{"id":24935806,"url":"https://github.com/hellebenjamin/p4-cpu","last_synced_at":"2025-09-03T09:36:10.183Z","repository":{"id":242586503,"uuid":"809973040","full_name":"HelleBenjamin/p4-cpu","owner":"HelleBenjamin","description":"Simple single cycle 4-bit cpu","archived":false,"fork":false,"pushed_at":"2024-06-13T22:51:35.000Z","size":3950,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T16:13:03.442Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HelleBenjamin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-03T20:03:56.000Z","updated_at":"2024-06-13T22:51:38.000Z","dependencies_parsed_at":"2024-06-03T23:01:14.032Z","dependency_job_id":"91b3338b-6eba-4d4a-af24-214f2829435b","html_url":"https://github.com/HelleBenjamin/p4-cpu","commit_stats":null,"previous_names":["pepe-57/p4-cpu","hellebenjamin/p4-cpu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HelleBenjamin/p4-cpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fp4-cpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fp4-cpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fp4-cpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fp4-cpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HelleBenjamin","download_url":"https://codeload.github.com/HelleBenjamin/p4-cpu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HelleBenjamin%2Fp4-cpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273423405,"owners_count":25103141,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-02-02T15:56:59.043Z","updated_at":"2025-09-03T09:36:10.143Z","avatar_url":"https://github.com/HelleBenjamin.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![The P4 cpu](https://github.com/Pepe-57/p4-cpu/blob/main/p4.jpg)\n# P4 CPU\nP4 is a simple 4-bit single-cycle prosessor with 2-bit instruction set. Check the [user manual](https://github.com/Pepe-57/p4-cpu/blob/main/P4_user_manual_en.pdf) for more information. \n\n## Registers\nThe P4 contains two General-Purpose Registers (GPR) and two Special-Purpose Registers (SPR).\n### GPR\n- REG A: A 4-bit register that is used for the ALU.\n- REG OR: A 4-bit register that is used for a result of an ALU operation.\n### SPR\n- PC: 4-bit or 6-bit register that points the next instruction in memory.\n- IR: 6-bit register that is holds current instruction byte fetched from memory.\n## Instruction set\nThe P4 has 4 diffent instructions. Every instruction takes a single clock cycle to complete.\n- NOP    No operation\n- LDA n  Load A with immediate value\n- ADD n  Add A with immediate value -\u003e OR\n- JMP n  Unconditional jump, PC = immediate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellebenjamin%2Fp4-cpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellebenjamin%2Fp4-cpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellebenjamin%2Fp4-cpu/lists"}