The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Modeling >> Behavioral Models >> VerilogA model for Current Monitoring
https://designers-guide.org/forum/YaBB.pl?num=1527615784

Message started by sanforyou on May 29th, 2018, 10:43am

Title: VerilogA model for Current Monitoring
Post by sanforyou on May 29th, 2018, 10:43am

Hi,
I want to write a VerilogA model which monitors input current and prints a message if it is above certain level. I also want output to be same as input current.

I wrote a model and it works but throws out below error when I add a line for output current to be equal to input. Any suggestions what I'm doing wrong here?


Code:
`include "constants.vams"
`include "disciplines.vams"

module CurrentMonitor_VlogA(Iin,Iout);

input Iin;
output Iout;
electrical Iin,Iout;

real Ivalue;
parameter real IT2Limit=1m;

analog begin

     Ivalue=I(Iin);
     I(Iout)<+ -I(Iin);

     if (Ivalue>=IT2Limit)
           $strobe("WARNING:Value of current at node Iin has exceeded %g at %m, Iin=%g at simulation time t=%e",IT2Limit,Ivalue,$abstime);
     else
           $strobe("Current at node Iin=%g, simulation time=%e",Ivalue,$abstime);
end

endmodule


Here is the error message:

   ERROR (SPECTRE-16384): Signal V(Iout) = -732.434 GV exceeds the blowup limit for the quantity `V' which is (1 GV). It is likely that the circuit is unstable. If you really want signals this large, set the `blowup' parameter of this quantity to a larger value.

Title: Re: VerilogA model for Current Monitoring
Post by Andrew Beckett on May 29th, 2018, 11:38pm

This was answered in this thread: https://community.cadence.com/cadence_technology_forums/f/custom-ic-design/38857/veriloga-code-error-signal-exceeds-blowup-limit

The output of the current-controlled source was left open circuit, and then I proposed implementing it as a zero-volt source instead of a current controlled source.

Andrew.

Title: Re: VerilogA model for Current Monitoring
Post by sanforyou on May 30th, 2018, 9:31am

Thanks Andrew.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.