File: INSTALL-FOR-SIMULATION

package info (click to toggle)
savant 1.02.1-1
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 9,076 kB
  • ctags: 8,973
  • sloc: cpp: 70,113; sh: 1,792; makefile: 157
file content (159 lines) | stat: -rw-r--r-- 8,639 bytes parent folder | download
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
GUIDELINES FOR BUILDING/INSTALLING SAVANT FOR SIMULATION:
---------------------------------------------------------

In order to simulate VHDL with SAVANT, additional some tools will be
required.  TyVis is a VHDL simulation library developed at the University
of Cincinnati that works with SAVANT.  It's a C++ class library that
encapsulates VHDL semantics such as signals and the simulation cycle.
WARPED, also developed at the University of Cincinnati, is a discrete event 
simulation kernel.  WARPED supports both parallel and sequential
simulation, and therefore so does TyVis.

To see the requirements for compiling SAVANT itself, please see the file
INSTALL.

In order to simulate VHDL with version 1.0 of SAVANT, you'll need version
1.0 of TyVis and WARPED as well.  All of the tools can be found at:
ftp://www.ececs.uc.edu/pub/users/dmartin/

Compilation of these tools so that they'll work together is slightly
complex, and in the past some users have found it difficult.  We've tried
to explain the process as clearly as possible in the following sections.

If you're interested in VHDL simulation only - you're not planning on
doing regular development of WARPED or TyVis, please follow the guidelines
in Section 1.  If you are planning on developing either TyVis or WARPED,
then please go to Section 2.

Section 1 - VHDL SIMULATION ONLY (no kernel development) - getting started.

[1.0] Unpack all three archives.  "savant", "warped", and "tyvis"
directories will be created.

[1.1] Change into the warped directory, and run the configure script
found there.  (cd warped; ./configure)

[1.2] Change into the tyvis directory, and run the configure script
found there.  (cd tyvis; ./configure)

[1.3] Change into the savant/src directory.  In order to build savant, you
need to have defined the PCCTSROOT environment variable.  PCCTSROOT should
be set to the directory where the pccts header files can be found.  Note that
ANY TIME you build scram, this environment variable needs to be defined, so
if you're going to be building it often, set the variable in your shell
startup script.  See your shell documentation to figure out how to define
environment variables, and how to set them at startup.  If you were running
csh and the pccts header files were in "/home/me/include/pccts", you'd say 
"setenv PCCTSROOT /home/me/include/pccts".  Now run SAVANT's configure
script.  (cd savant/src; ./configure).

WARPED is a highly configurable simulation kernel.  It can run sequential
or parallel simulation using the same API, and the parallel kernel has
_many_ optimizations available in it.  See WARPED'S documentation for
details.  Due to WARPED's design, for TyVis to use it correctly, the build
of WARPED must be controlled by TyVis.  So, if you build WARPED directly
using it's Makefiles, it won't be configured to run with TyVis and you
won't be able to simulate anything.

In addition, the current TyVis system can only build libraries supporting
sequential _or_ parallel simulation, selected at the time of compiling
TyVis.  So, you must decide whether you want your simulations to run in
parallel or sequential mode at this point.  By default everything will
build to run sequential, and unless you're doing parallel VHDL research,
you're probably better off sticking with the sequential simulator.
However, if you'd like to be able to run parallel VHDL simulations, then
you need to make two modifications at this point.  One is to
"savant/lib/Makefile.common", the other to "tyvis/VHDLKernel/Makefile".  In
both of these Makefiles, find the assignment of the variable "METHOD" and
change it from "METHOD = Sequential" to "METHOD = TimeWarp".  Spelling and
capitalization count so be careful.

[1.4] In order for TyVis to be able to build WARPED, it needs to know where
WARPED is unpacked.  You can tell TyVis where warped is by defining an
environment variable "WARPEDROOT".  This variable needs to be defined only
when compiling TyVis in the next step.  In fact, it could mess things up if
it's defined after that, so _don't_ define it in your shell startup
scripts. (If it's defined when compiling simulations, the Makefiles will
try to statically link to the Warped libraries instead of dynamically
linking to the shared lib.  We don't want that.)

[1.5] Now we'll build TyVis and WARPED at the same time.  Do this by going
into "tyvis/VHDLKernel" and saying "make shared".  This will build shared
libraries of both TyVis and WARPED.

[1.6] Next, we'll install the shared libraries and header files.  To install
them into "/usr/local", simply do a "make install".  If you want them
somewhere else, you can define the environment variable "DESTDIR".  If you
install the headers and libraries somewhere other than the default, you're
going to need to modify "savant/lib/Makefile.common", and point
"TYVIS_PREFIX" at wherever you specified DESTDIR to be.  You're also going
to need to figure out how to get your OS to load shared libraries from
non-standard directories.  Under Linux read the manpage for "ld.so".  Under
Solaris, read the manpage for "ld.so.1".  If you're using another OS,
you'll need to find the documentation yourself.

If you are installing to /usr/local via "make install", your system will
need to know about the libraries installed.  In Linux, you can do this by
running "ldconfig" as root.  In Solaris, the easiest way is to make soft
links from "/usr/local/lib/libTyVis.so to /usr/lib/libTyVis.so".  This is
generally accomplished by running a command like "ln -s
/usr/local/lib/libTyVis.so /usr/lib/libTyVis.so".  In either case, read the 
manpages referenced in the previous paragraph for details.

[1.7] Now we'll build scram.  You should have configured SAVANT in step 1.3,
so this should simply be a matter of doing a "cd savant/src; make".

[1.8] Install SAVANT; if you want it to install "scram" (and a couple of
small library-type files like savant/lib/Makefile.common) in /usr/local,
then just do a "make install".  If you want to install it somewhere else,
then set the environment variable DESTDIR before you run "make install".
If you _do_ install savant to a nonstandard directory via DESTDIR, then
you're going to need to set the environment variable "SAVANTROOT" to point
at the same directory as DESTDIR any time you run scram so it can find its
libraries.  If you're going to be doing this frequently, you'll probably
want to set SAVANTROOT in your shell startup.

Theoretically, you're all set and ready to go!  Enjoy!

What to do if you have problems:

If you have problems compiling simulations, here are things to check out:
1) If you installed anything to a non-standard place, you need to re-read
the above documentation, and see how to tell the system where it is.  This
generally involves the environment variable "SAVANTROOT", which tells the
system where to find a file "Makefile.common", which in turn tells
simulations where the TyVis and WARPED header files are.

If your simulation compiles but it won't run due to some weird error about
finding libraries:
1) Re-read 1.6 for some hints.
2) If you installed in a non-standard place, you need to find the
documentation for your system that explains how to load shared libraries
from non-standard places.  Re-read 1.6 for some hints.
3) If you installed into /usr/local/, your system probably still doesn't
know the libraries are there and it needs to be told. Re-read 1.6 for some
hints.

Section 2 - VHDL simulation, WARPED and TyVis Development

We're going to assume that if you're planning on hacking WARPED and TyVis,
that you know a little more about computers than your average guy on the
street.  If you don't, and you need to hack this stuff anyways, then
you're going to need to figure a lot of stuff out on your own to be able
to succeed, as no one is going to hold your hand.

[2.0] Read section 1.  Again.

[2.1] Since you're developing, you're probably going to find it more
convenient to use statically linked libraries than shared libraries.  This
will allow the debugger to work correctly with your simulations.  The
Makefiles are designed to be smart enough that merely by defining
"WARPEDROOT" and "TYVISROOT", it will use statically linked libraries
rather than dynamically linked libraries.  They need to be defined to point 
at the root directories of your WARPED and TyVis source directories.
(Something like /home/me/tyvis and /home/me/warped probably.)

If you're a lost user from section 1 of this document and you actually want
to use shared libraries since you're not planning on modifying TyVis or
WARPED, you'll ensure nothing works by defining these variables so don't
define them.