Experiments with the ZPU processor core
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
C3BoardProject
C3BoardRTL
C4BoardProject
C4BoardRTL
CIII_Generated
DE1Project
DE1RTL
DE2Project
DE2RTL
Firmware
Generated
RTL
ZPUFlex @ c288747
ZPUSim
.gitmodules
README

README

This project contains my experiments with the ZPU - the Zylin soft processor
core.



PLEASE NOTE:
This project should be considered obsolete, superceded by the more actively
maintained and much tider "ZPUDemos" and "ZPUFlex" repositories.  For now I'll
leave the respository here in case anyone finds it useful, but I don't
guarantee that the contents are buildable or functional.




My aim is to see just how far the "small" variant of the core can be be taken
while keeping it under 1000 logic elements.

I've tried to keep the project as configurable as possible, so there are a
number of generics which can be used to configure this ZPU variant:

Firstly, it's possible to enable or disable hardware implementations of
various instructions.  With all these disabled, the ZPU is a little under 600
LEs in size, but requires emulation "microcode" in the lower kilobyte of the
program ROM.  With these instructions enabled, the ZPU takes just under 1,000
LEs, but in combination with various GCC switches, can make do without
emulation code; thus how you set these switches will depend on whether you're
short of LEs or Block RAM.

* IMPL_MULTIPLY - hardware mult
* IMPL_COMPARISON_SUB - hardware sub, lessthan, lessthanorequal,
  ulessthan, ulessthanorequal.
* IMPL_EQBRANCH - hardware eqbranch and neqbranch
* IMPL_STOREBH - hardware storeb and storeh
* IMPL_LOADBH - hardware loadb and loadh
* IMPL_CALL - hardware call
* IMPL_SHIFT - hardware lshiftright, ashiftright and ashiftleft
* IMPL_XOR - hardware xor

There are a couple of other switches too:
* EXECUTE_RAM - include support for executing code from outside the Boot ROM.
* REMAP_STACK - maps the stack / Boot ROM to 0x04000000.
  This is useful in combination with the EXECUTE_RAM switch.  With REMAP_STACK
  set to FALSE, the ROM / Stack RAM appears in low memory, with any accesses
  above the ROM's size going to the host.  If REMAP_STACK is set to true,
  the ROM / Stack is moved, allowing access to low memory.  Useful if you want
  to bootstrap a larger program than will fit in the BlockRAM-based Boot ROM.