1 |
11 |
wfjm |
# $Id: INSTALL.txt 376 2011-04-17 12:24:07Z mueller $
|
2 |
5 |
wfjm |
|
3 |
11 |
wfjm |
Guide to install and build w11a systems, test benches and support software
|
4 |
5 |
wfjm |
|
5 |
|
|
Table of content:
|
6 |
|
|
|
7 |
11 |
wfjm |
1. Download
|
8 |
|
|
2. Setup environment variables
|
9 |
|
|
3. Compile UNISIM/SIMPRIM libraries for ghdl
|
10 |
|
|
4. Compile and install the support software
|
11 |
|
|
a. Compile sharable libraries
|
12 |
|
|
b. Setup Tcl packages
|
13 |
|
|
5. The build system
|
14 |
|
|
6. Building test benches
|
15 |
|
|
a. General instructions
|
16 |
|
|
b. Available test benches
|
17 |
|
|
7. Building systems
|
18 |
|
|
a. General instructions
|
19 |
|
|
b. Available systems
|
20 |
5 |
wfjm |
|
21 |
|
|
|
22 |
|
|
1. Download ---------------------------------------------------------------
|
23 |
|
|
|
24 |
|
|
All instructions below assume that the project files reside in a
|
25 |
|
|
working directory with the name represented as
|
26 |
|
|
|
27 |
|
|
To download latest tagged version (V0.5) of w11a
|
28 |
|
|
|
29 |
|
|
cd
|
30 |
|
|
svn co http://opencores.org/ocsvn/w11/w11/tags/w11a_V0.5
|
31 |
|
|
|
32 |
|
|
To download latest snapshot of trunk
|
33 |
|
|
|
34 |
|
|
cd
|
35 |
|
|
svn co http://opencores.org/ocsvn/w11/w11/trunk
|
36 |
|
|
|
37 |
11 |
wfjm |
2. Setup environment variables --------------------------------------------
|
38 |
5 |
wfjm |
|
39 |
11 |
wfjm |
The make flow for building test benches (ghdl and ISim based) and systems
|
40 |
|
|
(Xilinx xst based) as well as the support software (mainly the rlink backend
|
41 |
|
|
server) requires
|
42 |
5 |
wfjm |
|
43 |
11 |
wfjm |
- the definition of the environment variable RETROBASE
|
44 |
|
|
- that the tools binary directory is in the path
|
45 |
|
|
- that the tools library directory is in the library path
|
46 |
|
|
|
47 |
5 |
wfjm |
For bash and alike use
|
48 |
|
|
|
49 |
|
|
export RETROBASE=
|
50 |
|
|
export PATH=$PATH:$RETROBASE/tools/bin
|
51 |
11 |
wfjm |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RETROBASE/tools/lib
|
52 |
5 |
wfjm |
|
53 |
|
|
After that building functional model based test benches will work. If you
|
54 |
|
|
want to also build post-xst or post-par test benches read next section.
|
55 |
|
|
|
56 |
|
|
3. Compile UNISIM/SIMPRIM libraries for ghdl ------------------------------
|
57 |
|
|
|
58 |
|
|
The build system for test benches also supports test benches run against
|
59 |
|
|
the gate level models derived after the xst, map or par step. In this
|
60 |
|
|
case ghdl has to link against a compiled UNISIM or SIMPRIM library.
|
61 |
|
|
|
62 |
|
|
To make handling of the parallel installion of several WebPack versions
|
63 |
|
|
easy the compiled libraries are stored in sub-directories under $XILINX:
|
64 |
|
|
|
65 |
|
|
$XILINX/ghdl/unisim
|
66 |
|
|
$XILINX/ghdl/simprim
|
67 |
|
|
|
68 |
|
|
Two helper scripts will create these libraries:
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
cd $RETROBASE
|
73 |
|
|
xilinx_ghdl_unisim
|
74 |
|
|
xilinx_ghdl_simprim
|
75 |
|
|
|
76 |
|
|
If you have several WebPack versions installed, repeat for each version.
|
77 |
|
|
|
78 |
11 |
wfjm |
4. Compile and install the support software -------------------------------
|
79 |
5 |
wfjm |
|
80 |
11 |
wfjm |
4a. Compile sharable libraries ---------------------------------------
|
81 |
5 |
wfjm |
|
82 |
11 |
wfjm |
To build all sharable libraries
|
83 |
|
|
|
84 |
|
|
cd $RETROBASE/tools/src
|
85 |
|
|
make -j 4
|
86 |
|
|
|
87 |
|
|
To cleanup, e.g. before a re-build
|
88 |
|
|
|
89 |
|
|
cd $RETROBASE/tools/src
|
90 |
|
|
rm_dep
|
91 |
|
|
make realclean
|
92 |
|
|
|
93 |
|
|
4b. Setup Tcl environment --------------------------------------------
|
94 |
|
|
|
95 |
|
|
The Tcl files are organized in several packages. To create the Tcl
|
96 |
|
|
package files (pkgIndex.tcl)
|
97 |
|
|
|
98 |
|
|
cd $RETROBASE/tools/tcl
|
99 |
|
|
setup_packages
|
100 |
|
|
|
101 |
|
|
To use these packages it is convenient to make them available via the
|
102 |
|
|
'auto_path' mechanism. To do that add in your .tclshrc or .wishrc
|
103 |
|
|
|
104 |
|
|
lappend auto_path [file join $env(RETROBASE) tools tcl]
|
105 |
|
|
lappend auto_path [file join $env(RETROBASE) tools lib]
|
106 |
|
|
|
107 |
|
|
The w11 distribution contains two ready to use .tclshrc or .wishrc
|
108 |
|
|
files which
|
109 |
|
|
- include the auto_path statements above
|
110 |
|
|
- activate tclreadline (and thus in tclshrc an event loop)
|
111 |
|
|
|
112 |
|
|
To use them simply copy them into your home directory (or soft link them)
|
113 |
|
|
|
114 |
|
|
cd $HOME
|
115 |
|
|
ln -s $RETROBASE/tools/tcl/.tclshrc .
|
116 |
|
|
ln -s $RETROBASE/tools/tcl/.wishrc .
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
5. The build system -------------------------------------------------------
|
120 |
|
|
|
121 |
5 |
wfjm |
Simulation and synthesis tools usually need a list of the VHDL source
|
122 |
|
|
files, often in proper compilation order (libraries before components).
|
123 |
|
|
The different tools have different formats of these 'project files'.
|
124 |
|
|
|
125 |
|
|
The build system employed in this project is based on
|
126 |
|
|
"VHDL bill of material" or 'vbom' files
|
127 |
|
|
which list for each vhdl source file the libraries and sources for
|
128 |
|
|
the instantiated components, the later via their vbom, and last but
|
129 |
|
|
not least the name of the vhdl source file. All file name are relative
|
130 |
|
|
to the current directory. A recursive traversal through all vbom's gives
|
131 |
|
|
for each vhld module all sources needed to compile it. The vbomconv script
|
132 |
|
|
in tools/bin does this, and generates depending on options
|
133 |
|
|
- make dependency files
|
134 |
|
|
- ISE xst project files
|
135 |
|
|
- ISE ISim project files
|
136 |
|
|
- ghdl commands for analysis, inspection and make step
|
137 |
|
|
|
138 |
|
|
The master make files contain pattern rules like
|
139 |
|
|
%.ngc : %.vbom -- synthesize with xst
|
140 |
|
|
% : %.vbom -- build functional model test bench
|
141 |
|
|
which encapsulate all the vbomconf magic
|
142 |
|
|
|
143 |
|
|
A full w11a is build from more than 80 source files, test benches from
|
144 |
|
|
even more. Using the vbom's a large number of designs can be easily
|
145 |
|
|
maintained.
|
146 |
|
|
|
147 |
11 |
wfjm |
6. Building test benches --------------------------------------------------
|
148 |
5 |
wfjm |
|
149 |
11 |
wfjm |
6a. General instructions ---------------------------------------------
|
150 |
|
|
|
151 |
5 |
wfjm |
To compile a test bench named all is needed is
|
152 |
|
|
|
153 |
|
|
make
|
154 |
|
|
|
155 |
|
|
The make file will use .vbom, create all make dependency files,
|
156 |
|
|
and generate the needed ghdl commands.
|
157 |
|
|
|
158 |
|
|
In many cases the test benches can also be compiled against the gate
|
159 |
|
|
level models derived after the xst, map or par step. To compile them
|
160 |
|
|
|
161 |
|
|
make ghdl_tmp_clean
|
162 |
|
|
make _ssim # for post-xst
|
163 |
|
|
make _fsim # for post-map
|
164 |
|
|
make _tsim # for post-par
|
165 |
|
|
|
166 |
|
|
The 'make ghdl_tmp_clean' is needed to flush the ghdl work area from
|
167 |
|
|
the compilation remains of earlier functional model compiles.
|
168 |
|
|
|
169 |
11 |
wfjm |
6b. Available test benches -------------------------------------------
|
170 |
5 |
wfjm |
|
171 |
11 |
wfjm |
See file w11a_tb_guide.txt
|
172 |
|
|
|
173 |
|
|
7. Building systems -------------------------------------------------------
|
174 |
|
|
|
175 |
|
|
7a. General instructions ---------------------------------------------
|
176 |
|
|
|
177 |
5 |
wfjm |
To generate a bit file for a system named all is needed is
|
178 |
|
|
|
179 |
|
|
make .bit
|
180 |
|
|
|
181 |
|
|
The make file will use .vbom, create all make dependency files, build
|
182 |
|
|
the ucf file with cpp, and run the synthesis flow (xst, ngdbuild, par, trce).
|
183 |
|
|
The log files will be named
|
184 |
|
|
|
185 |
|
|
_xst.log # xst log file
|
186 |
|
|
_tra.log # translate (ngdbuild) log file (renamed %.bld)
|
187 |
|
|
_map.log # map log file (renamed %_map.mrp)
|
188 |
|
|
_par.log # par log file (renamed %.par)
|
189 |
|
|
_pad.log # pad file (renamed %_pad.txt)
|
190 |
|
|
_twr.log # trce log file (renamed %.twr)
|
191 |
|
|
|
192 |
|
|
To load the bitfile with WebPack impact into the target board use
|
193 |
|
|
|
194 |
|
|
make .impact
|
195 |
|
|
|
196 |
|
|
If only the xst or par output is wanted just use
|
197 |
|
|
|
198 |
|
|
make .ngc
|
199 |
|
|
make .ncd
|
200 |
11 |
wfjm |
|
201 |
|
|
7b. Available systems ------------------------------------------------
|
202 |
|
|
|
203 |
|
|
Note: Currently ready to build versions exist for
|
204 |
|
|
Digilent S3BOARD (-1000 FPGA version)
|
205 |
|
|
Digilent Nexys2 board (-1200 FPGA version)
|
206 |
|
|
|
207 |
|
|
1. rlink tester
|
208 |
|
|
a. for Digilent Nexys2 board
|
209 |
|
|
|
210 |
|
|
cd $RETROBASE/rtl/sys_gen/tst_rlink/nexys2
|
211 |
|
|
make sys_tst_rlink_n2.bit
|
212 |
|
|
|
213 |
|
|
2. w11a systems
|
214 |
|
|
a. for Digilent S3BOARD
|
215 |
|
|
|
216 |
|
|
cd $RETROBASE/rtl/sys_gen/w11a/s3board
|
217 |
|
|
make sys_w11a_s3.bit
|
218 |
|
|
|
219 |
|
|
b. for Digilent Nexys2 board
|
220 |
|
|
|
221 |
|
|
cd $RETROBASE/rtl/sys_gen/w11a/nexys2
|
222 |
|
|
make sys_w11a_n2.bit
|