Skip to content

w8ste/Single-Cycle-Processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Single-Cycle Processor

Main Modules

Datapath

Used to connect different modules and creates path the instruction takes through the processor. You can find the pdf here.

Decoder

Part of the Control Unit. It is used to set different flags depending on the instruction, that is suppposed to be executed.

You can find the pdf here.

Building blocks

The block folder contains the associated files.

Adder

The adder module is fairly straight forward. The adder has two data inputs, adds them together and outputs the result.

Multiplexer

The mux module is also quite simple. It has one parameter, which determines the width of the data inputs (d0, d1) and output.

input logic s output logic y
0 d0
1 d1

Register File

The register file module is used by digitial system to store temporary variables. In arm 32-bit, we have 15 32-bit register. You can find the synthesiis of the code here.

Resetable Flip-Flip

Resetable Flip-Flip wit enable signal

Extender

The extender module is used to extend different bit-widths. Here is how this functions:

Imm Src Ext Imm
00 Imm {24x0} instr_7:0
01 {20x0} instr_11:0
10 {6xinstr_23} instr_23:0

You can find the pdf here.

ALU

The ALU is used to execute various arithmetic calculations. You can find the synthesis here.

TODO

  • Update README and add all synthesized modules
  • Write Testbench
  • Depending on Testbench results, fix bugs

Appendix

  • This project is based on the book Digital Design and Computer Architecture by Harris & Harris and their implementation of a Single-Cycle-Processor.
  • Im only learning how to optimize with yosys, which is why it is possible, that the synthesized product is a bit blown out of proportion.

About

A single cycle processor, written in System Verilog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published