{"id":15684658,"url":"https://github.com/code-hex/go-riscv","last_synced_at":"2025-08-15T14:07:43.341Z","repository":{"id":71653900,"uuid":"470088440","full_name":"Code-Hex/go-riscv","owner":"Code-Hex","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-27T14:53:05.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-24T19:39:35.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/Code-Hex.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":"2022-03-15T09:29:41.000Z","updated_at":"2022-06-06T18:17:29.000Z","dependencies_parsed_at":"2023-05-13T08:30:34.818Z","dependency_job_id":null,"html_url":"https://github.com/Code-Hex/go-riscv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Code-Hex/go-riscv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-riscv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-riscv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-riscv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-riscv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-Hex","download_url":"https://codeload.github.com/Code-Hex/go-riscv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-riscv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270579613,"owners_count":24610044,"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-08-15T02:00:12.559Z","response_time":110,"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":"2024-10-03T17:20:28.618Z","updated_at":"2025-08-15T14:07:43.306Z","avatar_url":"https://github.com/Code-Hex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RISC-V emulator\n\n\n## memo\n\n- [Writing a RISC-V Emulator in Rust](https://book.rvemu.app/)\n- [HackerNews - Writing a RISC-V Emulator from Scratch](https://news.ycombinator.com/item?id=23033517)\n- [The Adventures of OS: Making a RISC-V Operating System using Rust](http://osblog.stephenmarz.com/)\n- [RISC-V ELF psABI](https://github.com/riscv-non-isa/riscv-elf-psabi-doc)\n- [riscv-emu (Go)](https://github.com/LMMilewski/riscv-emu)\n- [RISC-V Instruction Formats](https://inst.eecs.berkeley.edu/~cs61c/resources/su18_lec/Lecture7.pdf)\n- [github.com/johnwinans/rvalp - RISC-V Assemly Language Programming](https://github.com/johnwinans/rvalp)\n- [Writing a simple RISC-V emulator in plain C](https://fmash16.github.io/content/posts/riscv-emulator-in-c.html)\n- Japanese\n  - [RISC-Vを実装してみる](https://kamiyaowl.github.io/presentation/pdf/lets-impl-rv32i.pdf)\n\n## Install tool-chain\n\n- macOS should install using homebrew.\n  - see: https://github.com/riscv-software-src/homebrew-riscv\n\n### Instructions\n\nRISC-V has been defined 6-type instructions\n\n- R-format\n  - instructions using 3 register inputs\n  - add, xor, mul - arithmetic/logical ops\n- I-format\n  - instructions with immediates, loads\n  - addi, lw, jalr, slli\n- S-format\n  - store instructions\n  - sw, sb\n- U-format\n  - instructions with upper immediates\n  - lui, auipc - upper immediate is 20-bits\n- SB-format\n  - branch instructions\n  - beq, bge\n- UJ-format\n  - jump instructions\n  - jal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fgo-riscv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-hex%2Fgo-riscv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fgo-riscv/lists"}