Indirect assignments are a way of defining an equation to be solved. Here we present two examples of indirect assignments, a perfect virtual earth and the solution of a first order differential equation.
In this topic:
Consider this example of an indirect branch assignment:
V(out) : V(in) == 0.0 ;
This can be expressed in words as "drive V(out) so that V(in) equals zero". This creates a virtual earth at vin.
Here is the complete Verilog-A module:
'include "disciplines.vams" module virtual_earth(in, out) ; electrical in, out; analog begin V(out) : V(in) == 0.0 ; end endmodule
Differential Equation |
'include "disciplines.vams" module differential_equation(in, out) ; electrical in, out; analog begin V(out) : ddt(V(out)) == (V(in) - V(out))/1m ; end endmodule
This solves the differential equation:
???MATH???\displaystyle \frac{d.vout}{dt} = \frac{(vin - vout)}{0.001}???MATH???
This is the equation that governs the following circuit:
You can try this with this schematic:
◄ RC Ladder - Loops, Vectored Nodes and genvars | Phase-locked Loop ▶ |