{"id":16343286,"url":"https://github.com/ners/riscv-hs","last_synced_at":"2025-04-04T12:24:12.889Z","repository":{"id":61693543,"uuid":"545990146","full_name":"ners/riscv-hs","owner":"ners","description":"A RISC-V emulator in Haskell","archived":false,"fork":false,"pushed_at":"2023-05-31T11:51:07.000Z","size":42,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T22:19:20.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ners.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-10-05T10:29:12.000Z","updated_at":"2023-01-31T20:32:44.000Z","dependencies_parsed_at":"2024-12-17T15:22:16.581Z","dependency_job_id":"9bb22178-c2b2-4f5c-8a12-3e1efcfa9e73","html_url":"https://github.com/ners/riscv-hs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ners%2Friscv-hs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ners%2Friscv-hs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ners%2Friscv-hs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ners%2Friscv-hs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ners","download_url":"https://codeload.github.com/ners/riscv-hs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247175946,"owners_count":20896377,"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":[],"created_at":"2024-10-11T00:24:02.209Z","updated_at":"2025-04-04T12:24:12.868Z","avatar_url":"https://github.com/ners.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RISCV-HS\n\nA logical model of a minimal RISC-V CPU written in Haskell.\n\nThis is an exercise to learn Nix, Haskell, and RISC-V.\nIt is not intended to be useful, fast, or even complete.\n\nThe goal is to understand the inner workings of the RISC-V architecture from the bottom-up and learn Haskell concepts on the way.\nA possible outcome would be an emulator that can run RV32I assembly.\n\n# Requirements\n\n- Install Nix\n  - follow instructions on https://nixos.org/download\n- Enable flakes\n  - follow instructions on https://nixos.wiki/wiki/Flakes#Enable_flakes\n- (Optional) install [`direnv`](https://direnv.net)\n\n# Project structure\n- The structure of the project is dictated by the tools we are using, namely Nix and Cabal. This repository is both a Nix flake and a Cabal package and as such contains the following folders/files:\n  - [`app/`](/app): Haskell source code for an executable that can be built and run by `cabal run`.\n  - [`src/`](/src): Haskell library folder, each file inside is a Haskell module.\n  - [`test/`](/test): Haskell source code for an executable that is built and run by `cabal test`, used to test the functions defined in `src/`.\n  - [`CHANGELOG.md`](CHANGELOG.md): This file will only become relevant in case of a release.\n  - [`flake.nix`](flake.nix): This is a [Nix flake](https://nixos.wiki/wiki/Flakes) providing dependencies for the project.\n  - [`flake.lock`](flake.lock): File specifying the exact versions of dependencies, created by the [`nix flake lock`](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake-lock.html) command. \n  - [`LICENSE`](LICENSE): The Apache 2.0 license.\n  - [`riscvs-hs.cabal`](riscvs-hs.cabal): Cabal [package description](https://cabal.readthedocs.io/en/3.4/cabal-package.html).\n  - [`shell.nix`](shell.nix): For compatibility with Nix without flakes as well as other tools.\n\n# Notes\n- If you're using VSCode, you can use [Nix environment selector](https://github.com/arrterian/nix-env-selector) to connect it with the Nix shell.\n\n# References\n\n[The RISC-V Instruction Set Manual](https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fners%2Friscv-hs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fners%2Friscv-hs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fners%2Friscv-hs/lists"}