The Easy 8-bit Processor
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
assembler use ocamlbuild instead of make Jun 9, 2014
docs get rid of optional argument in ret instruction in isa reference Mar 3, 2014
emulator get rid of unused variables in emulator Jun 9, 2014
processor add a bunch of comments and clean up source Mar 3, 2014
tests disable set accumulator in return Mar 2, 2014 edit fpga instructions in README Feb 27, 2014

EZ8 : The easy 8-bit processor

This is an attempt to craft an 8-bit microcontroller architecture that is easy to implement. Care is taken to choose the instruction encoding so that instructions that perform similar tasks have similar encodings.

This repository contains an assembler written in OCaml, an emulator written in C, some test assembly programs, and a three-stage pipelined processor written in Verilog.

The RTL description is designed to be used on the Arrow SoCKit. You may be able to port it to other Cyclone V-based boards, such as the DE1-SoC board, but you will have to change the pin assignments in the settings file.

Instructions for Verification

To verify that the processor is functioning correctly. Perform the following steps.

  1. Go into the "assembler" directory and run make to build the assembler. You will need to have an OCaml compiler installed.
  2. Go into the "tests" directory and run make to assemble the test programs into machine code.
  3. Open the "processor/ez8cpu.qpf" project in Quartus, run "Analysis and Synthesis", then run RTL simulation.

Instructions for Running on FPGA

  1. Build the assembler as above.
  2. Go into the "tests" directory and run make fpga to build the FPGA test program. You will need to have SRecord installed in order to do this.
  3. Copy the "led_example.hex" file to "processor/program.hex".
  4. Open the project file in Quartus, run the Assembler, then open the programmer and program the FPGA through the USB Blaster.
  5. The program should now be running. If switch 0 is off (down), the LEDs will sweep back and forth regularly. If switch 0 is on (up), the LEDs will advance when you press key 0.

Detailed documentation is available in the "docs/" folder.