{"id":20658519,"url":"https://github.com/gergoerdi/clash-tinybasic","last_synced_at":"2025-04-19T13:19:21.968Z","repository":{"id":66978032,"uuid":"301068040","full_name":"gergoerdi/clash-tinybasic","owner":"gergoerdi","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-02T13:14:23.000Z","size":190,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T08:11:39.214Z","etag":null,"topics":["clash","fpga","haskell","intel8080","tinybasic"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/gergoerdi.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":"2020-10-04T07:36:25.000Z","updated_at":"2023-06-20T04:39:52.000Z","dependencies_parsed_at":"2023-02-23T15:45:54.682Z","dependency_job_id":null,"html_url":"https://github.com/gergoerdi/clash-tinybasic","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fclash-tinybasic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fclash-tinybasic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fclash-tinybasic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fclash-tinybasic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gergoerdi","download_url":"https://codeload.github.com/gergoerdi/clash-tinybasic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249702807,"owners_count":21312761,"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":["clash","fpga","haskell","intel8080","tinybasic"],"created_at":"2024-11-16T18:26:48.450Z","updated_at":"2025-04-19T13:19:21.962Z","avatar_url":"https://github.com/gergoerdi.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tiny BASIC computer implemented in Clash\n========================================\n\nAs seen in \u003chttps://unsafePerform.IO/blog/2020-11-17-a_tiny_computer_for_tiny_basic/\u003e\n\nThis code is part of the book *Retrocomputing with Clash: Haskell for\nFPGA Hardware Design* at \u003chttps://unsafePerform.IO/retroclash/\u003e.\n\n## Building into a bitfile\n\nThe included `mk` script runs the included Shake rules and creates a\nbitfile ready to upload on a supported FPGA dev board. Targets are\nmade up from three specifiers: **core**, **IO** and **FPGA board**.\n\nAvailable CPU cores:\n\n- `intel8080`\n\nAvailable IO modes:\n\n- `serial`: serial IO\n- `video`: PS/2 keyboard input, 640⨯480 VGA output\n\nAvailable FPGA boards:\n\n- [`papilio-one`][1] (with the Arcade MegaWing for `video`)\n- [`papilio-pro`][2] (with the Arcade MegaWing for `video`)\n- [`nexys-a7-50t`][3]\n\nNote that only the Nexys A7-50T target is tested extensively, the\nothers might accumulate some bit-rot.\n\nFirst, create a `build.mk` file that describes your local build\nenvironment and your build target:\n\n```\nVIVADO_ROOT=/path/to/vivado/installation\nTARGET=intel8080/video/nexys-a7-50t\n```\n\nAlternatively, if you are using the Vivado or ISE toolchain via a\nwrapper script (e.g. to run it in Docker), instead of `VIVADO_ROOT` or\n`ISE_ROOT`, you can set `VIVADO` or `ISE` to the wrapper script's name:\n\n```\nVIVADO=/path/to/vivado-wrapper\n```\n\nThe script will be called with the first argument being the Vivado\ntool's name, and the rest of the arguments are the arguments to the\ntool itself.\n\nOnce you have `build.mk`, you can run `mk` and upload to your FPGA\nboard the `TinyBASICVIdeo.bit` file from the\n`_build/intel8080/video/nexys-a7-50t/synth/TinyBASICVIdeo/TinyBASICVideo.runs/impl_1`\ndirectory (or just do `./mk intel8080/video/nexys-a7-50t/upload`).\n\n## Building the simulators\n\nThere are two simulators included:\n\n* A [\"very high-level\"][4] simulation that only uses the CPU\n  implementation from Clash, and the rest is Haskell.\n  \n* A logic board simulation that simulates not just the CPU, but also\n  the memory elements, including the memory address decoding.\n  \nTo build the simulations, just do a `stack build`. \n\n[1]: https://papilio.cc/index.php?n=Papilio.PapilioPro\n[2]: https://papilio.cc/index.php?n=Papilio.PapilioOne\n[3]: https://reference.digilentinc.com/reference/programmable-logic/nexys-a7/start\n[4]: https://gergo.erdi.hu/blog/2018-09-15-very_high-level_simulation_of_a_c_ash_cpu/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgergoerdi%2Fclash-tinybasic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgergoerdi%2Fclash-tinybasic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgergoerdi%2Fclash-tinybasic/lists"}