{"id":18894206,"url":"https://github.com/trailofbits/clash-silicon-tinytapeout","last_synced_at":"2026-02-27T07:30:16.533Z","repository":{"id":63151802,"uuid":"564950414","full_name":"trailofbits/clash-silicon-tinytapeout","owner":"trailofbits","description":"a (very small) synthesized cpu written in clash for tinytapeout.","archived":false,"fork":false,"pushed_at":"2023-04-14T21:57:44.000Z","size":166,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-31T07:24:37.295Z","etag":null,"topics":["tinytapeout"],"latest_commit_sha":null,"homepage":"https://jleightcap.github.io/clash-silicon-tinytapeout/","language":"Verilog","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/trailofbits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://zerotoasiccourse.com"]}},"created_at":"2022-11-11T22:28:52.000Z","updated_at":"2023-09-13T12:35:21.000Z","dependencies_parsed_at":"2024-12-31T07:24:05.434Z","dependency_job_id":"154eed7c-b403-4ab9-a19b-5ed8a0fe0f65","html_url":"https://github.com/trailofbits/clash-silicon-tinytapeout","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/trailofbits%2Fclash-silicon-tinytapeout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fclash-silicon-tinytapeout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fclash-silicon-tinytapeout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailofbits%2Fclash-silicon-tinytapeout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailofbits","download_url":"https://codeload.github.com/trailofbits/clash-silicon-tinytapeout/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239869218,"owners_count":19710485,"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":["tinytapeout"],"created_at":"2024-11-08T08:19:52.338Z","updated_at":"2026-02-27T07:30:16.503Z","avatar_url":"https://github.com/trailofbits.png","language":"Verilog","funding_links":["https://zerotoasiccourse.com"],"categories":[],"sub_categories":[],"readme":"![](../../workflows/gds/badge.svg) ![](../../workflows/test/badge.svg)\n\n# clash silicon\n\na (very small) synthesized cpu written in [clash](https://clash-lang.org/).\n\n[interactive viewer](https://jleightcap.github.io/clash-silicon-tinytapeout/)\n\n# cpu description\n\na small minsky-like register machine consisting of\n\n- register file (`rf`): 8× 5-bit register\n- register file pointer (`ptr`): 3-bit pointer into register file\n- cjump: 1-bit conditional branch taken\n\nthe register `R` is the contents of the `rf[ptr]`.\n\n| encoding | meaning |\n| -------- | ------- |\n| `0_nnnnn` | `R` ← 5-bit literal `n` |\n| `100_ppp` | `ptr` ← 3-bit literal `p` |\n| `101_ppp` | if `R == 0` then `ptr` ← 3-bit literal `p` else NOP |\n| `1100_nn` | `R` ← `R` + 2-bit literal `n` |\n| `1101_nn` | `R` ← `R` - 2-bit literal `n` |\n| ... | ... |\n\n# building\n\n```sh\n$ nix-shell --pure --run \"make\"\n```\n\nsee `default.nix` for dependencies.\n\n# testing\n\n```sh\n$ nix-shell --pure --run \"make lint test\"\n```\n\n## clash\nclash-level tests are written in haskell using [quickcheck](https://hackage.haskell.org/package/QuickCheck).\n- testing pure haskell functions abstracted away from e.g. clock cycles\n- fuzzing\n\n## HDL\nHDL-level tests are written using [cocotb](https://www.cocotb.org/) and a small `src/tb.v` shim.\n- verification of the compiled Clash\n- clock-cycle dependencies\n- GTKWave\n\nto generate GTKWave output for a single cocotb test, here `test_regfile`,\n\n```sh\n$ TESTCASE=\"test_regfile\" nix-shell --run \"make -C test\"\n```\n\n# special thanks\n\n- [Matt Venn](https://mattvenn.net/)\n- Connor Northway \u0026 Eddie Zhou (feedback and rubber ducking)\n\n# resources\n\n- [tinytapeout](https://tinytapeout.com/)\n- [TT02 verilog template](https://github.com/TinyTapeout/tt02-verilog-demo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Fclash-silicon-tinytapeout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailofbits%2Fclash-silicon-tinytapeout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailofbits%2Fclash-silicon-tinytapeout/lists"}