The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 29th, 2024, 5:39am
Pages: 1
Send Topic Print
VerilogA model for Current Monitoring (Read 2596 times)
sanforyou
Junior Member
**
Offline



Posts: 17

VerilogA model for Current Monitoring
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.
Back to top
 
« Last Edit: May 29th, 2018, 2:46pm by sanforyou »  
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: VerilogA model for Current Monitoring
Reply #1 - May 29th, 2018, 11:38pm
 
This was answered in this thread: https://community.cadence.com/cadence_technology_forums/f/custom-ic-design/38857...

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.
Back to top
 
 
View Profile WWW   IP Logged
sanforyou
Junior Member
**
Offline



Posts: 17

Re: VerilogA model for Current Monitoring
Reply #2 - May 30th, 2018, 9:31am
 
Thanks Andrew.
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.