The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 10:34am
Pages: 1
Send Topic Print
external supply pins (Read 2868 times)
ScottO
New Member
*
Offline



Posts: 2
Midwest
external supply pins
Apr 19th, 2008, 8:06am
 
Hello. I'm new to VerilogA/behavioral modeling.

Wondering how system level external power supplies and ground pins are typically handled in an analog model.

For instance, say I don't reference a given supply in the model's code, but I want my symbol to have a pin for the supply so it matches the transistor level symbol. Is there a best way to handle such a pin in the model.

Currently I'm trying to model a regulator. I've included external supply and  ground pins. The simulator indicates a voltage loop because, I assume, my model is making an implied short. What are the typical ways of handling this sort of thing, and accessing external supplies in your code?

Thank you,
Scott
Back to top
 
 
View Profile   IP Logged
Stefan
Senior Member
****
Offline



Posts: 124

Re: external supply pins
Reply #1 - Apr 19th, 2008, 10:28am
 
Hi Scott,

I don't get your point.
If you simply specify two input/output pin in your sourcecode to act as power supplie input(!), then you shouldn't get any messages like voltage loops.

Your sourcecode of the model should look like this:
module NAME(vddpin,gndpin)
inout vddpin,gndpin;
electrical vddpin,gndpin;
analog begin
if V(vddpin,gndpin) > necessarysupplyvoltage
begin
 // functionality here
end
// this is for virtual power consumption
I(vddpin,gndpin) <+ V(vddpin,gndpin)/ R_something;
end
endmodule

Regards,

Stefan
Back to top
 
 
View Profile 16731287   IP Logged
ScottO
New Member
*
Offline



Posts: 2
Midwest
Re: external supply pins
Reply #2 - Apr 24th, 2008, 6:05am
 
Stefan,

Thanks for the reply.

It turned out something in one of my files was corrupted which caused the strange errors. My code was similar to your example, yet didn't work. Being new to this, I thought I my code was incorrect.

Deleting my files, and typing a new model (same code) from scratch fixed things.  :P

Scott
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.