FABulous-FPGA 2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. fabulous_fpga-2/.cursorrules +56 -0
  2. fabulous_fpga-2/.devcontainer/Dockerfile +76 -0
  3. fabulous_fpga-2/.devcontainer/codespace/devcontainer.json +57 -0
  4. fabulous_fpga-2/.devcontainer/devshell.sh.tpl +8 -0
  5. fabulous_fpga-2/.devcontainer/display-switch.sh +35 -0
  6. fabulous_fpga-2/.devcontainer/local/devcontainer.json +47 -0
  7. fabulous_fpga-2/.gitattributes +2 -0
  8. fabulous_fpga-2/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  9. fabulous_fpga-2/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
  10. fabulous_fpga-2/.github/PULL_REQUEST_TEMPLATE.md +18 -0
  11. fabulous_fpga-2/.github/actions/create_failure_issue/action.yaml +54 -0
  12. fabulous_fpga-2/.github/actions/prepare_FABulous_container/action.yaml +126 -0
  13. fabulous_fpga-2/.github/actions/prepare_nix_environment/action.yaml +52 -0
  14. fabulous_fpga-2/.github/copilot-instructions.md +56 -0
  15. fabulous_fpga-2/.github/dependabot.yml +101 -0
  16. fabulous_fpga-2/.github/workflows/all-clean.yml +23 -0
  17. fabulous_fpga-2/.github/workflows/backwards-compatibility.yml +67 -0
  18. fabulous_fpga-2/.github/workflows/dependabot-auto-merge.yml +36 -0
  19. fabulous_fpga-2/.github/workflows/docker-image.yml +86 -0
  20. fabulous_fpga-2/.github/workflows/gds-flow-ci.yml +335 -0
  21. fabulous_fpga-2/.github/workflows/nix-env.yml +44 -0
  22. fabulous_fpga-2/.github/workflows/pre-commit-hooks.yml +20 -0
  23. fabulous_fpga-2/.github/workflows/publish_to_pypi.yml +62 -0
  24. fabulous_fpga-2/.github/workflows/pytest_testing.yml +275 -0
  25. fabulous_fpga-2/.github/workflows/release_please.yml +72 -0
  26. fabulous_fpga-2/.gitignore +22 -0
  27. fabulous_fpga-2/.pre-commit-config.yaml +90 -0
  28. fabulous_fpga-2/.readthedocs.yaml +28 -0
  29. fabulous_fpga-2/.svlint.toml +10 -0
  30. fabulous_fpga-2/.test_durations_fallback +1209 -0
  31. fabulous_fpga-2/.vsg.yaml +8 -0
  32. fabulous_fpga-2/AGENTS.md +56 -0
  33. fabulous_fpga-2/AUTHORS.md +21 -0
  34. fabulous_fpga-2/CHANGELOG.md +52 -0
  35. fabulous_fpga-2/CLAUDE.md +56 -0
  36. fabulous_fpga-2/CONTRIBUTING.md +34 -0
  37. fabulous_fpga-2/FABulous_FPGA.egg-info/PKG-INFO +226 -0
  38. fabulous_fpga-2/FABulous_FPGA.egg-info/SOURCES.txt +466 -0
  39. fabulous_fpga-2/FABulous_FPGA.egg-info/dependency_links.txt +1 -0
  40. fabulous_fpga-2/FABulous_FPGA.egg-info/entry_points.txt +3 -0
  41. fabulous_fpga-2/FABulous_FPGA.egg-info/requires.txt +26 -0
  42. fabulous_fpga-2/FABulous_FPGA.egg-info/top_level.txt +3 -0
  43. fabulous_fpga-2/LICENSE +201 -0
  44. fabulous_fpga-2/PKG-INFO +226 -0
  45. fabulous_fpga-2/README.md +183 -0
  46. fabulous_fpga-2/Taskfile.yml +71 -0
  47. fabulous_fpga-2/build_hooks.py +58 -0
  48. fabulous_fpga-2/docs/.gitignore +3 -0
  49. fabulous_fpga-2/docs/Makefile +76 -0
  50. fabulous_fpga-2/docs/environment.yml +10 -0
  51. fabulous_fpga-2/docs/make.bat +35 -0
  52. fabulous_fpga-2/docs/pyproject.toml +38 -0
  53. fabulous_fpga-2/docs/readme.md +134 -0
  54. fabulous_fpga-2/docs/requirements.txt +5 -0
  55. fabulous_fpga-2/docs/source/FAB_logo.png +0 -0
  56. fabulous_fpga-2/docs/source/_ext/docstring_renderer.py +323 -0
  57. fabulous_fpga-2/docs/source/_ext/generate_cli_docs.py +483 -0
  58. fabulous_fpga-2/docs/source/_ext/generate_configvar_docs.py +407 -0
  59. fabulous_fpga-2/docs/source/_ext/generate_gds_variable_docs.py +321 -0
  60. fabulous_fpga-2/docs/source/_static/custom.css +196 -0
  61. fabulous_fpga-2/docs/source/_static/toc_sidebar.js +102 -0
  62. fabulous_fpga-2/docs/source/_templates/autoapi/index.rst +22 -0
  63. fabulous_fpga-2/docs/source/_templates/autoapi/python/class.rst +57 -0
  64. fabulous_fpga-2/docs/source/_templates/autoapi/python/data.rst +47 -0
  65. fabulous_fpga-2/docs/source/_templates/autoapi/python/function.rst +23 -0
  66. fabulous_fpga-2/docs/source/_templates/autoapi/python/method.rst +23 -0
  67. fabulous_fpga-2/docs/source/_templates/autoapi/python/module.rst +156 -0
  68. fabulous_fpga-2/docs/source/_templates/autoapi/python/package.rst +1 -0
  69. fabulous_fpga-2/docs/source/_templates/autoapi/python/property.rst +23 -0
  70. fabulous_fpga-2/docs/source/_templates/base.html +6 -0
  71. fabulous_fpga-2/docs/source/_templates/cli_commands.md.jinja +26 -0
  72. fabulous_fpga-2/docs/source/_templates/flow_variable.md.jinja +29 -0
  73. fabulous_fpga-2/docs/source/_templates/gds_variable.md.jinja +18 -0
  74. fabulous_fpga-2/docs/source/_templates/sidebar/brand.html +18 -0
  75. fabulous_fpga-2/docs/source/conf.py +406 -0
  76. fabulous_fpga-2/docs/source/conf_helper.py +53 -0
  77. fabulous_fpga-2/docs/source/developer_guide/development.md +375 -0
  78. fabulous_fpga-2/docs/source/figs/FAB_logo.png +0 -0
  79. fabulous_fpga-2/docs/source/figs/FAB_logo.svg +273 -0
  80. fabulous_fpga-2/docs/source/figs/FABulous_help.jpg +0 -0
  81. fabulous_fpga-2/docs/source/figs/FABulouslogo_wide_2.png +0 -0
  82. fabulous_fpga-2/docs/source/figs/FABulouslogo_wide_2.svg +271 -0
  83. fabulous_fpga-2/docs/source/figs/FORTE_tapeouts.svg +14810 -0
  84. fabulous_fpga-2/docs/source/figs/Ibex_eFPGA.pdf +0 -0
  85. fabulous_fpga-2/docs/source/figs/dev-container/step1.png +0 -0
  86. fabulous_fpga-2/docs/source/figs/dev-container/step2.png +0 -0
  87. fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-1.png +0 -0
  88. fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-2.png +0 -0
  89. fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-3.png +0 -0
  90. fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-4.png +0 -0
  91. fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-5.png +0 -0
  92. fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-6.png +0 -0
  93. fabulous_fpga-2/docs/source/figs/eFPGA_chip.png +0 -0
  94. fabulous_fpga-2/docs/source/figs/fabulous_ecosystem.png +0 -0
  95. fabulous_fpga-2/docs/source/figs/workflows.svg +653 -0
  96. fabulous_fpga-2/docs/source/gallery/index.md +37 -0
  97. fabulous_fpga-2/docs/source/getting_started/codespaces.md +146 -0
  98. fabulous_fpga-2/docs/source/getting_started/index.md +10 -0
  99. fabulous_fpga-2/docs/source/getting_started/installation/cad-tool.md +41 -0
  100. fabulous_fpga-2/docs/source/getting_started/installation/docker.md +144 -0
  101. fabulous_fpga-2/docs/source/getting_started/installation/index.md +24 -0
  102. fabulous_fpga-2/docs/source/getting_started/installation/nix-env.md +94 -0
  103. fabulous_fpga-2/docs/source/getting_started/installation/uv.md +51 -0
  104. fabulous_fpga-2/docs/source/getting_started/installation/venv.md +50 -0
  105. fabulous_fpga-2/docs/source/getting_started/quickstart.md +88 -0
  106. fabulous_fpga-2/docs/source/index.md +54 -0
  107. fabulous_fpga-2/docs/source/misc/contact.md +3 -0
  108. fabulous_fpga-2/docs/source/misc/publications.bib +61 -0
  109. fabulous_fpga-2/docs/source/misc/publications.md +6 -0
  110. fabulous_fpga-2/docs/source/user_guide/building_doc/_static/clock_leader.svg +65 -0
  111. fabulous_fpga-2/docs/source/user_guide/building_doc/_static/pin_layout_order.svg +59 -0
  112. fabulous_fpga-2/docs/source/user_guide/building_doc/building_fabric.md +138 -0
  113. fabulous_fpga-2/docs/source/user_guide/building_doc/fabric_automation.md +1356 -0
  114. fabulous_fpga-2/docs/source/user_guide/building_doc/fabric_definition.md +1384 -0
  115. fabulous_fpga-2/docs/source/user_guide/building_doc/fabric_gds.md +346 -0
  116. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/FABulous_flow2.png +0 -0
  117. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/Fabric_spreadsheet.png +0 -0
  118. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/Ibex_eFPGA.png +0 -0
  119. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/SuperTILE_examples.png +0 -0
  120. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/SuperTILE_functionality.png +0 -0
  121. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/abstract_tile_view.png +0 -0
  122. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/adjacency.png +0 -0
  123. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/bitstream_mask_mapping.png +0 -0
  124. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/east_terminate.png +0 -0
  125. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/mid_wires.jpg +0 -0
  126. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/tile_CLB_example.png +0 -0
  127. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/wire_nesting_indexing.png +0 -0
  128. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/wire_tile_grid.png +0 -0
  129. fabulous_fpga-2/docs/source/user_guide/building_doc/figs/wires_model.png +0 -0
  130. fabulous_fpga-2/docs/source/user_guide/building_doc/index.md +13 -0
  131. fabulous_fpga-2/docs/source/user_guide/building_doc/timing_characterization.md +236 -0
  132. fabulous_fpga-2/docs/source/user_guide/cli_doc/cli_feature.md +222 -0
  133. fabulous_fpga-2/docs/source/user_guide/cli_doc/fabulous_variable.md +52 -0
  134. fabulous_fpga-2/docs/source/user_guide/cli_doc/index.md +11 -0
  135. fabulous_fpga-2/docs/source/user_guide/index.md +13 -0
  136. fabulous_fpga-2/docs/source/user_guide/simulation/emulation.md +37 -0
  137. fabulous_fpga-2/docs/source/user_guide/simulation/figs/bitbang1.png +0 -0
  138. fabulous_fpga-2/docs/source/user_guide/simulation/figs/bitbang2.png +0 -0
  139. fabulous_fpga-2/docs/source/user_guide/simulation/gate_level_simulation.md +117 -0
  140. fabulous_fpga-2/docs/source/user_guide/simulation/index.md +29 -0
  141. fabulous_fpga-2/docs/source/user_guide/simulation/simulation.md +227 -0
  142. fabulous_fpga-2/docs/source/user_guide/using_doc/bitstream/bitstream_generation.md +49 -0
  143. fabulous_fpga-2/docs/source/user_guide/using_doc/index.md +10 -0
  144. fabulous_fpga-2/docs/source/user_guide/using_doc/pnr/index.md +8 -0
  145. fabulous_fpga-2/docs/source/user_guide/using_doc/pnr/nextpnr.md +62 -0
  146. fabulous_fpga-2/docs/source/user_guide/using_doc/pnr/nextpnr_compilation.md +143 -0
  147. fabulous_fpga-2/docs/source/user_guide/using_doc/synthesis/index.md +8 -0
  148. fabulous_fpga-2/docs/source/user_guide/using_doc/synthesis/yosys.md +38 -0
  149. fabulous_fpga-2/docs/source/user_guide/using_doc/synthesis/yosys_compilation.md +62 -0
  150. fabulous_fpga-2/docs/uv.lock +2963 -0
  151. fabulous_fpga-2/fabulous/__init__.py +5 -0
  152. fabulous_fpga-2/fabulous/custom_exception.py +66 -0
  153. fabulous_fpga-2/fabulous/fabric_cad/README.md +152 -0
  154. fabulous_fpga-2/fabulous/fabric_cad/__init__.py +5 -0
  155. fabulous_fpga-2/fabulous/fabric_cad/gen_bitstream_spec.py +286 -0
  156. fabulous_fpga-2/fabulous/fabric_cad/gen_design_top_wrapper.py +246 -0
  157. fabulous_fpga-2/fabulous/fabric_cad/gen_npnr_model.py +253 -0
  158. fabulous_fpga-2/fabulous/fabric_cad/timing_model/FABulous_timing_model.py +1037 -0
  159. fabulous_fpga-2/fabulous/fabric_cad/timing_model/FABulous_timing_model_interface.py +104 -0
  160. fabulous_fpga-2/fabulous/fabric_cad/timing_model/__init__.py +8 -0
  161. fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/__init__.py +7 -0
  162. fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/hdlnx_timing_model.py +89 -0
  163. fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/__init__.py +6 -0
  164. fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/sdf_to_graph.py +362 -0
  165. fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/sdf_to_graph_base.py +200 -0
  166. fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/timing_graph.py +329 -0
  167. fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/verilog_gate_level.py +1046 -0
  168. fabulous_fpga-2/fabulous/fabric_cad/timing_model/models.py +427 -0
  169. fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/__init__.py +6 -0
  170. fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/specification.py +248 -0
  171. fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/sta_tools/__init__.py +6 -0
  172. fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/sta_tools/opensta.py +359 -0
  173. fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/synth_tools/__init__.py +4 -0
  174. fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/synth_tools/yosys.py +467 -0
  175. fabulous_fpga-2/fabulous/fabric_definition/__init__.py +17 -0
  176. fabulous_fpga-2/fabulous/fabric_definition/bel.py +167 -0
  177. fabulous_fpga-2/fabulous/fabric_definition/cell_spec.py +230 -0
  178. fabulous_fpga-2/fabulous/fabric_definition/configmem.py +35 -0
  179. fabulous_fpga-2/fabulous/fabric_definition/define.py +163 -0
  180. fabulous_fpga-2/fabulous/fabric_definition/fabric.py +726 -0
  181. fabulous_fpga-2/fabulous/fabric_definition/gen_io.py +64 -0
  182. fabulous_fpga-2/fabulous/fabric_definition/port.py +292 -0
  183. fabulous_fpga-2/fabulous/fabric_definition/supertile.py +311 -0
  184. fabulous_fpga-2/fabulous/fabric_definition/switch_matrix.py +71 -0
  185. fabulous_fpga-2/fabulous/fabric_definition/tile.py +428 -0
  186. fabulous_fpga-2/fabulous/fabric_definition/wire.py +107 -0
  187. fabulous_fpga-2/fabulous/fabric_definition/yosys_obj.py +521 -0
  188. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Fabric/gds_config.yaml +61 -0
  189. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Fabric/std_cell_library.yaml +96 -0
  190. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/.gitignore +17 -0
  191. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/build_fabulous_fabric.tcl +4 -0
  192. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/compile.Taskfile.yml +62 -0
  193. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/makehex.py +28 -0
  194. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP.csv +4 -0
  195. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_bot/DSP_bot.csv +8 -0
  196. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_bot/DSP_bot_switch_matrix.list +230 -0
  197. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_top/DSP_top.csv +7 -0
  198. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_top/DSP_top_switch_matrix.list +215 -0
  199. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/gds_config.yaml +6 -0
  200. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB.csv +17 -0
  201. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB_ConfigMem.csv +21 -0
  202. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB_switch_matrix.list +301 -0
  203. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/gds_config.yaml +6 -0
  204. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/N_term_DSP.csv +14 -0
  205. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/N_term_DSP_switch_matrix.list +15 -0
  206. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/gds_config.yaml +4 -0
  207. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/N_term_RAM_IO.csv +12 -0
  208. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/N_term_RAM_IO_switch_matrix.list +16 -0
  209. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/gds_config.yaml +4 -0
  210. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/N_term_single.csv +15 -0
  211. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/N_term_single_switch_matrix.list +15 -0
  212. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/gds_config.yaml +4 -0
  213. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/N_term_single2.csv +14 -0
  214. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/N_term_single2_switch_matrix.list +15 -0
  215. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/gds_config.yaml +4 -0
  216. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/RAM_IO.csv +45 -0
  217. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/RAM_IO_switch_matrix.list +230 -0
  218. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/gds_config.yaml +4 -0
  219. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RegFile/RegFile.csv +6 -0
  220. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RegFile/RegFile_switch_matrix.list +222 -0
  221. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RegFile/gds_config.yaml +6 -0
  222. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/S_term_DSP.csv +14 -0
  223. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/S_term_DSP_switch_matrix.list +15 -0
  224. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/gds_config.yaml +4 -0
  225. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/S_term_RAM_IO.csv +12 -0
  226. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/S_term_RAM_IO_switch_matrix.list +16 -0
  227. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/gds_config.yaml +4 -0
  228. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/S_term_single.csv +16 -0
  229. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/S_term_single_switch_matrix.list +17 -0
  230. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/gds_config.yaml +4 -0
  231. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/S_term_single2.csv +14 -0
  232. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/S_term_single2_switch_matrix.list +15 -0
  233. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/gds_config.yaml +4 -0
  234. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/W_IO/W_IO.csv +22 -0
  235. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/W_IO/W_IO_switch_matrix.list +69 -0
  236. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/W_IO/gds_config.yaml +4 -0
  237. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/Base.csv +43 -0
  238. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/Base.list +75 -0
  239. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/gds_config.yaml +61 -0
  240. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/gf180mcuD_latchmap.v +7 -0
  241. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/fabric.csv +47 -0
  242. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/user_design/top_wrapper.v +159 -0
  243. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/FABulous.tcl +7 -0
  244. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/BlockRAM_1KB.v +216 -0
  245. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/ConfigFSM.v +106 -0
  246. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/Frame_Data_Reg.v +19 -0
  247. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/Frame_Select.v +21 -0
  248. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/bitbang.v +84 -0
  249. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/config_UART.v +633 -0
  250. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/eFPGA_Config.v +99 -0
  251. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/models_pack.v +204 -0
  252. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/Makefile +83 -0
  253. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/README.md +28 -0
  254. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/Taskfile.yml +232 -0
  255. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/gen_gl_xinit.py +303 -0
  256. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/sequential_16bit_en_tb.v +126 -0
  257. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/DSP/DSP_bot/MULADD.v +86 -0
  258. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/LUT4AB/LUT4c_frame_config_dffesr.v +123 -0
  259. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/LUT4AB/MUX8LUT_frame_config_mux.v +156 -0
  260. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/Config_access.v +21 -0
  261. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/InPass4_frame_config_mux.v +75 -0
  262. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/OutPass4_frame_config_mux.v +79 -0
  263. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RegFile/RegFile_32x4.v +77 -0
  264. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/W_IO/Config_access.v +23 -0
  265. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/W_IO/IO_1_bidirectional_frame_config_pass.v +50 -0
  266. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/user_design/sequential_16bit_en.v +22 -0
  267. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/FABulous.tcl +2 -0
  268. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/BlockRAM_1KB.vhdl +262 -0
  269. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/ConfigFSM.vhdl +160 -0
  270. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/Frame_Data_Reg.vhdl +52 -0
  271. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/Frame_Select.vhdl +52 -0
  272. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/bitbang.vhdl +124 -0
  273. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/config_UART.vhdl +716 -0
  274. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/eFPGA_Config.vhdl +166 -0
  275. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/models_pack.vhdl +456 -0
  276. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/Makefile +155 -0
  277. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/README.md +33 -0
  278. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/Taskfile.yml +195 -0
  279. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/sequential_16bit_en_tb.vhdl +270 -0
  280. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/DSP/DSP_bot/MULADD.vhdl +106 -0
  281. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/LUT4AB/LUT4c_frame_config_dffesr.vhdl +228 -0
  282. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/LUT4AB/MUX8LUT_frame_config_mux.vhdl +202 -0
  283. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/Config_access.vhdl +50 -0
  284. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/InPass4_frame_config_mux.vhdl +115 -0
  285. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/OutPass4_frame_config_mux.vhdl +113 -0
  286. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RegFile/RegFile_32x4.vhdl +90 -0
  287. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/W_IO/Config_access.vhdl +50 -0
  288. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/W_IO/IO_1_bidirectional_frame_config_pass.vhdl +83 -0
  289. fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/user_design/sequential_16bit_en.vhdl +45 -0
  290. fabulous_fpga-2/fabulous/fabric_files/__init__.py +1 -0
  291. fabulous_fpga-2/fabulous/fabric_files/dummy_files/DUMMY_switch_matrix.list +310 -0
  292. fabulous_fpga-2/fabulous/fabric_generator/.gitignore +13 -0
  293. fabulous_fpga-2/fabulous/fabric_generator/__init__.py +17 -0
  294. fabulous_fpga-2/fabulous/fabric_generator/code_generator/__init__.py +6 -0
  295. fabulous_fpga-2/fabulous/fabric_generator/code_generator/code_generator.py +853 -0
  296. fabulous_fpga-2/fabulous/fabric_generator/code_generator/code_generator_VHDL.py +745 -0
  297. fabulous_fpga-2/fabulous/fabric_generator/code_generator/code_generator_Verilog.py +546 -0
  298. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/__init__.py +1 -0
  299. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/__init__.py +5 -0
  300. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/fabric_macro_flow.py +729 -0
  301. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/fabric_optimisation_flow.py +616 -0
  302. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/flow_define.py +188 -0
  303. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/tile_macro_flow.py +286 -0
  304. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/gen_io_pin_config_yaml.py +298 -0
  305. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/helper.py +167 -0
  306. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/__init__.py +1 -0
  307. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/add_buffers.tcl +57 -0
  308. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/extract_site_info.tcl +20 -0
  309. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/fabric_io_place.py +205 -0
  310. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/odb_power.py +130 -0
  311. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/odb_protocol.py +46 -0
  312. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/pdn.tcl +55 -0
  313. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/pdn_config.tcl +138 -0
  314. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/tile_io_place.py +1179 -0
  315. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/vhdl_json_header.py +73 -0
  316. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/__init__.py +5 -0
  317. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/add_buffer.py +76 -0
  318. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/auto_diode.py +148 -0
  319. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/condition_magic_drc.py +24 -0
  320. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/custom_pdn.py +46 -0
  321. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/diodes_on_ports.py +34 -0
  322. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/extract_pdk_info.py +58 -0
  323. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/fabric_IO_placement.py +72 -0
  324. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/fabric_area_opt.py +846 -0
  325. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/magic_streamout.py +38 -0
  326. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/odb_connect_pdn.py +44 -0
  327. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/round_die_area.py +56 -0
  328. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/tile_IO_placement.py +97 -0
  329. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/tile_area_opt.py +673 -0
  330. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/timed_detailed_routing.py +109 -0
  331. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/vhdl_json_header.py +45 -0
  332. fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/while_step.py +171 -0
  333. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/__init__.py +14 -0
  334. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/fabric_automation.py +879 -0
  335. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_configmem.py +532 -0
  336. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_fabric.py +602 -0
  337. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_helper.py +200 -0
  338. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_switchmatrix.py +591 -0
  339. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_tile.py +1137 -0
  340. fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_top_wrapper.py +368 -0
  341. fabulous_fpga-2/fabulous/fabric_generator/parser/__init__.py +1 -0
  342. fabulous_fpga-2/fabulous/fabric_generator/parser/parse_configmem.py +178 -0
  343. fabulous_fpga-2/fabulous/fabric_generator/parser/parse_csv.py +887 -0
  344. fabulous_fpga-2/fabulous/fabric_generator/parser/parse_hdl.py +336 -0
  345. fabulous_fpga-2/fabulous/fabric_generator/parser/parse_switchmatrix.py +216 -0
  346. fabulous_fpga-2/fabulous/fabulous.py +992 -0
  347. fabulous_fpga-2/fabulous/fabulous_api.py +916 -0
  348. fabulous_fpga-2/fabulous/fabulous_cli/__init__.py +5 -0
  349. fabulous_fpga-2/fabulous/fabulous_cli/cmd_compile_design.py +235 -0
  350. fabulous_fpga-2/fabulous/fabulous_cli/cmd_run_simulation.py +343 -0
  351. fabulous_fpga-2/fabulous/fabulous_cli/fabulous_cli.py +1846 -0
  352. fabulous_fpga-2/fabulous/fabulous_cli/helper.py +1000 -0
  353. fabulous_fpga-2/fabulous/fabulous_settings.py +692 -0
  354. fabulous_fpga-2/fabulous/geometry_generator/__init__.py +22 -0
  355. fabulous_fpga-2/fabulous/geometry_generator/bel_geometry.py +223 -0
  356. fabulous_fpga-2/fabulous/geometry_generator/fabric_geometry.py +420 -0
  357. fabulous_fpga-2/fabulous/geometry_generator/geometry_gen.py +71 -0
  358. fabulous_fpga-2/fabulous/geometry_generator/geometry_obj.py +55 -0
  359. fabulous_fpga-2/fabulous/geometry_generator/port_geometry.py +138 -0
  360. fabulous_fpga-2/fabulous/geometry_generator/sm_geometry.py +531 -0
  361. fabulous_fpga-2/fabulous/geometry_generator/tile_geometry.py +696 -0
  362. fabulous_fpga-2/fabulous/geometry_generator/wire_geometry.py +391 -0
  363. fabulous_fpga-2/fabulous/processpool.py +43 -0
  364. fabulous_fpga-2/flake.lock +305 -0
  365. fabulous_fpga-2/flake.nix +394 -0
  366. fabulous_fpga-2/nix/default.nix +53 -0
  367. fabulous_fpga-2/nix/overlay/python.nix +60 -0
  368. fabulous_fpga-2/nix/tools/fabulator.nix +114 -0
  369. fabulous_fpga-2/nix/tools/ghdl-bin.nix +69 -0
  370. fabulous_fpga-2/nix/tools/nextpnr.nix +53 -0
  371. fabulous_fpga-2/nix/tools/yosys.nix +102 -0
  372. fabulous_fpga-2/pyproject.toml +182 -0
  373. fabulous_fpga-2/ruff.toml +159 -0
  374. fabulous_fpga-2/schema/std_cell_library.schema.json +91 -0
  375. fabulous_fpga-2/scripts/run_tests.py +266 -0
  376. fabulous_fpga-2/scripts/svlint_wrapper.py +235 -0
  377. fabulous_fpga-2/scripts/sync_demo_tile_gds_config.py +80 -0
  378. fabulous_fpga-2/setup.cfg +4 -0
  379. fabulous_fpga-2/tests/__init__.py +5 -0
  380. fabulous_fpga-2/tests/cli_test/conftest.py +100 -0
  381. fabulous_fpga-2/tests/cli_test/test_arguments.py +1273 -0
  382. fabulous_fpga-2/tests/cli_test/test_cli.py +626 -0
  383. fabulous_fpga-2/tests/cli_test/test_compile_design.py +332 -0
  384. fabulous_fpga-2/tests/cli_test/test_helper.py +402 -0
  385. fabulous_fpga-2/tests/cli_test/test_run_simulation.py +256 -0
  386. fabulous_fpga-2/tests/conftest.py +301 -0
  387. fabulous_fpga-2/tests/fabric_definition/conftest.py +52 -0
  388. fabulous_fpga-2/tests/fabric_definition/test_cell_spec.py +232 -0
  389. fabulous_fpga-2/tests/fabric_definition/test_fabric.py +163 -0
  390. fabulous_fpga-2/tests/fabric_definition/test_sjump_supertile.py +368 -0
  391. fabulous_fpga-2/tests/fabric_definition/test_supertile.py +203 -0
  392. fabulous_fpga-2/tests/fabric_definition/test_tile.py +125 -0
  393. fabulous_fpga-2/tests/fabric_gen_test/__init__.py +1 -0
  394. fabulous_fpga-2/tests/fabric_gen_test/configmem_test/test_configmem_rtl.py +306 -0
  395. fabulous_fpga-2/tests/fabric_gen_test/configmem_test/test_gen_configmem.py +476 -0
  396. fabulous_fpga-2/tests/fabric_gen_test/configmem_test/test_parse_configmem.py +631 -0
  397. fabulous_fpga-2/tests/fabric_gen_test/conftest.py +668 -0
  398. fabulous_fpga-2/tests/fabric_gen_test/fabric_test/__init__.py +0 -0
  399. fabulous_fpga-2/tests/fabric_gen_test/fabric_test/test_gen_fabric.py +116 -0
  400. fabulous_fpga-2/tests/fabric_gen_test/fabric_test/test_gen_fabric_child_index.py +69 -0
  401. fabulous_fpga-2/tests/fabric_gen_test/fabric_test/test_gen_supertile.py +425 -0
  402. fabulous_fpga-2/tests/fabric_gen_test/integration_test/__init__.py +1 -0
  403. fabulous_fpga-2/tests/fabric_gen_test/integration_test/conftest.py +721 -0
  404. fabulous_fpga-2/tests/fabric_gen_test/integration_test/test_designs_pattern.py +250 -0
  405. fabulous_fpga-2/tests/fabric_gen_test/integration_test/test_designs_pattern_gl.py +83 -0
  406. fabulous_fpga-2/tests/fabric_gen_test/integration_test/test_full_intergration.py +41 -0
  407. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/addition.v +16 -0
  408. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/addition.vhdl +22 -0
  409. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_ones.v +14 -0
  410. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_ones.vhdl +23 -0
  411. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_zeros.v +14 -0
  412. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_zeros.vhdl +21 -0
  413. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/constraints.pcf +48 -0
  414. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/counter.v +29 -0
  415. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/counter.vhdl +53 -0
  416. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/multiplication.v +16 -0
  417. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/multiplication.vhdl +22 -0
  418. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/passthrough.v +15 -0
  419. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/passthrough.vhdl +20 -0
  420. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/sys_reset.v +29 -0
  421. fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/sys_reset.vhdl +50 -0
  422. fabulous_fpga-2/tests/fabric_gen_test/parser_test/test_parse_csv.py +128 -0
  423. fabulous_fpga-2/tests/fabric_gen_test/switchmatrix_test/test_gen_switchmatrix.py +273 -0
  424. fabulous_fpga-2/tests/fabric_gen_test/switchmatrix_test/test_gen_switchmatrix_generic.py +84 -0
  425. fabulous_fpga-2/tests/fabric_gen_test/switchmatrix_test/test_parse_switchmatrix.py +354 -0
  426. fabulous_fpga-2/tests/fabric_gen_test/testdata/models.v +24 -0
  427. fabulous_fpga-2/tests/fabric_gen_test/testdata/models.vhd +45 -0
  428. fabulous_fpga-2/tests/gds_flow_test/flow_test/conftest.py +262 -0
  429. fabulous_fpga-2/tests/gds_flow_test/flow_test/test_fabric_macro_flow.py +536 -0
  430. fabulous_fpga-2/tests/gds_flow_test/flow_test/test_fabric_optimisation_flow.py +498 -0
  431. fabulous_fpga-2/tests/gds_flow_test/flow_test/test_gen_io_pin_config_yaml.py +767 -0
  432. fabulous_fpga-2/tests/gds_flow_test/flow_test/test_tile_macro_flow.py +585 -0
  433. fabulous_fpga-2/tests/gds_flow_test/script_test/conftest.py +757 -0
  434. fabulous_fpga-2/tests/gds_flow_test/script_test/test_fabric_io_place.py +218 -0
  435. fabulous_fpga-2/tests/gds_flow_test/script_test/test_odb_power.py +510 -0
  436. fabulous_fpga-2/tests/gds_flow_test/script_test/test_tile_io_place.py +1509 -0
  437. fabulous_fpga-2/tests/gds_flow_test/step_test/conftest.py +103 -0
  438. fabulous_fpga-2/tests/gds_flow_test/step_test/test_add_buffer.py +59 -0
  439. fabulous_fpga-2/tests/gds_flow_test/step_test/test_auto_diode.py +204 -0
  440. fabulous_fpga-2/tests/gds_flow_test/step_test/test_condition_magic_drc.py +42 -0
  441. fabulous_fpga-2/tests/gds_flow_test/step_test/test_custom_pdn.py +28 -0
  442. fabulous_fpga-2/tests/gds_flow_test/step_test/test_extract_pdk_info.py +39 -0
  443. fabulous_fpga-2/tests/gds_flow_test/step_test/test_fabric_area_opt.py +458 -0
  444. fabulous_fpga-2/tests/gds_flow_test/step_test/test_io_placement.py +95 -0
  445. fabulous_fpga-2/tests/gds_flow_test/step_test/test_odb_connect_power.py +122 -0
  446. fabulous_fpga-2/tests/gds_flow_test/step_test/test_tile_area_opt.py +525 -0
  447. fabulous_fpga-2/tests/gds_flow_test/step_test/test_timed_detailed_routing.py +70 -0
  448. fabulous_fpga-2/tests/gds_flow_test/step_test/test_while_step.py +151 -0
  449. fabulous_fpga-2/tests/gds_flow_test/test_gds_generator_helper.py +332 -0
  450. fabulous_fpga-2/tests/guide.md +95 -0
  451. fabulous_fpga-2/tests/reference_test/.gitignore +1 -0
  452. fabulous_fpga-2/tests/reference_test/README.md +126 -0
  453. fabulous_fpga-2/tests/reference_test/__init__.py +5 -0
  454. fabulous_fpga-2/tests/reference_test/conftest.py +109 -0
  455. fabulous_fpga-2/tests/reference_test/helpers.py +404 -0
  456. fabulous_fpga-2/tests/reference_test/reference_projects_test.py +237 -0
  457. fabulous_fpga-2/tests/test_fabulous_main.py +224 -0
  458. fabulous_fpga-2/tests/timing_model_test/test_FABulous_timing_model.py +1583 -0
  459. fabulous_fpga-2/tests/timing_model_test/test_sdf_to_graph.py +567 -0
  460. fabulous_fpga-2/tests/timing_model_test/test_sdf_to_graph_base.py +342 -0
  461. fabulous_fpga-2/tests/timing_model_test/test_specification.py +211 -0
  462. fabulous_fpga-2/tests/timing_model_test/test_timing_graph.py +371 -0
  463. fabulous_fpga-2/tests/timing_model_test/test_verilog_gate_level.py +358 -0
  464. fabulous_fpga-2/tests/utils_test/conftest.py +19 -0
  465. fabulous_fpga-2/tests/utils_test/test_fabulous_settings.py +1202 -0
  466. fabulous_fpga-2/tests/utils_test/test_processpool.py +69 -0
  467. fabulous_fpga-2/tests/utils_test/test_yosys_obj.py +336 -0
  468. fabulous_fpga-2/uv.lock +2373 -0
@@ -0,0 +1,56 @@
1
+ # AGENTS.md
2
+
3
+ ## Project Overview
4
+
5
+ FABulous is a parametric FPGA fabric generator. It takes a fabric definition (CSV or YAML), builds an in-memory fabric model, and emits the HDL, nextpnr chip database, synthesis scripts, geometry, and bitstream needed to target that fabric.
6
+
7
+ ```text
8
+ config (CSV/YAML) → fabric model → HDL + chip DB + synth scripts
9
+ user design → Yosys (synth) → nextpnr (P&R) → FASM → bitstream
10
+ ```
11
+
12
+ ## How to Work in This Repo
13
+
14
+ - **Python deps: `uv`.** Run `uv sync` after pulling; add deps with `uv add` (`--group dev` for dev-only). Never hand-edit `uv.lock`. Run commands as `uv run <cmd>` or activate `.venv/`.
15
+ - **EDA toolchain: Nix.** `flake.nix` pins Yosys, nextpnr, OpenROAD, GHDL, Librelane, etc. The **GDS / ASIC flow** (anything under `gds_flow_test`, `librelane_plugin_fabulous`, or `fabulous/fabric_generator/gds_generator`) requires the Nix shell — `nix develop` first, when inside the shell you will not need `uv`. Don't try to substitute system installs of these tools; CI uses Nix and version drift will burn you.
16
+ - **Tasks**: `Taskfile.yml` is the canonical runner. The ones you'll use most: `task test` (forwards args after `--`; pass `--runslow` for slow tests), `task ci` (run before pushing), `task smoke-test` (end-to-end). `task --list` for the rest.
17
+ - **Pre-commit is enforced** (ruff, docstring linting, dependency hygiene, etc.). If a hook fails, fix the cause — don't `--no-verify`.
18
+
19
+ ## Coding Taste
20
+
21
+ Rules that make changes feel native. Follow them even when a tool's defaults disagree.
22
+
23
+ ### Style
24
+
25
+ - **Python 3.12+**. Built-in generics only (`list[int]`, `X | None`); never `typing.List`/`Optional`.
26
+ - **Paths**: `pathlib.Path`. Never `os.path` or string concatenation.
27
+ - **Logging**: `loguru` (`from loguru import logger`). Not `print`, not stdlib `logging`.
28
+ - **Docstrings**: NumPy style — `pydoclint` + `interrogate` (≥95% coverage) enforce this.
29
+ - **Inline code in docstrings/comments**: We use MyST for documentation. We use single "`" for raw text and "_" for italic.
30
+ - **Naming**: this repo right now uses `camelCase` for variables/functions, `PascalCase` for classes, `CONSTANT_CASE` for module constants. Use snake case for all newly created methods and variables as we slow transition to meet PEP 8.
31
+ - Formatting (line length, quotes, etc.) is whatever `ruff format` produces.
32
+
33
+ ### Design
34
+
35
+ - **No fallbacks, no silent retries.** Surface failures with clear errors. A stack trace beats a wrong result.
36
+ - **Fix root causes.** If a fix doesn't change behavior the way you expected, stop and re-analyze before patching again.
37
+ - **Validate at boundaries, trust internals.** Defensive checks belong where untrusted input enters (parsers, CLI, external tools).
38
+ - **No premature abstraction.** Three similar lines beat a speculative helper. Ship the smallest correct change.
39
+ - **Clear over clever.** Loops over unreadable comprehensions; parsers over paragraph-long regexes.
40
+ - **Comments explain *why*, not *what*.** Reserve them for hidden constraints, non-obvious invariants, bug-specific workarounds. Don't reference task numbers or callers — that rots.
41
+ - **Pydantic** for runtime-validated config (`fabulous_settings.py`); **dataclasses** for the fabric model — keep them light, no heavy logic.
42
+
43
+ ### Testing
44
+
45
+ - `pytest` + `pytest-mock` (use the `mocker` fixture; don't import `unittest.mock`).
46
+ - Mark slow tests `@pytest.mark.slow` so default `task test` stays fast.
47
+ - Prefer real in-memory fabric fixtures over heavy mocks.
48
+ - `cocotb` is available for RTL-level verification, not for Python logic.
49
+ - Try to reuse fixture as much as possible.
50
+ - Try to parameterize the test if possible
51
+
52
+ ## House Rules
53
+
54
+ - Don't edit the symlinked agent files (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.github/copilot-instructions.md`) — edit `AGENTS.md`.
55
+ - Don't add new top-level packages without a clear home in the layout above.
56
+ - When in doubt, read `Taskfile.yml`, `pyproject.toml`, and `tests/conftest.py` — they encode the live conventions. The Sphinx docs under `docs/` cover user-facing flow.
@@ -0,0 +1,76 @@
1
+ FROM ubuntu:24.04
2
+
3
+ # Install minimal dependencies and set up non-root user (UID 1000)
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ curl ca-certificates xz-utils git sudo && \
6
+ rm -rf /var/lib/apt/lists/* && \
7
+ userdel -r ubuntu 2>/dev/null || true && \
8
+ useradd -m -s /bin/bash -u 1000 nixuser && \
9
+ echo 'nixuser ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/nixuser && \
10
+ chmod 0440 /etc/sudoers.d/nixuser && \
11
+ mkdir -p /nix && chown -R nixuser:nixuser /nix
12
+
13
+ # Install Nix as nixuser and configure for single-user mode with flakes
14
+ RUN su - nixuser -c 'curl -L https://nixos.org/nix/install | sh -s -- --no-daemon' && \
15
+ mkdir -p /home/nixuser/.config/nix && \
16
+ { echo 'experimental-features = nix-command flakes'; \
17
+ echo 'cores = 0'; \
18
+ echo 'extra-substituters = https://nix-cache.fossi-foundation.org'; \
19
+ echo 'extra-trusted-public-keys = nix-cache.fossi-foundation.org:3+K59iFwXqKsL7BNu6Guy0v+uTlwsxYQxjspXzqLYQs='; \
20
+ echo 'build-users-group ='; \
21
+ } > /home/nixuser/.config/nix/nix.conf && \
22
+ chown -R nixuser:nixuser /home/nixuser/.config
23
+
24
+ # Copy project files for Nix build
25
+ WORKDIR /build
26
+ COPY --chown=nixuser:nixuser flake.nix flake.lock ./
27
+ COPY --chown=nixuser:nixuser nix/ ./nix/
28
+ COPY --chown=nixuser:nixuser pyproject.toml uv.lock build_hooks.py ./
29
+ COPY --chown=nixuser:nixuser fabulous/ ./fabulous/
30
+
31
+ # Build dev shell profile as nixuser and clean up to reduce image size
32
+ USER nixuser
33
+ ENV PATH="/home/nixuser/.nix-profile/bin:$PATH"
34
+ RUN nix develop --profile /nix/var/nix/profiles/devshell --command true && \
35
+ nix store gc && \
36
+ nix store optimise
37
+
38
+ # Switch back to root for system-level setup
39
+ USER root
40
+
41
+ # Set up workspace and runtime dir
42
+ RUN mkdir -p /workspaces /run/user/1000 && \
43
+ chown nixuser:nixuser /workspaces /run/user/1000 && \
44
+ chmod 700 /run/user/1000
45
+
46
+ # Install devshell profile script, resolving DEVSHELL_DIR at build time.
47
+ # Sourced via BASH_ENV (non-interactive), /etc/bash.bashrc (system interactive),
48
+ # and ~/.bashrc (user interactive) to cover all shell invocation modes.
49
+ COPY .devcontainer/devshell.sh.tpl /tmp/devshell.sh.tpl
50
+ RUN DEVSHELL_DIR=$(find /nix/store -maxdepth 1 -type d -name "*-devshell-dir" | head -1) && \
51
+ sed "s|@@DEVSHELL_DIR@@|$DEVSHELL_DIR|" /tmp/devshell.sh.tpl > /etc/profile.d/devshell.sh && \
52
+ rm /tmp/devshell.sh.tpl && \
53
+ chmod +x /etc/profile.d/devshell.sh && \
54
+ echo 'source /etc/profile.d/devshell.sh' >> /home/nixuser/.bashrc && \
55
+ echo 'source /etc/profile.d/devshell.sh' >> /etc/bash.bashrc && \
56
+ chown nixuser:nixuser /home/nixuser/.bashrc
57
+
58
+ # Fix GPG "invalid signature" errors when devcontainer features run apt-get update
59
+ # in Codespaces overlay builds. The base image enables gzip indexes (docker-gzip-indexes)
60
+ # which causes file size mismatches across overlay2 layers during GPG verification.
61
+ RUN rm -f /etc/apt/apt.conf.d/docker-gzip-indexes && \
62
+ rm -rf /var/lib/apt/lists/* && \
63
+ apt-get update
64
+
65
+ # Run as nixuser by default and set environment variables
66
+ USER nixuser
67
+ ENV BASH_ENV=/etc/profile.d/devshell.sh \
68
+ XDG_RUNTIME_DIR=/run/user/1000 \
69
+ QT_X11_NO_MITSHM=1 \
70
+ QT_QPA_PLATFORM=offscreen \
71
+ REPO_ROOT=/workspaces \
72
+ PRJ_ROOT=/workspaces \
73
+ PATH="/nix/var/nix/profiles/devshell/bin:/home/nixuser/.nix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
74
+
75
+ WORKDIR /workspaces
76
+ CMD ["/bin/bash"]
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "Remote (codespace)",
3
+ "image": "ghcr.io/fpga-research/fabulous:latest",
4
+ "features": {
5
+ "ghcr.io/devcontainers/features/desktop-lite:1": {
6
+ "password": "fabulous",
7
+ "webPort": "6080",
8
+ "vncPort": "5901"
9
+ }
10
+ },
11
+ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
12
+ "containerEnv": {
13
+ "QT_QPA_PLATFORM": "xcb"
14
+ },
15
+ "customizations": {
16
+ "vscode": {
17
+ "settings": {
18
+ "python.defaultInterpreterPath": "python",
19
+ "python.analysis.typeCheckingMode": "basic",
20
+ "editor.formatOnSave": true,
21
+ "[python]": {
22
+ "editor.defaultFormatter": "charliermarsh.ruff",
23
+ "editor.codeActionsOnSave": {
24
+ "source.fixAll.ruff": "explicit",
25
+ "source.organizeImports.ruff": "explicit"
26
+ }
27
+ },
28
+ "terminal.integrated.cwd": "/workspaces/${localWorkspaceFolderBasename}",
29
+ "dotfiles.repository": "",
30
+ "dotfiles.installCommand": ""
31
+ },
32
+ "extensions": [
33
+ "charliermarsh.ruff",
34
+ "ms-python.python"
35
+ ]
36
+ },
37
+ "codespaces": {
38
+ "portsAttributes": {
39
+ "6080": {
40
+ "label": "Desktop (noVNC)",
41
+ "onAutoForward": "ignore",
42
+ "visibility": "private"
43
+ },
44
+ "5901": {
45
+ "label": "VNC",
46
+ "onAutoForward": "ignore",
47
+ "visibility": "private"
48
+ }
49
+ }
50
+ }
51
+ },
52
+ "postAttachCommand": "bash .devcontainer/display-switch.sh",
53
+ "remoteUser": "nixuser",
54
+ "hostRequirements": {
55
+ "cpus": 4
56
+ }
57
+ }
@@ -0,0 +1,8 @@
1
+ # Sourced by BASH_ENV, /etc/bash.bashrc, and ~/.bashrc
2
+ # _DEVSHELL_SOURCED guard prevents re-sourcing in nested shells
3
+ [ -n "$_DEVSHELL_SOURCED" ] && return
4
+ export _DEVSHELL_SOURCED=1
5
+
6
+ export DEVSHELL_DIR="@@DEVSHELL_DIR@@"
7
+ [ -f "$DEVSHELL_DIR/env.bash" ] && source "$DEVSHELL_DIR/env.bash"
8
+ export PATH="/nix/var/nix/profiles/devshell/bin:/home/nixuser/.nix-profile/bin:$PATH"
@@ -0,0 +1,35 @@
1
+ #!/bin/bash
2
+
3
+ # Configures the display server based on the environment:
4
+ # - Codespaces: uses the built-in VNC server on :1
5
+ # - Local Linux: switches from VNC to host X11 via socket mount
6
+
7
+ if [ "$CODESPACES" = "true" ]; then
8
+ echo "Running in Codespaces (VNC on :1)"
9
+ export DISPLAY=:1
10
+ else
11
+ echo "Running on Local Linux (X11 socket mount)"
12
+
13
+ # Kill internal VNC to avoid conflicts with host X11
14
+ pkill Xvfb 2>/dev/null || true
15
+ rm -f /tmp/.X11-unix/X1 2>/dev/null || true
16
+
17
+ # Link host X11 socket from mount point
18
+ if [ -d "/tmp/.host-X11-unix" ]; then
19
+ ln -sf /tmp/.host-X11-unix/* /tmp/.X11-unix/ 2>/dev/null || true
20
+ fi
21
+
22
+ # Use the DISPLAY variable passed from the host
23
+ export DISPLAY="${DISPLAY:-:0}"
24
+ echo "Using display: $DISPLAY"
25
+
26
+ # Disable auth (relies on xhost +local:docker on host)
27
+ export XAUTHORITY=""
28
+ fi
29
+
30
+ # Persist display settings to bashrc for new terminal sessions
31
+ sed -i '/export DISPLAY=/d; /export XAUTHORITY=/d' ~/.bashrc
32
+ echo "export DISPLAY=$DISPLAY" >> ~/.bashrc
33
+ if [ "$CODESPACES" != "true" ]; then
34
+ echo 'export XAUTHORITY=""' >> ~/.bashrc
35
+ fi
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "Local",
3
+ "image": "ghcr.io/fpga-research/fabulous:latest",
4
+ "features": {
5
+ "ghcr.io/devcontainers/features/desktop-lite:1": {
6
+ "password": "fabulous",
7
+ "webPort": "6080",
8
+ "vncPort": "5901"
9
+ }
10
+ },
11
+ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
12
+ // --- LOCAL LINUX SPECIFIC SETTINGS ---
13
+ // --net=host is required for X11: modern Linux uses abstract Unix sockets
14
+ // for X11, which live in the network namespace (not the filesystem).
15
+ // --security-opt needed for SELinux (Fedora/RHEL).
16
+ "runArgs": [
17
+ "--net=host",
18
+ "--security-opt=label=disable"
19
+ ],
20
+ "mounts": [
21
+ "source=/tmp/.X11-unix,target=/tmp/.host-X11-unix,type=bind"
22
+ ],
23
+ "containerEnv": {
24
+ "QT_QPA_PLATFORM": "xcb",
25
+ "DISPLAY": "${localEnv:DISPLAY}"
26
+ },
27
+ "postAttachCommand": "bash .devcontainer/display-switch.sh",
28
+ "initializeCommand": "xhost +local:docker 2>/dev/null || true",
29
+ "customizations": {
30
+ "vscode": {
31
+ "settings": {
32
+ "python.defaultInterpreterPath": "python",
33
+ "python.analysis.typeCheckingMode": "basic",
34
+ "editor.formatOnSave": true,
35
+ "[python]": {
36
+ "editor.defaultFormatter": "charliermarsh.ruff",
37
+ "editor.codeActionsOnSave": {
38
+ "source.fixAll.ruff": "explicit",
39
+ "source.organizeImports.ruff": "explicit"
40
+ }
41
+ },
42
+ "terminal.integrated.cwd": "/workspaces/${localWorkspaceFolderBasename}"
43
+ }
44
+ }
45
+ },
46
+ "remoteUser": "nixuser"
47
+ }
@@ -0,0 +1,2 @@
1
+ # Set the default behavior, in case people don't have core.autocrlf set.
2
+ * text=auto
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Execute command '....'
17
+ 3. See error
18
+
19
+ **Expected behavior**
20
+ A clear and concise description of what you expected to happen.
21
+
22
+ **Example**
23
+ Provide a minimal reproducible example.
24
+ You may also provide your FABulous project.
25
+
26
+ **Screenshots**
27
+ If applicable, add screenshots to help explain your problem.
28
+
29
+ **Your Setup (please complete the following information):**
30
+ - OS: [e.g. Debian Linux]
31
+ - OS / kernel version: [e.g. 6.12.4-arch1-1]
32
+ - Python version: [e.g. 3.12.07]
33
+ - Yosys version: [e.g. 0.43]
34
+ - FABulous version / git commit id / git branch
35
+
36
+ **Additional context**
37
+ Add any other context about the problem here.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+ If you have questions about the usage of FABulous, please check the [FABulous discussions page](https://github.com/FPGA-Research/FABulous/discussions) .
13
+
14
+ **Describe the solution you'd like**
15
+ A clear and concise description of what you want to happen.
16
+
17
+ **Describe alternatives you've considered**
18
+ A clear and concise description of any alternative solutions or features you've considered.
19
+
20
+ **Additional context**
21
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,18 @@
1
+ ## Summary
2
+
3
+ <!-- Briefly describe what this PR changes and why. -->
4
+
5
+ ## Related Issues
6
+
7
+ <!-- Link any related issues, e.g. "Closes #123". -->
8
+
9
+ ## Testing
10
+
11
+ <!-- Describe how you tested this change. Include commands run and any relevant output. -->
12
+
13
+ ## Checklist
14
+
15
+ - [ ] I have read [`CONTRIBUTING.md`](../CONTRIBUTING.md).
16
+ - [ ] I agree that my contribution is licensed under the project's [Apache License 2.0](../LICENSE).
17
+ - [ ] I have run `pre-commit run --all-files` and `pytest` locally.
18
+ - [ ] I have updated documentation where relevant.
@@ -0,0 +1,54 @@
1
+ name: Create failure issue
2
+ description: Create a GitHub issue on CI failure with deduplication
3
+
4
+ inputs:
5
+ title:
6
+ description: "Issue title (used for deduplication)"
7
+ required: true
8
+ body:
9
+ description: "Issue body in markdown"
10
+ required: true
11
+ labels:
12
+ description: "Comma-separated labels (first label used for dedup search)"
13
+ required: true
14
+ github_token:
15
+ description: "GitHub token for API access"
16
+ required: true
17
+
18
+ runs:
19
+ using: "composite"
20
+ steps:
21
+ - name: Create issue on failure
22
+ uses: actions/github-script@v9
23
+ env:
24
+ ISSUE_TITLE: ${{ inputs.title }}
25
+ ISSUE_BODY: ${{ inputs.body }}
26
+ ISSUE_LABELS: ${{ inputs.labels }}
27
+ with:
28
+ github-token: ${{ inputs.github_token }}
29
+ script: |
30
+ const title = process.env.ISSUE_TITLE;
31
+ const body = process.env.ISSUE_BODY;
32
+ const labels = process.env.ISSUE_LABELS.split(',').map(l => l.trim());
33
+ const searchLabel = labels[0];
34
+
35
+ const issues = await github.rest.issues.listForRepo({
36
+ owner: context.repo.owner,
37
+ repo: context.repo.repo,
38
+ state: 'open',
39
+ labels: [searchLabel],
40
+ per_page: 100
41
+ });
42
+
43
+ if (!issues.data.find(i => i.title === title)) {
44
+ const created = await github.rest.issues.create({
45
+ owner: context.repo.owner,
46
+ repo: context.repo.repo,
47
+ title: title,
48
+ body: body,
49
+ labels: labels
50
+ });
51
+ console.log(`Created issue #${created.data.number}: ${title}`);
52
+ } else {
53
+ console.log('Issue already exists, skipping creation');
54
+ }
@@ -0,0 +1,126 @@
1
+ name: Prepare FABulous workflow
2
+ description: Composite action to prepare a container with everything needed to run FABulous
3
+
4
+ inputs:
5
+ python_version:
6
+ description: "Python version to use"
7
+ required: false
8
+ default: "3.12"
9
+ oss-cad-suite-nightly:
10
+ description: "Set true to use nightly version of oss-cad-suite."
11
+ required: false
12
+ default: "false"
13
+ additional_system_packages:
14
+ description: "Additional ubuntu packages to install"
15
+ required: false
16
+ default: ""
17
+ additional_python_packages:
18
+ description: "Additional python packages to install"
19
+ required: false
20
+ default: ""
21
+ install_ghdl_mcode:
22
+ description:
23
+ "If false, ghdl mcode won't be installed and the oss-cad-suite llvm
24
+ version is used"
25
+ required: false
26
+ default: "true"
27
+ install_nvc:
28
+ description: "If true, NVC VHDL simulator will be installed (recommended, faster than GHDL)"
29
+ required: false
30
+ default: "true"
31
+
32
+ runs:
33
+ using: "composite"
34
+ steps:
35
+ - name: Set up Python
36
+ uses: actions/setup-python@v6
37
+ with:
38
+ python-version: ${{ inputs.python_version }}
39
+ - name: Install uv
40
+ uses: astral-sh/setup-uv@v7
41
+ with:
42
+ version: "latest"
43
+ enable-cache: true
44
+ - name: Get OSS CAD Suite version
45
+ id: oss-cad-version
46
+ shell: bash
47
+ run: |
48
+ # Get the latest release info from YosysHQ/oss-cad-suite-build
49
+ # Use authenticated API call to avoid rate limits
50
+
51
+ if ${{ inputs.oss-cad-suite-nightly }}; then
52
+ echo "Get latest oss-cad-suite nightly version"
53
+ if [ -n "${{ github.token }}"]; then
54
+ VERSION=$(curl -s -H "Authorization: Bearer ${{ github.token }}" \
55
+ "https://api.github.com/repos/YosysHQ/oss-cad-suite-build/releases/latest" | \
56
+ jq -r '.tag_name // "unknown"')
57
+ else
58
+ VERSION=$(curl -s "https://api.github.com/repos/YosysHQ/oss-cad-suite-build/releases/latest" | \
59
+ jq -r '.tag_name // "unknown"')
60
+ fi
61
+
62
+ # Fallback to a fixed version if API call fails
63
+ if [ "$VERSION" = "unknown" ] || [ "$VERSION" = "null" ] || [ -z "$VERSION" ]; then
64
+ echo "Warning: Failed to get OSS CAD Suite version from API, using fallback"
65
+ VERSION="2026-05-12" # Use a recent stable version as fallback
66
+ fi
67
+
68
+ else
69
+ echo "Get latest known working OSS CAD Suite version."
70
+ VERSION="2026-05-12" # Use a recent stable version as fallback
71
+ fi
72
+
73
+ echo "Using OSS CAD Suite version: $VERSION"
74
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
75
+ - name: Cache OSS CAD Suite
76
+ id: cache-oss-cad
77
+ uses: actions/cache@v6
78
+ with:
79
+ path: |
80
+ ${{ runner.temp }}/oss-cad-suite
81
+ key: oss-cad-suite-${{ runner.os }}-${{ steps.oss-cad-version.outputs.version }}
82
+ restore-keys: |
83
+ oss-cad-suite-${{ runner.os }}-${{ steps.oss-cad-version.outputs.version }}
84
+ - name: set up OSS CAD path
85
+ if: ${{ steps.cache-oss-cad.outputs.cache-hit == 'true' }}
86
+ shell: bash
87
+ run: |
88
+ echo "${{ runner.temp }}/oss-cad-suite/bin:$PATH" >> "$GITHUB_PATH"
89
+ - name: Set up OSS CAD suite
90
+ if: ${{ steps.cache-oss-cad.outputs.cache-hit != 'true' }}
91
+ uses: YosysHQ/setup-oss-cad-suite@v4
92
+ with:
93
+ github-token: ${{ github.token }}
94
+ version: ${{ steps.oss-cad-version.outputs.version }}
95
+ - name: Install NVC VHDL simulator
96
+ uses: nickg/setup-nvc@v1
97
+ if: ${{ inputs.install_nvc != 'false' }}
98
+ - name: Install GHDL mcode nightly
99
+ # GHDL mcode is required to test our fabric.
100
+ # The oss-cad-suite action installs GHDL, but with the LLVM backend, which is much slower for our simulation
101
+ uses: ghdl/setup-ghdl@v1
102
+ if: ${{ inputs.install_ghdl_mcode != 'false' }}
103
+ with:
104
+ version: 6.0.0
105
+ backend: mcode
106
+ investigate: true
107
+ - name: Install additional ubuntu packages
108
+ if: ${{ inputs.additional_system_packages != '' }}
109
+ shell: bash
110
+ run: |
111
+ sudo apt-get update
112
+ sudo apt-get install -y ${{ inputs.additional_system_packages }}
113
+ - name: Install additional python packages
114
+ if: ${{ inputs.additional_python_packages != '' }}
115
+ shell: bash
116
+ run: |
117
+ uv add ${{ inputs.additional_python_packages }}
118
+ - name: Install FABulous with dev dependencies
119
+ shell: bash
120
+ run: |
121
+ uv sync --dev --locked --all-extras
122
+ uv pip install -e .
123
+ - name: Set PATH
124
+ shell: bash
125
+ run: |
126
+ echo "$GITHUB_WORKSPACE/.venv/bin:/usr/local/bin:/usr/bin:/bin" >> "$GITHUB_PATH"
@@ -0,0 +1,52 @@
1
+ name: Prepare Nix environment
2
+ description: Composite action to install Nix, cache the store, free disk space,
3
+ and build the devshell
4
+
5
+ inputs:
6
+ nix_version:
7
+ description: "Nix version to install"
8
+ required: false
9
+ default: "2.34.7"
10
+ free_disk_space:
11
+ description: "Remove large pre-installed tool directories to free disk space"
12
+ required: false
13
+ default: "true"
14
+
15
+ runs:
16
+ using: "composite"
17
+ steps:
18
+ - name: Install Nix
19
+ uses: nixbuild/nix-quick-install-action@v35
20
+ with:
21
+ nix_version: ${{ inputs.nix_version }}
22
+ nix_conf: |
23
+ substituters = https://cache.nixos.org https://nix-cache.fossi-foundation.org
24
+ extra-trusted-public-keys = nix-cache.fossi-foundation.org:3+K59iFwXqKsL7BNu6Guy0v+uTlwsxYQxjspXzqLYQs=
25
+
26
+ - name: Free up disk space
27
+ if: ${{ inputs.free_disk_space == 'true' && runner.os == 'Linux' }}
28
+ shell: bash
29
+ run: |
30
+ sudo rm -rf /usr/share/dotnet
31
+ sudo rm -rf /usr/local/lib/android
32
+ sudo rm -rf /opt/ghc
33
+ sudo rm -rf /opt/hostedtoolcache
34
+ sudo rm -rf /usr/local/share/boost
35
+ sudo rm -rf /usr/lib/jvm
36
+ sudo rm -rf /usr/share/swift
37
+
38
+ - name: Cache Nix store
39
+ uses: nix-community/cache-nix-action@v7
40
+ with:
41
+ primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock') }}
42
+ restore-prefixes-first-match: nix-${{ runner.os }}-
43
+ gc-max-store-size-linux: 10G
44
+ purge: true
45
+ purge-prefixes: nix-${{ runner.os }}-
46
+ purge-created: 0
47
+ purge-last-accessed: 0
48
+ purge-primary-key: never
49
+
50
+ - name: Build nix environment
51
+ shell: bash
52
+ run: nix develop --command true
@@ -0,0 +1,56 @@
1
+ # AGENTS.md
2
+
3
+ ## Project Overview
4
+
5
+ FABulous is a parametric FPGA fabric generator. It takes a fabric definition (CSV or YAML), builds an in-memory fabric model, and emits the HDL, nextpnr chip database, synthesis scripts, geometry, and bitstream needed to target that fabric.
6
+
7
+ ```text
8
+ config (CSV/YAML) → fabric model → HDL + chip DB + synth scripts
9
+ user design → Yosys (synth) → nextpnr (P&R) → FASM → bitstream
10
+ ```
11
+
12
+ ## How to Work in This Repo
13
+
14
+ - **Python deps: `uv`.** Run `uv sync` after pulling; add deps with `uv add` (`--group dev` for dev-only). Never hand-edit `uv.lock`. Run commands as `uv run <cmd>` or activate `.venv/`.
15
+ - **EDA toolchain: Nix.** `flake.nix` pins Yosys, nextpnr, OpenROAD, GHDL, Librelane, etc. The **GDS / ASIC flow** (anything under `gds_flow_test`, `librelane_plugin_fabulous`, or `fabulous/fabric_generator/gds_generator`) requires the Nix shell — `nix develop` first, when inside the shell you will not need `uv`. Don't try to substitute system installs of these tools; CI uses Nix and version drift will burn you.
16
+ - **Tasks**: `Taskfile.yml` is the canonical runner. The ones you'll use most: `task test` (forwards args after `--`; pass `--runslow` for slow tests), `task ci` (run before pushing), `task smoke-test` (end-to-end). `task --list` for the rest.
17
+ - **Pre-commit is enforced** (ruff, docstring linting, dependency hygiene, etc.). If a hook fails, fix the cause — don't `--no-verify`.
18
+
19
+ ## Coding Taste
20
+
21
+ Rules that make changes feel native. Follow them even when a tool's defaults disagree.
22
+
23
+ ### Style
24
+
25
+ - **Python 3.12+**. Built-in generics only (`list[int]`, `X | None`); never `typing.List`/`Optional`.
26
+ - **Paths**: `pathlib.Path`. Never `os.path` or string concatenation.
27
+ - **Logging**: `loguru` (`from loguru import logger`). Not `print`, not stdlib `logging`.
28
+ - **Docstrings**: NumPy style — `pydoclint` + `interrogate` (≥95% coverage) enforce this.
29
+ - **Inline code in docstrings/comments**: We use MyST for documentation. We use single "`" for raw text and "_" for italic.
30
+ - **Naming**: this repo right now uses `camelCase` for variables/functions, `PascalCase` for classes, `CONSTANT_CASE` for module constants. Use snake case for all newly created methods and variables as we slow transition to meet PEP 8.
31
+ - Formatting (line length, quotes, etc.) is whatever `ruff format` produces.
32
+
33
+ ### Design
34
+
35
+ - **No fallbacks, no silent retries.** Surface failures with clear errors. A stack trace beats a wrong result.
36
+ - **Fix root causes.** If a fix doesn't change behavior the way you expected, stop and re-analyze before patching again.
37
+ - **Validate at boundaries, trust internals.** Defensive checks belong where untrusted input enters (parsers, CLI, external tools).
38
+ - **No premature abstraction.** Three similar lines beat a speculative helper. Ship the smallest correct change.
39
+ - **Clear over clever.** Loops over unreadable comprehensions; parsers over paragraph-long regexes.
40
+ - **Comments explain *why*, not *what*.** Reserve them for hidden constraints, non-obvious invariants, bug-specific workarounds. Don't reference task numbers or callers — that rots.
41
+ - **Pydantic** for runtime-validated config (`fabulous_settings.py`); **dataclasses** for the fabric model — keep them light, no heavy logic.
42
+
43
+ ### Testing
44
+
45
+ - `pytest` + `pytest-mock` (use the `mocker` fixture; don't import `unittest.mock`).
46
+ - Mark slow tests `@pytest.mark.slow` so default `task test` stays fast.
47
+ - Prefer real in-memory fabric fixtures over heavy mocks.
48
+ - `cocotb` is available for RTL-level verification, not for Python logic.
49
+ - Try to reuse fixture as much as possible.
50
+ - Try to parameterize the test if possible
51
+
52
+ ## House Rules
53
+
54
+ - Don't edit the symlinked agent files (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.github/copilot-instructions.md`) — edit `AGENTS.md`.
55
+ - Don't add new top-level packages without a clear home in the layout above.
56
+ - When in doubt, read `Taskfile.yml`, `pyproject.toml`, and `tests/conftest.py` — they encode the live conventions. The Sphinx docs under `docs/` cover user-facing flow.