Simultaneous statements

(simultaneous statements, resistor model, capacitor model, tolerance group)
 

Simultaneous statements:
[label:] simple_expression == simple_expression;

Resistor model:
For example a constitutive equation of a resistor may be written as:
i == v/r;

where v is an across quantity representing voltage between the two terminals and r the value of the resistance

 
entity resistor is 
generic(r:real:=1.0E3);
port (terminal rin, rout:electrical);
end resistor; 
 
architecture simple of resistor is
begin
quantity v across i through rin to rout;
begin
  i == v/r; -- characteristic expression
end simple;
 
 
Capacitor model:
 
entity capacitor is
generic(r:real:=1.0E-9);
port (terminal capin, capout:electrical);
end capacitor; 
 
architecture simple of capacitor is
begin
quantity v across i through capin to capout;
begin
  i == c*v'dot; -- characteristic expression
end simple;
 

Tolerance group:
 
i == c*v'dot tolerance "tol_lowcurrent";