gmork_0
New Member
Offline
Posts: 3
Prague
|
Hi,
In Spectre, there is an ideal transformer component (called transformer). This one is "truly" bidirectional - one can force the current or voltage (connect ideal current or voltage source) to either primary or secondary winding.
i just wondered, if such a component can be written in Verilog-A as well.My best try was:
module idealTransformer(pLeft, nLeft, pRight, nRight); parameter real ratio = 2 from (0:inf);
inout pLeft, nLeft, pRight, nRight; electrical pLeft, nLeft, pRight, nRight;
analog begin V(pRight,nRight) <+ ratio*V(pLeft, nLeft); I(pLeft,nLeft) <+ -ratio*I(pRight, nRight); end endmodule
,what works fine for real loading of ports. However, one cannot e.g. connect the ideal voltage source to the pRight, nRight ports.
Thanks for comments,
Miro
|