Hi,
Just wondering about the listing 21 (chap 3, pg. 73) of Ken's Designer's guide to Verilog-AMS... can't we have a model core like this for the ideal diode:
Code:if(V(a,c)<0)
I(a,c) <+ 0;
else
V(a,c) <+ 0;
This model takes care of the boundary where V(a,c)=0 and diode is on. One need not go with the rather strange condition like V(a,c)+I(a,c). I agree that V(a,c)+I(a,c) is required for crossing point detection, but is it a necessary if clause condition? I couldn't relate with it in the previous listing 20 for ideal mechanical stop either.
I doubt if I am going illegal in the above syntax, probably because of probing potential at a branch where I am assigning flow. But in listing 21, both potential and flow are probed (to my surprise). So, this should probably be legal.
No doubt I am a beginner, so am seeking guidance. Any comments?
* Dushyant Juneja Jan 7th, 2013, 11:53pm