The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 4:20pm
Pages: 1
Send Topic Print
instantiating modules in Verilog-A blocks (Read 6981 times)
Pavel
Senior Member
****
Offline



Posts: 174
Lausanne/Switzerland
instantiating modules in Verilog-A blocks
Aug 13th, 2008, 2:30am
 
Hello

How to instantiate modules from other libraries in Verilog-A/Verilog-AMS blocks. For example, when I try to instantiate resistor block from analogLib library
Code:
res #(.Resistance(10k) R1(a,b); 


compiler outputs error
line 20: Error: undeclared symbol res

Thanks in advance.

Regards.

Pavel.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: instantiating modules in Verilog-A blocks
Reply #1 - Aug 13th, 2008, 6:25am
 
You should be able to instantiate a resistor with
resistor #(.r(10k)) R1(a, b);

as specified in Annex E of the Verilog-AMS LRM on Spice compatibility.  However, I don't know how to instantiate cells from other libraries.

You might want to try generating a regular CDL netlist including analogLib cells and see how the netlister includes those blocks.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pavel
Senior Member
****
Offline



Posts: 174
Lausanne/Switzerland
Re: instantiating modules in Verilog-A blocks
Reply #2 - Aug 13th, 2008, 7:28am
 
Hello Geoffrey,

Thank you for response.
I tried your proposition.
CDL put in the top of netlist the description of block to be instantiated in form of subcircuit .SUBCKT.
For simple blocks it could be solution but for complex ones ...?

Thanks.

Regards.

Pavel.
Back to top
 
 
View Profile   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: instantiating modules in Verilog-A blocks
Reply #3 - Aug 13th, 2008, 3:16pm
 
the difference between res and resistor is that res is a device in analogLib, that AMS has been setup NOT to support, while resistor is the spectre primitive that res actually uses too..

This is STILL an issue for simulator portability, one that could be solved by defining a nice library of basic primitives written in Verilog-A
(that could be mapped to standard spice or spectre primitives for those simulators without requiring anyone to change their models. )
and that would run in other simulators like GnuCAP
(ok.. I've STILL not actually run a recent version of that.. just no time for the experimentation)


as you no doubt realize there is not a 1:1 correspondence between spectre primitives and analogLib.. I suspect mainly because analogLib has to support many simulators.

jbd
Back to top
 
 

jbdavid
Mixed Signal Design Verification
View Profile WWW   IP Logged
Pavel
Senior Member
****
Offline



Posts: 174
Lausanne/Switzerland
Re: instantiating modules in Verilog-A blocks
Reply #4 - Aug 13th, 2008, 11:50pm
 
Resistor case I presented only as example. Actually I would like to instantiate blocks from design kit libraries.
For example I wanted to create parametric Verilog-A cell that would contain a variable number of invertors (using generate statement). These invertors come from digital library of design kit. The purpose of such manipulation is to create a possibility to quickly change the number of invertors without recreating of a schematic.

But as I see in actual implementation it's impossible.

Thanks.

Regards.

Pavel.
Back to top
 
 
View Profile   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: instantiating modules in Verilog-A blocks
Reply #5 - Aug 27th, 2008, 3:10pm
 
So Analog lib is specifically designed not to support AMS using its views since most of them call spectre primitives that are already supported..
for YOUR own library, if you are working inside CADENCE (ie icfb) for the veriloga, the cell you are instantiating SHOULD already exist in a library and have a symbol view.
then when you are done editing the veriloga, there is some parsing done to establish the link between the library you reference and the instances you include (this is the info inside the pc.db file in the CDB format..)
--
if you are working in a pure netlist environment, you just need to make sure that the element you instantiate can be found in one of
-Spectre builtin primitive
-model files included in the simulation setup
-a module defined in one of the verilog files included in the simulation.
--
Hopefully not more than one.. (ie don't make a resistor model called "resistor" !!!)
HTH
jbd
Back to top
 
 

jbdavid
Mixed Signal Design Verification
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.