The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Modeling >> Behavioral Models >> external supply pins
https://designers-guide.org/forum/YaBB.pl?num=1208617562

Message started by ScottO on Apr 19th, 2008, 8:06am

Title: external supply pins
Post by ScottO on 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

Title: Re: external supply pins
Post by Stefan on 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

Title: Re: external supply pins
Post by ScottO on 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

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