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 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 36 wfjm
# $Id: README_buildsystem_Vivado.txt 779 2016-06-26 15:37:16Z 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 36 wfjm
  5.  Building vivado projects, creating gate level models
16
  6.  Configuring FPGAs (via make flow)
17
  7.  Note on ISE
18 29 wfjm
 
19
1. Concept ----------------------------------------------------------------
20
 
21
  This projects uses GNU make to
22
    - generate bit files     (with Vivado synthesis)
23
    - generate test benches  (with ghdl or Vivado XSim)
24
    - configure the FPGA     (with Vivado hardware server)
25
 
26
  The Makefile's in general contain only a few definitions. By far most of
27
  the build flow logic in Vivado is in tcl scripts, only a thin interface
28
  layer is needed at the make level, which is concentrated in a few master
29
  makefiles which are included.
30
 
31
  Simulation and synthesis tools usually need a list of the VHDL source
32
  files, sometimes in proper compilation order (libraries before components).
33
  The different tools have different formats of these 'project descriptions.
34
 
35
  The build system employed in this project is based on manifest files called
36
     'vbom' or "VHDL bill of material" files
37
  which list for each vhdl source file the libraries and sources for the
38
  instantiated components, the later via their vbom, and last but not least
39
  the name of the vhdl source file.
40
  All file name are relative to the current directory. A recursive traversal
41
  through all vbom's gives for each vhld module all sources needed to compile
42
  it. The vbomconv script in tools/bin does this, and generates depending on
43
  options
44
    - make dependency files
45
    - Vivado synthesis setup files
46
    - Vivado simulation setup files
47
    - ghdl commands for analysis, inspection and make step
48
 
49
  The master make files contain pattern rules like
50
    %.bit  : %.vbom           -- create bit file
51
    %      : %.vbom           -- build functional model test bench
52
  which encapsulate all the vbomconv magic
53
 
54
  A full w11a system is build from about 100 source files, test benches
55
  from even more. Using the vbom's a large number of designs can be easily
56
  maintained.
57
 
58
  For more details on vbomconv consult the man page.
59
 
60
2. Setup system environment -----------------------------------------------
61
 
62
2a. Setup environment variables --------------------------------------
63
 
64
  The build flows require the environment variables:
65
 
66
    - RETROBASE:  must refer to the installation root directory
67
    - XTWV_PATH:  install path of the Vivado version
68
 
69
  For general instructions on environment see INSTALL.txt .
70
 
71
  Notes:
72
  - The build system uses a small wrapper script called xtwv to encapsulate
73
    the Xilinx environment. It uses XTWV_PATH to setup the Vivado environment
74
    on the fly. For details consult 'man xtwv'.
75
  - don't run the Vivado setup scripts ..../settings(32|64).sh in your working
76
    shell. Setup only XTWV_PATH !
77
 
78
2b. Compile UNISIM/UNIMACRO libraries for ghdl -----------------------
79
 
80
  A few entities use UNISIM or UNIMACRO primitives, and post synthesis models
81
  require also UNISIM primitives. In these cases ghdl has to link against a
82
  compiled UNISIM or UNIMACRO libraries.
83
 
84
  To make handling of the parallel installation of several Vivado versions
85
  easy the compiled libraries are stored in sub-directories under $XTWV_PATH:
86
 
87
     $XTWV_PATH/ghdl/unisim
88
     $XTWV_PATH/ghdl/unimacro
89
 
90
  A helper scripts will create these libraries:
91
 
92
    cd $RETROBASE
93
    xviv_ghdl_unisim            # does UNISIM and UNIMACRO
94
 
95
  Run these scripts for each Vivado version which is installed.
96
 
97
  Notes:
98
  - Vivado supports SIMPRIM libraries only in Verilog form, there is no vhdl
99
    version anymore.
100
  - ghdl can therefore not be used to do timing simulations with Vivado.
101
    However: under ISE SIMPRIM was available in vhdl, but ghdl did never accept
102
    the sdf files, making ghdl timing simulations impossible under ISE too.
103
 
104
3. Building test benches --------------------------------------------------
105
 
106 36 wfjm
  The build flows currently supports ghdl and the vivado simulator xsim.
107 29 wfjm
 
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 36 wfjm
  level models derived after the synthesis or optimize step.
119
  Vivado only generated functional (UNISIM based) models in vhdl. Timing
120
  (SIMPRIM based) models are only available on verilog. The combination
121
  vivado + ghdl is therefore limited to functional model simulation.
122 29 wfjm
 
123 36 wfjm
  To compile them
124
 
125 29 wfjm
    make ghdl_tmp_clean
126 36 wfjm
    make _ssim                  # for post synthesis functional
127
    make _osim                  # for post optimize  functional
128
    make _rsim                  # for post routing   functional
129 29 wfjm
 
130 36 wfjm
  Individual working directories are used for the different models
131
    ghdl.bsim        for bahavioral model
132
    ghdl.ssim        for post synthesis
133
    ghdl.osim        for post optimize
134
    ghdl.rsim        for post routing
135
  and can co-exist. The 'make ghdl_tmp_clean' can be used to flush the ghdl
136
  work areas, but in general this is not needed (since V0.73).
137 29 wfjm
 
138
  Notes:
139 36 wfjm
  - Many post-synthesis functional currently fail due to startup and
140
    initialization problems (see issue V0.73-2).
141 29 wfjm
 
142 35 wfjm
3b. With Vivado xsim -------------------------------------------------
143
 
144
  To compile a Vivado xsim based test bench named  all is needed is
145
 
146
    make _XSim
147
 
148
  The make file will use .vbom, create all make dependency files,
149
  and generate the needed Vivado xsim project files and commands.
150
 
151
  In many cases the test benches can also be compiled against the gate
152
  level models derived after the synthesis, optimize or routing step.
153 36 wfjm
  Vivado supports functional (UNISIM based) models in vhdl and in verilog,
154
  and timing (SIMPRIM based) models only in verilog. Since practice showed
155
  that verilog models compile and execute faster, verilog is used for both
156
  functional and timing models.
157 35 wfjm
 
158 36 wfjm
    make _XSim_ssim             # for post-synthesis functional
159
    make _XSim_osim             # for post-optimize  functional
160
    make _XSim_rsim             # for post-routing   functional
161 35 wfjm
 
162 36 wfjm
    make _XSim_esim             # for post-synthesis timing
163
    make _XSim_psim             # for post-optimize  timing
164
    make _XSim_tsim             # for post-routing   timing
165
 
166 35 wfjm
  Notes:
167 36 wfjm
  - as of vivado 2016.2 xelab shows sometimes extremely long build times,
168
    especially for generated post-synthesis vhdl models (see issue V0.73-1).
169
  - Many post-synthesis functional and especially post-routing timing
170
    simulations currently fail due to startup and initialization problems
171
    (see issue V0.73-2).
172 35 wfjm
 
173 29 wfjm
4. Building systems -------------------------------------------------------
174
 
175
  To generate a bit file for a system named  all is needed is
176
 
177
    make .bit
178
 
179
  The make file will use .vbom, create all make dependency files and
180
  starts Vivado in batch mode with the proper scripts which will handle the
181
  build steps. The log files and reports are conveniently renamed
182
 
183
      _syn.log            # synthesis log                 (from runme.log)
184
      _imp.log            # implementation log            (from runme.log)
185
      _bit.log            # write_bitstream log           (from runme.log)
186
 
187
      _syn_util.rpt       # (from _utilization_synth.rpt)
188
      _opt_drc.rpt        # (from _opt_drc.rpt)
189
      _pla_io.rpt         # (from _io_placed.rpt)
190
      _pla_clk.rpt        # (from _clock_utilization_placed.rpt)
191
      _pla_util.rpt       # (from _utilization_placed.rpt)
192
      _pla_cset.rpt       # (from _control_sets_placed.rpt)
193
      _rou_sta.rpt        # (from _route_status.rpt)
194
      _rou_drc.rpt        # (from _drc_routed.rpt)
195
      _rou_tim.rpt        # (from _timing_summary_routed.rpt)
196
      _rou_pwr.rpt        # (from _power_routed.rpt)
197
      _rou_util.rpt       # (extra report_utilization)
198
      _rou_util_h.rpt     # (extra report_utilization -hierarchical)
199
      _ds.rpt             # (extra report_datasheet)
200
 
201
  The design check points are also kept
202
 
203
      _syn.dcp            # (from .dcp)
204
      _opt.dcp            # (from _opt.dcp)
205
      _pla.dcp            # (from _placed.dcp)
206
      _rou.dcp            # (from _routed.dcp)
207
 
208
  If only the post synthesis, optimize or route design checkpoints are wanted
209
 
210
    make _syn.dcp
211
    make _opt.dcp
212
    make _rou.dcp
213
 
214 36 wfjm
5. Building vivado projects, creating gate level models -------------------
215 29 wfjm
 
216 36 wfjm
  Vivado is used in 'project mode', whenever one of the targets mentioned
217
  above is build a vivado project is freshly created in the directory
218
    project_mflow
219
  with the project file
220
    project_mflow/project_mflow.xpr
221
 
222
  There are many make targets which
223
    - just create the project
224
    - start vivado in gui mode to inspect the most recent project
225
    - create gate level models
226
 
227
  Specifically
228
 
229
    make .vivado          # create vivado project from .vbom
230
    make vivado                # open project in project_mflow
231
 
232
    make _ssim.vhd        # post-synthesis functional model (vhdl)
233
    make _osim.vhd        # post-optimize  functional model (vhdl)
234
    make _rsim.vhd        # post-routing   functional model (vhdl)
235
 
236
    make _ssim.v          # post-synthesis functional model (verilog)
237
    make _osim.v          # post-optimize  functional model (verilog)
238
    make _rsim.v          # post-routing   functional model (verilog)
239
 
240
    make _esim.v          # post-synthesis timing model (verilog)
241
    make _psim.v          # post-optimize  timing model (verilog)
242
    make _tsim.v          # post-routing   timing model (verilog)
243
 
244
  For timing model verilog file an associated sdf file is also generated.
245
 
246
6. Configuring FPGAs ------------------------------------------------------
247
 
248 29 wfjm
  The make flow supports also loading the bitstream into FPGAs via the
249
  Vivado hardware server. Simply use
250
 
251
    make .vconfig
252
 
253 36 wfjm
  Note: works with Arty, Basys3, and Nexys4, only one board must connected.
254 29 wfjm
 
255 36 wfjm
7. Note on ISE ------------------------------------------------------------
256 29 wfjm
 
257
  The development for Nexys4 started with ISE, but has now fully moved to
258
  Vivado. The make files for the ISE build flows have been kept for comparison
259
  are have the name Makefile.ise. So for some Nexys4 designs and associated
260
  one can still start with a
261
 
262
    make -f Makefile.ise  
263 36 wfjm
  or
264
    makeise 
265 29 wfjm
 
266
  an ISE based build. To be used for tool comparisons, the ISE generated bit
267
  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.