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
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
20 ZPU CPU, medium version.
23 ZPU CPU, small version (Dual Port RAM only!).
26 Package containing the declarations for the ZPU library.
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.
35 64 bits clock counter maped by the PHI I/O.
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.
42 Useful text handling routines for the simulation.
45 Fixed baud rate generator for the UART.
54 Package containing the declarations for the memories used by the small and
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.
64 Same as roms/dmips_bram.vhdl, but dual ported. Suitable for the small ZPU.
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
73 Same as roms/hello_bram.vhdl, but dual ported. Suitable for the small ZPU.
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).
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
89 Same as fpga/dmips_med1.vhdl, but uses less memory, enough for the "Hello
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.
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:
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):
157 The hello world example needs less memory:
173 The hello world example needs less memory:
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