{"id":26713521,"url":"https://github.com/admacpherson/cpu-simulator","last_synced_at":"2025-03-27T12:29:15.396Z","repository":{"id":261861390,"uuid":"885554954","full_name":"admacpherson/CPU-Simulator","owner":"admacpherson","description":"Python program to simulate CPU functionalities","archived":false,"fork":false,"pushed_at":"2025-02-18T23:31:51.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T00:27:45.173Z","etag":null,"topics":["cache","cpu","cpu-simulator","memory-bus","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/admacpherson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-08T20:21:16.000Z","updated_at":"2025-02-18T23:31:55.000Z","dependencies_parsed_at":"2024-11-08T21:42:06.384Z","dependency_job_id":null,"html_url":"https://github.com/admacpherson/CPU-Simulator","commit_stats":null,"previous_names":["admacpherson/cpu-simulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admacpherson%2FCPU-Simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admacpherson%2FCPU-Simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admacpherson%2FCPU-Simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admacpherson%2FCPU-Simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/admacpherson","download_url":"https://codeload.github.com/admacpherson/CPU-Simulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245844254,"owners_count":20681676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","cpu","cpu-simulator","memory-bus","python"],"created_at":"2025-03-27T12:29:12.041Z","updated_at":"2025-03-27T12:29:15.381Z","avatar_url":"https://github.com/admacpherson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CPU-Simulator\n![Python Badge](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge\u0026logo=python\u0026logoColor=blue)\u003cbr\u003e\nPython program to simulate CPU functionalities using OOP structure.\n\n## Structure\n📁[inputs](https://github.com/admacpherson/CPU-Simulator/tree/main/Inputs) - Modifiable input files to be read into simulation\u003cbr\u003e\n| [`data_input`](https://github.com/admacpherson/CPU-Simulator/blob/main/Inputs/data_input.txt) - Contains sample data that are read into memory bus\u003cbr\u003e\n| [`instruction input`](https://github.com/admacpherson/CPU-Simulator/blob/main/Inputs/instruction_input.txt) - Contains sample instructions that are read into CPU\u003cbr\u003e\n\n[`cache.py`](https://github.com/admacpherson/CPU-Simulator/blob/main/cache.py) - Cache class\u003cbr\u003e\n[`cpu.py`](https://github.com/admacpherson/CPU-Simulator/blob/main/cpu.py) - CPU class that contains the bulk of the applicable programming. Utilizes intstantiations of the cache and memory bus\u003cbr\u003e\n[`main.py`](https://github.com/admacpherson/CPU-Simulator/blob/main/main.py) - Instantiates CPU, reads applicable data, and runs the simulation\u003cbr\u003e\n[`memory.py`](https://github.com/admacpherson/CPU-Simulator/blob/main/memory.py) - Memory bus class\n\n## Instruction Key\n|Command|Argument|Function|\n|---|---|---|\n|CACHE|0|Turn cache off|\n|CACHE|1|Turn cache on|\n|CACHE|2|Flush cache|\n|JMP|\u003ci\u003eINT\u003c/i\u003e|Jump to specified position\n|ADD|\u003ci\u003eDestination, Source, Target\u003c/i\u003e|Add target and source register values on destination register|\n|ADDI|\u003ci\u003eDestination, Source, Immediate\u003c/i\u003e|Add immediate value to source register on destination register|\n|HALT||Halt program|\n\n## References\nCode is based on \u003ca href=\"https://codecadmy.com\"\u003eCodecademy's\u003c/a\u003e \u003ca href=\"https://github.com/Codecademy/computer-architecture/tree/main/portfolio-project-cpu-simulator\"\u003eCPU Simulator Portfolio Project\u003c/a\u003e.\u003cbr\u003e\n\nThanks to Dr. Timothy Heil for his computer architecture knowledge.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadmacpherson%2Fcpu-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadmacpherson%2Fcpu-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadmacpherson%2Fcpu-simulator/lists"}