Skip to content

A simplified computer built in Logisim capable of running C/C++ programs

Notifications You must be signed in to change notification settings

Ma-Y/RISC-V-Computer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RISC-V-Computer

A simplified computer built in Logisim capable of running C/C++ programs

The idea behined this project was to build a bare minimum computer that can run C/C++ programs and simple enough to learn and understand.

Memory map:

0000000-07FFFFF Code 800000 - 7FFFFFB Data 7FFFFFC - 7FFFFFF I/O ports

The desing of this computer is composed out of four main components:

  1. CPU
  2. Main memory
  3. I/O interface
  4. Acess coordinator

CPU:

The CPU is a single-cycle, 32-bit design based on the RISC-V ISA, it also implements the M extension for hardware multipication and division.

Memory:

This computer has a single 128MB memory for storing both code and data and due to logisim limitations the memory design was divided into 8 banks with each bank sizing 16MB.

I/O interface:

The I/O interface consists of 4 input ports and 4 output port with each port being 32-bit wide.

Access coordinator:

This module directs CPU Read/Write accesses between Main memory and I/O interface based on the current address generated by the CPU.

Compiling and Loading C/C++ programs

You'll need a RISC-V C/C++ compiler, i personaly use this one for my windows machine https://gnutoolchains.com/risc-v/

Load the generated binary file into bank0 in the memory module.

Tested in Logisim-evolution v3.7.2

enjoy :)

About

A simplified computer built in Logisim capable of running C/C++ programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 95.4%
  • Makefile 4.6%