jtag: Apply Martin Strubel JTAG implementation for ZPU
[zpu.git] / zpu / hdl / zealot / 0README.txt
blob4bb454602111e203826540c3675555ca57c08cf6
1 This is a test release of the ZPU.
2 ZPU is a 32 bits stack CPU. This package contains a VHDL implementation
3 suitable for FPGAs. It was tested using a Xilinx Spartan 3 1500 FPGA.
5 The author of the ZPU is Øyvind Harboe (oyvind.harboe zylin.com) and the
6 license is the BSD one. Portions of this package were developed by Salvador E.
7 Tropea (salvador inti.gob.ar) and others. Some portions are under the GPL
8 license.
10 Øyvind also added a ZPU target to the gcc/gdb.
12 For more information about the ZPU core please visit:
13 http://www.zylin.com/zpu.htm
14 http://www.opencores.org/projects.cgi/web/zpu/overview
16 What are the files?
17 -------------------
19 zpu_medium.vhdl
20 ZPU CPU, medium version.
22 zpu_small.vhdl
23 ZPU CPU, small version (Dual Port RAM only!).
25 zpu_pkg.vhdl
26 Package containing the declarations for the ZPU library.
28 devices/phi_io.vhdl
29 The very basic I/O peripherals needed for the standard C library. It includes a
30 timer (64 bits clock counter) and an UART (8N1 without FIFO).
31 This is known as the PHI I/O layout, this implementation isn't complete. Only
32 the above mentioned peripherals are available.
34 devices/timer.vhdl
35 64 bits clock counter maped by the PHI I/O.
37 devices/trace.vhdl
38 This is used for debug purposes. The ZPU have a debug port to connect this
39 module. It can generate an execution trace log during the simulation.
41 devices/txt_util.vhdl
42 Useful text handling routines for the simulation.
44 devices/br_gen.vhdl
45 Fixed baud rate generator for the UART.
47 devices/rx_unit.vhdl
48 UART Rx module.
50 devices/tx_unit.vhdl
51 UART Tx module.
53 roms/rom_pkg.vhdl
54 Package containing the declarations for the memories used by the small and
55 medium ZPU.
57 roms/dmips_bram.vhdl
58 A memory that maps to Xilinx BRAMs and contains the Dhrystone Benchmark,
59 Version 2.1 (Language: C). This memory can be connected to the ZPU for
60 simulation or hardware implementations. The code assumes a 50 MHz clock to
61 compute the benchmark. The minimum size for this block should be 32 kB.
63 roms/dmips_dbram.vhdl
64 Same as roms/dmips_bram.vhdl, but dual ported. Suitable for the small ZPU.
66 roms/hello_bram.vhdl
67 A memory that maps to Xilinx BRAMs and contains a simple "Hello World!"
68 program (C compiled). This memory can be connected to the ZPU for
69 simulation or hardware implementations. The minimum size for this block
70 should be 16 kB.
72 roms/hello_dbram.vhdl
73 Same as roms/hello_bram.vhdl, but dual ported. Suitable for the small ZPU.
74 helpers/zpu_med1.vhdl
75 This is a helper that connects a ZPU to its memory and the PHI I/O space.
77 testbenches/dmips_med1_tb.vhdl
78 A simple testbench to simulate the medium ZPU (behavior).
80 testbenches/small1_tb.vhdl
81 A simple testbench to simulate the small ZPU (behavior).
83 fpga/dmips_med1.vhdl
84 A wrapper to implement the medium ZPU in an FPGA. This example was designed
85 for a GR-XC3S board from Pender, but should be easily adapted to other
86 boards.
88 fpga/hello_med1.vhdl
89 Same as fpga/dmips_med1.vhdl, but uses less memory, enough for the "Hello
90 Wold!" test.
92 fpga/dmips_small1.vhdl
93 Same as fpga/dmips_med1.vhdl, but for the small ZPU.
95 fpga/hello_small1.vhdl
96 Same as fpga/hello_med1.vhdl, but for the small ZPU.
99 ZPU library?
100 ------------
102 The following files are part of a library I called ZPU:
104 zpu_pkg.vhdl, zpu_medium.vhdl, zpu_small.vhdl, txt_util.vhdl, timer.vhdl,
105 rx_unit.vhdl, tx_unit.vhdl, br_gen.vhdl, phi_io.vhdl and trace.vhdl.
107 You should group them inside a library called zpu. This procedure is
108 tool-chain dependent. In the ISE tool you must add a library and them move
109 these files to the library.
111 If you don't know how to do it with your tools you can just replace all the:
113 library zpu;
114 use zpu.xxxxxx.all;
116 code by:
118 library work;
119 use work.xxxxxx.all;
122 Which files are needed for simulation?
123 --------------------------------------
125 You need all the files that compose the zpu library plus:
126 1) A memory containing a program, i.e.:
127 roms/rom_pkg.vhdl and roms/dmips_bram.vhdl
128 2) A testbench (including the memory and I/O interconnections):
129 aux/zpu_med1.vhdl and testbenches/dmips_med1_tb.vhdl
130 3) Be careful to include only the medium or the small ZPU. Also note that
131 the small uses dual port BRAMs, i.e. roms/dmips_dbram.vhdl The testbench
132 for the small ZPU is small1_tb.vhdl
135 Which files are needed for synthesis?
136 -------------------------------------
138 This is similar to simulation, but:
139 1) You should avoid trace.vhdl.
140 2) The top level should connect to the FPGA pins, replace dmips_med1_tb.vhdl
141 by fpga/dmips_med1.vhdl or fpga/hello_med1.vhdl
144 What resources are needed in the FPGA?
145 --------------------------------------
147 The DMIPS benchmarks needs aprox (Xilinx Spartan 3):
149 Medium ZPU:
151 Flip Flops:   498
152 LUTs:        1877
153 Slices:      1032
154 BRAMs:         16
155 Multipliers:    3
157 The hello world example needs less memory:
159 Flip Flops:   496
160 LUTs:        1871
161 Slices:      1027
162 BRAMs:          8
163 Multipliers:    3
166 Small ZPU:
168 Flip Flops:   373
169 LUTs:         706
170 Slices:       434
171 BRAMs:         16
173 The hello world example needs less memory:
175 Flip Flops:   371
176 LUTs:         701
177 Slices:       431
178 BRAMs:          8
181 The board should contain an RS-232 transceiver. A push button (active when
182 pressed) is also used, for reset.
185 Ok, I synthetized it and put in the FPGA, what now?
186 ---------------------------------------------------
188 Connect the RS-232 board output to a terminal (a PC). Setup the terminal for
189 115200 8N1 reception and press the reset push button. You should get the
190 program output. You can change the baudrate in the toplevel VHDL.
193 Please tell me if you succeed or failed!
194 Enjoy, Salvador E. Tropea