A 4-bit processor (4004) with its respective ROM's (4001) and RAM's (4002) is implemented in SystemVerilog with some debug infrastructure wired in to allow remote manipulation and monitoring of the system as it's running.
A simulation testbench is provided in Verilator with support for waveform dumping, makefiles handle generation & updating of specified ROMs.
Example Assembly files are provided to exercise the system, along with a rudimentary assembler (located in sw/) to convert the ROMs into ASCII Hex ROMs that can be parsed and loaded by the testbench or eventually by the Zynq main processor.
An assembler for the ASM files and a gold model for the Fibonacci "Random" program.
All TCL scripts necessary to inflate a BlockDesign and Vivado Project to synthesize a bitfile for the Pynq-Z2 platform. MCS-4 system is packaged into an IP with parameterizable ROM & RAM configurations.
cd sim/
make axi ROM=../roms/fibonacci_rand.asm
gtkwave obj_dir/simx.fst &
ROM | Function |
---|---|
fibonacci_rand | Generates Fibonacci mod 128 |
no_branch_bist | All non-branching instruction quick test |
ram_test | Writes and reads a bunch of different RAMs |
stack_test | Plays around with branching and stack instructions |
cd vivado/
vivado -mode batch -source ./mcs4pynq_proj.tcl
start_gui
- Upload entire sw/pynq folder to Pynq
- Move .bit and .tcl to /overlays/mcs4/
- Open mcs4_boot notebook and run.
- Vivado 2019.1 WebPack (license for Zynq-Z7020)
- Verilator
- Python
- Pynq-Z2