head 1.5;
access;
symbols;
locks; strict;
comment @# @;
1.5
date 2008.08.21.21.12.58; author oharboe; state dead;
branches;
next 1.4;
commitid 240b48adda574567;
1.4
date 2008.05.06.06.39.38; author oharboe; state Exp;
branches;
next 1.3;
commitid 189481ffd014567;
1.3
date 2008.02.21.18.59.59; author oharboe; state Exp;
branches;
next 1.2;
commitid 6ce647bdc9fc4567;
1.2
date 2008.02.11.20.47.27; author oharboe; state Exp;
branches;
next 1.1;
commitid 3eca47b0b45d4567;
1.1
date 2008.01.02.21.53.13; author oharboe; state Exp;
branches;
next ;
commitid 5c22477c05084567;
desc
@@
1.5
log
@merging in some docs to zpu_arch.html
@
text
@
Getting started - FPGA
The simplest version of the ZPU uses BRAM. When getting accustomed to the ZPU, a BRAM ZPU with a UART
is a good place to start.
You'll find a working simulation script in hdl/example/simzpu_small.do and hdl/example_medium/simzpu_medium.do, which
show simulation of the small(zpu_core_small.vhd) and medium sized ZPU(zpu_core.vhd). hdl/example/simzpu_interrupt.do
shows use of interrupts.
When implementing the ZPU, copy the following files and modify them to your needs:
- hdl/example/zpu_config.vhd - set up RAM size here
- hdl/example/helloworld.vhd - dual port BRAM implementation.
Obviously you must also connect the ZPU to the rest of your IO subsystem. IO is memory mapped(read/write) in the ZPU.
Generating VHDL BRAM initialization
../install/bin/zpu-elf-objcopy -O binary hello.elf hello.bin
java -classpath ../simulator/zpusim.jar com.zylin.zpu.simulator.tools.MakeRam hello.bin >hello.bram
Running example simulation
The hdl/example directory has a simulation written for Xilinx WebPack ModelSim. From the ModelSim command prompt:
- cd c:/<installfolder>/hdl/example
- do zpusim_small.do
After running the hello world simulation (see zpusim.do), two files are written to the hdl/example directory:
- log.txt - contains the "Hello world!" text written to the debug channel/simplified UART.
- trace.txt - a trace file for the CPU. The instruction set simulator has the capability of taking
this file as input in order to verify that the HDL implementation matches the instruction set simulator.
When a mismatch is found, the GDB debugger will break. Very handy for debugging custom ZPU implementations.
HDL Directories & files
- example - contains example files & working ZPU. Start here.
- wishbone - contains wishbone interface for the ZPU
- zpu3 - if you are interested in developing ZPU cores and not only using them, then this directory contains various stuff of more or less historical interest.
- zpu4 - if you are interested in developing ZPU cores and not only using them, then this is the active development version. You'll also want to copy out the
files you need from this folder to your own project.
The HDL files need a bit of spit and polish!
@
1.4
log
@ * Small ZPU now supports interrupts
* added simulation example demonstrating interrupts
@
text
@@
1.3
log
@ * zpu/zpu/hdl/index.html. Sharpened instructions and shows two working
examples. Small & medium ZPU.
* got zpu4/src/simzpu_medium.do working again.
@
text
@d7 3
a9 2
You'll find a working simulation script in hdl/example/simzpu_small.do and hdl/zpu4/src/simzpu_medium.do, which
show simulation of the small(zpu_core_small.vhd) and medium sized ZPU(zpu_core.vhd).
@
1.2
log
@ * hdl/index.html. Fixed typo. Use objcopy and not objdump.
@
text
@d7 2
a8 1
You'll find a working simulation script in hdl/example/simzpu.do.
d27 1
a27 1
do zpusim.do
d30 1
a30 1
After running the hello world simulation (see zpusim.do), two files are written to the hdl/exmaple directory:
@
1.1
log
@Initial import from www.ecosforge.net
@
text
@d18 1
a18 1
../install/bin/zpu-elf-objdump -O binary hello.elf hello.bin
@