MSDV User Guide
MSDV User Guide
User Guide
Version J-2014.09, September 2014
Copyright and Proprietary Information Notice
© 2014 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and proprietary information that is
the property of Synopsys, Inc. The software and documentation are furnished under a license agreement and may be used or
copied only in accordance with the terms of the license agreement. No part of the software and documentation may be reproduced,
transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without prior written
permission of Synopsys, Inc., or as expressly provided by the license agreement.
Destination Control Statement
All technical data contained in this publication is subject to the export control laws of the United States of America.
Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader’s responsibility to
determine the applicable regulations and to comply with them.
Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH
REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Trademarks
Synopsys and certain Synopsys product names are trademarks of Synopsys, as set forth at
http://www.synopsys.com/Company/Pages/Trademarks.aspx.
All other product or company names may be trademarks of their respective owners.
Synopsys, Inc.
700 E. Middlefield Road
Mountain View, CA 94043
www.synopsys.com
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
iii
Contents
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Meta-Encrypted SPICE Netlists in Mixed-Signal Design . . . . . . . . . . . . . . . . . 23
iv
Contents
snps_above ( ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
snps_cross ( ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Interface A/D and D/A Signal Conversions . . . . . . . . . . . . . . . . . . . . . . . 44
Cases Where A/D and D/A Converters are Not Inserted . . . . . . . . . 46
Signal Conversion from Verilog-to-SPICE and SPICE-to-Verilog. . . . . . . 49
Converting Signal Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Dynamic Supply in Mixed-Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Converting Signal Strength . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Creating a Resistance Map File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Postlayout Simulation Through Back-annotation . . . . . . . . . . . . . . . . . . . . . . . 58
Using the SDF File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Known Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Known Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
v
Contents
vi
Contents
Invoking the Interactive Mode with the UCLI Debugging Feature with Verilog-SPICE
127
The ucli% ace Analog Interactive Commands . . . . . . . . . . . . . . . . . . . . . 128
DC Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Recompiling the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
vii
Contents
viii
Contents
13. Using Multiple Views, Donut Partitioning and Connect Modules with Verilog-
AMS-SPICE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Selecting Multiple Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Understanding Hierarchical Layering of SPICE and Verilog-AMS in a Design 190
Unsupported Features in Verilog-AMS-SPICE . . . . . . . . . . . . . . . . . . . . . . . . 191
Resolving Keyword Conflicts between SystemVerilog and Verilog-AMS . . . . . 192
Converting Signals with Interface A/D and D/A Connect Modules . . . . . . . . . 192
Identifying the Correct Connect Module. . . . . . . . . . . . . . . . . . . . . . . . . . 193
Understanding Connect Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
ix
Contents
x
Contents
keep_iface_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
map_subckt_name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
map_unfound_port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
report_logic_delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
report_port_resistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
set_args . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
set_intr_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
set_fall_step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
set_port_prop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
set_port_prop_warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
set_print_progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
set_rise_step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
set_slope_step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
set_verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
set_verilog_supply1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
set_verilog_supply0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
verilog_file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Automatic Voltage Level Detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Voltage Setting Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Rule 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Rule 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Rule 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Mixed-Signal Simulation Interactive Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
List Interface Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
csli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Print Global Interface History in Time . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
csh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Print Interface Node History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
csnh, csinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Set the Number of Entries Printed By csnh and csinh . . . . . . . . . . . . . . . 264
csnph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Set Watchpoint to Interface Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
csnw, csinw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Delete Watchpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
csdnw, csdinw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Verilog System Tasks for Mixed-Signal Simulation . . . . . . . . . . . . . . . . . . . . . 266
Mixed-Signal Simulation Setup Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Map Correct Port Voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Define Clear Port Direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
xi
Contents
xii
Contents
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
xiii
Contents
xiv
About This Manual
The Mixed-Signal Simulation User Guide describes how to set up and use
mixed-signal simulations using one of the following setups:
■
CustomSim™, FineSim™, HSIM® or NanoSim®-VCS
■ CustomSim, FineSim, HSIM, or NanoSim-VCS-MX
■
CustomSim- or NanoSim-VCS-AMS
Audience
This user guide is meant for designers who use the Mixed-Signal Verification
(MSV).
Knowledge of UNIX, the analog tool used in mixed-signal (the CustomSim,
FineSim, HSIM or NanoSim tools), VCS/VCS-MX, and a waveform viewer is
assumed.
Related Publications
For additional information about these interfaces, see
■
The CustomSim/FineSim/HSIM/ NanoSim Release Notes, available on
SolvNet (see Accessing SolvNet on page xvii)
■
Documentation on the Web, which provides HTML and PDF documents and
is available through SolvNet at http://solvnet.synopsys.com
You should also refer to the documentation for the following related Synopsys
products:
■
CustomSim or FineSim or HSIM or NanoSim tools
■
VCS
■ VCS-MX
Conventions
The following conventions are used in Synopsys documentation.
Convention Description
Edit > Copy Indicates a path to a menu command, such as opening the
Edit menu and choosing Copy.
Customer Support
Customer support is available through SolvNet online customer support and
through contacting the Synopsys Technical Support Center.
Accessing SolvNet
SolvNet includes an electronic knowledge base of technical articles and
answers to frequently asked questions about Synopsys tools. SolvNet also
provides access to a wide range of Synopsys online services, which include
downloading software, viewing Documentation on the Web, and entering a call
to the Support Center.
To access SolvNet:
1. Go to the SolvNet Web page at http://solvnet.synopsys.com.
2. If prompted, enter your user name and password. (If you do not have a
Synopsys user name and password, follow the instructions to register with
SolvNet.)
If you need help using SolvNet, click SolvNet Help in the Support Resources
section.
This chapter provides an overview of the simulation flows as well as the basic
steps for simulating a mixed-signal design.
Overview
A mixed-signal simulation enables simulating a design partly modeled in analog
and partly modeled in digital.
Mixed-signal simulation is possible through different solutions, depending on
which of the analog simulators available you use.
The solutions are:
■
CustomSim-VCS/VCS-MX
■ FineSim-VCS/VCS-MX
■
HSIM-VCS/VCS-MX
■
NanoSim-VCS/VCS-MX
Each of the above solutions supports some or all of the following flows:
■
Verilog-SPICE
■
VHDL/Verilog-SPICE
■
Verilog-AMS-SPICE
Table 1 on page 2 maps the solutions to the flows.
CustomSim-VCS/VCS- X X X
MX
FineSim-VCS/VCS-MX X X
HSIM-VCS/VCS-MX X X
NanoSim-VCS/VCS-MX X X X
Donut Configuration
One of the factors that affects the setup of a mixed-signal simulation is the
netlist formats used in different layers of the design hierarchy. For example, if
the top level of a design is in SPICE format, the design is called SPICE-top. A
design could also be Verilog-top, VHDL-top or Verilog-AMS-top.
Also, a design in which Verilog is on top of SPICE in the hierarchy is called a
Verilog-SPICE donut configuration. There are many possible donut
configurations for each of the three flows. There are also restrictions on certain
types of donut configurations that are described in detail in following sections.
Figure 1 shows a simple design and its hierarchy. The top_blk (top block)
instantiates two child blocks blk-1 and blk-2. Child block blk-2, in turn,
has child block blk-2-1.
Cells blk-1 and blk-2-1 are referred to as leaf cells, because they are
located at the bottom of a hierarchy branch.
Figure 2 shows a Verilog-SPICE-Verilog donut configuration.
Any one block in the hierarchy can have definitions in more than one format.
For example, blk-2 in Figure 3 can have both SPICE and Verilog definitions—
such a cell is called a multi-view cell.
The tool automatically selects a view for each multi-view cell. By default, the
view that matches the parent block is selected (if available). For example, if
blk-2 (in Figure 3) is a multi-view cell with both SPICE and Verilog views, by
default the analog engine selects the SPICE view because it is the view for its
parent block top_blk.
The default behavior can be changed by using a command that explicitly
instructs the tool to select a particular view for a given cell. The view selection
commands are described in detail in Chapter 4, Mixed-Signal Simulation in the
Verilog-SPICE Flow.
call to the analog engine (CustomSim, FineSim, HSIM, or NanoSim tools) and
optional mixed-signal commands. Here is a sample mixed-signal setup file for
the NanoSim-VCS flow.
use_spice -cell blk-1;
use_spice –cell blk-2;
choose nanosim -n blk-1.spi blk-2.spi -C ns.cfg ;
bus_format _%d;
In the previous command line, VCS is called and the Verilog files top_blk.v
and blk-2-1.v are passed to it. Also passed to VCS is the mixed-signal
simulation setup file control.init. This command generates an executable
file called simv and a log file called comp.log.
To start the simulation, run the executable file.
Note: The -ad option is supported in VCS 2009.06 and later releases,
and replaces the old +ad option. Although the +ad option is still
supported, it will be phased out in a future release.
hierarchy.rpt
This file lists the hierarchical paths to all cells in the design along with their cell
names. Each hierarchical instance name is followed by the cell name of the
instance encapsulated in parentheses, "( )", if the cell is in Verilog/VHDL or
angle brackets, "< >", if it is in SPICE or Verilog-A (which is read in through
SPICE `hdl) , or "{ }" if the cell is deemed by the tool to be Verilog-AMS. An
example of the file content is shown below:
top(top).dut<addr4>.x4<addr>.x9<nor2>
top(top).dut<addr4>.x1<addr>.x2<xor2>.x2<inv>
top(top).dut<addr4>.x1<addr>.x2<xor2>.x3<inv>
top(top).dut<addr4>.x1<addr>.x2<xor2>.x4<xfer>
interface_element.rpt
This file is only generated in Verilog-SPICE and VHDL/Verilog-SPICE flows. It
contains all information related to interface nets in the design in the following
format:
■
A header explaining the meanings of acronyms used in the file (a2d, e2r
etc.)
■
Total number of all resistors added to the netlist because of interface
elements
■
A list of resistance map files used
■
A list of all interface nodes
The following comment lines appear at the top of the report file. They explain
the meaning of the acronyms used in describing the type of interface nets:
# a2d: Analog to Digital interface node
# d2a: Digital to Analog interface node
# inout: bidirectional interface node
# e2r: Real interface node with an Analog to Digital direction
# r2e: Real interface node with a Digital to Analog direction
The header is followed a list of resistance map files used in the design. If no
explicit resistance map file is used, only the default resistance map will be
listed:
rmap_file 1 = tool_install_dir/resistance.map
otherwise all resistance map files that apply to interface nets will be listed as
shown below:
rmap_file 1 = ./global_res.map
rmap_file 2 = ./cust_res_a.map
rmap_file 3 = ./cust_res_b.map
rmap_file 4 = ./cust_res_lv.map
rmap_file 5 = ./cust_res_hv.map
The next section in the report file is the list of interface nodes, which looks like
the following:
…
a2d loth=0.2v hith=1.7v node= snps_sptop.xpll.lock;
d2a hiv=3.3 lov=0.0 node= snps_sptop.xpll.xpfd.xlock.lock;
inout hiv=3.3 lov=0.0 loth=0.3v hith=2.7v node= top.i1.clk;
e2r node=top.i2.ctl;
r2e node=top.i3.data;
…
The “loth” and “hith” values for “a2d” and “inout” nodes are reported as
absolute values and not as ratios (percentages). It is important to note that for
“a2d” and “d2a” nodes, the reports are generated with correct syntax for “a2d”
and “d2a” commands. Consequently, to change the default settings, these lines
can be copied and pasted into mixed-signal control file (vcsAD.init) and the only
changes needed will be the ones to the high and low levels/thresholds.
The equivalent report in the Verilog-AMS-SPICE flow is the Connect Module
report which can be generated with the VCS option -ad_iereport
-ams_iereport.
mview.rpt
This file lists all cells in the design that have more than one view (for example,
SPICE, Verilog, Verilog-A).
Here is an example of the file content:
; Lists of modules: Verilog Spice Verilog-A Adfmi
pll pll * *
* inv inv *
In this example, multi-view cell “pll” has Verilog and SPICE views, while cell
“inv” has SPICE and Verilog-A views.
names_map.rpt
This file is only generated in the Verilog-SPICE and VHDL/Verilog-SPICE flows.
Each line in this file corresponds to an interface element and contains two
entries in the following format:
interface_low_conn : interface_hi_conn
where low_conn and hi_conn refer to the two ends of a mixed-net.
■
low_conn refers to the net name in the child cell that connects to the
interface.
■
hi_conn refers to the net name in the parent cell that connects to the
interface.
If Verilog/VHDL instantiates SPICE, the hi_conn node will be in Verilog/VHDL
net and the low_conn will be a SPICE one.
If SPICE instantiates Verilog/VHDL, the hi_conn will be a SPICE net and
low_conn will be a Verilog/VHDL one.
In the following example, signal top.ctl is the hi_conn for the given
interface net and top.i1.x4.ctl_sig is the low_conn net.
top.i1.x4.ctl_sig:top.ctl:
port.rpt
This file contains information about how ports are mapped when one SPICE or
HDL view is replaced by the other. If multiple views are present, the port order,
names, or direction are often not consistent between them. The mixed-signal
interface tries to reconcile the differences according to the rules and
commands described elsewhere in this manual.
The results in the port.rpt file contain syntactically correct commands that
can be cut, edited, and pasted back into the mixed-signal control file.
Note: The port.rpt file does not display connectivity from the high to
low (from parent to child). It displays the mapping between child
views
The port.rpt file is useful when ports were mapped by the tool successfully
and you want to compare the results to the intended mapping, or when some
ports were not mapped successfully and you want to find out why.
The report contains:
■
A header that provides a reminder of the syntax used within the report.
■
Reports on cells with multiple views, organized by cell name.
■
Reports on cells with single view. Contains port direction only.
Entries are grouped by cell name.
The following example shows Cell names, modules and sub-circuit references
for cells with multiple views, including:
■
Each cell name.
■
Where to find the cell definitions within the overall design.
■
The port list for the Verilog and SPICE views.
■
The total port count for both views.
For example:
Each port_map entry contains the entire set of resolved and unresolved ports
for each multiview cell:
■
Ports specifically mapped by port_map command.
■
Ports unable to resolve.
■
Ports mapped by default as snps_by_name.
Busses are reported, where possible, in the busname[m:n] format. They are
resolved and printed, as much as possible, as a unit. A mismatch in one bus
should not generally affect the reporting of another.
Ports unable to resolve should be presented with double question marks - ??.
They are collapsed where possible, but if you define the port map, it is
expressly shown. For example:
use_spice -cell addr4 port_map(
a[3:0]=>a[4:0]??, //bus width mismatch
*=>snps_by_name);
When extra SPICE ports are detected, they are shown mapped to ??. For
example:
use_spice -cell addr4d port_map(
<??=>vdd1, <??=>vss1,
*=>snps_by_name);
After the port mapping information, the resolved port directions of cells with a
SPICE view are reported in the format of the port_dir command. For
example:
port_dir -cell addr4b(
input a, b, cin;
output s, cout
) //derived from verilog
runtime_interface_element.rpt
In an HDL testbench and ucli run scripts, the hdl_xmrs, hdl_xmr_force and
ucli force commands are required on an analog target. When a cell view is
switched from a digital HDL view to an analog view, the same hdl_xmr,
hdl_xmr_force or ucli force commands must be applicable for the analog
target.
Correct digital-to-analog conversion must take place for a digital 0,1,X,Z force
on a digital target that has now changed to an analog target. An automatic vdd
detection mechanism, similar to that used for traditional interface element
thresholds and voltage swings, must be used to automatically select voltage
thresholds and voltage swings for analog-to-digital conversions and digital-to-
analog conversions required for the hdl_xmr, hdl_xmr_force or ucli force
commands.
You can manually change the voltage thresholds and swings with:
■
The rt_a2d Command
■
The rt_d2a Command
■
The rt_e2r Command
■
The rt_r2e Command
The runtime_interfact_element.rpt file is generated and dynamically
updated for any hdl_xmr, hdl_xmr_force/release or ucli force/
release command on an analog target. The automatically generated voltage
swings, thresholds, and options are recorded in the report file. You can use the
rf* commands and options generated in
runtime_interfact_element.rpt (cut and paste) in the mixed-signal
control file (vcsAD.init) to change or modify any generated voltage swings
or thresholds or options. When you use an hdl_xmr, hdl_xmr_force/
release or ucli force/release command on an analog target, a runtime
message is output on screen with information about the options that have been
used for any analog-to-digital or digital-to-analog conversion, electrical-to-real,
or real-to-electrical conversion.
through_net.rpt
This file is only generated in Verilog-SPICE and VHDL/Verilog-SPICE flows. It
contains the list of all thrunets in the design and gets generated only if there is
at least one a2a or d2d net in the design. If both a2a and d2d thrunets exist in
the design, the a2a nets will be listed first, followed by d2d nets, as shown in
the example below:
snps_sptop.lock a2a
snps_sptop.reset a2a
snps_sptop.f6g_b d2d
snps_sptop.xpll.lfin d2d …
use_cell_view.rpt
This file lists all the cells that match each of the use_spice, use_verilog
and use_vhdl commands. The list is broken into sections, and each section
corresponds to each use statement. Each section contains a full hierarchical
path to the matching element. Here is an example of the file content:
#==============================================================
# Command used on line 3 of mixed-signal control file vcsAD_1.init
# followed by instances partitioned by that command
#==============================================================
use_verilog -module addr4;
#x_dut.x_sp
In this example, there is one use_verilog command and the design has one
instance that matches this use_verilog command.
continue the run from that point on. The testbench, however, has to be
designed in such a way that you can select different tests after restore, for
example by forcing the content of an RTL variable that selects between tests to
a different value after each restore.
You can use these commands to capture and save the memory image of the
simulation executable at a given point and quit the simulation. The following
example shows how the mixed-signal simulation can start in the UCLI
interactive mode using the -ucli command line option and then the steady
state image of the simulation can be saved:
% simv -ucli
ucli% run 100
ucli% save sim_state
ucli% quit
You can restore the saved state of the simulation at a later time and the
simulation can resume. The following example shows how the simulation can
start in the interactive mode, the saved state of the simulation be restored, and
run from the saved time point on:
% simv -ucli
ucli% restore sim_state
ucli% run
long time to simulate. By using the save and restore feature, a simulation can
be run past the initialization phase, then the save command can be used to
save the state of the simulation. Then the subsequent simulations can
restore that state and continue the simulation from that point on. That way
they skip the time needed to simulate the initialization phase.
In order for the testbench to execute different tests after the restore operation,
the testbench has to be written in a way that allows different tests to be run and
each test can be selected by, for example, the numerical value of a variable.
You can force that test selector variable to different values after the restore
operation and before resuming the simulation.
Here is an example for a Verilog testbench that allows multiple tests to be run.
In this example the value of a variable called tst is used to select different
tests:
module testbench;
int tst;
…
case (tst)
0: test0( ); // Run Test No 0
1: test1( ); // Run Test No 1
2: test2( ); // Run Test No 2
3: test3( ); // Run Test No 3
4: test4( ); // Run Test No 4
5: test5( ); // Run Test No 5
default: tst0 ( );
endcase
…
end
You can use such a test selecting mechanism in save and restore to run a
different test after each restore. The following example shows how that can be
done.
In this example the simv -ucli command takes the simulation into the UCLI
interactive mode. The simulation is run for 10 digital timepoints and then the
simulation image is saved in file sim_st. Then the saved image is restored in
two separate simulations. Each one of those two restores the image, but one
forces the variable testbench.tst to 3 in order to select test number 3 and
the other forces that variable to 4 so that the test number 4 is executed.
As a result each simulation runs a different test as identified by the green and
yellow graphs in Figure 4.
Options Description
-ad setup file Specifies a new mixed-signal control file. Only the
hiz attributes of The e2r command and The r2e
command can be overwritten. All other commands
in the new mixed-signal control file are ignored.
-o output file The restored waveform file and log file are prefixed
name with the specified output file name.
Limitations
■
You cannot change the Verilog or VHDL models or their content between
save and restore. Generally speaking, you cannot change anything that
would imply re-compiling or re-elaborating (re-running any of the following
commands: vlogan, vhdlan, or vcs).
■
Changes to the original CustomSim configuration file are not honored. The
only way to change the CustomSim configuration is by providing a new
configuration file through the -c <new_xa_cfg_file> option of the
reread command.
■
It is possible to specify a new mixed-signal control file with ace reread -
ad <new setup file>, but only the hiz attribute of The e2r command
and The r2e command can be changed. All other commands in the new
setup file are ignored.
■
Merged vpd does not work with the reread command.
Examples
files are still valid. The new configuration file is appended to the original file. For
example:
After reread, there are two waveform files in your SPICE output directory. The
previous example specified wdf format in the original configuration file, so you
see:
■
A xa.wdf file that contains the waveforms until the execution of reread.
■
A xa.1e-6.wdf file that contains the waveforms after reread.
If you are using vpd format for the analog output, the vpd file is appended so
that the waveforms pre- and post reread are dumped in a single vpd file.
After executing reread there are two waveform files in your SPICE output
directory. The previous example specified wdf format in the original config file,
so you see:
■
A xa.wdf file that contains the waveforms until the execution of reread,
where the temperature is 27 degrees and VDD is 1.2V.
■
A xa.1e-6.wdf file that contains the waveforms after the execution of
reread, where vdd is set to 3.0V and temperature is 125C.
If you are using vpd format for the analog output, the vpd file is appended so
that the waveforms pre- and post reread are dumped in a single vpd file.
unix> vi netlist.spi
[ change .TEMP 27 to .TEMP 125]
ucli% reread
[enforce XA config changes by running the "reread" command]
ucli% run
Overview
The following topics are described in this section:
■ Running a Mixed-Signal Simulation in Verilog-AMS-SPICE
• Compile Options Specific to Verilog-AMS-SPICE
■
Required Input Files
■ Verilog Netlist Files
■
Mixed-Signal Simulation Setup File
• Files Containing Connect Rule and Connect Module Definitions
■ Compiling and Running the Design
flows are:
■
Compile options specific to Verilog-AMS-SPICE
■
Required input files
■
Compiling and running the design
-ams
-ams
To enable the Verilog-AMS-SPICE feature, include the -ams switch in the
compile script:
vcs -ad -ams …
-ams_discipline logic
The -ams_discipline logic option tells the simulator that all nets without
an explicit discipline definition must assume discipline type logic. This
compile option is used when importing legacy Verilog-D code in which no
disciplines are defined for module ports.
By using this option, discipline logic is assigned to all such ports avoiding a
compile-time error.
While logic is the digital discipline commonly used, any other discipline
name can be used in Verilog-AMS as the default discrete discipline. Especially
if Verilog-AMS is used along with System-Verilog, a name different from logic
must be used for default discrete discipline because logic is a reserved
System-Verilog type. The following example shows how to identify a discrete
discipline called logical as the default discrete discipline.
-ams_discipline logical
-ams_iereport
The -ams_iereport compile option prints—both on the screen and the
compile log file—a list of all the instances of connects modules in the design
with the following information:
■
instance name under which the connect module was inserted
■
instance name of the connect module
■
module name of the connect module
■
discipline resolution mode used (i.e., merged or split)
■
net and port that connect to each end of the connect module
In this example, it is assumed that the files are in the local directory. If not, a full
path to the location of these files is required (just as in any other Verilog file).
Note: simv is the default name for the binary executable generated
after compilation that can be overwritten using the -o
This chapter provides a detailed description of the features supported in all flows
of mixed-signal simulation.
Overview
In a mixed-signal simulation of a design some parts of the design are modeled
in SPICE and other parts in HDL (Verilog, VHDL, or Verilog-AMS, depending
on the mixed-signal flow).
The content in this chapter assumes you have a basic familiarity with both VCS
and the analog simulator involved in mixed-signal simulation. Refer to the
respective manuals for each product for more information.
This chapter describes the following topics:
■
Mixed-Signal Feature Highlights
■
Known Limitations
■
Automatic Verilog Dummy Module Generation
■
Verilog-A Model Instantiation
• Parameter Passing Rule
■
XMR (Cross Module Referencing) Across Analog-Digital Boundary
■
Interface A/D and D/A Signal Conversions
• Cases Where A/D and D/A Converters are Not Inserted
■
Signal Conversion from Verilog-to-SPICE and SPICE-to-Verilog
• Converting Signal Values
• Converting Signal Strength
• Creating a Resistance Map File
■
Postlayout Simulation Through Back-annotation
• Using the SDF File
Multiple Views
Each block in the design can have definitions in more than one view. For
example, a block can have both SPICE and Verilog definitions.
By default, Verilog-SPICE selects the view of the multi-view cell that is identical
to the parent block view. A particular view of a multi-view cell can also be
selected explicitly by using "use_spice" or "use_verilog" mixed-signal
commands.
port direction, net name, and instance module definitions (if available). These
dummy Verilog modules are generated during the compile time, and are kept in
the simv.daidir directory (for more information about the compile and
simv.daidir directory, please refer to Chapter 5, Running a Mixed-Signal
Simulation in the Verilog-SPICE Flow.
■
In Verilog-SPICE and VHDL/Verilog-SPICE flows, parameter passing
between HDL and SPICE is not enabled by default. To enable parameter
passing, the mixed-signal command "param_pass enable;" must be
used (see the mixed-signal command section of this manual).
■
Parameter passing between SPICE and Verilog-A is always enabled in all
solutions if Verilog-A is read in via the SPICE .hdl command. For example:
■
.hdl "inv_verilog_a.va"
x1 in out inv_verilog_a vhigh=3.3 vlow=0 td=10
■
In NanoSim-VCS and NanoSim-VCS-MX, parameter passing between HVA
(Hierarchical Verilog-A) blocks is disabled by default. To enable parameter
passing, the following environment variable must be set:
setenv HVA_ON 1
■
In the Verilog-AMS-SPICE flow parameter passing between Verilog and
SPICE and parameter passing between HVA blocks are enabled by default.
change the default settings for the a2d or d2a converters inserted for logic
XMR.
The following example shows a logic XMR read on an analog node with the
hierarchical path "top.i1.i2.x1.clk" into a Verilog wire. It assigns the
logic value corresponding to the voltage of an analog node.
assign verilog_wire = top.i1.i2.x1.clk;
The following example shows a logic XMR read on an analog node with the
hierarchical path "top.i1.i2.x1.strb" into a Verilog register. It assigns the
logic value corresponding to the voltage of an analog node.
initial begin
...
verilog_reg = top.i1.i2.x1.strb;
...
end
The following example shows how a logic XMR write can be done on an analog
node. The d2a converters inserted by mixed-signal simulation translates the
logic values to voltage values and apply them to the analog node.
reg rst_reg;
assign top.i1.i2.x1.rst = rst_reg;
initial begin
...
rst_reg = 1'b0;
#5 rst_reg = 1'b1;
...
end
Because SPICE does not have an inherent notion of "bus", if the target of a
logic XMR is a SPICE bus, the members of the SPICE bus must be
encapsulated in a braces, { }, when they are referenced in a logic XMR. The
following example shows a SPICE subcircuit with bus ports and how those
SPICE bus members must be used in a logic XMR. Here, the subcircuit
spice_blk has bus ports a_2, a_1, and a_0:
.subckt spice_blk a_2 a_1 a_0
This is how these SPICE bus ports can be used in an assign statement that
uses logic XMR:
wire [2:0] verilog_wire;assign verilog_wire = { top.i1.x1.a_2 ,
top.i1.x1.a_1 , top.i1.x1.a_0 };
■
Event generator snps_cross (expression, dir)
$snps_force_volt()
This system task allows Verilog to force a voltage on any analog node, even
one connected to an ideal voltage source. In such a case this system task
overrides the ideal voltage source.
Syntax
$snps_force_volt(analog_node_name, verilog_real_value |
verilog_real_variable);
Argument Description
Argument Description
Examples
$snps_force_volt (top.i1.spcell.n1, 3.3);
or
The voltage of the analog node will stay at the given real value until the next
$snps_force_volt or $snps_release_volt system task calls.
$snps_release_volt()
This system task removes the voltage source applied by a previous
$snps_force_volt task, and from that point on, allows the analog node to
assume voltages determined by the analog circuit. If the node has not been
forced with $snps_force_volt or is already released, this system task will
have no effect.
Syntax
$snps_release_volt (analog_node);
Argument Description
Examples
$snps_release_volt (top.i1.spcell.n1);
$snps_get_volt()
This is a Verilog function that allows sampling of voltage values for internal
analog nodes.
This function can be used to assign a value to a Verilog real variable or it could
be used as a real value in an expression.
Syntax
$snps_get_volt (analog_node_name)
Argument Description
Examples
real_var = $snps_get_volt(top.i1.spcell.n2);
$snps_get_port_current()
This is a Verilog function that allows sampling of current through analog
subcircuit ports or SPICE primitive pins.
You can use this function to assign a value to a Verilog real variable or as a real
value in an expression.
Syntax
$snps_get_port_current (analog_port_name |
spice_primitive_pin)
Argument Description
Examples
real_var = $snps_get_port_current(top.i1.amp.out);
res_curr = $snps_get_port_current(top.i1.x1.r2.p);
$ current through the
$ "p" pin of a resistor
mos_curr = $snps_get_port_current(top.i3.x1.m5.d);
$ current through the
$drain of a MOS transistor
if($snps_get_port_current(top.i1.i2.bias > 1e-3)
…
else
…
end
snps_above ( )
Generates a digital event that allows Verilog to sense when a given analog
voltage has gone above or below a certain threshold. This event can be used in
the sensitivity list of a Verilog always block, which would then allow a piece of
Verilog code to be executed depending on the voltage transitions on the given
analog node.
Syntax
snps_above ( expression )
In the following example snps_above is used in conjunction with
$snps_get_volt() in a Verilog always block to sense when the voltage of
analog node top.dut.x4.rst rises above 1.85V.
Examples
always @ (snps_above($snps_get_volt(top.dut.x4.rst) - 1.85))
begin
...
end
snps_cross ( )
Generates a digital event that allows Verilog to sense when a given analog
voltage has gone above or below a certain threshold. This event can be used in
the sensitivity list of a Verilog always block, which would then allow a piece of
Verilog code to be executed depending on the voltage transitions on the given
analog node.
Syntax
snps_cross ( expression, dir )
Argument Description
Case #1
When two SPICE ports are connected to each other via a Verilog wire in the
parent Verilog cell
Case #2
When two Verilog ports are connected to each other via a SPICE net in the
parent SPICE cell
In these two cases, the analog engine detects that the origin and destination of
the mixed nets are from the same domain (SPICE or Verilog); as a result, No A/
D or D/A converters are inserted on their paths.
Figure 5 on page 47 graphically demonstrates Case #1. Two SPICE blocks,
blk-1 and blk-2, are instantiated under a Verilog parent, and a port of blk-
1 is connected to a port of blk-2 via a Verilog wire.
Because both the source and destination of that wire are analog, that wire is
treated as an analog net and no A/D or D/A converters are inserted on this path
from blk-1 to blk-2.
As a result, this mixed net is optimized as an analog net, despite its definition
as a Verilog wire, and by default is captured only in the analog output file. (You
can have a digital image of the signal dumped in the digital output file, which is
explained in the following text).
Figure 6 on page 48 graphically demonstrates Case #2. Two Verilog cells,
blk-1 and blk-2, are instantiated under a SPICE parent, and a port from
blk-1 is connected to a port from blk-2 via a SPICE net.
Because the tool detects that both the source and destination of the signal is
digital, it does not insert A/D or D/A converters on the path from blk-1 to blk-
2, and treats the SPICE net connecting the two digital ports as a digital net.
As a result, this mixed net is optimized as a digital wire, despite its definition as
a SPICE net. By default, this mixed net is captured only in the digital output file.
(You can have an analog image of the signal dumped in the analog output file,
which is explained in the following text).
Such mixed nets—which cross the analog and digital boundary, yet do not incur
the insertion of A/D or D/A components—are referred to interchangeably as
through-nets or thru-nets.
The through-net in Case #1 that connects two analog blocks is referred to as an
a2a through-net. The through-net in Case #2 that connects two digital blocks is
referred to as a d2d through-net.
An a2a through-net is optimized as an analog node and, by default, is dumped
only in the analog output file. You can use the print_thru_net mixed-signal
control command to generate a digital image of the signal created and dumped
in the digital output file. In doing so, a redundant A/D converter is added to the
optimized analog net to generate the digital image.
■
0 0V (gnd) or, in case dynamic supply is enabled
for d2a, a percentage of the voltage on the
referenced VDD net.
■
Can be modified with the d2a mixed-signal
control command.
■
1 Local supply voltage value or, in case dynamic
supply is enabled for d2a, a percentage of the
voltage on the referenced VDD net.
■
Can be modified by the d2a mixed-signal
control command.
■
Z The analog node will not be driven by Verilog.
The voltage of the node depends entirely on the
analog circuitry.
■
X 0V
■
Can be modified by the d2a mixed-signal
command.
Signal value conversion in the a2d direction from the transistor level to Verilog
is based on the analog voltage crossing high and low thresholds. By default,
50% of the local voltage supply is used for both high and low a2d thresholds. To
change the threshold values for digital event generation, the mixed-signal
control command a2d must be used. If the dynamic supply feature is enabled
in the a2d command (seee the The a2d Command description). Then the high
and low thresholds can be set as a percentage of the referenced VDD net.
The A/D signal value conversion rules are displayed in Table 4.
Table 4 Signal Value Conversion Rules for Analog-To-Digital Conversion
■
Greater than (>) or equal to (=) the high 1
threshold voltage (default = 50% of local
voltage supply)
■
Can be modified by the a2d command
Figure 7 demonstrates how, with the dynamic supply enabled, the a2d
thresholds vary as the analog supply varies. Here, the variations on the supply
net VDD causes the a2d thresholds to vary in tandem with it (assuming that
both a2d thresholds are set to 50% of VDD).
For details about how to enable the dynamic supply feature through the a2d
and d2a commands, see The a2d Command and The d2a command.
■
Level 6: strong0, strong1 (default)
■
Level 7: supply0, supply1
These drive strengths enable multiple drivers—with differing strengths—to
drive the same net that can be modeled in Verilog. In case of a conflict between
multiple drivers driving a net, the driver with the value from the strongest driver
prevails and determines the net value. Unless explicitly stated in the Verilog
code, the default drive strength for all Verilog nets is 6 (Strong0, Strong1).
For the A/D conversion, if the mixed net has inout direction, the tool calculates
the effective analog output resistance of the mixed net to estimate an
equivalent drive strength on the digital side.
By default all SPICE ports are assumed to be inout, unless the SPICE cell has
a Verilog view where the direction of ports are explicitly declared. If the
direction of a SPICE port connected to a mixed net is output, no drive strength
mapping from Analog to Digital will take place during A/D conversion and the
mixed net will always assume Level 6, the default drive strength (the strongest)
in Verilog.
If the mixed net connects to a SPICE port of type inout (either because there is
no Verilog view for the SPICE cell or the direction of the port in the Verilog view
is defined as inout) then the tool calculates the effective output resistance for
the analog output and maps it to a corresponding drive strength in Verilog. This
can be a time-consuming task during simulation and it is recommended to
avoid bidirectional mixed nets as much as possible.
For the D/A conversion, the Verilog drive strength is translated to a resistance
value for the resistor which is placed in series with the voltage supply that
models the Verilog driver in SPICE. This drive strength mapping in D/A
conversion occurs for both unidirectional and bidirectional mixed nets. The
following sections describe the rules governing these conversions:
The resistance value of the series resistor used in the d2a interface will be
1.2 + 1000.1-
-----------------------------
2
or 500.65 Ohms. The only exception will be when Verilog drives with HiZ (drive
strength 0) for which no driver (no ideal supply or series resistor) will be applied
on the analog side and the digital driver will act as an open circuit. In that case,
the voltage of the analog node will depend entirely on the drivers in the analog
circuit.
See Figure 9 for a visual representation.
The default resistance map file is used, unless you specify your own resistance
map file using the rmap_file command in the mixed-signal simulation setup
file (vcsAD.init, by default).
You can create a custom resistance map file using unidirectional mapping or
bidirectional mapping. The unidirectional resistance map file is useful when you
want different resistance mapping for either direction: from Verilog-to-transistor
level, or from transistor level-to-Verilog.
Unidirectional Mapping
See the following syntax and description for strength (Verilog) to resistance
(transistor-level) unidirectional mapping.
Bidirectional Mapping
See the following syntax and description for strength (Verilog) to resistance
(transistor-level) bidirectional mapping.
The bidirectional syntax is
resistance_map resistance_value_range strength;
See the following example for a bidirectional file sample.
resistance_map 90000.2-1e32 0;
resistance_map 70000.2-90000.1 1;
resistance_map 50000.2-70000.1 2;
resistance_map 7000.2-50000.1 3;
resistance_map 6000.2-7000.1 4;
resistance_map 1000.2-6000.1 5;
resistance_map 1.2-1000.1 6;
resistance_map 0-1.1 7;
Known Limitations
The following are current limitations:
■
NanoSim set_sim_hierid command is ignored in the NanoSim-VCS/
VCS-MX flow. (At all times, use the default "." (period) hierarchical delimiter.)
The following features are not supported in the NanoSim-VCS/VCS-MX flow:
■
HAR
■
BDC
■
.ALTER
■
Bisection
■
Selective BA (back-annotation)
■
SDF annotation on the mixed-net
A mixed net can be back-annotated with an SDF file, but due to hierarchical
net name optimization, the delay introduced by the SDF file might not be
transferred to the analog side in the D2A direction, which could lead to
incorrect results. But in the A2D direction, the delay introduced by the SDF
file for the mixed net is accounted for. Because of this inconsistency and
potentially incorrect results, the use of SDF back-annotation on mixed nets
is strongly discouraged.
Known Problems
The following problems currently exist:
■
SDF back-annotation to the library cells does not function properly. Use the
library cells as design modules, if possible.
■
When a programming language interface (PLI) is used along with the g++
complier on the Linux platform, an error messages for multiple symbol
definition... might be generated. To resolve the error, set the UNIX
environmental variable as follows: setenv NO_STDPP 1
Flow
This chapter describes the required steps for preparing Verilog and SPICE
netlists for mixed-signal simulations, and for generating a mixed-signal control
file.
Overview
Before using any one of the mixed-signal flows, there are several tasks that
should be completed. Verilog netlist files and/or SPICE netlist files may need
some modification for a successful netlist compilation. Check these guidelines
before simulating a design.
When running a mixed-signal simulation, note that the required mixed-signal
simulation control file contains commands that are described in the Creating a
Mixed-Signal Simulation Control File section of this chapter.
This chapter contains the following topics:
■
Mixed-signal Setup Checklist
■ Netlist-Related Issues
• Identical Module/Subcircuit Name
• Case Sensitivity
• Power Supplies
• Netlist Statements
• Simulation Time
■ Port-Related Issues
• Port Mapping
• Duplicate Ports
■
Creating a Mixed-Signal Simulation Control File
■
Mixed-Signal Control Commands
■
The optimize_shadowfile Command
■
Summary of Mixed-Signal Simulation Commands
■
Known Limitations
Netlist-Related Issues
Each topic listed in Table 5 is described in the following sections:
■
Identical Module/Subcircuit Name
■
Case Sensitivity
■
Power Supplies
■
Netlist Statements
■
Simulation Time
Case Sensitivity
For a multi-view cell, the Verilog module name’s case and the SPICE subcircuit
name’s case must be identical. The cases for port names must be identical
between SPICE and Verilog views. Also, be aware that every name in HSPICE
netlists is treated as lowercase (by default). Because Verilog is case-sensitive,
and VCS processes everything as-is (by default), you must be aware of any
possible case discrepancies between the two views that may arise.
Power Supplies
Power supplies must be passed to SPICE subcircuits to function properly. If the
SPICE subcircuit is instantiated under Verilog, the supply nets can be passed
to it by one of the following methods:
■
Method #1
■
Method #2
■
Method #3
Method #1
If neither the subcircuit definitions, nor their instantiations under Verilog,
contain the supply pins (that is, VDD and VSS), then the supply pins must be
propagated to the SPICE subcircuits via.global statements in SPICE.
Method #2
If both the subcircuit definitions and their instantiations under Verilog contain
the supply pins (that is,VDD and VSS) then there are two options for passing
supplies to SPICE:
■
Verilog can drive the powernets (e.g. drive VDD to 1'b1 and VSS to 1'b0).
The powernets are fed to SPICE through d2a elements at the boundary. All
d2a interface elements include a series resistance map resistor which are
undesirable for powernets. To remove the resistance map use the d2a
command with powernet option for both VDD and VSS.
Example:
d2a powernet hiv=1.2 lov=0 node=top.vdd;
d2a powernet hiv=1.2 lov=0 node=top.vss;
assuming that the power supply is 1.2V. The hierarchical paths to the
powernets must be taken from the simv.msv/interface_element.rpt
report file.
Note: If the Verilog nets that drive the SPICE supplies are defined
as Verilog predefined "supply0" or "supply1" nets, the tool
automatically treats those nets as if the d2a powernet
command was applied to them. So no rmap resistor is placed
at the d2a interface for those nets and they are treated as
ideal voltage sources on the analog side.
■
A new two-port SPICE subcircuit must be created that has defined analog
supplies. By instantiating this new subcircuit under Verilog, the two ports are
connected to the supply pins for other SPICE cells under Verilog. In this way,
the SPICE cell receives its supply.
Figure 11 shows an example of the SPICE definitions for Method #1, in which
VDD and VSS pins do not appear in the subcircuit port list, and a .global
statement is used instead to provide supply net connectivity:
Figure 12 shows the Verilog instantiation of the subcircuit defined in Figure 11.
Because the power supply nets are defined and passed to SPICE subcircuits
as global nets, they do not need to appear in the SPICE instantiation under
Verilog:
Examples for Method #2 are displayed in Figure 13 and Figure 14. Supply nets
are defined as subcircuit ports and are passed to SPICE cells at their
instantiations under Verilog.
Figure 13 SPICE Definitions for the Design Cell and a User-Defined Subcircuit
Figure 14 shows the instantiation of these cells under Verilog. Note that the
two-port subcircuit containing the analog supplies must be instantiated under
Verilog, to establish supply connections to SPICE cells.
Method #3
If the SPICE subcircuit instantiated under a Verilog (or VHDL) parent has power
pins (for example, VDD, VSS) but those power pins are not used in the
instantiation and as a result not hooked up, you can use the mixed-signal
port_connect command to connect those ports to any analog net that is
connected to an ideal supply. That way the SPICE supply pins get hooked up to
the right source and allow the SPICE circuitry to function correctly. See The
port_connect Command command description.
Netlist Statements
Any statements, keywords, or elements that are not supported by by the analog
simulator in a stand-alone analog simulation are also not supported in mixed-
signal either. For example, a y element in an Eldo format netlist is not
supported in NanoSim and is therefore not supported in NanoSim-VCS.
All other options and/or statements that are required for correct analog
simulation setup, such as .options scale=1e-6, must be included in the
netlist for mixed-signal as well. The following example shows a SPICE netlist
file sample.
.lib ‘models’ TT
.inc ‘cells.spi’
.options scale=1e-6
.temp 27
.global vdd gnd
.subckt test a b c d
x1 a b n1 vdd cell1
x2 c n1 d ref cell2
vref ref gnd 2.0
.ends
vvdd vdd 0 dc 3.3
vgnd gnd 0 dc 0
.end
Simulation Time
In mixed-signal simulation, the simulation time can be determined by either the
analog domain (usually by the .tran statement) or in the digital domain
(usually a $finish system task in the Verilog code).
In the case when different stop times are specified in analog and digital
domains, the smaller of the two times determines the simulation stop time.
Port-Related Issues
The section contains information about:
■
Port Mapping
■
Duplicate Ports
Port Mapping
By default mixed-signal simulation assumes that a multi-view cell (for example,
a cell with both Verilog and SPICE views) has the same number of ports and
port names in both views. But if the number of ports or the names of the ports
differ between the two views the compilation errors out. To resolve the port
inconsistency problem between different views the port_map option of the
use_spice, use_verilog or use_vhdl commands must be used.
Also, to handle discrepancy in the number of ports (for example if one view has
extra ports), you can use the port_connect command. See Chapter 8,
Mixed-Signal Simulation in the VHDL/Verilog-SPICE Flow for a description of
these commands and options.
If there is no port mismatch between different views of a cell, ports from
different views get mapped as described below.
For a SPICE parent instantiating a Verilog child, by default, ports are mapped
by position. However, name-based port mapping can be achieved by creating a
SPICE view for the Verilog cell (if one is not already there). The tool then
automatically maps ports by name for the child Verilog cell, comparing the port
order between the SPICE and Verilog views, and rearranging the Verilog port
order to match the SPICE view.
In the case of a Verilog parent instantiating a SPICE child, either name-based
or position-based port-mapping can be used. When using port-mapping by
name, the Verilog module port name begins with a period character ( . ), and
must be identical to the SPICE port name. The cases for port names at the
instantiation must be identical to the case of ports in the subcircuit definition.
Figure 15 demonstrates the Verilog syntax for name-based port mapping.
Figure 16 is an example of port mapping by name.
nor i2 (.a(in1));
Port-mapping between Verilog and SPICE can also be achieved for bus ports.
By default, mixed-signal simulation requires that the bus members be
contiguous in the subcircuit definition (that is, no other port defined between
any two members of the same bus port), and the ports must be sequentially
numbered—ascending or descending. Failing to meet these two requirements
leads to compilation failure. Additionally, the ascending or descending order of
the bus members in SPICE must be identical to the order expected by the
Verilog parent block; otherwise, the port connections are incorrect.
However, if the bus port definition in the SPICE subcircuit does not meet these
requirements, the problem can be resolved by defining a Verilog view for the
subcircuit and using the following mixed-signal command to set the port order
in the SPICE subcircuits to that of their Verilog view:
spice_port_order_as_vlog;
Figure 18 shows an example of a SPICE subcircuit with bus ports and its
instantiation in a Verilog parent block. In the SPICE subcircuit, the port names
a[3], a[2], a[1] and a[0] are contiguous, and the sequencing of the bus
members meets the expectation of the parent Verilog (both are descending).
As a result, compilation should be without problems related to the bus order in
SPICE. In addition, the port connections for this bus are correct since both the
bus port a in SPICE and the wire ai in Verilog are in a descending order.
By default, the tool assumes that the SPICE port names that connect to a
mixed-net and contain closed bracket characters [ ] are members of a bus. If
the bus notation in the SPICE subcircuit is a string different from [ ], use the
mixed-signal bus_format command to override the default SPICE bus
notation. For more information, see The bus_format Command section.
Figure 18 Port Mapping for the Verilog Vector Port and SPICE Scalar Port
Duplicate Ports
Duplicate port names in the SPICE subcircuit cannot be used, except for power
supply nodes.
If the proc module is at the digital/analog boundary (for example, if this Verilog
block is being replaced by its SPICE view with the use_spice command, or if
this module is replacing its SPICE view with the use_verilog command) then
the mixed-signal compilation creates an error. The size of the buses must be
explicit for those digital cells that are located at the digital/analog boundary.
However, the use of a Verilog or VHDL cell with parameterized bus ports that is
located elsewhere in the design (not touching the analog/digital boundary) is
completely legal.
■
The use_spice Command
■
The use_verilog Command
To use these commands, the following rules apply:
■
All commands must be completed with a semi-colon (;)
■
To create a comment line, insert the double forward-slash character (//)
■
Commands can span more than one line with no line continuation character
needed. The Enter character at the end of each line serves as the line
continuation character.
For example, the following command spread across two lines is considered
one command line:
choose nanosim -nspice test.spi -C config –nvec test.vec -o
output_files/nanosim ;
Note: Starting from the 2009.06 release, the additional VCS switches
(-ad_hsim and -ad_xa) which were previously required for
HSIM and CustomSim mixed-signal simulations, are no longer
needed.
Syntax
a2d [ loth=lo_thrsh[V | %] ] [ hith=hi_thrsh[V | %] ]
[ hiz_off | hiz_on ]<cell=cell_name port=port_name |
node=hier_name> [ vdd=hier_name [minv=min_vdd_voltage]
[minv_logic= [0 | 1 | X | Z ]][ceff=value]
Options Description
loth=lo_thrsh[V | %] These two options determine the low and high a2d
hith=hi_thrsh[V | %] threshold values. They can be expressed either as
absolute values (1.1V, 2.2) or as a percentage of
the supply (10%, 90%). For dynamic supply (when
the vdd= option is specified) they can only be
specified as a percentage of the supply voltage.
That way, as the supply voltage changes during the
simulation, so do the a2d thresholds.
Options Description
hiz_off Turns off the a2d drive strength calculation. All a2d
events are passed to digital with the Verilog default
drive strength of 6 (strong).
The application of this option is for inout
(bidirectional) interface nets. With this option
enabled, the analog side always sends values
across to the digital side with a "strong" drive
strength (st0 or st1). This means that the interface
signal as seen in the digital output never shows HiZ.
You can use this option to remove (mask) the HiZ
glitches on bidirectional interface nets. The HiZ
glitches are caused during the periods when
neither the analog nor the digital circuits are driving
the interface net. With this option enabled, the
interface element always drives the digital side, with
a st0 or st1, based on the voltage on the analog
side and the a2d thresholds. This means that the
digital net always has a non-HiZ driver and as a
result no HiZ appears on the digital image of the
interface net.
Caution: HiZ glitches usually reflect the
correct behavior of the circuit.
Removing them by using the
hiz_off option can potentially
mask a real phenomenon or
problem in the circuit and is
discouraged.
Options Description
Options Description
Examples
The following example sets the a2d low and high thresholds for node
top.i1.ctl to 0.2V and 1.7V respectively.
a2d loth=0.2 hith=1.7 node=top.i1.ctl;
or
a2d loth=0.2V hith=1.7V node=top.i1.ctl;
The following a2d command sets the a2d low and high thresholds for node
top.i1.ctl to 20% and 80% of the local supply voltage.
a2d loth=20% hith=80% node=top.i1.ctl;
The following a2d command enables the dynamic supply feature and sets the
a2d thresholds for node top.i1.ctl to 50% of the referenced VDD node. As the
voltage of the VDD node changes, so do the a2d thresholds.
a2d loth=50% hith=50% node=top.i1.ctl vdd=top.vdd;
The following a2d command enables the dynamic supply feature and sets the
a2d thresholds for node top.i1.ctl to 40% and 60% of the referenced VDD node.
It also sets the minv value t0 500mV. As a result if the VDD voltage drops below
that value, the a2d conversion would be shut off and HiZ is passed to the digital
side instead.
a2d loth=40% hith=60% node=top.i1.ctl vdd=top.vdd minv=500mV;
The following a2d command enables the dynamic supply feature and sets the
a2d thresholds for node top.i1.ctl to 40% and 60% of the referenced VDD node.
It also sets the minv value to 500mV and specifies logic value "X" to be
transferred to the digital side if the VDD voltage drops below the minv value.
a2d loth=40% hith=60% node=top.i1.ctl vdd=top.vdd minv=500mV
minv_logic=x;
The following example specifies top.n1 to be an a2d interface net and adds 1pF
capacitance at the top.n1 node.
a2d node=top.n1 ceff=1p;
The following example specifies the ports in1 of cell blk1 to be a2d interface
nets and adds 2pF capacitance at this port.
a2d cell=blk1 port=in1 ceff=2p;
*SPICE subckt
.subckt addr4 a<3> a<2> a<1> a<0>
+b<3> b<2> b<1> b<0> cin
+s<3> s<2> s<1> s<0> cout
.ends
In the following example, more than one bus format is defined for SPICE. Both
ports inp and out are considered as busses when connecting to Verilog.
bus_format <%d> _%d ;
*SPICE subckt definition
.subckt data_blk inp<2> inp<1> inp<0> out 2 out_1 out_0
...
.ends
*SPICE subckt
.subckt addr4 a_3 a_2 a_1 a_0
+b_3 b_2 b_1 b_0 cin
+s_3 s_2 s_1 s_0 cout
.ends
Specifies that FineSim Pro is the analog engine in the mixed-signal simulation
and a SPICE netlist named net.spi must be passed to it. It also sets the
prefix for output files to out.
Examples
The following example indicates that FineSim SPICE is the analog engine in
the mixed-signal simulation and a SPICE netlist names net.spi must be passed
to it. It also sets the prefix for output files to out;.
// This is comment
choose finesim -spice net.spi -o out;
The following example specifies that HSIM is the analog engine in the mixed-
signal simulation and a SPICE netlist named net.spi must be passed to it.
//This is a comment
choose hsim -i net.spi;
Syntax
d2a [powernet] [rf_time=slope_time] | [rise_time=rise_time]
[fall_time=fall_time] [delay=delay_time]
[x2v=0|1|2|3|4] hiv=high_voltage [ V | % ] lov=low_voltage
[V | % ] <cell=cell_name port=port_name | node=hier_name>
[ vdd = hier_name ]
Options Description
rf_time=slope_time Specifies the analog rise and fall times. The default
time unit is in seconds, so specify the sub-unit with
the value rf_time=1.5n, for example. With this
option, both rise and fall times are set to the same
value.
rise_time=rise_time Specifies the analog rise time. The default time unit
is in seconds, so specify the sub-unit with the value
rise_time=1n rise_time=2n, for example.
fall_time=fall_time Specifies the analog fall time. The default time unit
is in seconds, so specify the sub-unit with the value
fall_time=1n fall_time=2n, for example.
Options Description
Options Description
Examples
The following d2a command sets the high and low d2a voltages to 1.8V and
0.1V
d2a hiv=1.8 lov=0.1 node=top.i1.ctl;
The following d2a command sets the high and low d2a voltages to 1.2V and 0V.
d2a hiv=1.2V lov=0V node=top.i1.ctl;
The following two commands define interface nets top.vdd and top.vss as
ideal supplies while setting their high and low voltage values to 1.2V and 0V
respectively.
d2a powernet hiv=1.2 lov=0 node=top.vdd;
d2a powernet hiv=1.2 lov=0 node=top.vss;
The following command enables dynamic supply and defines the interface net
top.i1.rst as a d2a interface for which high and low voltages track the
changes on node top.i2.vdd. The high and low voltages are set to 90% and
10% of the voltage on the node top.i2.vdd.
d2a hiv=90% lov=10% node=top.i1.rst vdd=top.i2.vdd;
The following command enables dynamic supply for all d2a interface elements
below the hierarchical level “top.i1”. All those d2a interfaces track the changes
on supply net “top.i1.vdd” dynamically. The “hiv” and “lov” values are set to
100% and 0% of the voltage on node top.i1.vdd.
d2a hiv=100% lov=0% node=top.i1.* vdd=top.i1.vdd;
If the command is used with the disable option (default behavior of mixed-
signal simulation), duplicate names used for net(s) and an instance in SPICE
causes a compilation error:
Examples
x_and1 a x_and1 y and2x2
Here the subcircuit and2x2 is instantiated with instance name x_and1 while at
the same time one of the nodes connected to its ports is also called x_and1.
This is allowed in SPICE, but illegal in Verilog, and causes an error during
mixed-signal compilation.
To resolve it, use the following command inside the mixed-signal control file:
duplicate_net_inst_name enable;
Argument Description
Argument Description
res Determines the value of the resistor, which is put between the
interface net and ground to measure the current through it. This
option is only applicable with type=i.
node Specifies the hierarchical path to the e2r interface. You can
specify wildcard characters (*) in the path.
The next example shows how the fidelity for the e2r interface located at
test.pblk.clk is set to 1mV.
e2r fidelity=1e-3 node=top.pblk.clk;
Options Description
Options Description
-flush <flush Specifies the simulation time interval at which the report
percent>% file gets updated. The interval is given as a percentage
of the end time specified in the .tran statement. By
default the interval is be 10% of the .tran end time. If
there is no .tran statement in SPICE, this option is
ignored.
Examples
The following example shows how to enable dumping the interface activity
report in the simv.msv/interface_activity.rpt file.
ie_activity_rpt enable;
The following example shows how to enable dumping the interface activity
report and sets the intervals at which the file gets updated to 2ns.
ie_activity_rpt enable -flush 2ns;
Syntax
insert_cell [model= ADFMI_model_name [param=parameter_list]
] [subckt= subcircuit_name apin=port_name dpin=port_name
] <cell=cell_name port=port_name | node=hier_name>
subckt= subcircuit_name apin=port_name dpin=port_name
Options Description
Examples
To insert the 2-port SPICE subcircuit:
.subckt multiplier in out
...
.ends
When multiple map_by_node commands are used for the same mixed-nets in
the mixed-signal simulation setup file, the last command takes precedence.
Note: Using this command prevents VCS from probing inside the
SPICE hierarchy; this can prevent optimization of D2D through-
nets, potentially increasing the number of interface nodes.
Table 6
Table 6
Syntax
port_connect <cell_name> spice_port_name =>
hierarchical_net, ... | spice_port_name => snps_open
Argument Description
hierarchical_net The hierarchical path to the net the extra port needs
to be connected to.
Examples
Here the SPICE cell inv1 is instantiated under a Verilog-top testbench:
inv1 i1 (.y(y_wire), .a(a_wire) );
The SPICE cell has two extra ports called vdd, vss that are not present in the
Verilog view of the cell and as a result are not connected in the instantiation
above.
Assuming that in the body of SPICE there are two ideal supplies defined as
following:
v3 vdd! 0 DC=3.0
v2 vss! 0 DC=0
You can use the following mixed-signal command to connect the dangling
SPICE ports vdd and vss to to the nets connected to the ideal supplies:
port_connect -cell inv1 ( vdd => vdd! , vss => vss! );
In the following example the SPICE cell inv1 instantiated under a Verilog-top
testbench:
inv1 i1 (.y(y_wire), .a(a_wire) );
has two extra ports called vdd, vss that are not present in the
Verilog view of the cell:
.subckt inv1 y a vdd vss
….
module inv1 (y, a);
….
Assuming that two ideal supplies are defined in subcircuit at the hierarchical
path top.i_power_blk as:
v1 vdd 0 DC=1.2
v2 vss 0 DC=0
You can use the following mixed-signal command to connect the dangling
SPICE ports vdd and vss to to the nets connected to the ideal supplies:
port_connect -cell inv1 ( vdd => top.i_power_blk.vdd , vss =>
top.i_power_blk.vss );
Syntax
port_dir <cell_name> [input|output|inout]
<spice_port_name>, <spice_port_name>;
Argument Description
Examples
port_dir -cell invs1 (input a;output y);
port_dir –cell invs1 (input a,b; output y);
Argument Description
Argument Description
cell=cell_name Specifies the cell name and port name. You must
port=port_name specify both names, in which you can use wildcard
characters ("*").
Description
Bidirectional interface elements are common in mixed-signal designs. These
interface elements usually model I/O elements that can assume one of the
following two states during the circuit operation:
■
Transmitter (driver)
■
Receiver (high Impedance (HiZ) input)
Two or more of such I/O elements are connected together to allow data
exchange between multiple transmitters and receivers. Usually at each given
time only one of the I/O elements is in transmission mode and the rest of the
I/Os are in HiZ receiver mode. For this data exchange to occur, it is imperative
that all the receivers stay in HiZ mode and do not drive the interface. Otherwise
they would interfere with the transmitter (active driver).
Note: If you use a2d hiz_off, the print_ie_res is ignored for that
interface element. If you use a2d without hiz_on, and the net is
not bidirectional, the print_ie_res command is ignored for
that interface element.
ctrl ctrl
TX TX
RX RX
In this process, knowing the value of the output resistance exhibited by the
SPICE I/O element, especially during the receiver mode, is crucial to proper
adjustment of the resistance map for the interface element, as shown in
Figure 20.
The capability to view the output resistance of the analog drivers at the analog/
digital boundary in the analog waveform file and decide how or whether to
adjust the resistance map for that interface element is only applicable to
interface elements for which analog drive strength calculations take place,
which are:
■
inout interface elements
■
a2d interface elements for which drive strength calculation is enabled with
the hiz_on option of the a2d command
ctrl ctrl
TX TX
ie
RX RX
SPICE Digital
Output
resistance
Figure 20 Output Resistance of the Analog Driver is used for Drive Strength
Calculation of the Interface Element
Examples
The following command enables dumping the output resistance for interface
net top.i1.ckgen.rst:
print_ie_res node = top.i1.ckgen.rst ;
Res(rst)
1MEG
The following command enables dumping the output resistance for interface
net at port vbc of cell bandgap and limits the display of output resistances
bigger than 10kOhms:
print_ie_res limit=10k cell=bandgap port=vbc ;
Res(ctl)
10K
Argument Description
Argument Description
Argument Description
node Specifies the hierarchical path to the r2e interface. You can
specify wildcard characters (*) in the path.
rf_rate The rf_rate has a unit of second/volt, with the default set to
10ps/V. This value indicates how fast the voltage changes from
the current value to the target value. It is recommended to avoid
too fast changes in voltage values that might create unwanted
current peaks.
The next example shows how the fidelity for the r2e interface located at
test.pblk.clk is set to 1mV.
r2e fidelity=1e-3 node=top.pblk.clk;
Examples
The following example shows that top.VVDH is no longer a mixed-net node.
The constant dc voltage source value is 1.8V. , and is applied to that net in the
transistor-level netlist.
remove_d2a dc=1.8 node=top.VVDH;
The following example shows that all net names starting with top.V are no
longer considered mixed-nets. In addition, the constant dc voltage source with
a value of 2.5V is applied to those nets in the transistor-level netlist.
remove_d2a dc=2.5 node=top.V* ;
Note: When multiple remove_d2a commands are used for the same
mixed-net(s) in the mixed-signal simulation setup file, the last
command takes precedence.
Argument Description
loth=lo_thrsh[V | %] These two options determine the low and high a2d
hith=hi_thrsh[V | %] threshold values. They can be expressed either as
absolute values (1.1V, 2.2) or as a percentage of the
supply (10%, 90%).
Argument Description
rf_time=slope_time Specifies the analog rise and fall times. The default
time unit is in seconds, so specify the sub-unit with a
value such as rf_time=1.5n, for example. With this
option, both rise and fall times are set to the same
value.
rise_time=rise_time Specifies the analog rise time. The default time unit is
in seconds, so specify the sub-unit with a value such as
fall_time=1n rise_time =2n, for example.
fall_time=fall_time Specifies the analog fall time. The default time unit is in
seconds, so specify the sub-unit with a value such as
fall_time=1n rise_time=2n, for example.
Argument Description
Argument Description
Argument Description
Argument Description
node node=nodename(s)
instance inst=instance_names(s)
inst=instance_name port=port_name(s)
subcircuit subckt=subckt_name(s)
subckt=subckt_name port=port_name(s)
Examples
In the following example, resis_comp.map is the resistance map file in the
current directory.
rmap_file resis_comp.map;
In the following example, resis.map is the resistance map file in the /home/
john/work directory.
rmap_file /home/john/work/resis.map;
In In the following example, r2.map is the resistance map file that is applied to
the top.i1.wen and top.i2.ren nodes. The default resistance map file is
applied to the remaining mixed-nets.
rmap_file r2.map node=top.i1.wen top.i2.ren;
In In the following example, r3.map is the resistance map file that is applied to
all mixed-nets connected to the top.i1.abc and top.i2.xyz instances.
The default resistance map file is applied to the remaining mixed-nets.
rmap_file r3.map inst=top.i1.abc top.i2.xyz;
In the following example, r3.map is the resistance map file that is applied to
the mixed-net connected to port Z located at the top.i1 instance. The
default resistance map file is applied to the remaining mixed-nets.
rmap_file r3.map inst=top.i1.abc port=Z;
In the following example, r4.map is the resistance map file that is applied to all
mixed-nets connected to the pad subcircuit. The default resistance map file is
applied to the remaining mixed-nets.
rmap_file r4.map subckt=pad;
In the following example, r4.map is the resistance map file that is applied to
the mixed-net connected to the IN port located at the pad subcircuit. The
default resistance map file is applied to the remaining mixed-nets.
rmap_file r4.map subckt=pad port=IN;
In the following example, r5.map is the resistance map file that is applied to
the top.i1.clk, top.i2.addr[0], top.i2.addr[1] and
top.i2.addr[2] mixed-nets. The default resistance map file is applied to the
remaining mixed-nets.
rmap_file r5.map nodefile=n1.txt;
In the following example, r6.map is the resistance map file that is applied to
the mixed-nets connected to the top.i1, top.i2, top.i3.abc and
In the following example, r7.map is the resistance map file that is applied to
the mixed-nets connected to the pad, abc and xyz subcircuits. The default
resistance map file is applied to the remaining mixed-nets.
rmap_file r7.map subcktfile=s1.txt;
The following example shows the content of the s1.txt subcircuit file.
pad
abc
xyz
In the following example, r8.map is the resistance map file that is applied to all
mixed-nets matched by the *addr* string. The default resistance map file is
applied to the remaining mixed-nets.
rmap_file r8.map node=*addr*;
In the following example, the r1.map resistance map file is ignored because
the second rmap_file command also encompasses the signal identified by
the first command. When two or more rmap_file commands encompass the
same signals, the last command always prevails—file rmap r2.map is applied
to node top.i1.addr.n1. The default resistance map file is applied to the
remaining mixed-nets that are not covered by these commands.
rmap_file r1.map node=top.i1.addr.n1;
rmap_file r2.map node=top.*addr*;
The following example is illegal. The options are mutually exclusive. The node
and inst options cannot be used together in the same command. An
additional rmap_file command must be used, such that one command
contains the inst= option and the other command contains the node= option:.
rmap_file r1.map node=top.i1.addr inst=top.i1.abc;
In the following example, r2.map is the resistance map file that is applied to
the mixed-nets connected to the top.i1.abc instance. The r1.map file is
If multiple rmap_file commands target the same mixed-nets, and each one
of the commands uses one of the node, instance or subcircuit options,
use the options with the rmap_file command in the following order: (1)
subcircuit-based, (2) instance-based, and (3) node-based.
The wild card (*) character can be used in the port, node, instance, or
subcircuit name.
The period (.) character is the required hierarchical separator. The string length
must not exceed 4,096 characters.
Note: When multiple rmap_file commands are used for the same
mixed-net(s) in the mixed-signal simulation setup file, the last
command takes precedence.
This command allows you to work around such netlist disparity problems by
following these steps:
1. Copy the simv.daidir directory (or unique_name.daidir if VCS option
-o unique_name is used) to a new location.
2. Hand-edit the shadow module files to resolve the Verilog/SPICE netlist
disparity issues.
3. Run the compile again with shadow_file_dir command in the mixed-
signal control file pointing to the new location.
Syntax
shadow_file_dir directory_path;
Examples
The following example shows how to have the shadow_file_dir command
point to the
/home/john/work/wrapper_dir directory, which contains the modified
versions of simv.daidir files.
shadow_file_dir /home/john/work/wrapper_dir;
Examples
The unique_name option assigns a name (of your choice) to the top-level
dummy module instance—see the following example. Specifying a
unique_name option is useful when you want the name of the top-level block
in design be something other than the default SPICE-top name snps_sptop.
spice_top name=my_top;
Argument Description
-cell subcircuit_name Identifies the cell name to be substituted with SPICE. The
substitution is done on a cell basis for all instances of the
cell. The "*" (asterisk) wildcard character can be used as
part of the subcircuit name.
Argument Description
port_map When the ports in the SPICE view of a multi-view cell have
(port_map_list) a different name compared to their Verilog or VHDL view,
you can use this option to map the Verilog/VHDL port
name to SPICE. The port_map_list can have one or more
of the following mappings, each separated by a ",":
verilog/vhdl_port_name => spice_port_name
A Verilog/VHDL port name is mapped to a SPICE port
name. The port name could be a bus identifier as well. For
single dimensional buses, you can specify the dimension
of the SPICE bus could be specified as well:
verilog/vhdl_port_name => spice_port_name[range]
If you do not specify a range, the members with the same
index number get mapped together:
verilog/vhdl_port_name[0] => spice_port_name[0]
verilog/vhld_port_name[1] => spice_port_name[1]
...
But if you specify the SPICE bus range, the left-most
member of the Verilog/Vhdl bus gets mapped to the left-
most member of the SPICE port, and so on. You can
specify the range for SPICE bus to, for example, flip the
bus order in SPICE so that SPICE MSB maps to Verilog/
VHDL LSB and vice versa.
verilog/vhdl_port_name => snps_open
A Verilog/VHDL port is declared as not having a SPICE
counterpart and as a result the top-level Verilog/VHDL net
connected to that port remain open/dangling.
* => snps_by_position
Maps all Verilog/VHDL ports (or all remaining Verilog/
VHDL ports that have not been mapped yet) to SPICE
ports by position. As a result the first port declared in
Verilog/VHDL is mapped to the first port declared in the
SPICE subcircuit and so on and so forth.
*=> snps_by_name
Maps all Verilog/VHDL ports (or all remaining Verilog/
VHDL ports that have not been mapped yet) to SPICE
ports by name. As a result ports that have the same name
in SPICE and Verilog/VHDL are mapped together.
* => snps_open
All Verilog/VHDL ports (or all remaining Verilog/VHDL
Mixed-Signal Simulation User Guide ports that have not been mapped yet) stay open, meaning 111
J-2014.09 that the top-level Verilog/VHDL nets connecting to those
Verilog ports stay open/dangling when the Verilog/VHDL
view of the cell is substituted with the SPICE view.
Chapter 4: Mixed-Signal Simulation in the Verilog-SPICE Flow
Mixed-Signal Control Commands
Examples
The following shows how to use the SPICE view for all instances of the cell
memory. This command can be used when both the memory Verilog module
and the memory SPICE subcircuit are available.
use_spice -cell memory;
The following example shows how to replace the Verilog view of a multi-view
cell with its SPICE counterpart and how to map Verilog ports to SPICE ports
when they have different names.
module inv1 (y, a);
….
.subckt inv1 i o
….
use_spice -cell inv1 port_map ( y => o, a => i );
The following example demonstrates how to map Verilog ports to SPICE ports
when a few of the ports have different names in Verilog and SPICE but the rest
have identical names in both views and can be mapped by name.
module inv1 (z, n, a, b, c);
….
.subckt inv1 y m a b c
….
use_spice –cell inv1 port_map ( z => y, n =>m, * => snps_by_name);
The following example shows how to map Verilog ports to SPICE ports when
there are a few Verilog ports that don't have a counterpart in SPICE, a few of
the ports have different names in Verilog and SPICE, and the rest have
identical names.
module inv1 (z, n, a, b, c);
….
.subckt inv1 y a b c
….
use_spice –cell inv1 port_map ( z => y, n =>snps_open, * =>
snps_by_name);
The following example shows how to map a Verilog bus to its SPICE
counterpart when there is a mismatch between the Verilog and SPICE bus port
names:
use_spice -cell data_path port_map ( data => {d_2, d_1, d_0}, *=>
snps_by_name);
Here the bus identifiers have been used to map ports. Another option would be
to use SPICE bus order as shown in the following examples:
use_spice -cell data_path port_map (data => d[2:0], *=>
snps_by_name);
Going from left to right, maps the leftmost member of data to the leftmost
member of d and so on:
data[2] => d[2]
data[1] => d[1]
data[0] => d[0]
or
use_spice -cell data_path port_map (data => d[0:2], *=>
snps_by_name);
The following example demonstrates how the "*" wildcard character can be
used as part of the instance name in the use_spice command:
use_spice -cell ph_det -inst test.i1.*.u1;
use_spice -cell serdes -inst test.idata1.i_s*;
use_spice -cell div -inst test.i3.u2.*;
The "*" character in the instance name is only supported if the -adopt
wildcard switch is added to the VCS command line:
vcs -ad -adopt wildcard ...
Note that all ports must be mapped. That is why the "*" in " *=> snps_by_name"
is required to map any port that is not explicitly mapped.
Note that the instance name (under the SPICE view) begins with the letter X.
To ensure that you are using the correct hierarchical path to the instance, use
the hierarchical names listed in the interface_element.rpt file under the
simv.msv directory as a guide. The interface_element.rpt file is
explained in Chapter 15, Mixed-Signal Report Files.
Argument Description
Argument Description
port_map When the ports in the Verilog view of a multi-view cell have
(port_map_list) a different name compared to their SPICE view, you can
use this option to map the SPICE name to the Verilog
name. The port_map_list can have one or more of the
following mappings, each separated by a ",":
spice_port_name => verilog_port_name
A SPICE port name is mapped to a Verilog port name.
spice_port_name => snps_open
A SPICE port is declared as not having a Verilog
counterpart and as a result the top-level SPICE net
connected to that port remains open/dangling.
* => snps_by_position
Maps all SPICE ports (or all remaining SPICE ports that
have not been mapped yet) to Verilog ports by position. As
a result the first port declared in the subckt definition is
mapped to the first port declared in Verilog module
definition, and so forth.
*=> snps_by_name
Maps all SPICE ports (or all remaining SPICE ports that
have not been mapped yet) to Verilog ports by name. As a
result ports that have the same name in SPICE and Verilog
are mapped together.
* => snps_open
All SPICE ports (or all remaining SPICE ports that have not
been mapped yet) stay open, meaning that the top-level
SPICE nets connecting to those SPICE ports stay open/
dangling when the SPICE view of the cell is substituted
with the Verilog view.
Examples
The following example shows how to use the Verilog view for all instances of
the cell memory. This command can be used when both the memory Verilog
module and the memory SPICE subcircuit are available.
use_verilog -module memory;
(use_vcs -module memory;)
The following example shows how to map SPICE ports to Verilog ports when
they have different names.
.subckt inv1 i o
….
module inv1 (y, a);
….
use_verilog -module inv1 port_map ( o => y, i => a );
The following example demonstrates how to map SPICE ports to Verilog ports
when a few of the ports have different names in Verilog and SPICE but the rest
have identical names in both views and can be mapped by name.
.subckt inv1 y m a b c
….
module inv1 (z, n, a, b, c);
….
use_verilog –module inv1 port_map ( y => z, m =>n, * =>
snps_by_name);
Note that all ports must be mapped. That is why the "*" in " *=> snps_by_name"
is required to map any port that is not explicitly mapped.
The following example shows how to map SPICE ports to Verilog ports when
there are a few SPICE ports that don't have a counterpart in Verilog, a few of
the ports have different names in Verilog and SPICE, and the rest have
identical names.
.subckt inv1 y n a b c
….
module inv1 (z, a, b, c);
….
use_verilog –module inv1 port_map ( y => z, n =>snps_open, * =>
snps_by_name);
Known Limitations
The following are known limitations:
■
Bidirectional pass switches and registered nets (tran, rtran, tranif1,
rtranif1, tranif0, and rtranif0) that are connected to mixed-nets
are not supported—the results could be incorrect.
■
Jumper ports that are connected to the mixed-nets are not supported—the
results are incorrect.
The following example shows a sample jumper port.
module jumper (a, a);
inout a;
...
endmodule
SPICE Flow
Overview
Information about compiling and simulating the design is described in Chapter
3, “Using Verilog-SPICE Mixed-Signal Features.”
This chapter contains the following topics:
■ Setting Up the Simulation Environment for the Verilog-SPICE Flow
• Version Compatibility Between Analog and Digital Engines
• Licenses
• Required UNIX Paths and Variable Settings
• Using the 64-bit Binaries
■
Required Input Files
■
Compiling the Design
■
Running the Simulation in the Verilog-SPICE Flow
• Invoking the Interactive Mode with the UCLI Debugging Feature with
Verilog-SPICE
■
DC Initialization
■
Recompiling the Design
Licenses
To run a mixed-signal simulation, the following license keys are required:
■
Regular license keys for the CustomSim, FineSim, HSIM, or NanoSim tools
(depending on which analog engine is being used)
■
Regular license keys for VCS
■ Mixed-Signal keys for the CustomSim, FineSim, HSIM, or NanoSim tools
(depending on which one of them are used)
Either LM_LICENSE_FILE or SNPSLMD_LICENSE_FILE can be used to
specify the license file location.
setenv LM_LICENSE_FILE Location_of_License_File
or
setenv SNPSLMD_LICENSE_FILE Location_of_License_File
By default, if any one of the required licenses for the analog or digital engines is
missing, the simulation will not compile or execute.
To enable queuing for license keys, so that the compilation/simulation waits for
the required license key to become available, do the following:
■ For the CustomSim tool:
setenv XA_WAIT_LICENSE
■
For the FineSim tool:
setenv FINESIM_LICENSE_WAIT_TIMEOUT 3600
This command forces FineSim to wait for an hour (3600 seconds) for a
FineSim license key to become available. If after an hour still no license is
available the simulation exits.
■
For the HSIM tool:
setenv HSIM_WAIT_LICENSE
■
For NanoSim tool:
setenv EPIC_WAIT_LICENSE
■
For VCS:
Use the +vcs+lic+wait switch at compile time.
vcs +vcs+lic+wait ...
For example
setenv VCS_HOME /usr/synopsys/VCS/vcsmx_2010.06
set path = ($VCS_HOME/bin $path)
source /usr/synopsys/Nanosim/2010.06/CSHRC_ns
Note: Starting with the J-2014.09 release the CustomSim and FineSim
tools are only be available in the 64-bit mode. Running a mixed-
signal simulation in the 32-bit mode causes an error, so use the
VCS switch -full64 at all times when running a mixed-signal
simulation:
vcs -ad -full64 ...
This tells VCS to use 64-bit binaries and also instructs the analog engine (the
CustomSim, FineSim, HSIM, or NanoSim tools) to use 64-bit binaries as well
(assuming that the 64-bit binaries for the analog engine are installed and the
environment variables for the analog engine are set as described above).
The following example shows that vcs compiles the design.v file with the -
ad VCS compile time option. It reads the default vcsAD.init file as the mixed-
signal control file. The simv simulation executable is created (if no errors occur
during the compilation).
vcs design.v -ad
The following example shows that vcs compiles the design files listed in the
my_list.txt file with the -ad VCS compile time option. It reads the
my_setup.init file as the mixed-signal simulation control file. A simulation
executable, my_simv, is created, instead of the default simv executable.
vcs -f my_list.txt -ad=my_setup.init -o my_simv
The following example is identical to the previous example, except for the-
full64 option. This option generates 64-bit simv executable instead of the
default 32-bit.
vcs design.v -ad -full64
After simv is generated, the simulation can be run using the following syntax:
simv [vcs run-time options]
The following example shows how to instruct VCS to generate a run time log
file called simv.log.
simv -l simv.log
resolutions. The CustomSim tool is not mentioned in this table because it does
not have the notion of a predetermined time resolution.
Table 9 Timestep Synchronization Behavior Overview
■
10 ps 1 ps In the case of NanoSim-VCS, the VCS timestep
overrides the NS timestep so that both use 1 ps as a
timestep value.
■ In the case of HSIM-VCS a compilation error occurs
warning that the analog timestep cannot be smaller
than the digital timestep.
Limitation: All timestep values for NanoSim, HSIM, and VCS must be
set to a value that is a power of 10; for example 1ns, 10ps,
100ps.
Next, invoke the simv binary file by passing the -ucli option to it:
% simv -ucli
Alternatively, you can stop the simulation any time during the simulation by
pressing Ctrl+C, provided that the UCLI was enabled through "-debug" or "-
debug_all" at compile time and simv was run with the -ucli switch.
All UCLI commands can be used at this prompt, such as
ucli % run 10
For a complete list of the UCLI commands, see the VCS Unified Command
Line Interface User Guide.
Note: The analog simulation time cannot be advanced using the UCLI
command. The analog simulation time can only be advanced by
advancing the digital simulation time in UCLI. (See the VCS User
Guide for more information.)
To use the FineSim interactive command exi to report devices with excessive
current:
ucli% ace exi
DC Initialization
When you replace existing SPICE subcircuits with Verilog modules, the analog
DC initialization in mixed-signal simulation may not be identical to the stand-
alone analog simulation. For DC initialization condition-sensitive circuits, it may
be necessary to apply specific DC initialization condition values at certain
nodes to get expected simulation behaviors.
Verilog-SPICE
This chapter describes how to generate separate digital and analog waveforms
or a unified output file in Verilog-SPICE and how to view them.
Overview
In Verilog-SPICE, simulation results can be
■ Generated separately for analog and digital signals.
■
Viewed with Signal Explorer, CosmosScope, or nWave.
Alternatively, the output can be
■ Generated as a single output file in VPD (VCD Plus Dump) format.
This chapter contains the following topics:
■
Capturing Analog and Digital Signals in the Output File(s)
• Generating an Analog Output File
• Generating a Digital Output File
■
Generating a Unified Output
By default, the hierarchical nets that appear in multiple levels of the SPICE
hierarchy with different names (aliases) appear only once under their top-level
alias.
This makes the size of the analog output file more compact but could make
chasing signals through the hierarchy difficult. The following configuration
commands enable printing of all analog hierarchical aliases:
■
For the CustomSim tool use the "-port 1" option of the "probe_waveform_xx"
commands. For example:
probe_waveform_voltage * -port 1
■
For the FineSim tool:
.OPTION POST PROBE
.probe v(*) i(*)
1. Use the -PP or -debug_pp compile time options with VCS to enable VPD
generation by VCS-MX, as follows:
In which the -depth option specifies that all signals—at and below the
hierarchical path /foo—are dumped in the VPD file. If foo is the name of the
top entity, every digital signal in the design is saved in the VPD file. The -o
option specifies the VPD file name, and in this example, the file name is
foo.vpd. For a complete list of all options for the UCLI dump command, refer
to the VCS Unified Command Line Interface User Guide.
Note: FineSim does not support VPD output format and as a result
FineSim-VCS cannot produce a merged VPD file.
This chapter provides the basic information needed to start simulation in the
VHDL/Verilog-SPICE flow—including installation and setup.
Overview
The VHDL/Verilog-SPICE flow provides a mixed-signal, mixed-HDL language
verification solution. VHDL/Verilog-SPICE enables simulating a design
described in SPICE (or other transistor-level description language that the
analog engine supports), Verilog-HDL (“Verilog”), and VHDL.
You must be familiar with the SPICE, Verilog, and VHDL languages, as well as
the CustomSim, FineSim, HSIM, or NanoSim tools (depending on which
analog engine is being used) as well as VCS_MX. See the respective manuals
for more information.
This chapter contains the following sections:
■ VHDL/Verilog-SPICE Flow Highlights
■
Known Limitations
Donut Configurations
CustomSim-VCS-MX/FineSim-VCS-MX/HSIM-VCS-MX, and NanoSim-VCS-
MX support VHDL-top, Verilog-top, and SPICE-top design configurations.
There is no restriction on donut configurations. VHDL, Verilog or SPICE blocks
can each instantiate blocks of the other two formats without restriction. The
only requirement is for SPICE instantiations under VHDL; those SPICE cells
must also have a Verilog view available in order for the instantiation under
VHDL to take place.
Multiple Views
The blocks in the design can contain more than one view (for example, SPICE
and VHDL).
By default, VHDL/Verilog-SPICE selects the view for the multi-view cell that is
identical to the parent block view. If that view is not available, VHDL/Verilog-
SPICE selects the next-available view.
A particular view of a multi-view cell can also be selected explicitly. The method
of explicit view selection for a child cell depends on the view of the parent cell.
The SPICE block "addr4" must have a Verilog view defined in which the
port "cin" is defined as "wreal":
module top;
real cin_real;
…
addr4 dut (.cin(cin_real), … );
…
And to compile this design, the VCS switch "-realport" must be used:
% vcs -ad=vcsAD.init -realport ….
■
SPICE port connecting a VHDL "real" signal
A VHDL net type of "real" can connect to a SPICE port of type input or output
which would create an r2e or e2r interface element respectively. To allow
that connectivity to happen, the following steps must be taken:
• The SPICE block must have a Verilog view defined and in that Verilog
view, the real port must be defined as type "wreal", or if SystemVerilog
is used, the port must be defined as type "real".
• The switch "-realport" must be used in "vlogan" and "vcs" command line
to enable the SPICE real port. For example, here is a top-level VHDL
testbench instantiates SPICE block "addr4" which has a real port called
"cin":
architecture bhv of testbench is
…
component addr4 port ( cin : in real; … ) …
…
signal cin_real : real;
…
I0 : addr4 port map ( cin => cin_real, … );
…
The SPICE block "addr4" must have a Verilog view defined in which the
port "cin" is defined as "wreal":
.module addr4 (cin, … );
input cin,
wreal cin;
…
And to compile this design, the VCS switch "-realport" must be used:
% vlogan -realport addr4.v
% vcs -ad=vcsAD.init -realport ….
Known Limitations
Some limitations exist in VHDL/Verilog-SPICE, due to the existing limitations in
the VCS-MX flow. See the VCS-MX User Guide for more details.
The known VHDL/Verilog-SPICE limitations are:
■
Verilog wrappers are required for instantiations of SPICE under VHDL
(Please refer to "Using a Verilog Wrapper" section below for further details).
However, donuts of Verilog and SPICE blocks, or SPICE instantiating VHDL,
do not require a Verilog wrapper.
■
The NanoSim set_sim_hierid configuration command is ignored.
■
Thru-net optimization is not supported for SPICE ports connecting through
a top-level Verilog/VHDL net. But Verilog/VHDL ports connecting through a
top-level SPICE net are subject to thru-net optimization.
Note: As an alternative, real type connections in VHDL can be
used to generate unidirectional connections of SPICE ports
via VHDL.
SPICE Flow
This chapter provides the instructions on how to prepare the files (input data) to
run a mixed-signal simulation with CustomSim-VCS-MX/FineSim-VCS-MX,
HSIM-VCS-MX, or NanoSim-VCS-MX.
Overview
Some of the issues that require attention for VHDL/Verilog-SPICE mixed-signal
simulation are identical to those for the Verilog-SPICE.
Those issues are:
■ Netlist-related
■
Port-related
For a description of the steps to take to ensure that these issues are
addressed, refer to the Netlist-Related Issues and Port-Related Issues sections
in Chapter 4, Mixed-Signal Simulation in the Verilog-SPICE Flow.
Figure 21 shows the recommended steps to take to prepare files for
CustomSim/FineSim/HSIM/NanoSim-VCS-MX mixed-signal simulation.
The required files for analog models and blocks in the design are:
■
Transistor-level descriptions (or SPICE netlists)
■
Device model libraries (can be included inside the SPICE netlist)
Note: The CustomSim/FineSim/HSIM/NanoSim configuration
commands for specific analog parts of the design are not
required, but often used.
The required files for the digital components of the design are
■
VHDL and/or Verilog descriptions of the digital blocks
■
Dummy Verilog wrappers for SPICE blocks instantiated under VHDL
■
VHDL setup file
■
Mixed-signal simulation control file
Transistor-level Descriptions
For the SPICE netlists, keep the following points in mind:
■
HSPICE and VHDL netlist formats are case-insensitive, but Verilog is case-
sensitive.
So the best practice is to create all subcircuit, port, and signal names
consistently, in either lowercase or uppercase, across all SPICE, Verilog and
VHDL files.
■
Unused ports must be removed from the subcircuits that are going to be
instantiated under VHDL, and a Verilog wrapper is generated for them.
NanoSim removes those ports by default. The corresponding ports in the
Verilog wrapper modules must also be removed. You will see a WARNING
and ERROR message when NanoSim removes the port:
WARNING: mixed node “net10” not found.
ERROR: Unable to find nanosim id for net ‘net10’
interface signal mismatch
The VHDL setup file allows defining multiple logical library names and mapping
them to their actual physical location.
By default, all VHDL blocks are analyzed and stored in the WORK logical library.
The default physical directory for this library is ./WORK
For more information on the VCS-MX setup file, please refer to the VCS-MX
User Guide.
The following example shows a sample synopsys_sim.setup file. Here,
rtl_lib and gate_lib (two logical libraries) and their physical locations are
defined. Also, the WORK default logical library is mapped to the rtl_lib library.
WORK > rtl_lib
rtl_lib: ./rtl_library
gate_lib: ./gate_library
TIMEBASE=ns
TIME_RESOLUTION=10ps
The following example shows a SPICE subcircuit, its instance in the VHDL
description, and the required corresponding Verilog wrapper.
*
.subckt chargepump_com
+ com_inv<3> com_inv<2> com_inv<1> com_inv<0>
+ com_rsh<3> com_rsh<2> com_rsh<1> com_rsh <0>
+ clk
* we skip the subckt description
.ends
The following example shows the instantiation of the SPICE block described in
example 53 in the VHDL description. The sig_inv, sig_rsh and sig_clk
signals are defined in the VHDL block and connect to the chargepump ports.
I3 : chargepump_com
port map (
com_inv=> sig_inv(3 downto 0),
com_rsh=> sig_rsh(3 downto 0),
clk => sig_clk
);
• For cells instantiated under VHDL, when VHDL native methods are
used (through use lib_name.cell_name in VHDL code or by using
VHDL configurations).
The following example is a sample mixed-signal control file for the CustomSim-
VCS-MX file.
use_spice -cell chargepump;
use_verilog –module counter;
use_vhdl –cell d_flop;
use_vhdl –cell rtl_lib.mux_1;
The mixed-signal control file for FineSim, HSIM and NanoSim will look the
same except that the choose nanosim line must be replaced with choose
finesim or choose hsim or choose nanosim.
Argument Description
Argument Description
The following example shows how to map SPICE ports to VHDL ports when
they have different names.
.subckt inv1 i o
….
entity inv1 is port (y, a : out STD_LOGIC);
….
use_vhdl -cell inv1 port_map ( o => y, i => a );
The following example demonstrates how to map SPICE ports to VHDL ports
when a few of the ports have different names in VHDL and SPICE but the rest
have identical names in both views and can be mapped by name:
.subckt inv1 y m a b c
….
entity inv1 is port (z, n, a, b, c : out STD_LOGIC);
….
use_vhdl –cell inv1 port_map ( y => z, m =>n, * => snps_by_name);
Note that all ports must be mapped, which is why the "*" in " *=>
snps_by_name" is required to map any port that is not explicitly mapped.
The following example shows how to map SPICE ports to VHDL ports when
there are a few SPICE ports that don't have a counterpart in VHDL, a few of the
ports have different names in VHDL and SPICE, and the rest have identical
names:
.subckt inv1 y n a b c
….
entity inv1 is port (z, a, b, c : out STD_LOGIC);
….
use_vhdl –cell inv1 port_map ( y => z, n =>snps_open, * =>
snps_by_name);
Verilog-SPICE
Overview
To run a VHDL/Verilog-SPICE mixed-signal simulation, you must first be
familiar with stand-alone VCS-MX and CustomSim/FineSim/HSIM/NanoSim
simulations.
This chapter contains the following sections:
■
Installation Requirements
■
Setting up the Simulation Environment for the VHDL/Verilog-SPICE flow
■ Required Input Files
■
Compiling the Netlists
• The Design Analysis Stage
• The Design Elaboration Stage
■
Running the Simulation in VHDL/Verilog-SPICE
• Simulation Time Resolution in VHDL/Verilog-SPICE
• Interactive Simulation with UCLI using VCS-MX
■
Back-Annotation
Installation Requirements
In order to use VHDL/Verilog-SPICE, both the analog engine (the CustomSim,
FineSim, HSIM or NanoSim tools) and VCS-MX must be installed.
Check the respective release notes for the compatibility table showing the
compatible versions of the CustomSim/FineSim/HSIM/NanoSim tools and
VCS-MX. The compatibility table also specifies the utilities (such as "cc", "gcc"
and "ld") and the versions that are required for each release.
Generally, only one version of the CustomSim/FineSim/HSIM/NanoSim tools
and one version of VCS-MX are certified for each VHDL/Verilog-SPICE
release. (Non-recommended versions are not guaranteed to be compatible with
each other. Refer to the Installation Requirements section of each manual for
installation specifications.
License
Both LM_LICENSE_FILE and SNPSLMD_LICENSE_FILE can be used to
specify the license file location.
setenv LM_LICENSE_FILE Location_of_License_File
or
setenv SNPSLMD_LICENSE_FILE Location_of_License_File
During Design Analysis, the syntax of Verilog and VHDL files are verified and
intermediary files are generated that are used during Design Elaboration. Any
syntax errors in Verilog or VHDL netlists are flagged during this step.
During Design Elaboration, the design hierarchy is built based on the
information obtained during the Design Analysis step. At this stage, incorrect
port connectivity or missing definitions for instantiated blocks in Verilog, VHDL
or SPICE are identified and flagged.
Figure 22 demonstrates the two stages and the commands required for each
stage.
Argument Description
Argument Description
For a complete list of the command-line options for vlogan, refer to the VCS®
MX/VCS MXi User Guide.
The following example shows the calling of vlogan, where the two Verilog
netlist files cell1.v and cell2.v are
passed for analysis.
% vlogan cell1.v cell2.v
Because the –work option is not given, the intermediary files generated during
analysis are stored in the logical WORK directory—the physical location of which
is determined in the synopsys_sim.setup file.
The following example shows that instead of passing the names of individual
Verilog files, option -f passes the file_list file to vlogan, which includes
the names of the Verilog files to be analyzed. The intermediary files are also
generated during the analysis of the Verilog files and are written into the
vlog_lib logical library. The physical location of this logical library must be
defined in the synopsys_sim.setup file.
% vlogan –f file_list -work vlog_lib
The following example shows how to analyze a Verilog wrapper file that
contains one or more wreal ports with the -realport option.
% vlogan –realport wrapper1.v
Here, vlogan is called to analyze the verilog file wrapper1.v. Also the option
-realport is used so that the ports defined as wreal in the wrapper1.v file
can be handled by vlogan; otherwise, analysis fails and an error message is
generated.
If there are no wreal ports defined in the Verilog files passed to vlogan, using
the -realport option has no impact on the analysis.
The following example shows how to analyze a Verilog file that contains one or
more SystemVerilog real ports with the -realport option.
% vlogan -sverilog -realport real_port_file.v
Argument Description
Argument Description
For a complete list of the command-line options for vhdlan, refer to the VCS®
MX/VCS MXi User Guide.
The following example shows the calling of vhdlan, where the test1.vhd
and test2.vhd files are passed for analysis:
% vhdlan test1.vhd test2.vhd
Because the -work option is not used, the intermediary files generated during
analysis are stored in the WORK logical library, the physical location of which is
determined in the synopsys_sim.setup file.
The following example shows the file testbench.vhd is analyzed and the
intermediary files are stored in the vhd_lib logical library. The physical
location of vhd_lib must be defined inside the synopsys_sim.setup file.
% vhdlan –work vhd_lib testbench.vhd
Argument Description
Argument Description
topConfig | topModule| Defines the top-level cell in the design. The top-
topEntity level cell can be defined in one of three ways:
Argument Description
Argument Description
In the following example, the -ucli option starts the simulation in the UCLI
interactive mode (assuming that the -debug or -debug_all option was also
used during VCS compilation).
%simv -ucli
Back-Annotation
The same rules governing back-annotation in Verilog-SPICE apply in VHDL/
Verilog-SPICE as well.
This chapter describes how to use the autowrapper utility, which can generate
Verilog wrappers for SPICE subcircuits instantiated under VHDL.
Overview
The autowrapper generates an empty Verilog module for a given SPICE
subcircuit.
This chapter contains the following sections:
■
The VHDL/Verilog-SPICE Autowrapper Utility
• Using the Autowrapper Utility
(slow) the run time because inout mixed-nets can lead to many successive
back-and-forth D/A and A/D conversions.
The autowrapper utility creates wrapper.v and wrapper.log files (by default).
The wrapper.v file contains all Verilog wrapper modules corresponding to all
subcircuits that are defined in the SPICE file. For instance, if there are four
subcircuits specified in the SPICE file, this utility creates four Verilog wrapper
modules in the wrapper.v file. The syntax for the autowrapper utility is:
autowrapper -n[fmt] netlist_file(s)_name
[-bus_fm bus_format][-cell subckt_name(s)]
[-xcell subckt_name(s)] [-file netlist_file_name]
[-o output_file_name][-case s|S|l|L|u|U]
endmodule
All ports are defined as inout in module inv. You must change port
directions; for example, a as input and zn as output.
For a description of the autowrapper utility options, see Table 11.
Table 11 autowrapper Utility Description
A[0] [%d]
B_1 _%d
C<2> <%d>
D_3_ _%d_
E{4} {%d}
F5 %d
G6_ %d_
For example, the _%d bus format directs the autowrapper utility to recognize
bus signals defined as A_1, A_2 ..., A_n.
.subckt inv a zn
m1 zn a vdd vdd p 1 0.35
m2 zn a gnd gnd n 2 0.35
.ends
The inv module is unnecessary here and can create confusion if another
inv module exists in the original Verilog code. You must remove the inv
module description from the net.v file.
■
Verilog is case-sensitive. SPICE is not case-sensitive. The autowrapper
utility maintains case-sensitivity for module names; but, you must use the
-case option if you want to maintain case-sensitivity for port names.
■
No timescale information in the wrapper file is generated by the
autowrapper utility. Therefore, the wrapper file must be placed at the end
of the Verilog file’s compilation input:
vcs -ad a.v c.v d.v wrapper.v
■
If the signal in the SPICE netlist is bus- or array-type, it must be expanded.
The autowrapper utility automatically generates bus- or array-type
signals in the Verilog wrapper file (original SPICE subcircuit), as shown in
the following example. Refer to Table 11 for details.
.subckt mem DATA[3], DATA[2], DATA[1], DATA[0],
+ WL[0], WL[1], WL[2], WL[3],
+ WL[4], WL[5], WL[6], WL[7],
+ R_WB, RAM_ENB
.ends
■
If special characters and Verilog-specific keywords are used for the signal or
subcircuit name, the name is assigned a backslash ( \ ) leading character.
In addition, a space is inserted at the end of the name in the Verilog wrapper
file, as shown in the following example.
module \inverter.test ( \if , \1 , \2 );
inout \if ;
inout \1 ;
inout \2 ;
endmodule
■ If subcircuit ports in a bus are randomly ordered in the transistor netlist, the
autowrapper utility cannot function properly.
■
Nested subcircuits in the SPICE netlist are supported. A module is
generated for the nested subcircuit; the module name is made of the nested
subcircuit name preceded by the parent subcircuit name, itself preceded by
a backslash character (\).
A nested subcircuit sample is shown in the following example.
.subckt s in out
.subckt inv13 in out
.ends inv13
.ends s
This chapter describes the ways analog and digital waveforms can be generated
and saved in CustomSim-VCS-MX, FineSim-VCS-MX, HSIM-VCS-MX, and
NanoSim-VCS-MX simulations.
Overview
The output of VHDL/Verilog-SPICE mixed-signal simulation can either be
saved into two separate files—one file for VCS-MX results (.vpd format) and
another for analog results (for example,.vpd or .fsdb format)—or the
simulation can generate a unified single output (in a merged .vpd format) that
contains both digital and analog waveforms.
This chapter contains the following sections:
■ Generating an Analog Output File
■
Generating a Digital Output File
■ Generating a Merged VPD Output File
in which the -depth option specifies that all signals—at and below the
hierarchical path /foo—are dumped in the VPD file. If foo is the name of
the top entity, every digital signal in the design is saved in the VPD file.
The -o option specifies the VPD file name, and in this example, the file
name is foo.vpd.
For a complete list of all options for the UCLI dump command, refer to the
VCS Unified Command Line Interface User Guide.
Note: FineSim does not support VPD format and as a result FineSim-
VCS cannot generate a merged VPD output.
Overview
The Verilog-AMS-SPICE flow is only supported in the CustomSim-VCS AMS
and NanoSim-VCS AMS solutions (mixed-signal solutions with the FineSim
and HSIM tools do not currently support Verilog-AMS). This flow supports
Verilog-AMS, as described in the Verilog-AMS LRM (with some exceptions and
limitations described in this section).
The Verilog-AMS-SPICE flow supports many of the same features as those in
Verilog-SPICE, described in Chapter 4, Mixed-Signal Simulation in the Verilog-
SPICE Flow.
Some of the concepts in the Verilog-AMS language that must be considered
when using the Verilog-AMS-SPICE flow are:
■
Analog and digital blocks in Verilog-AMS
■ Connect rules and connect modules
■
Continuous and discrete domains
■
Nets and disciplines
This chapter contains the following topics:
■
Analog and Digital Domains
■
Understanding Analog and Digital Blocks in Verilog-AMS
■ Nets and Disciplines
`include "constants.vams"
`include "disciplines.vams"
endmodule
A Verilog-AMS module can contain many digital blocks, but it can only contain
one analog block as defined in the Verilog-AMS LRM (Language Reference
Manual).
An analog block is identified by the keyword analog. All other blocks inside a
module definition are considered digital blocks (e.g., initial and always blocks).
Since Verilog-AMS is a superset of the Verilog-A and digital Verilog-HDL
languages, a module that only contains digital blocks (conventional digital
Verilog HDL) or a module that only contains an analog block (conventional
Verilog-A) is also viewed and treated as Verilog-AMS code by the simulator.
module test;
endmodule
Note: No explicit disciplines are declared for these nets, and the
simulator can use the discipline resolution method to assign the
proper discipline.
`include "constants.vams"
`include "disciplines.vams"
`default_discipline logic
module foo ( a , b);
input a;
output b;
…
endmodule
Unlike nets, disciplines are not explicitly declared for variables.. The domain of
a variable is determined by the context in which the assignment is made. If the
variable is assigned a value in an analog context (i.e., in an analog block), the
variable is considered analog. If, however, the assignment is made in a digital
context (i.e., in a digital block), the variable is considered digital. A variable can
only be assigned a value in one domain, but it can be accessed for reading
from any domain.
The following example shows shows a digital domain variable. The real variable
v is assigned a value in the digital domain (inside the initial block), and as a
result is considered a digital variable.
`include "constants.vams"
`include "disciplines.vams"
module foo;
real v;
initial begin
v=1.5;
end
…
endmodule
module foo;
real v;
analog begin
…
v = 1.5;
…
end
…
endmodule
This chapter describes using multiple views, donut partitioning, and connect
modules in Verilog-AMS-SPICE.
Overview
The following topics are described in this section:
■ Selecting Multiple Views
■
Understanding Hierarchical Layering of SPICE and Verilog-AMS in a Design
■
Unsupported Features in Verilog-AMS-SPICE
■ Resolving Keyword Conflicts between SystemVerilog and Verilog-AMS
■
Converting Signals with Interface A/D and D/A Connect Modules
• Identifying the Correct Connect Module
• Understanding Connect Rules
In the Verilog-AMS-SPICE flow, a cell can only have one module definition.
Regardless of the type of Verilog language used, the definition is viewed as
Verilog-AMS and can be selected by using the use_verilog command.
The following example shows a mixed-signal control file where both instance-
based and cell-based view selection commands are used.
choose xa -nspice spice_files.spi -c cfg;
This way the language context for SystemVerilog and Verilog-AMS would be
kept separate at compilation time and the potential conflict between keywrods/
function names can be avoided.
endmodule
A connect rule may contain many more associations; for example, to define
interfaces between other types of digital and analog disciplines, or to define bidi
connect modules.
Note: Connect rules and connect modules are only deployed by the
simulator if there is a connection between a digital and an analog
net. If no direct connection exists throughout the netlist, connect
rules and connect modules are not used.
In Verilog-AMS-SPICE, all conversions of signals between digital
and analog are done by-way-of connect modules, as opposed to
the resistance mapping used in NanoSim-VCS.
analog begin
if (dig_in == 1b'1) // digital signal accessed in analog domain
V(an_out) <+ 1.8;
end
endmodule
Figure 24 shows where the simulator inserts connect modules. There are two
inserted connect modules: d2a and a2d.
d2a a2d
Figure 24 Inserted Connect Modules when Two Nets Of Different Disciplines come
into Contact
This chapter describes the special requirements for compiling netlists for an
Verilog-AMS-SPICE simulation.
Overview
Before compiling netlists for an Verilog-AMS-SPICE simulation, special
requirements must be met. For example, identical subcircuit and module
names for multi-view cells, port name matching between SPICE and Verilog
views, etc.
The following topics are described in this section:
■
Preparing a Mixed-Signal Simulation in Verilog-AMS-SPICE
■
Files Containing Connect Rule and Connect Module Definitions
simulation in Verilog-AMS-SPICE:
1. Define proper connect modules and connect rules, if needed.
2. Use/modify the default connect rule and connect module files that come with
the CustomSim™ and NanoSim installations.
3. Include the following two lines at the top of the first Verilog file passed to the
simulator:
• `include "constants.vams"
• `include "disciplines.vams"
Note: Connect rules and connect modules are not used if direct
connection(s) between analog and digital nets do not exist. This
occurs if the interactions between analog and digital nets are
implemented by-way-of the analog/digital cross-boundary
sampling within a Verilog-AMS module—not through port
connections—as shown in Figure 24 in Chapter 13, Using
Multiple Views, Donut Partitioning and Connect Modules with
Verilog-AMS-SPICE.
However, if there are direct connections between analog and digital nets (e.g.,
nets of electrical and logic disciplines), the definitions for connect rules and
connect modules must be passed to the simulator at compile time.
CustomSim and NanoSim installations come with default connect rules and
connect modules. They are located at:
XA_install_dir/include/connect_modules
NanoSim_install_dir/platform_type/ns/interfaces/vcsace
where platform_type is the name of the platform (e.g., linux, amd64,
sparcOS5 etc.). For example, the default connect rules and connect modules
for NanoSim on a Linux platform are located at:
NanoSim_install_dir/linux/ns/interfaces/vcsace
Overview
Starting from 2009.06 a new set of mixed-signal commands is introduced which
will replace, and in some cases add to, the old command set.
Table 13 maps the new commands to the old ones. The table also identifies the
old, obsolete commands and new commands that do not have a counterpart in
the old command set.
Both sets of commands will be supported in the 2010.12 release, but the old
commands will be phased out in later releases.
choose choose
N/A duplicate_net_inst_name
(new in 2010.03)
spice_top spice_top
use_spice use_spice
use_verilog use_verilog
use_vhdl use_vhdl
This appendix describes the reserved keywords. When using the Verilog-
SPICE, VHDL/Verilog-SPICE or Verilog-AMS-SPICE flows, or Verilog-AMS-
SPICE, these terms are treated as keywords in the Verilog modules. If any of
the following keywords are used as net names, port names, instance names or
module names in the Verilog (D) modules, you must rename these keywords to
avoid compilation errors.
Overview
This appendix contains the following items:
■
Reserved Keywords for Verilog-SPICE and VHDL/Verilog-SPICE
■ Reserved Keywords for Verilog-AMS-SPICE
it is not fully tested. Other PLI 2.0 compliant Verilog/VHDL simulators may also
work with HSIM mixed-signal simulation but have not been fully tested.
Mixed-signal simulation uses Verilog Procedural Interface (VPI) or
Programming Language Interface (PLI) 2.0, to interact with ncsim, NC-Verilog/
VHDL simulator. The mixed-signal simulation executable is a shared library
including VPI code and the HSIM engine. Mixed-signal simulation starts with
ncsim as the master simulator which dynamically links with the mixed-signal
simulation library and invokes the HSIM engine. The single process combines
the ncsim, mixed-signal simulation interface, and HSIM engine. The
interactions between ncsim and HSIM go through VPI function calls. This
approach does not need any communication backplane and interprocess
communication (IPC). Thus, best performance can be achieved.
Note: For the HP-UX platform, the library path environment variable is
SHLIB_PATH and the VPI shared library is libvpihsim.sl.
Note: To run mixed-signal simulation with VCS and Verilog-XL, set the
TCL_LIBRARY environment variable to the HSIM tool installation
directory containing the init.tcl file.
2. Provide a SPICE netlist for Verilog modules that have the same module/
subcircuit and port names.
3. Recompile the Verilog source code using ncvlog. Proper hdl.var and cds.lib
are required for ncvlog.
4. Insert ncelab with an additional command line option where libvpihsim.so is
the VPI share library shipped to Synopsys customers as shown in the
following syntax example:
-loadvpi libvpihsim.so:nsda_vpi_startup
5. Specify HSIM parameters such as the netlist file name in the cosim.cfg file.
6. Run ncsim with additional command line option as shown in the following
syntax example:
-loadvpi libvpihsim.so:nsda_vpi_startup +nsda+”cosim.cfg”
Use a new file name extension, such as .cs, to compile the new files into a
new view such as cosim view.
2. Modify hdl.var to define a new view as shown in the following syntax
example:
DEFINE VIEW_MAP (.cs => cosim)
3. The selected view described in the previous syntax is cell based. For an
instance based view selection, insert the following compilation directive
before the instance in the original Verilog source code as shown in the
following syntax:
`uselib lib=cosim_lib view=cosim
4. Create a SPICE netlist for the Verilog modules. Make sure to have the same
subcircuit name as the Verilog module name and port names as well.
Note: If a subcircuit name is different from the module name, use
map_subckt_name to associate them.
5. Compile the new Verilog files into a new view as specified in hdl.var.
6. Prepare mixed-signal simulation configuration file, e.g. cosim.cfg, with HSIM
parameters and mixed-signal simulation parameters.
7. Run the NC-Verilog command with additional -loadvpi command option.
NC-Verilog is a Cadence product that requires three steps to run a
simulation: compilation, elaboration, and simulation. The related commands
are:
• Compilation—Use the ncvlog command. The syntax is :
where libvpihsim.so is the VPI share library are shipped with the
product.
Note: The ncsim command line option +nsda+ is used to pass
the cosim.cfg configuration file name to mixed-signal
simulation. If the +nsda+ option is not specified, the
default configuration file is cosim.cfg.
The following example illustrates a simple inverter chain with five inverters of
which two are in analog and three in digital. The inv module is shown in both
the top.v and gate.cs files. Since hdl.var defines the .cs file as cosim view with
a higher precedence over the default module view, the inv module is simulated
in HSIM. Its equivalent subcircuit is defined in the inv.spi file.
Sample files for the example include the following:
■
top.v
Verilog source code that contains the default inv module. This file is
compiled into the default module view.
■
gate.cs
Verilog source code containing an inv module to be simulated by HSIM. This
file is compiled into the cosim view.
■
hdl.var
Verilog configuration file that specifies a cosim view, asks the compiler to
compile *.cs source files into cosim view, and asks elaborator to pick cells
with cosim view whenever available.
■
cds.lib
Verilog configuration file that defines design libraries. The physical directory
for a design library must pre-exist. Refer to the Cadence NC-Verilog User
Manual for details.
■
inv.spi and test.spi
SPICE netlist with inv subcircuit simulated by HSIM.
■
cosim.cfg
Mixed-signalsimulation configuration file that specifies both HSIM and
mixed-signal simulation parameters such as the SPICE netlist file name.
module top;
wire z1, z2, z3;
testbench tb(z1, z2, z3, a);
chain main(a, z1, z2, z3);
endmodule
module chain(...);
inv i1(...);
inv i2(...);
endmodule
config cfg;
design rtlLib.top;
default liblist rtlLib cosimLib;
instance top.a2.i1 liblist cosimLib;
endconfig
To compile the design units, invoke ncvlog using the following syntax:
% ncvlog -libmap lib.map top.v inv.cs
This compiles the design units into the appropriate libraries as follows:
top rtlLib
chain rtlLib
In the lib.map (library map) file, the Verilog configuration cfg specifies an
instance based instantiation for instance top.a2.i1. To elaborate the top design,
use the following command:
% ncelab -libmap lib.map cfg -loadvpi \
libvpihsim.so:nsda_vpi_startup -access +rwc
The instance top.a2.i1 is bound to the design unit inv in cosimLib while the
remaining three inv instances are bound to the design unit inv in rtlLib. During
mixed-signal simulation, the instance top.a2.i1 is partitioned to the analog
simulator and the others are simulated by Verilog simulator. With the Verilog
configuration, analog/digital partitioning for mixed-signal simulation can be
accomplished in an instance based fashion.
Refer to the NC-Verilog User Manual and IEEE 1364-2001 standard for further
details on instance based instantiation.
2. Modify the original VHDL code to instantiate the new Verilog module.
3. Compile the VHDL code with ncvhdl as shown in the following syntax:
% ncvhdl top.vhd
4. Compile the Verilog code with ncvlog as shown in the following syntax:
% ncvlog gate.cs
The following example shows a VHDL on top design of a inverter chain with
two leaf inverters assigned to SPICE. The VHDL entity inv is replaced by a
SPICE subcircuit inv for mixed-signal simulation. A Verilog module inv is
created as the wrapper of the SPICE subcircuit.
The following sample files are used are:
■
top.vhd: The VHDL design
■
gate.cs: The Verilog wrapper for SPICE subcircuit inv.
■
test.spi: SPICE netlist
■
inv_sub.spi: SPICE netlist
■
cosim.cfg: Mixed-Signal simulation configuration file
■
hdl.var: NC-Verilog configuration file
■
cds.lib: NC-Verilog configuration file
component
my_inv port(a: in std_logic;
z: out std_logic);
end component;
signal m1, m2, m3: std_logic;
begin
x1: my_buf PORT MAP (a, m1);
x2: my_inv PORT MAP (m1, m2);
x3: my_buf PORT MAP (m2, m3);
z1 <= m1;
z2 <= m2;
z3 <= m3;
-- process (a, m1, m2, m3)
-- VARIABLE I: LINE;
-- begin
-- write( I, now, left, 15);
-- write( I, a , right, 3);
-- write( I, m1, right, 3 );
-- write( I, m2 , right, 3);
-- write( I, m3 , right, 3);
-- writeline(output, I);
-- end process;
end;
library ieee;
use ieee.std_logic_1164.all;
entity my_inv is
port(a: in std_logic;
z: out std_logic);
end my_inv;
library ieee;
use ieee.std_logic_1164.all;
architecture behav of my_inv is
begin
-- z <= NOT a after 1 ns;
z <= NOT a;
end;
--library ieee;
--use ieee.std_logic_1164.all;
--entity inv is
-- port(a: in std_logic;
-- z: out std_logic);
--end inv;
--library ieee;
--use ieee.std_logic_1164.all;
--architecture behav of inv is
--begin
-- z <= NOT a after 1 ns;
-- z <= NOT a;
--end;
library ieee;
use ieee.std_logic_1164.all;
entity my_buf is
port (a: in std_logic;
z: out std_logic);
end my_buf;
library work;
use work.all;
architecture gate of my_buf is
component
my_inv port(a: in std_logic;
z: out std_logic);
end component;
component
inv port(a: in std_logic;
z: out std_logic);
end component;
signal t: std_logic;
begin
IV1: my_inv PORT MAP (a, t);
IV2: inv PORT MAP (t, z);
end gate;
set_args spice/test.spi
digital_cell invd
verilog_file verilog/invd.v
.inc inv.spi
.inc invd.spi
.inc buf.spi
vin in 0 pwl 0n 0v 1n 0v 1.1n 3v 6n 3v 6.2n 0v r
.print v(*)
.tran 0.1n 100n
.end
=========== File: inv.spi =============
.subckt inv a z
m1 z a vdd vdd p l=0.5u w=5u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
m2 z a 0 0 n l=0.5u w=3u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
.ends
=========== File: invd.spi ============
.subckt invd a z
m1 z a vdd vdd p l=0.5u w=5u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
m2 z a 0 0 n l=0.5u w=3u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
.ends
=========== File buf.spi ==============
.subckt buf in out
x1 in n1 inv
x2 n1 out invd
.ends buf
============ File: invd.v ============
`timescale 1ns/10ps
module invd (a, z);
input a;
output z;
assign z =~a;
endmodule
To use donut partition with Verilog on top, perform the following steps.
1. Use the analog_cell statements specify analog/digital partitioning. The
syntax for analog_cell is:
analog_cell <cell name> -vmod <verilog module name>...
where <cell name> specifies the module to be simulated in HSIM and -vmod
<verilog module name> specifies the module under <cell name> that
remains in Verilog.
Any number of module names can be specified by adding additional -vmod
<verilog module name> parameters. Refer to analog_cell on page 244 for
additional information.
2. Run the simulation as normal Verilog netlist-on-top flow. The first run will exit
before simulation time 0, generating a .cs and file for each donut cell.
3. Include the .cs files in Verilog compilation and run the simulation. The
modules will be partitioned and simulated as specified in the analog_cell
command.
Note: The cosim view file extension (.cs) is optional and can be
specified in the analog_cell command.
Figure 25 and Example show donut partitioning with a Verilog top. The mixed-
signal simulation configuration file should contain the analog_cell command.
Verilog Top
hsimmod
hsimmod_2
pure_hsimmod vlogmod
After first run, the following files are generated in the specified “.” output
directory. In this example, it is the current directory:
■
hsimmod.cs
■
hsimmod_2.cs
■
pure_hsimmod.cs
initial begin
#0 vlog_drv = 1'bz;
#10 vlog_drv = 1'b1;
#10 vlog_drv = 1'b0;
#10 vlog_drv = 1'b1;
#10 vlog_drv = 1'b0;
#10 $finish;
end
endmodule
assign z =~a;
always @(a)$display(“%t invd : z = %v”, $time, z);
endmodule
assign z =~a;
always @(a)$display”%t invd2: z = %v”, $time, z);
endmodule
assign z =~a;
always @(a)$display(“%t invd3: z = %v”, $time, z);
endmodule
assign z =~a;
always @(a)v$display(“%t inv : z = %v”, $time, z);
endmodule
* global nodes
.global vdd vss gnd
* supplies
vvdd vdd 0 dc VDDVAL
vgnd gnd 0 dc 0v
.inc models
.inc inv.spi
.inc invd.spi
.inc buf.spi
.end
.ends
.subckt invd2 a z
m1 z a vdd vdd p l=1.0u w=10u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
m2 z a 0 0 n l=1.0u w=6u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
.ends
.subckt invd3 a z
m1 z a vdd vdd p l=1.0u w=10u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
m2 z a 0 0 n l=1.0u w=6u as=1.0e-10 ad=1.0e-10 ps=0 pd=0
.ends
2. Replace the module body of the sub block in the Verilog module to be
simulated in HSIM with the following syntax line:
initial $nsda_module();
5. The Verilog compiler is used to compile cosim.v together with other Verilog
source files.
6. Start mixed-signal simulation from the top Verilog module defined in cosim.v
and the SPICE netlist. HSIM will skip simulating the SPICE subcircuits
specified in digital_cell commands while partitioning the sub-block specified
in Step 2 into HSIM.
Figure 26 is an example of donut partitioning with a SPICE top. Within the
SPICE top, the buffer is partitioned to Verilog while one of its sub blocks, inva,
is partitioned to be simulated in HSIM.
SPICE top
· invd inva
buffer
·
Figure 26 SPICE Top Mixed-Signal Simulation Working in Donut Partitioning
* global nodes
.global vdd vss gnd
* supplies
vvdd vdd 0 dc VDDVAL
vgnd gnd 0 dc 0v
.inc models
.inc inva.spi
.inc invd.spi
.inc buf.spi
.end
output out;
wire n;
invd inst_invd (in, n);
inva inst_inva(n, out);
endmodule
endmodule
To restart the simulation, use ncsim command with the saved snapshot as
shown in the following example:
% ncsim <snapshot name>
Restart from within ncsim interactive mode is not supported.
analog_cell
Generates Verilog module templates containing the $nsda_module() statement
for analog partitions in the Verilog as the top instance flow.
Syntax
analog_cell [-ext <file name extension>] [-dir <directory>]
<cell 1> <cell 2> -vmod <verilog sub-module name>...
Arguments
-ext
Specifies file name extension for the generated Verilog module templates.
The default file name extension is cs.
-dir
Specifies the directory to put the generated Verilog module template. The
default directory is the current working directory.
cell name
Can be a wildcard.
-vmod
Specifies the submodule that remains in Verilog. Do not use wild cards.
Note: When using the -vmod option, only one cell within an
analog_cell command may be used.
Description
The analog_cell command generates Verilog module templates containing
the $nsda_module() statement for analog partitions in the Verilog as the top
instance flow. If the design module of an analog partition does not exist in the
design library, mixed-signal simulation stops after the template is generated.
Then this new file must be compiled in order to start mixed-signal simulation. If
the design module of an analog partition already exists in the design library,
analog_cell will not generate the module template.
auto_vsrc_warning
Issues warning message if conflict exists between automatically detected
voltage level and voltage level set by set_port_prop command.
Syntax
auto_vrsc_warning <bool>
Description
Default for <bool> is 0. When set to 1, a warning message is issued if a
conflict between an automatically detected voltage level and a voltage level set
correct_netlist
Syntax
correct_netlist <bool>
Description
Default for <bool> is 1. If this option is on, and:
■
Verilog module has more ports than subcircuit ports, it will drop port a
connection which is found as a global node, i.e. vdd, vss.
■
Subcircuit has more ports than inst module ports, it will create dummy node
to let simulation go on.
define_print_variable
Defines a print variable used as a reference voltage in the set_port_prop
command.
Syntax
define_print_variable <print variable name> = <expression>
Description
This command defines a print variable used as a reference voltage in the
set_port_prop command. The print variable will be added to nsda_cosim.sp
netlist file with SPICE .print statement.
define_strength
Defines a strength table with resistances mapped to Verilog seven strength
levels.
Syntax
define_strength <strength table name> [<double>] [-<strength
option> <double>] [-<strength option> <double>] ...
Description
This command defines a strength table with resistances mapped to Verilog
seven strength levels.
Each -<strength option> is used to map to the corresponding Verilog
strength level and can be any of the following:
■
-supply
■
-strong
■
-pull
■
-weak
■
-large
■
-medium
■
-small
The value inserted after -<strength option> is a strength resistor’s
resistance. If a value does not have an associated -<strength option>, it
will be set as the default value for the remaining strength levels not specified
using the -<strength option>.
<strength table name> is used in the -strength port property of the
set_port_prop command for strength resolution at inout ports. Verilog inputs
will be applied through the resistor with respect to the Verilog strength level and
HSIM resolves contributions of both the Verilog- and SPICE-sides in order to
obtain the final bi-directional net value.
digital_cell
Specifies the SPICE subcircuit to be partitioned to Verilog.
Syntax
digital_cell <sub-circuit name>
Description
In SPICE flow, specifies the SPICE subcircuit to be partitioned to Verilog.
digital_cell_inst
Specifies the SPICE instance to be partitioned to Verilog.
Syntax
digital_cell_inst <SPICE instance name>
Description
In SPICE flow, specifies the SPICE instance to be partitioned to Verilog.
dump_interface
Produces a report file showing the mapping result between analog and digital
ports.
Syntax
dump_interface [0|1|2]
Arguments
0
Do not dump the .csintf file.
1
Generates the .csintf that lists all interface nodes and properties.
2
(Default) Generates the .csintf at the end of mixed-signal simulation that lists
all interface nodes, properties, and the number of interface events for each
interface node.
Description
This command produces a report file showing the mapping result between
analog and digital ports.
Example
Here is a .csintf file example.
-------------------------------------------
a2d main.out2 xmain.out2 node=out2 vhi=2.1 vlo=0.9
d2a main.out1 xmain.out1 node=out1 logichv=3 logiclv=0 rise=1000
fall=1000 rm_glitch=1000
-------------------------------------------
■
Column two lists the verilog ports.
■
Column three lists the HSIM ports.
dump_port_prop
Dumps port properties associated with matching ports.
Syntax
dump_port_prop <file>
Description
Dumps out what port properties have been associated with the matching ports.
dump_setting
Dumps configuration command settings to HSIM log file.
Syntax
dump_setting <bool>
Description
Dumps configuration command settings to the HSIM log file. Default for
<bool> is 0.
keep_iface_file
Specifies whether to deletes nsda_cosim.sp interface file automatically after
completing simulation.
Syntax
keep_iface_file <bool>
Description
Mixed-signal -simulation engine generates the nsda_cosim.sp interface file for
the analog blocks in analog view, and it serves as the interface media between
Verilog and HSIM simulators. Turning off this flag deletes this file automatically
after simulation is complete. Default for <bool> is 1.
map_subckt_name
Maps module name to correct subcircuit definition in SPICE instantiation.
Syntax
map_subckt_name <module_name> <subckt_name>
Description
If module name is different than the subcircuit name, this command will map it
to the correct subcircuit definition in SPICE instantiation.
map_unfound_port
Maps unfound port to the specified SPICE node name.
Syntax
map_unfound_port [-cell <pattern>] <map_node>
<unfound_port> …
Description
When writing the interface netlist file, if a subcircuit has more ports than inst
module ports, this command will map the unfound port to the specified SPICE
node name.
The search priority is in a top-down order as follow:
■
Exact cell name.
■
Match cell pattern.
■
Match unfound port list for rules without -cell argument.
report_logic_delay
Reports delayed logic output when the signal voltage crosses logic threshold
voltage.
Syntax
report_logic_delay <time>
Description
[default] 2 ns
This command reports delayed logic output when the signal voltage crosses
the logic threshold voltage, if the delayed logic output is greater than a specified
time.
report_port_resistance
Generates a report of path resistances in the hsim.csres file.
Syntax
report_port_resistance {0|1|2}
Arguments
0
no report (default)
1
Report for inout ports only.
2
Report for all interface ports.
Description
This command generates a report of path resistances in the hsim.csres file.
The report contains statistics of resistances of paths from interface nodes to
voltage sources. The resistance values can be used as a reference to set up
strength tables to map Verilog seven strength levels to resistors.
set_args
Passes the regular HSIM command line argument to HSIM.
Syntax
set_args <nsda_args> …
Description
This command passes the regular HSIM command line argument to HSIM. For
example: set_args test.spi asks HSIM to accept test.spi as an input netlist.
set_intr_mode
Sets the interactive mode.
Syntax
set_intr_mode <bool>
Description
By default, Ctrl-C stops simulation in the Verilog simulator’s interactive mode.
To move between the interactive modes of the Verilog simulator and HSIM, use
the following commands:
■
call nsda_intr_mode: Leaves the Verilog simulator’s interactive mode
and enters the HSIM interactive mode.
■
quit: Leaves the HSIM interactive mode and returns to the Verilog
simulator’s interactive mode.
If set_intr_mode is set to 1, Ctrl-C stops the simulation in HSIM’s interactive
mode instead of Verilog simulator's interactive mode. HSIM interactive
commands can be applied to debug the simulation. In this case, Verilog’s
interactive mode can not be entered by users. Default for <bool> is 0.
set_fall_step
Specifies the number of stop times to update signal voltages when a rising/
falling slope occurs.
Syntax
set_fall_step <positive number>
Description
This command specifies the number of stop times to update signal voltages
when a rising/falling slope occurs. Default for <positive number> is 10.
set_port_prop
Applies specified properties to matched cells or instances and their ports.
Syntax
set_port_prop [-cell <pattern>|-inst <pattern>] [-port
<pattern>] <-port property1> <value1> <-port property2>
<value2> … [-follow_ov_param] [-no_a2d <bool>] [-no_d2a
where logichv is the output variable and '0.7 * v(vdd)' is the voltage
expression.
-logiclv <double>|<output variable>
[default] HSIMLOGICLV
Set port logic0 voltage.
Its value can be a double number or an output variable which is a string
identifier starting with an alphabetic letter.
-logicxv <double>|<output variable>
[default] HSIMLOGIGLV
set_port_prop_warning
Specifies the number of warning messages allowed before simulation stops.
Syntax
set_port_prop_warning <number> [-stop]
Description
Warning messages are issued when set_prop_prop command specifies
mismatched ports. This command specifies the number of warning messages
allowed before simulation stops. If -stop option is specified, simulation stops
whenever there is any mismatched port. The default is 250 warning messages
with -stop option.
set_print_progress
Specifies the time interval to output mixed-signal simulation progress.
Syntax
set_print_progress <time>
Description
This command specifies the time interval to output mixed-signal simulation
progress.
set_rise_step
Specifies the number of stop times to update signal voltages when a rising/
falling slope occurs.
Syntax
set_rise_step <positive number>
Description
This command specifies the number of stop times to update signal voltages
when a rising/falling slope occurs. Default for <positive number> is 10.
set_slope_step
Specifies the number of stop times to update signal voltages when a rising/
falling slope occurs.
Syntax
set_slope_step <positive number>
Description
This command specifies the number of stop times to update signal voltages
when a rising/falling slope occurs. Default for <positive number> is 10.
set_verbose
Sets the level of detail for output messages.
Syntax
set_verbose <level>
Description
This command sets the level of detail for output messages. <level> can be
none, low, high, or detail; default is high.
none
Suppresses any messages generated by the mixed-signal simulation
interface except error message.
low
Writes information messages generated by the mixed-signal simulation
interface.
high
Writes warning messages generated by the mixed-signal simulation
interface.
detail
Writes suggestion on which D-to-A input should be defined as VSRC to
speedup the simulation time and other messages.
set_verilog_supply1
Defines voltage level for Verilog supply1.
Syntax
set_verilog_supply1 <double>
Description
This command defines voltage level for Verilog supply1.
set_verilog_supply0
Defines voltage level for Verilog supply0.
Syntax
set_verilog_supply0 <double>
Description
This command defines voltage level for Verilog supply0.
verilog_file
Specifies Verilog source file containing Verilog module definitions for
digital_cell or digital_cell_inst.
Syntax
verilog_file <Verilog source file name>
Description
In SPICE flow, this command specifies Verilog source file containing Verilog
module definitions for digital_cell or digital_cell_inst. verilog_file can be
applied multiple time for different verilog sources.
set_args hsim_top.sp
set_rise_step10
set_fall_step6
set_port_prop-cell top -port outport1 outport2 \
outport3 -vhi 2.64 -vlo 0.66
set_port_prop-cell top -port inport* \
-logichv 3.3 -logiclv 0 -slope 100ps
Rule 1
The set_port_prop configuration command provides the flexibility to over write
both default and automatically detected voltages.
Rule 2
Search through channel connected voltage sources. The voltage levels of the
voltage sources will be applied to the interface nodes. Warning messages are
given if there is any conflict between detected voltage sources and
configuration commands. By default, Warning messages are suppressed. They
can be turned on using the auto_vsrc_warning configuration command. A
Warning message is given if the interface node is not connected to any voltage
source and HSIMVDD is applied.
Rule 3
HSIMVDD is used as the default voltage if Rule 1 and Rule 2 do not apply. If
any channel connected voltage source is detected with a different voltage than
HSIMVDD, a Warning message is issued and the detected voltage is applied.
To continue simulation in NC-Verilog, issue the command cont from the HSIM
interactive mode prompt HSIM> and simulation will continue. If you are
prompted with ncsim> after issuing the cont command at HSIM>, type run and
NC-Verilog will continue.
Command Function
csli
csli <pattern> <-a2d|-d2a|-biput>
Parameter Description
HSIM > csli *addr* -d2a Prints d2a interface nodes with names matching
the pattern *addr*.
A typical result of csli command is shown in the following example. Note that
<=> denotes bi-directional ports:
Note: In this example, the bi-directional ports have both a2d and d2a
interface nodes: 7 <=>a2d db[3] and 7 <=>d2a db[3].
csh
csh <number of entries (default is 10)>
csh prints the global interface activity history in chronological order. If no
argument is specified, csh prints the maximum number of entries available up
to a maximum of 10 entries. If the number of entries is specified, csh prints up
to the specified number of entires. The maximum number of global history
entries is set to 10000 by default and can be changed by the max_history
command in mixed-signal simulation configuration file as follows:
max_history <max # of global history entires>
Table 19 HSIM Example
csnh, csinh
csnh <name>
csinh <id>
csnh and csinh print the activity of a specified interface node if available.
Entries for the specified node stored in the history buffer are printed in
chronological order. Both a2d and d2a history will be printed if available. The
maximum number of entries printed each time by csnh and csinh can be set by
the command csnph. The default is 10.
The id corresponds to the id field in the output of the csli command. This id can
also be used in other HSIM interactive commands.
Table 20 HSIM Example
HSIM > csnh db[3] Prints activity history of interface node on db[3].
HSIM > csinh 10 Prints activity history of interface node with index
10.
csnph
csnph <number of entries>
csnph reports the current setting if no argument is given. If an argument is
specified, the number of entries to be printed by csnh and csinh commands are
set. The number is limited between max_history and 0.
Table 21 HSIM Example
csnw, csinw
csnw <name> <-a2d|-d2a|-hz>
csinw <id> <-a2d|-d2a|-hz>
csnw and csinw set a watch point to the specified interface node. If no
additional option is given, any activity on the interface node will trigger the
watch point and you will enter the HSIM> prompt. Use -a2d|-d2a|-hz to catch a
specific type of interface activity. If no argument is given to csnw and csinw, a
list of current watch points is printed. Previous watch point settings are
overridden by the new setting.
Table 22 Set watch point to interface node: csnw csinw Syntax Descriptions
Parameter Description
HSIM > csnw db[0] -d2a Sets watchpoint on d2a part of interface node
db[0].
Delete Watchpoint
csdnw and csdinw delete the watchpoint specified by name or id, or delete all
watchpoints if -a or -all option is used. If no argument is given, csdnw and
csdinw print the list of currently set watchpoints.
csdnw, csdinw
csdnw <name|-a|-all>
csdinw <id|-a|-all>
Table 24 HSIM Example
.param HSIMBUSDELIMITER=<>
.param HSIMBUSDELIMITER=_
Partitioning Guidelines
Reach-in signals can be replaced with a new Verilog net using either of the
following system tasks; depending on the direction of the original reach-in
signal.
$nsda_a2d_node()
$nsda_d2a_node(),
The system task associates the new Verilog net to the SPICE node that is
equivalent to the original reach-in signal.
and HSIM resolves both Verilog and SPICE contributions to obtain the final
values of the bi-directional nets.
A strength table defines a set of resistance strength values that are mapped to
Verilog seven strength levels for use in strength resolution at inout ports. If
Verilog-side signals always win during strength fighting or there is no strength
fighting at inout ports, it is not necessary to introduce strength resistors.
The define_strength configuration command specifies the resistances of
strength resistors to map to the Verilog seven strength levels. The syntax is
shown in the following example.
define_strength strength_tbl -supply 10 -strong 100 \
-pull 1000 -large 10000 -weak 100000 \
-medium 1000000 -small 10000000
■
Resolves that the voltage at port Y to be 2.8V
■
Sets port Y to logic1
In this case, the weak Verilog strength is mapped to a 1000 Ohm strength
resistor.
■
Later, at simulation time 20 ns:
■
The Verilog-side presents a strong logic0 at port Y
■
SPICE-side voltage is 3V with a driving impedance of 1000 Ohms before
strength resolution
■
Data flows from the Verilog- to SPICE-side
■
The final value at port Y should be logic0
The proper resistance of the strength resistor may be 100 Ohms for HSIM to
resolve the strength fight and produce a final value of 0.5V and a logic0.
Therefore, strong Verilog strength is mapped to a 100 Ohm strength resistor.
The above two examples show why it is important to know the data flow
direction in order to select proper resistance values. Designers specify strength
resolution as follows:
■
Full Verilog netlist: Data flow direction is specified by setting different verilog
strength levels that drive the same net.
■
Full SPICE netlist: Data flow direction is determined by different size
transistors connecting to the same net.
■
Mixed-signal Simulation netlist: Data flow information is not available. Signal
strength tables are constructed from information provided by designers to
determine data flow directions.
The report_port_resistance configuration command creates a report that
details the SPICE-side resistance or impedance from interface nodes to
voltage sources. Strength tables can be constructed from the data flow
directions in a circuit design and the SPICE-side path resistance.
ModelSim/HSIM Integration
The libvpihsim.so mixed-signal simulation library supports ModelSim
integration with either of the following:
■
Stand-alone ModelSim
■
In the ADMS environment
In both Verilog and SPICE design partitioning flows, most mixed-signal
simulation features and limitations for NC-Verilog/VHDL are applicable to
ModelSim. Since the cell view and Verilog configurations for instance based
instantiation are not available in ModelSim, users need to modify the original
Verilog source files to add the $nsda_module() system task in order to
designate analog partitions.
3. Use the -pli command line option to link libvpihsim.so into ModelSim for
simulation using the following syntax. In this example, top is the name of the
top design module.
% vsim -c -pli libvpihsim.so +nsda+cosim.cfg top
2. Compile the Verilog source code using the following ModelSim syntax. In
this example, -ms invokes the ModelSim compiler:
% valog top.v -ms
3. Invoke ModelSim to run the simulation using the following syntax. In this
example, top is the name of the top design module.
% vasim top -ms -pli libvpihsim.so
Note: The -c command line option does not work for mixed-signal
simulation in batch mode.
■
DC Analysis
■
AC Analysis
■
Monte Carlo Analysis
■
Parameter Sweeping Analysis
References
[1] NC-Verilog/VHDL is a functional verification tool from Cadence Design
Systems, Inc.
[2] Verilog-XL is functional verification tool from Cadence Design Systems, Inc.
is made for the myspice subcircuit, which is defined outside of the scope of
the 3D-IC module.
You can select a SPICE subcircuit with a 3D-IC scope using the use_spice
command. To use this command to instantiate a 3D-IC SPICE cell, you must
specify the cell, icmodule, and instance. The replacement is instance-based.
For example:
use_spice -cell core -icmodule cpumod -inst top.x1;
You can replace any cell with a SPICE view with a 3D-IC scope:
use_spice -cell and_gt -icmodule cpumod -inst top.x4.x5.x1;
use_spice -cell dram -icmodule memmod -inst top.x2;
use_spice -cell dram -icmodule memmod2 -inst top.x3;
If two cells with the same name and different 3D-IC scope have different
number of ports or different port names, an error is generated because this
distinction is not yet supported.
Wildcard Support
Instance based wildcards that refer to blocks inside a 3D-IC module are
allowed. For example: top.x1.ou*.
Node based connections from Verilog are supported, allowing for separate
supplies:
D2A powernet … node=top.vdd1 vih=1.0
D2A powernet … node=top.vdd2 vih=1.2
Prerequisites
Design hierarchies instantiated in an HDL testbench can be of different formats,
such as mixed SPICE/HDL, but the hierarchies must be consistent using the
same module/entity or SPICE instances and cell names.
Recommended Steps
1. Develop an HDL testbench that contains a cross-module reference to a
digital target for a complete HDL, digital only, design hierarchy.
2. Ensure that the testbench and the cross module reference are functional.
3. Change the design cell view from HDL to SPICE.
4. Ensure that the HDL testbench cross-module reference is no longer
functional, since the SPICE instances in the design are prefixed with "X".
5. Use the new mixed-signal command resolve_x_prefix in the mixed-
signal control file (vcsAD.init) to resolve the SPICE X prefixes.
6. Ensure that the testbench is consistent and the cross-module reference is
again functional.
Example
Mixed Language - Verilog/VHDL
Verilog Testbench, instantiating a Verilog dut (Device under Test), the dut
instantiating VHDL components.
Three VHDL inverters inv1, inv2 and inv3, instances g1, g2 and g3 are
instantiated in the Verilog Module dut:
// verilog dut
module dut (out,clk);
output out;
input clk;
inv1 g1 (net1,clk); // VHDL
inv2 g2 (net2,net1); // VHDL
inv3 g3 (out,net2); // VHDL
endmodule
This example also has a "multiple cell view", or duplicate SPICE view, dut with
the same hierarchy and instances, but with the dut now described in SPICE
format, the HSPICE format to be specific:
/* SPICE dut
.subckt dut out clk
xg1 net1 clk inv1 * VHDL
xg2 net2 net1 inv2 * VHDL
xg3 out net2 inv3 * VHDL
.ends
Note: All VHDL instances in the SPICE dut are now prefixed with "x".
This is required for HSPICE and Eldo® SPICE formats (not
required for Spectre® format).
The same three VHDL inverters inv1, inv2 and inv3, instances xg1, xg2
and xg3 are instantiated in the SPICE subcircuit dut as in the Verilog dut.
The Verilog testbench top instantiates the dut with an $hdl_xmr referencing a
specific VHDL/instance port: top.g1.g2.Y:
module top(out);
output out;
reg clk, xmr;
initial begin
$hdl_xmr("top.g1.g2.Y","xmr",1);
$monitor ($time,,"clk=%b,out=%b,xmr=%b",clk,out,xmr);
#0 clk = 1'b0;
#101 $finish;
end
always begin
#10 clk = ~clk;
end
endmodule
Solution
A new mixed-signal control command is introduced:
resolve_x_inst_prefix enable;
When this command is applied, the same testbench for designs re-configured
with changes of multiple cell views can be re-used. For the test case shown
above, the same testbench and $hdl_xmr can be used for the design
configured with either the Verilog or SPICE dut cell views.
initial begin $hdl_xmr("top.g1.g2.Y","xmr",1);
A2A through-net
A net that is used only for port connections between two SPICE subcircuits in a
Verilog view.
A2D
An analog-to-digital converter.
ADFMI view
In a given design, at a particular hierarchy, if an ADFMI module is available and
is used to simulate a particular block, it is considered an ADFMI view for that
block.
BA (back-annotation)
Back-annotation (BA) is a process of stitching the parasitic RCs back to the
design netlist through connectivity information (net name, instance name, pin
name) inside the parasitic file.
bidirectional switch
A device that conducts in both directions. In such cases, signals on either side
of the device can be the driver signal. A bidirectional switch is typically used to
enable isolation between buses or signals.
D2A
A digital-to-analog converter.
D2D through-net
A net that is only used for port connections between two Verilog modules in a
SPICE view.
donut configuration
A description of the design using different views across different levels of
hierarchy. For example: Verilog-SPICE-Verilog or SPICE-VHDL-SPICE are
considered donut configurations.
DSPF
A detailed standard parasitic format (DSPF) output netlist format is generated
by an extraction tool, and describes interconnect information. Actual net
parasitic resistance and capacitance component information is contained in this
format.
GUI
A graphical user interface (GUI) for NanoSim.
HAR
Hierarchical array reduction (HAR) in NanoSim that speeds-up the simulation
for memory designs (DRAM and SRAM).
instantiation
The process of creating an instance from a module definition or simulator
primitive, and defining the connectivity and parameters of that instance.
mixed-net
A net that connects the discrete domain (digital) to the continuous domain
(analog). All nodes that exist at the boundary between VCS and NanoSim are
considered mixed-nets.
mixed-signal
A circuit containing analog- and digital-style components.
multiple view
In a given design, at a particular hierarchy, if more than one representation is
available for simulation (from the choices of Verilog, SPICE, ADFMI, and
Verilog-A), it is considered a multiple view.
NanoSim
The Synopsys fast-SPICE transistor-level simulator.
PLI
A programming language interface (PLI) of Verilog HDL is a mechanism for
interfacing Verilog programs with programs written in the C language. PLI also
provides a mechanism for accessing internal databases of the simulator from
the C program.
real data type
The Verilog or VHDL data type defined in IEEE Std 1264-1996 and Std 1364-
2001.
resistance map file
An ASCII file that equates MOSFET "on" resistance to Verilog drive strength;
the resistance map file contains the signal conversion data between a SPICE
analog value to a Verilog digital value, and a Verilog digital value to a SPICE
analog value.
SDF
A standard delay format (SDF) file stores the timing data generated by EDA
tools for use in any stage of a design process. The data in the SDF file is
represented in a tool-independent way and includes the following information:
delay, timing check, timing constraint, incremental and absolute delay.
simv
A Verilog simulator command.
single view
In a given design, at a particular hierarchy, if there is only one view available for
simulation (from the choices of Verilog, SPICE, ADFMI, and Verilog-A), it is
considered a single view. A single view is automatically selected for simulation
as it is the only view available.
SPEF
A standard parasitic extraction format (SPEF) file is an IEEE standard format.
This file provides a standard median to pass parasitic information between EDA
tools during any stage in the design process. This format contains actual net
parasitic resistance and capacitance components.
SPICE netlist
In the present context, the term SPICE netlist is used in place of transistor-level
netlist.
SPICE-top
The top level of the design hierarchy is described in a transistor-level netlist
format.
SPICE view
In a given design, at a particular hierarchy, if a SPICE module is available and is
used to simulate a particular block, it is considered a SPICE view for that block.
VCS
A Synopsys Verilog hardware description language (HDL) simulator.
VCS-MX
A Synopsys simulator for Verilog, VHDL, and mixed-HDL design descriptions.
Verilog dummy module
A module that is the Verilog place holder for a transistor block. A dummy
module is an empty module containing only the module declaration and port
declarations.
Verilog-top
The top level of the design hierarchy is described in Verilog RTL or gate-level
netlist format.
Verilog view
In a given design, at a particular hierarchy, if a Verilog module is available and
is used to simulate a particular block, it is considered a Verilog view for that
block.
Verilog wrapper
A Verilog netlist comprising an empty module. Only the module name and port
description are in the wrapper.
VHDL
VHSIC HDL
vhdlan
A VHDL analyzer command.
vlogan
A Verilog analyzer command.
VPD
An output format for VCS-MX. VPD uses the VCD+ (value change dump)
format.
wreal data type
A Verilog-AMS wire of type "real" which allows modules to exchange "real"
values through ports. Also a real net data type used in a Verilog wrapper
module in the VHDL/Verilog-SPICE flow to interface a real VHDL port to a top-
level SPICE net or connect a SPICE port to a top-level VHDL real net.
XMR
A feature that is extensively used in Verilog testbenches, and is referred to as a
cross-module reference or Verilog hierarchical referencing. This feature
enables simple probing into, or monitoring of, buried signals without requiring
the signals to be routed to the top of the design for observation. No declaration
of global signals in a package is required for this feature, nor is any modification
of the original monitored code.
293
Index
G
294
Index
N
-delay1 255 N
-fall 254 ncsim interactive mode 243
-logichv 253
NC-Verilog 213, 260, 261
-logiclv 253
NC-Verilog 5.1 220
-logicxv 253
NC-Verilog library 214
-lprint 255, 256
-rise 254 NC-Verilog/VHDL executables path 214
-rm_glitch 255 netlist
-slope 254 compiling 8
SPICE 61
-strength 255
Verilog 61
-timex 254
-vhi 254 nsda_cosim.sp interface file 249
-vlo 254
-vprint 255 O
-vsrc 255 optimize_shadowfile command 91
set_port_prop_warning 257
set_print_progress 257
set_rise_step 257 P
set_slope_step 257 partition boundary 269
set_verbose 258 partitioning commands
set_verilog_supply0 259 set rmap 154
set_verilog_supply1 258 pass switch 270
verilog_file 259 path resistance report 251
mixed-signal simulation engine 249 port delay 255
Mixed-Signal Simulation Interactive Mode port falling time 254
Command
port mapping 267
csdinw 266
csdnw 266 port rising & falling time 254
csh 263 port rising time 254
csinh 264 port-mapping 70
csinw 265 positive delay 255
csli 262 primitive gate 270
csnph 264 print voltage logic 256
csnw 265 print voltage value 255
mixed-signal simulation interface nodes 262 programming language interface (PLI) 214
mixed-signal simulation setup 268
spice_top 109
R
mixed-signal simulation setup file 72
reach-in signal 269
mixed-signal simulation system variable setup 213
Mixed-Singal Simulation Configuration Commands reach-in signals 270
analog_cell 244 real type Verilog variable 267
ModelSim command remove_d2a command 100
% valog top.v -ms 274 reserved keywords 207, 210
% vasim top -ms -pli libvpihsim.so 274 resistance map file 56
% vlib work 273 resistance map file, creating 56
% vlog top.v 274 resistance value 270
% vsim -c -pli libvpihsim.so +nsda+cosim.cfg top rmap_by_node command 90
274
rmap_file command 105
295
Index
S
296
Index
W
297
Index
X
298