{"id":26758527,"url":"https://github.com/wdevore/retro-amaranth","last_synced_at":"2025-03-28T16:29:25.035Z","repository":{"id":200892418,"uuid":"705339666","full_name":"wdevore/Retro-Amaranth","owner":"wdevore","description":"Various FPGA Amaranth projects","archived":false,"fork":false,"pushed_at":"2024-01-18T04:38:54.000Z","size":5616,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-01-18T09:20:16.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/wdevore.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}},"created_at":"2023-10-15T18:35:06.000Z","updated_at":"2023-10-18T03:06:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"5115ce9c-ead5-4916-8386-fbd711b4850f","html_url":"https://github.com/wdevore/Retro-Amaranth","commit_stats":null,"previous_names":["wdevore/retro-amaranth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdevore%2FRetro-Amaranth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdevore%2FRetro-Amaranth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdevore%2FRetro-Amaranth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdevore%2FRetro-Amaranth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdevore","download_url":"https://codeload.github.com/wdevore/Retro-Amaranth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246062224,"owners_count":20717579,"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":"2025-03-28T16:29:24.331Z","updated_at":"2025-03-28T16:29:24.999Z","avatar_url":"https://github.com/wdevore.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Retro-Amaranth\nVarious FPGA Amaranth projects\n\n# Machdyne Keks\nThis video shows Amaranth running a memory test for a selected bank. The vertical pmod shows the upper address bits and the horizontal pmod shows a code \"111\" = pass, \"101\" = fail.\n\n![Keks SBC](keks_SRAM_test.gif)\n\n# Clockworks timing\n```\nIncreasing the exponent value, for example, from 2^5 to 2^6\nincreases the period but doesn't change the simulation step size.\nThe step-size can't be changed, only the duration and period.\nIf we specify 1000e-6 (1ms) for the deadline, in the bench, that gives\n1000 step duration.\n\n                         duration\n|-----------------------------------------------------------------|\n\\_________/``````````\\_________/``````````\\_________/``````````\\__\n          |--------------------|\n              period = clock\n\nExample 1: 2^5 yields ~33 steps between clock edges or 18 clocks\n    over a duration of 1000 steps.\nExample 2: 2^6 yields ~65 steps between clock edges or 8 clocks\n    over a duration of 1000 steps.\nExample 3: 2^7 yields ~129 steps between clock edges or 4 clocks\n    over a duration of 1000 steps.\nExample 4: 2^8 yields ~257 steps between clock edges or 2 clocks\n    over a duration of 1000 steps.\nExample 5: 2^9 yields ~513 steps between clock edges or 1 clock\n    over a duration of 1000 steps.\nExample 6: 2^10 yields 0 clocks over a duration of 1000 steps.\n    However, if you increase the deadline (i.e. duration) to 2000e-6\n    you will now yield ~1025 steps between clock edges \n    or 1 clock over a duration of 2000 steps.\n    Thus as you increase the deadline (aka simulation window),\n    you add more clock edges to the simulation.\nFor a CPU simulation you will typically need several or more clocks\nto execute an instruction. Thus you need a duration long enough\nto execute all instructions.\nFor example:\nA period of 2^5 and a duration of 100e-3 (100ms) gives 1562 clocks, and\nthe simulation take 100000 steps.\nFor the Femto that means 1562(clocks)/4(clocks per instruction) ~= 390\ninstructions. The simulation takes about 3 seconds to run on a\n13th gen 16 thread intel.\n```\n\n```python\ncw = Clockworks(slow=19, sim_slow=5)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdevore%2Fretro-amaranth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdevore%2Fretro-amaranth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdevore%2Fretro-amaranth/lists"}