Home IP cores Tools Download Others
ZPU
ZPU doc
ZPU download
Introduction 1
Introduction 2

 

 

 

 

Copyright  ©  2009 chinafpga

What is zpu?

    ZPU是目前世界上最小的32位CPU,可以用FPGA去实现他,现在有许多人这在研究他,现在国内好像还不多。

    特点结构简单,便于理解,其最大的优势是具有GCC的工具链,非常适合做硬件的工程师研究编译原理,GCC工具链,FPGA的软核构造原理,以及FPGA的高级程序应用。有了这个吸引力,我想你一定很兴奋吧。那好,Let's go!!!

    请先看ZPU doc,你需要安装ISE(推荐ISE10.1),modelsimSE 6.2b和Cygwin(可以使用最新版本,推荐去啊不安装),软件的安装方法请大家自己网上搜索,一般默认安装都OK。

ZPU Project

 

This project is to setup basic zpu simulation with modelsim.How to setup "hello word",you should read ZPU doc ,  good luck!

You can download the source VHDL file from here .

1.使用svncodegoogle上下载代码,并放在一个安装目录里。运行Cygwin,我的工程目录是在G:Xilinx/zpu/zpu目录下,所以对应输入的命令行为:cd /cygdrive/g/xilinx/zpu/zpu/example/"hello world",然后输入:sh build.sh ,这时将会把hello.c转换为hdl文件,文件名为helloworld.vhd.

2.运行modelsim,用命令行打开工程:文件在example目录下,文件名为:simzpu_small.do.运行后你会发现在example目录下的log.txt文件输出hello world 1 hello world 2纵排的字样,那么恭喜你,你已经成功!

             Command in cygwin(linux is not test now):  cd /cygdrive/g/xilinx/zpu/zpu/src/gpio,then:  sh build.sh(you can see details in build.sh file).
             Start modelsim and then change work directory into g/xilinx/zpu/zpu/simzpu (or use dos command in modelsim to change work directory
              ).Enter : do simzpu.do in command in modelsim.

      Command in cygwin(linux is not test now):cd /cygdrive/g/xilinx/zpu/zpu/src/uart,then: sh build.sh(you can see details in build.sh file).

      The way to try is the same with gpio or uart test.

source code in test.S:

;gpio test
im 0x00000001
nop
im 0x0c000004 ;gpio direction register address
store
_loop:
im 0x00000060
nop
im 0x0c000000;gpio data register address
store
im _loop
poppc ; loop

modelsim simulation:

  1. opcode timing .
  2. Gpio gpio data register 's write timing.