File: swift.txt

package info (click to toggle)
verilog 0.8.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,216 kB
  • ctags: 7,454
  • sloc: cpp: 45,273; ansic: 29,729; yacc: 3,538; sh: 2,773; makefile: 1,252
file content (67 lines) | stat: -rw-r--r-- 2,393 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

SWIFT MODEL SUPPORT FOR Icarus Verilog (PRELIMINARY)

    Copyright 2003 Stephen Williams

  NOTE: SWIFT support does not work yet, these are provisional
  instructions, intended to show what's supposed to happen when I get
  it working.

Icarus Verilog support for SWIFT models is based on the LMTV interface
module from Synopsys. This module is normally distributed along with
the SWIFT models proper. This module can be linked with Icarus Verilog
via the cadpli compatibility object. (See cadpli.txt.)

* Preliminaries

First, you need the LMC_HOME environment variable set to point to the
installed directory for your SWIFT software. This setup is documented
in your SWIFT model documentation.

* Compilation

When compiling your Verilog design to include a SWIFT model, you need
to include wrappers for the model you intend to use. You may choose to
use ncverilog or verilogxl compatible wrappers, they work the
same. Locate your smartmodel directory, and include it in your command
file like so:

     +libdir+.../smartmodel/sol/wrappers/verilogxl

The wrappers directory includes Verilog modules that wrap your SWIFT
module, and with this +libdir+ statement in your command file, the
Icarus Verilog compiler will be able to locate these wrappers. The
wrappers in turn invoke the $lm_model system tasks that are the LMTV
support for your model.

  NOTE: This example uses the solaris directory of VerilogXL support
  files as a source of wrappers. The files of interest, however, are
  written in Verilog and are identical for all supported platforms, so
  long as you choose the verilogxl or ncverilog files.

* Execution

After your simulation is compiled, run the simulation with the vvp
command, like this:

      % vvp -mcadpli a.out -cadpli=$LMC_HOME/lib/x86_linux.lib/swiftpli.so:swift_boot

What this command line means is:

	-mcadpli
	   Include the cadpli compatibility module

	a.out
	   This is your compiled vvp file

	-cadpli=$LMC_HOME/lib/x86_linux.lib/swiftpli.so:swift_boot
	   This tells the cadpli module to load the swiftpli.so
	   shared object, and boot it. This is code that comes with
	   your SWIFT modules, and provides the generic SWIFT
	   capabilities (lm_* system tasks) needed by the module
	   itself.

Once you start the vvp command, the SWIFT infrastructure will be
initialized as part of the simulation setup, and all should work
normally from here.