Skip to content

menotti/lightriscv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightRISCV

Single & Multi-cycle implementation of a subset of RISC-V for educational purposes.

The first version of this processor (multicycle) was adapted from the MIPS processor described in the Harris & Harris book1. The single-cycle version was created from Bruno Levy's multicycle code2, with signal names changed to match those in the book.

Instructions

make will simulate the single-cycle version. Be careful with data addresses, as the linker won't calculate them correctly. In the example below, s0 is manually set to the address of variable b instead of using the pseudo instruction la.

_start:
	addi s0, zero, 0x4 # Harvard architecture (monocycle)
	#la s0, b # Von Neumann architecture (multicycle)

Uncomment the following line if you want to simulate the multicycle version. In this version, the addresses are calculated correctly by the linker. To simulate this version, use the command make VERSION=MULTI.

Implemented instructions

  • add
  • addi
  • lw
  • sw
  • jal (incomplete)

EDA Playground

Further Reading

References

Footnotes

  1. Digital Design and Computer Architecture

  2. From Blinker to RISC-V

About

Single & Multi-cycle implementation of a subset of RISC-V for educational purposes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published