OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [doc/] [README_buildsystem_Vivado.txt] - Blame information for rev 35

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 wfjm
# $Id: README_buildsystem_Vivado.txt 745 2016-03-18 22:10:34Z mueller $
2 29 wfjm
 
3
Guide to the Build System (Xilinx Vivado Version)
4
 
5
  Table of content:
6
 
7
  1.  Concept
8
  2.  Setup system environment
9
       a. Setup environment variables
10
       b. Compile UNISIM/UNIMACRO libraries for ghdl
11
  3.  Building test benches
12
       a. With ghdl
13 35 wfjm
       b. With Vivado xsim
14 29 wfjm
  4.  Building systems
15
  5.  Configuring FPGAs (via make flow)
16
  6.  Note on ISE
17
 
18
1. Concept ----------------------------------------------------------------
19
 
20
  This projects uses GNU make to
21
    - generate bit files     (with Vivado synthesis)
22
    - generate test benches  (with ghdl or Vivado XSim)
23
    - configure the FPGA     (with Vivado hardware server)
24
 
25
  The Makefile's in general contain only a few definitions. By far most of
26
  the build flow logic in Vivado is in tcl scripts, only a thin interface
27
  layer is needed at the make level, which is concentrated in a few master
28
  makefiles which are included.
29
 
30
  Simulation and synthesis tools usually need a list of the VHDL source
31
  files, sometimes in proper compilation order (libraries before components).
32
  The different tools have different formats of these 'project descriptions.
33
 
34
  The build system employed in this project is based on manifest files called
35
     'vbom' or "VHDL bill of material" files
36
  which list for each vhdl source file the libraries and sources for the
37
  instantiated components, the later via their vbom, and last but not least
38
  the name of the vhdl source file.
39
  All file name are relative to the current directory. A recursive traversal
40
  through all vbom's gives for each vhld module all sources needed to compile
41
  it. The vbomconv script in tools/bin does this, and generates depending on
42
  options
43
    - make dependency files
44
    - Vivado synthesis setup files
45
    - Vivado simulation setup files
46
    - ghdl commands for analysis, inspection and make step
47
 
48
  The master make files contain pattern rules like
49
    %.bit  : %.vbom           -- create bit file
50
    %      : %.vbom           -- build functional model test bench
51
  which encapsulate all the vbomconv magic
52
 
53
  A full w11a system is build from about 100 source files, test benches
54
  from even more. Using the vbom's a large number of designs can be easily
55
  maintained.
56
 
57
  For more details on vbomconv consult the man page.
58
 
59
2. Setup system environment -----------------------------------------------
60
 
61
2a. Setup environment variables --------------------------------------
62
 
63
  The build flows require the environment variables:
64
 
65
    - RETROBASE:  must refer to the installation root directory
66
    - XTWV_PATH:  install path of the Vivado version
67
 
68
  For general instructions on environment see INSTALL.txt .
69
 
70
  Notes:
71
  - The build system uses a small wrapper script called xtwv to encapsulate
72
    the Xilinx environment. It uses XTWV_PATH to setup the Vivado environment
73
    on the fly. For details consult 'man xtwv'.
74
  - don't run the Vivado setup scripts ..../settings(32|64).sh in your working
75
    shell. Setup only XTWV_PATH !
76
 
77
2b. Compile UNISIM/UNIMACRO libraries for ghdl -----------------------
78
 
79
  A few entities use UNISIM or UNIMACRO primitives, and post synthesis models
80
  require also UNISIM primitives. In these cases ghdl has to link against a
81
  compiled UNISIM or UNIMACRO libraries.
82
 
83
  To make handling of the parallel installation of several Vivado versions
84
  easy the compiled libraries are stored in sub-directories under $XTWV_PATH:
85
 
86
     $XTWV_PATH/ghdl/unisim
87
     $XTWV_PATH/ghdl/unimacro
88
 
89
  A helper scripts will create these libraries:
90
 
91
    cd $RETROBASE
92
    xviv_ghdl_unisim            # does UNISIM and UNIMACRO
93
 
94
  Run these scripts for each Vivado version which is installed.
95
 
96
  Notes:
97
  - Vivado supports SIMPRIM libraries only in Verilog form, there is no vhdl
98
    version anymore.
99
  - ghdl can therefore not be used to do timing simulations with Vivado.
100
    However: under ISE SIMPRIM was available in vhdl, but ghdl did never accept
101
    the sdf files, making ghdl timing simulations impossible under ISE too.
102
 
103
3. Building test benches --------------------------------------------------
104
 
105
  The build flows currently supports only ghdl.
106
  Support for the Vivado simulator XSim will be added in a future release.
107
 
108
3a. With ghdl --------------------------------------------------------
109
 
110
  To compile a ghdl based test bench named  all is needed is
111
 
112
    make 
113
 
114
  The make file will use .vbom, create all make dependency files,
115
  and generate the needed ghdl commands.
116
 
117
  In some cases the test benches can also be compiled against the gate
118
  level models derived after the synthesis or optimize step. To compile them
119
 
120
    make ghdl_tmp_clean
121
    make _ssim                  # for post synthesis {see Notes}
122
    make _osim                  # for post optimize  {see Notes}
123
 
124
  The 'make ghdl_tmp_clean' is needed to flush the ghdl work area from
125
  the compilation remains of earlier functional model compiles.
126
 
127
  Notes:
128
  - post synthesis or optimize models currently very often fail to compile
129
    in ghdl due to a bug in the ghdl code generator.
130
 
131 35 wfjm
3b. With Vivado xsim -------------------------------------------------
132
 
133
  To compile a Vivado xsim based test bench named  all is needed is
134
 
135
    make _XSim
136
 
137
  The make file will use .vbom, create all make dependency files,
138
  and generate the needed Vivado xsim project files and commands.
139
 
140
  In many cases the test benches can also be compiled against the gate
141
  level models derived after the synthesis, optimize or routing step.
142
 
143
    make _XSim_ssim             # for post-synthesis
144
    make _XSim_osim             # for post-optimize
145
    make _XSim_tsim             # for post-routing
146
 
147
  Notes:
148
  - xsim currently (as of Vivado 2015.4) crashes when DPI is used in a mixed
149
    vhdl verilog context.
150
    Since DPI is used in the rlink simulation all system test benches with
151
    an rlink interface, thus most, will only run with ghdl and not with XSim.
152
 
153 29 wfjm
4. Building systems -------------------------------------------------------
154
 
155
  To generate a bit file for a system named  all is needed is
156
 
157
    make .bit
158
 
159
  The make file will use .vbom, create all make dependency files and
160
  starts Vivado in batch mode with the proper scripts which will handle the
161
  build steps. The log files and reports are conveniently renamed
162
 
163
      _syn.log            # synthesis log                 (from runme.log)
164
      _imp.log            # implementation log            (from runme.log)
165
      _bit.log            # write_bitstream log           (from runme.log)
166
 
167
      _syn_util.rpt       # (from _utilization_synth.rpt)
168
      _opt_drc.rpt        # (from _opt_drc.rpt)
169
      _pla_io.rpt         # (from _io_placed.rpt)
170
      _pla_clk.rpt        # (from _clock_utilization_placed.rpt)
171
      _pla_util.rpt       # (from _utilization_placed.rpt)
172
      _pla_cset.rpt       # (from _control_sets_placed.rpt)
173
      _rou_sta.rpt        # (from _route_status.rpt)
174
      _rou_drc.rpt        # (from _drc_routed.rpt)
175
      _rou_tim.rpt        # (from _timing_summary_routed.rpt)
176
      _rou_pwr.rpt        # (from _power_routed.rpt)
177
      _rou_util.rpt       # (extra report_utilization)
178
      _rou_util_h.rpt     # (extra report_utilization -hierarchical)
179
      _ds.rpt             # (extra report_datasheet)
180
 
181
  The design check points are also kept
182
 
183
      _syn.dcp            # (from .dcp)
184
      _opt.dcp            # (from _opt.dcp)
185
      _pla.dcp            # (from _placed.dcp)
186
      _rou.dcp            # (from _routed.dcp)
187
 
188
  If only the post synthesis, optimize or route design checkpoints are wanted
189
 
190
    make _syn.dcp
191
    make _opt.dcp
192
    make _rou.dcp
193
 
194
5. Configuring FPGAs ------------------------------------------------------
195
 
196
  The make flow supports also loading the bitstream into FPGAs via the
197
  Vivado hardware server. Simply use
198
 
199
    make .vconfig
200
 
201
  Note: works with Basys3 and Nexys4, only one board must connected.
202
 
203
6. Note on ISE ------------------------------------------------------------
204
 
205
  The development for Nexys4 started with ISE, but has now fully moved to
206
  Vivado. The make files for the ISE build flows have been kept for comparison
207
  are have the name Makefile.ise. So for some Nexys4 designs and associated
208
  one can still start with a
209
 
210
    make -f Makefile.ise  
211
 
212
  an ISE based build. To be used for tool comparisons, the ISE generated bit
213
  files were never tested in an FPGA.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.