Skip to content

tomhepworth/cpu_sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tom Hepworth ACA coursework

My cycle level CPU simulator for the University of Bristol's advanced computer architecture unit. My simulator is based on a RISC-V ISA and implements an extended version of Tomasulos algorithm, with a reorder buffer and 2-bit branch prediction.

Compile using make

A binary called simulator will be created. Run it from the project directory

Example command:

./simulator --mode=ooo --program=programs/bubbleSort.asm -d3 -a3 -l3 -r32 --bp=2BIT

Add the flag --debug to see what's going on inside the CPU. Add the flag --step with debug to step through execution one cycle at a time

-d controls the number of issues per cycle -a controls the number of ALUs. -l controls the number of memory units. -r controls reorder buffer size. --bp selects branch prediction mode. Options are "2BIT" "AT" (always take) "NT" (never take)

References

Libraries used:

About

Advanced Computer Architecture coursework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages