Skip to content

Run this script to see a demonstration of the fetch-decode-execute cycle using a set of pre-defined commands similar to MIPS instructions.

Notifications You must be signed in to change notification settings

s-mehnert/cpu_simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Simulator

The CPU Simulator demonstrates the inner workings of a CPU by processing the following short list of simplified instructions:

CACHE,1
ADDI,R2,R2,2
ADD,R3,R2,R1
J,8
HALT,;

Features

The CPU Simulator was built for demonstration purposes only and focuses on a very small portion of the CPU's and ALU's capabilities. It showcases the CPU's fetch-decode-execute cycle and processes the given commands. It will not be possible to give any other instructions to the CPU Simulator than the ones provided.

Usage

To see the CPU Simulator in action fork and clone the repository, make sure you have a suitable Python version (e.g. 3.11.5) installed on your machine and run the file simulation.py in your terminal.

Contribution

If you would like to take the CPU Simulator to the next level and add functionality, pull requests are welcome.

About

This is the final project for module 4 "Computer Architecture" of the "Computer Science" Career Path on codecademy.com, created by Peafly_78. The CPU simulator has been created using Python 3.11.5.

License

MIT

About

Run this script to see a demonstration of the fetch-decode-execute cycle using a set of pre-defined commands similar to MIPS instructions.

Resources

Stars

Watchers

Forks

Languages