The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 12:25am
Pages: 1
Send Topic Print
verilog code in verilogA (Read 2502 times)
manodipan
Community Member
***
Offline



Posts: 83

verilog code in verilogA
Oct 29th, 2008, 4:01am
 
Hi all,
I have a mixed signal circuit .Now do verilog A support code written using verilog (like @posedge(clk))..if not then which way i can write codes for both environments....
Manodipan
Back to top
 
 
View Profile   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: verilog code in verilogA
Reply #1 - Oct 29th, 2008, 10:00am
 
Verilog-A is the analog subset. It will work in a spectre(or spice) netlist..
or in a verilog netlist.

Verilog-AMS is the mixed signal language. Its a superset of Verilog-A and Verilog, with some extra for dealing with the interface.

you can use the verilog-A model in the verilog netlist..
but you cant use the verilog-ams model in the spectre netlist.
Back to top
 
 

jbdavid
Mixed Signal Design Verification
View Profile WWW   IP Logged
patrick
Junior Member
**
Offline



Posts: 30
Santa Rosa, CA.
Re: verilog code in verilogA
Reply #2 - Oct 29th, 2008, 10:38am
 
I think you need to use the predefined macro, __VAMS_ENABLE__. See page 239 of the VAMS 2.3 LRM at,

http://www.verilog.org/verilog-ams/htmlpages/public-docs/lrm/2.3/VAMS-LRM-2-3.pd...

Verilog-AMS HDL supports a predefined macro to allow modules to be written that work with both IEEE
std 1364-2005 Verilog HDL and Verilog-AMS HDL.The predefined macro is called __VAMS_ENABLE__.
This macro shall always be defined during the parsing of Verilog-AMS source text. Its purpose is to support
the creation of modules which are both legal Verilog and Verilog-AMS. The Verilog-AMS features of such
modules are made visible only when the __VAMS_ENABLE__ macro has previously been defined.
Example:
module not_gate(in, out);
input in;
output out;
reg out;
`ifdef __VAMS_ENABLE__
parameter integer del = 1 from [1:100];
`else
parameter del = 1;
`endif
always @ in
out = #del !in;
endmodule
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.