The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines. Jun 18th, 2018, 5:52pm
  HomeHelpSearchLoginRegisterPM to admin  
 
Pages: 1
Send Topic Print
VerilogA model for Current Monitoring (Read 101 times)
sanforyou
New Member
*
Offline



Posts: 2

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: 1666
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
New Member
*
Offline



Posts: 2

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
Trouble viewing this site? Copyright © 2002-2014 Designer's Guide Consulting. 'Designer's Guide' is a registered trademark of Designer's Guide LLC. All rights reserved.

Our colleges are not as safe as they seem. Sexual assault is pervasive and the treatment of the victim by the adminstration is often as damaging as the assault: Campus Survivors, Campus Survivors Forum.

Some of our other sites that you might find useful: Avendesora, Inform and QuantiPhy.