Fix for assertion error when expanding macro.
[iverilog.git] / swift.txt
blobe4b0ad8a7e64d844477ad47af02762af62385381
2 SWIFT MODEL SUPPORT FOR Icarus Verilog (PRELIMINARY)
4     Copyright 2003 Stephen Williams
6   NOTE: SWIFT support does not work yet, these are provisional
7   instructions, intended to show what's supposed to happen when I get
8   it working.
10 Icarus Verilog support for SWIFT models is based on the LMTV interface
11 module from Synopsys. This module is normally distributed along with
12 the SWIFT models proper. This module can be linked with Icarus Verilog
13 via the cadpli compatibility object. (See cadpli.txt.)
15 * Preliminaries
17 First, you need the LMC_HOME environment variable set to point to the
18 installed directory for your SWIFT software. This setup is documented
19 in your SWIFT model documentation.
21 * Compilation
23 When compiling your Verilog design to include a SWIFT model, you need
24 to include wrappers for the model you intend to use. You may choose to
25 use ncverilog or verilogxl compatible wrappers, they work the
26 same. Locate your smartmodel directory, and include it in your command
27 file like so:
29      +libdir+.../smartmodel/sol/wrappers/verilogxl
31 The wrappers directory includes Verilog modules that wrap your SWIFT
32 module, and with this +libdir+ statement in your command file, the
33 Icarus Verilog compiler will be able to locate these wrappers. The
34 wrappers in turn invoke the $lm_model system tasks that are the LMTV
35 support for your model.
37   NOTE: This example uses the solaris directory of VerilogXL support
38   files as a source of wrappers. The files of interest, however, are
39   written in Verilog and are identical for all supported platforms, so
40   long as you choose the verilogxl or ncverilog files.
42 * Execution
44 After your simulation is compiled, run the simulation with the vvp
45 command, like this:
47       % vvp -mcadpli a.out -cadpli=$LMC_HOME/lib/x86_linux.lib/swiftpli.so:swift_boot
49 What this command line means is:
51         -mcadpli
52            Include the cadpli compatibility module
54         a.out
55            This is your compiled vvp file
57         -cadpli=$LMC_HOME/lib/x86_linux.lib/swiftpli.so:swift_boot
58            This tells the cadpli module to load the swiftpli.so
59            shared object, and boot it. This is code that comes with
60            your SWIFT modules, and provides the generic SWIFT
61            capabilities (lm_* system tasks) needed by the module
62            itself.
64 Once you start the vvp command, the SWIFT infrastructure will be
65 initialized as part of the simulation setup, and all should work
66 normally from here.