-
Notifications
You must be signed in to change notification settings - Fork 9
/
README
79 lines (63 loc) · 2.49 KB
/
README
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
This is a collection of tools, scripts, verilog, etc, for experimenting
with the Xilinx Zynq SoC FPGA, particularly around using a commandline
workflow and avoiding the IPI (IP Integrator) workflow.
An earlier version that attempted to make use of IPI from the commandline
lives in the deprecated-ipi branch.
Warning: This is very much a work in progress.
Projects
--------
zybo-hdmi - display a test pattern ZYBO board's HDMI output
zybo-hdmi-axi - same, but add an axi slave to adjust the pattern
zybo-simple-io - AXI access to the switches, buttons, and LEDs
...
Repository Layout
-----------------
hdl/... - verilog, systemverilog, and xdc sources
build/... - makefiles and tcl scripts
Generated Files
---------------
sim/${name}-vsim/... - where Verilator intermediates are generated
sim/${name}-xsim/... - where Xilinx Xsim intermediates are generated
synth/${name}/... - where Vivado synthesis intermediates are generated
out/... - where FPGA final products (bitfiles/etc) end up
out/${name}.bit - bitfile for project name
Build System Notes
------------------
1. Declare the name of the module and its sources (.v, .sv, .hex):
MODULE_NAME := ...
MODULE_SRCS := ...
2. invoke the appropriate build rules for the module type:
include build/vivado-bitfile.mk
- create Xilinx out/$(MODULE_NAME).bit bitfile
- target device MODULE_PART
- required: a top level module named top
- to build: make modulename
include build/verilator-sim.mk
- create Verilator simulation target
- required: a top level module named testbench(input clk)
- provided: clock signal
- to run: make modulename-vsim
include build/vivado-xsim.mk
- create Vivado Xsim simulation target
- required: a top level module named testbench
- to run: make modulename-xsim
Tools
-----
build/mkzynq.go - Generates useful wrappers around Zynq PS7 macro
Customizing for your Install
----------------------------
build/init.mk should point to Xilinx Vivado, Xilinx SDK, and Verilator.
The default setup assumes you installed the 2014.2 version of the Xilinx
tools under /work/xilinx/... and built verilator under /work/verilator/...
Building Verilator
------------------
You can replace /work with some other convenient directory if you like
(but be sure to update build/init.mk):
0. install autoconf, bison, flex
1. cd /work
2. git clone http://git.veripool.org/git/verilator
3. cd verilator
4. autoconf
5. ./configure
6. make -j32
7. you do not need to make install