The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 24th, 2024, 2:15pm
Pages: 1
Send Topic Print
Accessing Global Variables in verilogA (Read 2236 times)
subtr
Community Member
***
Offline

Analog Enthusiast

Posts: 72
India
Accessing Global Variables in verilogA
Apr 14th, 2017, 3:32pm
 
I would like to know if it's possible to access the global variables in verilogA when I run a simulation. The uses are as follows :

1) variables can be used to change the internal parameters of the verilogA so that it can adapt to the settings without passing any voltage or current through a port which represents the change of variable. Sometimes the variable can be a delay, bit pattern or a frequency variable which could be difficult to pass to the verilogA file.

2) If the verilogA file is used for punching out data from a simulation into a file which is to be processed later on, the user has to run the simulations in series in case of corner simulations because the file gets over written. But if variables can be accessed in the verilogA, then it can be used as a string to modify the file name which enables user to run cross corner simulations in parallel. Smiley

I'm looking for a way to achieve the second option which would only be possible if verilogA file can access the variables.
Back to top
 
 

Regards
Subtr
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

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

Posts: 1742
Bracknell, UK
Re: Accessing Global Variables in verilogA
Reply #1 - Apr 16th, 2017, 12:09am
 
If this is Veriog-A (rather than AMS) and the simulator is spectre, the best thing to do is make the variable a parameter to your model and then pass the global (design) variable on the instance of the model.

If it is Verilog-AMS and the simulator is AMS Designer, you can reference variables as cds_globals.varName .

If it's another simulator, probably best if you state which simulator you're using...

Regards,

Andrew.
Back to top
 
 
View Profile WWW   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.