[FPGA] RISC Processor


I designed and implemented this processor for my HAVO (secondary school) final assignment, for which it scored 10 out of 10 points and about which the local university(Universiteit Twente) who helped my school assess it said it would have been usable as a thesis for CS master.

It has 32 general registers and a link register for function returns, it supports direct, indirect and indexed addressing modes and has almost all basic operations implemented as instructions.

I also wrote an assembler for it, which is included in the Google Code project linked to below.

Click here to skip to the links and downloads section

Instructions:

Arithmetic:

  • Addition
  • Subtraction
  • Multiplication
  • Compare (Subtraction which discards the result but sets the status bits)

Logic:

  • And
  • Or
  • Exclusive or
  • Not and

Memory:

  • Load general purpose register
  • Store general purpose register
  • Load special (Link, Control) register
  • Store special (Link, Control) register

Branch:

All branch (branch, call or return) instructions are conditional (support the conditions listed below) and support both immediate mode and register based relative targets.

Instructions:

  • Branch
  • Call
  • Return

Conditions:

  • Less than
  • Equal
  • Greater than
  • Unconditional

Links


Download most recent source code
GoogleCode project (outdated code)
The paper I wrote about it as part of the assignment (Dutch)
YouTube video of my presentation about the assignment (Dutch)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>