# $Id: INSTALL.txt 317 2010-07-22 19:36:56Z mueller $
|
# $Id: INSTALL.txt 317 2010-07-22 19:36:56Z mueller $
|
|
|
Guide to install and build w11a
|
Guide to install and build w11a
|
|
|
Table of content:
|
Table of content:
|
|
|
1. Download
|
1. Download
|
2. Install and setup the build system
|
2. Install and setup the build system
|
3. Compile UNISIM/SIMPRIM libraries for ghdl
|
3. Compile UNISIM/SIMPRIM libraries for ghdl
|
4. The build system
|
4. The build system
|
5. Building test benches
|
5. Building test benches
|
6. Building systems
|
6. Building systems
|
|
|
|
|
1. Download ---------------------------------------------------------------
|
1. Download ---------------------------------------------------------------
|
|
|
All instructions below assume that the project files reside in a
|
All instructions below assume that the project files reside in a
|
working directory with the name represented as
|
working directory with the name represented as
|
|
|
To download latest tagged version (V0.5) of w11a
|
To download latest tagged version (V0.5) of w11a
|
|
|
cd
|
cd
|
svn co http://opencores.org/ocsvn/w11/w11/tags/w11a_V0.5
|
svn co http://opencores.org/ocsvn/w11/w11/tags/w11a_V0.5
|
|
|
To download latest snapshot of trunk
|
To download latest snapshot of trunk
|
|
|
cd
|
cd
|
svn co http://opencores.org/ocsvn/w11/w11/trunk
|
svn co http://opencores.org/ocsvn/w11/w11/trunk
|
|
|
2. Install and setup the build system -------------------------------------
|
2. Install and setup the build system -------------------------------------
|
|
|
The build system for test benches and systems requires
|
The build system for test benches and systems requires
|
- the definition of the environment variable RETROBASE
|
- the definition of the environment variable RETROBASE
|
- that the tools binary directory is in the path
|
- that the tools binary directory is in the path
|
|
|
For bash and alike use
|
For bash and alike use
|
|
|
export RETROBASE=
|
export RETROBASE=
|
export PATH=$PATH:$RETROBASE/tools/bin
|
export PATH=$PATH:$RETROBASE/tools/bin
|
|
|
After that building functional model based test benches will work. If you
|
After that building functional model based test benches will work. If you
|
want to also build post-xst or post-par test benches read next section.
|
want to also build post-xst or post-par test benches read next section.
|
|
|
3. Compile UNISIM/SIMPRIM libraries for ghdl ------------------------------
|
3. Compile UNISIM/SIMPRIM libraries for ghdl ------------------------------
|
|
|
The build system for test benches also supports test benches run against
|
The build system for test benches also supports test benches run against
|
the gate level models derived after the xst, map or par step. In this
|
the gate level models derived after the xst, map or par step. In this
|
case ghdl has to link against a compiled UNISIM or SIMPRIM library.
|
case ghdl has to link against a compiled UNISIM or SIMPRIM library.
|
|
|
To make handling of the parallel installion of several WebPack versions
|
To make handling of the parallel installion of several WebPack versions
|
easy the compiled libraries are stored in sub-directories under $XILINX:
|
easy the compiled libraries are stored in sub-directories under $XILINX:
|
|
|
$XILINX/ghdl/unisim
|
$XILINX/ghdl/unisim
|
$XILINX/ghdl/simprim
|
$XILINX/ghdl/simprim
|
|
|
Two helper scripts will create these libraries:
|
Two helper scripts will create these libraries:
|
|
|
|
|
|
|
cd $RETROBASE
|
cd $RETROBASE
|
xilinx_ghdl_unisim
|
xilinx_ghdl_unisim
|
xilinx_ghdl_simprim
|
xilinx_ghdl_simprim
|
|
|
If you have several WebPack versions installed, repeat for each version.
|
If you have several WebPack versions installed, repeat for each version.
|
|
|
|
|
4. The build system -------------------------------------------------------
|
4. The build system -------------------------------------------------------
|
|
|
Simulation and synthesis tools usually need a list of the VHDL source
|
Simulation and synthesis tools usually need a list of the VHDL source
|
files, often in proper compilation order (libraries before components).
|
files, often in proper compilation order (libraries before components).
|
The different tools have different formats of these 'project files'.
|
The different tools have different formats of these 'project files'.
|
|
|
The build system employed in this project is based on
|
The build system employed in this project is based on
|
"VHDL bill of material" or 'vbom' files
|
"VHDL bill of material" or 'vbom' files
|
which list for each vhdl source file the libraries and sources for
|
which list for each vhdl source file the libraries and sources for
|
the instantiated components, the later via their vbom, and last but
|
the instantiated components, the later via their vbom, and last but
|
not least the name of the vhdl source file. All file name are relative
|
not least the name of the vhdl source file. All file name are relative
|
to the current directory. A recursive traversal through all vbom's gives
|
to the current directory. A recursive traversal through all vbom's gives
|
for each vhld module all sources needed to compile it. The vbomconv script
|
for each vhld module all sources needed to compile it. The vbomconv script
|
in tools/bin does this, and generates depending on options
|
in tools/bin does this, and generates depending on options
|
- make dependency files
|
- make dependency files
|
- ISE xst project files
|
- ISE xst project files
|
- ISE ISim project files
|
- ISE ISim project files
|
- ghdl commands for analysis, inspection and make step
|
- ghdl commands for analysis, inspection and make step
|
|
|
The master make files contain pattern rules like
|
The master make files contain pattern rules like
|
%.ngc : %.vbom -- synthesize with xst
|
%.ngc : %.vbom -- synthesize with xst
|
% : %.vbom -- build functional model test bench
|
% : %.vbom -- build functional model test bench
|
which encapsulate all the vbomconf magic
|
which encapsulate all the vbomconf magic
|
|
|
A full w11a is build from more than 80 source files, test benches from
|
A full w11a is build from more than 80 source files, test benches from
|
even more. Using the vbom's a large number of designs can be easily
|
even more. Using the vbom's a large number of designs can be easily
|
maintained.
|
maintained.
|
|
|
5. Building test benches --------------------------------------------------
|
5. Building test benches --------------------------------------------------
|
|
|
To compile a test bench named all is needed is
|
To compile a test bench named all is needed is
|
|
|
make
|
make
|
|
|
The make file will use .vbom, create all make dependency files,
|
The make file will use .vbom, create all make dependency files,
|
and generate the needed ghdl commands.
|
and generate the needed ghdl commands.
|
|
|
In many cases the test benches can also be compiled against the gate
|
In many cases the test benches can also be compiled against the gate
|
level models derived after the xst, map or par step. To compile them
|
level models derived after the xst, map or par step. To compile them
|
|
|
make ghdl_tmp_clean
|
make ghdl_tmp_clean
|
make _ssim # for post-xst
|
make _ssim # for post-xst
|
make _fsim # for post-map
|
make _fsim # for post-map
|
make _tsim # for post-par
|
make _tsim # for post-par
|
|
|
The 'make ghdl_tmp_clean' is needed to flush the ghdl work area from
|
The 'make ghdl_tmp_clean' is needed to flush the ghdl work area from
|
the compilation remains of earlier functional model compiles.
|
the compilation remains of earlier functional model compiles.
|
|
|
6. Building systems -------------------------------------------------------
|
6. Building systems -------------------------------------------------------
|
|
|
To generate a bit file for a system named all is needed is
|
To generate a bit file for a system named all is needed is
|
|
|
make .bit
|
make .bit
|
|
|
The make file will use .vbom, create all make dependency files, build
|
The make file will use .vbom, create all make dependency files, build
|
the ucf file with cpp, and run the synthesis flow (xst, ngdbuild, par, trce).
|
the ucf file with cpp, and run the synthesis flow (xst, ngdbuild, par, trce).
|
The log files will be named
|
The log files will be named
|
|
|
_xst.log # xst log file
|
_xst.log # xst log file
|
_tra.log # translate (ngdbuild) log file (renamed %.bld)
|
_tra.log # translate (ngdbuild) log file (renamed %.bld)
|
_map.log # map log file (renamed %_map.mrp)
|
_map.log # map log file (renamed %_map.mrp)
|
_par.log # par log file (renamed %.par)
|
_par.log # par log file (renamed %.par)
|
_pad.log # pad file (renamed %_pad.txt)
|
_pad.log # pad file (renamed %_pad.txt)
|
_twr.log # trce log file (renamed %.twr)
|
_twr.log # trce log file (renamed %.twr)
|
|
|
To load the bitfile with WebPack impact into the target board use
|
To load the bitfile with WebPack impact into the target board use
|
|
|
make .impact
|
make .impact
|
|
|
If only the xst or par output is wanted just use
|
If only the xst or par output is wanted just use
|
|
|
make .ngc
|
make .ngc
|
make .ncd
|
make .ncd
|
|
|