Skip to content

andresryes/CPUsimulator

 
 

Repository files navigation

cpu
🚀 CPU Simulator


CPU simulator is an app that provides a set of instruction in order to recreate the functions of an actual CPU.

Vist Troubleshooting to find more.

Features and Technologies

  • Let you upload a .code from website
  • Debug mode implemented
  • See the CPU date in real time
  • Mnemonic and Machine code
  • You can edit the BIOS initial setup from a yml file
  • Cross-platform, using Docker.
  • Using Docker-Compose to run multiple containers.
  • Pipenv
  • TravisCI
  • NGINX for web page
  • Using OPP
  • Using functions as FCO
  • Support for Linux, MacOS and Windows with Docker properly installed

💡 Warning: You cannot run production mode with clock set up as 0. That parameter is meant for debug mode only.

Requirements

To work correctly, you will first need:

Installing and running the app

Now that the requirements are satisfied, you can install and run the CPU Simulator. First download or clone the repository and:

[Production]

docker-compose up --build

Done. This command should run both containers (web and api). In order to see the app hit your computer host direction in the port 5001.

💡 Warning: Do not run this method if clock is set as 0 in bios.yml file.

[Debug mode]

Make the required changes in bios.yml, you can either change the clock attribute to 0, program will wait for an Enter to continue. If not, you will be able to see the logs from the CPU simulator.

Procedure:

  • Build the api image from api.Dockerfile
  • Run the image you just build with the following flags:
docker run -it -p 5000:5000 andresry/cpusimulator:0.0

  • If you want to use the web app to interact with the debug mode of the cpu, please build the image for the NGINX container and run it as:
docker run --name web -d -p 5001:80 andresry/webcpu:0.0

  • Open your browser and go to your port 5001.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

CPU Simulator, Progra3 project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 58.5%
  • CSS 25.1%
  • HTML 11.0%
  • Python 4.8%
  • Dockerfile 0.6%