FABulous-FPGA 2.0.0b1__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 (290) hide show
  1. fabulous_fpga-2.0.0b1/.gitattributes +2 -0
  2. fabulous_fpga-2.0.0b1/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  3. fabulous_fpga-2.0.0b1/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
  4. fabulous_fpga-2.0.0b1/.github/actions/prepare_FABulous_container/action.yaml +117 -0
  5. fabulous_fpga-2.0.0b1/.github/copilot-instruction.md +7 -0
  6. fabulous_fpga-2.0.0b1/.github/workflows/backwards-compatibility.yml +40 -0
  7. fabulous_fpga-2.0.0b1/.github/workflows/nix-env.yml +59 -0
  8. fabulous_fpga-2.0.0b1/.github/workflows/pre-commit-hooks.yml +20 -0
  9. fabulous_fpga-2.0.0b1/.github/workflows/publish_to_pypi.yml +62 -0
  10. fabulous_fpga-2.0.0b1/.github/workflows/pytest_testing.yml +261 -0
  11. fabulous_fpga-2.0.0b1/.github/workflows/release_please.yml +42 -0
  12. fabulous_fpga-2.0.0b1/.gitignore +14 -0
  13. fabulous_fpga-2.0.0b1/.pre-commit-config.yaml +56 -0
  14. fabulous_fpga-2.0.0b1/.readthedocs.yaml +26 -0
  15. fabulous_fpga-2.0.0b1/.test_durations_fallback +552 -0
  16. fabulous_fpga-2.0.0b1/CHANGELOG.md +9 -0
  17. fabulous_fpga-2.0.0b1/Dockerfile +33 -0
  18. fabulous_fpga-2.0.0b1/FABulous/FABulous.py +807 -0
  19. fabulous_fpga-2.0.0b1/FABulous/FABulous_API.py +428 -0
  20. fabulous_fpga-2.0.0b1/FABulous/FABulous_CLI/FABulous_CLI.py +1243 -0
  21. fabulous_fpga-2.0.0b1/FABulous/FABulous_CLI/__init__.py +5 -0
  22. fabulous_fpga-2.0.0b1/FABulous/FABulous_CLI/cmd_synthesis.py +352 -0
  23. fabulous_fpga-2.0.0b1/FABulous/FABulous_CLI/helper.py +726 -0
  24. fabulous_fpga-2.0.0b1/FABulous/FABulous_settings.py +422 -0
  25. fabulous_fpga-2.0.0b1/FABulous/__init__.py +5 -0
  26. fabulous_fpga-2.0.0b1/FABulous/custom_exception.py +66 -0
  27. fabulous_fpga-2.0.0b1/FABulous/fabric_cad/README.md +152 -0
  28. fabulous_fpga-2.0.0b1/FABulous/fabric_cad/__init__.py +5 -0
  29. fabulous_fpga-2.0.0b1/FABulous/fabric_cad/bit_gen.py +289 -0
  30. fabulous_fpga-2.0.0b1/FABulous/fabric_cad/gen_bitstream_spec.py +183 -0
  31. fabulous_fpga-2.0.0b1/FABulous/fabric_cad/gen_design_top_wrapper.py +235 -0
  32. fabulous_fpga-2.0.0b1/FABulous/fabric_cad/gen_npnr_model.py +152 -0
  33. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/Bel.py +167 -0
  34. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/ConfigMem.py +35 -0
  35. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/Fabric.py +508 -0
  36. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/Gen_IO.py +64 -0
  37. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/Port.py +285 -0
  38. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/SuperTile.py +101 -0
  39. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/Tile.py +311 -0
  40. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/Wire.py +107 -0
  41. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/Yosys_obj.py +503 -0
  42. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/__init__.py +17 -0
  43. fabulous_fpga-2.0.0b1/FABulous/fabric_definition/define.py +134 -0
  44. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Fabric/gds_config.yaml +58 -0
  45. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Test/.gitignore +17 -0
  46. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Test/build_fabulous_fabric.tcl +4 -0
  47. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Test/makehex.py +28 -0
  48. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP.csv +4 -0
  49. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_bot/DSP_bot.csv +8 -0
  50. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_bot/DSP_bot_switch_matrix.list +230 -0
  51. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_top/DSP_top.csv +7 -0
  52. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_top/DSP_top_switch_matrix.list +215 -0
  53. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/DSP/gds_config.yaml +1 -0
  54. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB.csv +17 -0
  55. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB_ConfigMem.csv +21 -0
  56. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB_switch_matrix.list +301 -0
  57. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/gds_config.yaml +1 -0
  58. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/N_term_DSP.csv +14 -0
  59. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/N_term_DSP_switch_matrix.list +15 -0
  60. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/gds_config.yaml +1 -0
  61. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/N_term_RAM_IO.csv +12 -0
  62. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/N_term_RAM_IO_switch_matrix.list +16 -0
  63. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/gds_config.yaml +1 -0
  64. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/N_term_single.csv +15 -0
  65. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/N_term_single_switch_matrix.list +15 -0
  66. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/gds_config.yaml +1 -0
  67. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/N_term_single2.csv +14 -0
  68. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/N_term_single2_switch_matrix.list +15 -0
  69. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/gds_config.yaml +1 -0
  70. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/RAM_IO.csv +45 -0
  71. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/RAM_IO_switch_matrix.list +230 -0
  72. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/gds_config.yaml +1 -0
  73. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/RegFile/RegFile.csv +6 -0
  74. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/RegFile/RegFile_switch_matrix.list +222 -0
  75. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/RegFile/gds_config.yaml +1 -0
  76. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/S_term_DSP.csv +14 -0
  77. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/S_term_DSP_switch_matrix.list +15 -0
  78. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/gds_config.yaml +1 -0
  79. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/S_term_RAM_IO.csv +12 -0
  80. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/S_term_RAM_IO_switch_matrix.list +16 -0
  81. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/gds_config.yaml +1 -0
  82. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/S_term_single.csv +16 -0
  83. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/S_term_single_switch_matrix.list +17 -0
  84. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/gds_config.yaml +1 -0
  85. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/S_term_single2.csv +14 -0
  86. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/S_term_single2_switch_matrix.list +15 -0
  87. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/gds_config.yaml +1 -0
  88. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/W_IO/W_IO.csv +22 -0
  89. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/W_IO/W_IO_switch_matrix.list +69 -0
  90. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/W_IO/gds_config.yaml +1 -0
  91. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/include/Base.csv +43 -0
  92. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/include/Base.list +75 -0
  93. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/Tile/include/gds_config.yaml +82 -0
  94. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/fabric.csv +47 -0
  95. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_common/user_design/top_wrapper.v +40 -0
  96. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/FABulous.tcl +7 -0
  97. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/BlockRAM_1KB.v +164 -0
  98. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/ConfigFSM.v +94 -0
  99. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/Frame_Data_Reg.v +14 -0
  100. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/Frame_Select.v +17 -0
  101. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/bitbang.v +101 -0
  102. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/config_UART.v +459 -0
  103. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/eFPGA_Config.v +102 -0
  104. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Fabric/models_pack.v +505 -0
  105. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Test/Makefile +81 -0
  106. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Test/README.md +28 -0
  107. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Test/sequential_16bit_en_tb.v +110 -0
  108. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/DSP/DSP_bot/MULADD.v +73 -0
  109. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/LUT4AB/LUT4c_frame_config_dffesr.v +147 -0
  110. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/LUT4AB/MUX8LUT_frame_config_mux.v +156 -0
  111. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/Config_access.v +17 -0
  112. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/InPass4_frame_config_mux.v +76 -0
  113. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/OutPass4_frame_config_mux.v +82 -0
  114. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/RegFile/RegFile_32x4.v +73 -0
  115. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/W_IO/Config_access.v +17 -0
  116. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/Tile/W_IO/IO_1_bidirectional_frame_config_pass.v +60 -0
  117. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_verilog/user_design/sequential_16bit_en.v +17 -0
  118. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/FABulous.tcl +2 -0
  119. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/BlockRAM_1KB.vhdl +239 -0
  120. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/ConfigFSM.vhdl +133 -0
  121. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/Frame_Data_Reg.vhdl +44 -0
  122. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/Frame_Select.vhdl +44 -0
  123. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/bitbang.vhdl +110 -0
  124. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/config_UART.vhdl +562 -0
  125. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/eFPGA_Config.vhdl +155 -0
  126. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Fabric/models_pack.vhdl +960 -0
  127. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Test/Makefile +121 -0
  128. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Test/README.md +32 -0
  129. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Test/sequential_16bit_en_tb.vhdl +219 -0
  130. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/DSP/DSP_bot/MULADD.vhdl +96 -0
  131. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/LUT4AB/LUT4c_frame_config_dffesr.vhdl +175 -0
  132. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/LUT4AB/MUX8LUT_frame_config_mux.vhdl +192 -0
  133. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/Config_access.vhdl +44 -0
  134. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/InPass4_frame_config_mux.vhdl +102 -0
  135. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/OutPass4_frame_config_mux.vhdl +98 -0
  136. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/RegFile/RegFile_32x4.vhdl +79 -0
  137. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/W_IO/Config_access.vhdl +44 -0
  138. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/Tile/W_IO/IO_1_bidirectional_frame_config_pass.vhdl +72 -0
  139. fabulous_fpga-2.0.0b1/FABulous/fabric_files/FABulous_project_template_vhdl/user_design/sequential_16bit_en.vhdl +41 -0
  140. fabulous_fpga-2.0.0b1/FABulous/fabric_files/__init__.py +1 -0
  141. fabulous_fpga-2.0.0b1/FABulous/fabric_files/dummy_files/DUMMY_switch_matrix.list +310 -0
  142. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/.gitignore +13 -0
  143. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/__init__.py +17 -0
  144. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/code_generator/__init__.py +6 -0
  145. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/code_generator/code_generator.py +822 -0
  146. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/code_generator/code_generator_VHDL.py +701 -0
  147. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/code_generator/code_generator_Verilog.py +505 -0
  148. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gds_generator/__init__.py +1 -0
  149. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gds_generator/gen_io_pin_config_yaml.py +248 -0
  150. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/__init__.py +14 -0
  151. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/fabric_automation.py +869 -0
  152. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/gen_configmem.py +270 -0
  153. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/gen_fabric.py +540 -0
  154. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/gen_helper.py +181 -0
  155. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/gen_switchmatrix.py +378 -0
  156. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/gen_tile.py +867 -0
  157. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/gen_fabric/gen_top_wrapper.py +359 -0
  158. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/parser/__init__.py +1 -0
  159. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/parser/parse_configmem.py +178 -0
  160. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/parser/parse_csv.py +655 -0
  161. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/parser/parse_hdl.py +330 -0
  162. fabulous_fpga-2.0.0b1/FABulous/fabric_generator/parser/parse_switchmatrix.py +298 -0
  163. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/__init__.py +22 -0
  164. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/bel_geometry.py +223 -0
  165. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/fabric_geometry.py +389 -0
  166. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/geometry_gen.py +71 -0
  167. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/geometry_obj.py +55 -0
  168. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/port_geometry.py +138 -0
  169. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/sm_geometry.py +531 -0
  170. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/tile_geometry.py +677 -0
  171. fabulous_fpga-2.0.0b1/FABulous/geometry_generator/wire_geometry.py +391 -0
  172. fabulous_fpga-2.0.0b1/FABulous_FPGA.egg-info/PKG-INFO +353 -0
  173. fabulous_fpga-2.0.0b1/FABulous_FPGA.egg-info/SOURCES.txt +288 -0
  174. fabulous_fpga-2.0.0b1/FABulous_FPGA.egg-info/dependency_links.txt +1 -0
  175. fabulous_fpga-2.0.0b1/FABulous_FPGA.egg-info/entry_points.txt +3 -0
  176. fabulous_fpga-2.0.0b1/FABulous_FPGA.egg-info/requires.txt +16 -0
  177. fabulous_fpga-2.0.0b1/FABulous_FPGA.egg-info/top_level.txt +5 -0
  178. fabulous_fpga-2.0.0b1/LICENSE +201 -0
  179. fabulous_fpga-2.0.0b1/PKG-INFO +353 -0
  180. fabulous_fpga-2.0.0b1/README.md +321 -0
  181. fabulous_fpga-2.0.0b1/docs/.gitignore +3 -0
  182. fabulous_fpga-2.0.0b1/docs/Makefile +76 -0
  183. fabulous_fpga-2.0.0b1/docs/environment.yml +10 -0
  184. fabulous_fpga-2.0.0b1/docs/make.bat +35 -0
  185. fabulous_fpga-2.0.0b1/docs/pyproject.toml +35 -0
  186. fabulous_fpga-2.0.0b1/docs/readme.md +86 -0
  187. fabulous_fpga-2.0.0b1/docs/requirements.txt +5 -0
  188. fabulous_fpga-2.0.0b1/docs/source/FAB_logo.png +0 -0
  189. fabulous_fpga-2.0.0b1/docs/source/_static/custom.css +23 -0
  190. fabulous_fpga-2.0.0b1/docs/source/_templates/autoapi/index.rst +13 -0
  191. fabulous_fpga-2.0.0b1/docs/source/_templates/autoapi/python/class.rst +64 -0
  192. fabulous_fpga-2.0.0b1/docs/source/_templates/autoapi/python/module.rst +102 -0
  193. fabulous_fpga-2.0.0b1/docs/source/_templates/autoapi/python/package.rst +33 -0
  194. fabulous_fpga-2.0.0b1/docs/source/conf.py +357 -0
  195. fabulous_fpga-2.0.0b1/docs/source/developer_guide/development.rst +371 -0
  196. fabulous_fpga-2.0.0b1/docs/source/figs/FAB_logo.png +0 -0
  197. fabulous_fpga-2.0.0b1/docs/source/figs/FAB_logo.svg +273 -0
  198. fabulous_fpga-2.0.0b1/docs/source/figs/FABulouslogo_wide_2.png +0 -0
  199. fabulous_fpga-2.0.0b1/docs/source/figs/FABulouslogo_wide_2.svg +271 -0
  200. fabulous_fpga-2.0.0b1/docs/source/figs/FORTE_tapeouts.svg +14810 -0
  201. fabulous_fpga-2.0.0b1/docs/source/figs/Ibex_eFPGA.pdf +0 -0
  202. fabulous_fpga-2.0.0b1/docs/source/figs/eFPGA_chip.png +0 -0
  203. fabulous_fpga-2.0.0b1/docs/source/figs/fabulous_ecosystem.png +0 -0
  204. fabulous_fpga-2.0.0b1/docs/source/figs/workflows.svg +653 -0
  205. fabulous_fpga-2.0.0b1/docs/source/gallery/index.rst +35 -0
  206. fabulous_fpga-2.0.0b1/docs/source/getting_started/index.md +9 -0
  207. fabulous_fpga-2.0.0b1/docs/source/getting_started/installation/cad-tool.md +39 -0
  208. fabulous_fpga-2.0.0b1/docs/source/getting_started/installation/docker.md +22 -0
  209. fabulous_fpga-2.0.0b1/docs/source/getting_started/installation/index.md +13 -0
  210. fabulous_fpga-2.0.0b1/docs/source/getting_started/installation/nix-env.md +53 -0
  211. fabulous_fpga-2.0.0b1/docs/source/getting_started/installation/uv.md +41 -0
  212. fabulous_fpga-2.0.0b1/docs/source/getting_started/installation/venv.md +53 -0
  213. fabulous_fpga-2.0.0b1/docs/source/getting_started/quickstart.rst +174 -0
  214. fabulous_fpga-2.0.0b1/docs/source/index.rst +41 -0
  215. fabulous_fpga-2.0.0b1/docs/source/misc/contact.rst +4 -0
  216. fabulous_fpga-2.0.0b1/docs/source/misc/publications.bib +61 -0
  217. fabulous_fpga-2.0.0b1/docs/source/misc/publications.rst +5 -0
  218. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/building_fabric.rst +116 -0
  219. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/fabric_automation.rst +1377 -0
  220. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/fabric_definition.rst +1013 -0
  221. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/FABulous_flow2.png +0 -0
  222. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/Fabric_spreadsheet.png +0 -0
  223. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/Ibex_eFPGA.png +0 -0
  224. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/SuperTILE_examples.png +0 -0
  225. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/SuperTILE_functionality.png +0 -0
  226. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/abstract_tile_view.png +0 -0
  227. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/adjacency.png +0 -0
  228. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/bitstream_mask_mapping.png +0 -0
  229. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/east_terminate.png +0 -0
  230. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/mid_wires.jpg +0 -0
  231. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/tile_CLB_example.png +0 -0
  232. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/wire_nesting_indexing.png +0 -0
  233. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/wire_tile_grid.png +0 -0
  234. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/figs/wires_model.png +0 -0
  235. fabulous_fpga-2.0.0b1/docs/source/user_guide/building_doc/index.md +10 -0
  236. fabulous_fpga-2.0.0b1/docs/source/user_guide/cli_doc/fabulous_variable.rst +53 -0
  237. fabulous_fpga-2.0.0b1/docs/source/user_guide/cli_doc/index.md +8 -0
  238. fabulous_fpga-2.0.0b1/docs/source/user_guide/index.md +12 -0
  239. fabulous_fpga-2.0.0b1/docs/source/user_guide/simulation/emulation.rst +33 -0
  240. fabulous_fpga-2.0.0b1/docs/source/user_guide/simulation/figs/bitbang1.png +0 -0
  241. fabulous_fpga-2.0.0b1/docs/source/user_guide/simulation/figs/bitbang2.png +0 -0
  242. fabulous_fpga-2.0.0b1/docs/source/user_guide/simulation/index.md +9 -0
  243. fabulous_fpga-2.0.0b1/docs/source/user_guide/simulation/simulation.rst +57 -0
  244. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/bitstream/bitstream_generation.rst +96 -0
  245. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/index.md +10 -0
  246. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/pnr/index.md +8 -0
  247. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/pnr/nextpnr.rst +65 -0
  248. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/pnr/nextpnr_compilation.rst +152 -0
  249. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/synthesis/index.md +8 -0
  250. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/synthesis/yosys.rst +52 -0
  251. fabulous_fpga-2.0.0b1/docs/source/user_guide/using_doc/synthesis/yosys_compilation.rst +56 -0
  252. fabulous_fpga-2.0.0b1/docs/uv.lock +826 -0
  253. fabulous_fpga-2.0.0b1/flake.lock +281 -0
  254. fabulous_fpga-2.0.0b1/flake.nix +253 -0
  255. fabulous_fpga-2.0.0b1/nix/default.nix +48 -0
  256. fabulous_fpga-2.0.0b1/nix/overlay/nix-eda.nix +7 -0
  257. fabulous_fpga-2.0.0b1/nix/overlay/python.nix +36 -0
  258. fabulous_fpga-2.0.0b1/nix/patches/openroad/fix_connect_by_abutment.patch +14 -0
  259. fabulous_fpga-2.0.0b1/nix/tools/ghdl-bin.nix +64 -0
  260. fabulous_fpga-2.0.0b1/nix/tools/ghdl-src.nix +42 -0
  261. fabulous_fpga-2.0.0b1/nix/tools/nextpnr.nix +51 -0
  262. fabulous_fpga-2.0.0b1/pyproject.toml +156 -0
  263. fabulous_fpga-2.0.0b1/ruff.toml +163 -0
  264. fabulous_fpga-2.0.0b1/scripts/run_tests.py +266 -0
  265. fabulous_fpga-2.0.0b1/setup.cfg +4 -0
  266. fabulous_fpga-2.0.0b1/tests/CLI_test/conftest.py +81 -0
  267. fabulous_fpga-2.0.0b1/tests/CLI_test/test_CLI.py +195 -0
  268. fabulous_fpga-2.0.0b1/tests/CLI_test/test_arguments.py +1217 -0
  269. fabulous_fpga-2.0.0b1/tests/CLI_test/test_helper.py +96 -0
  270. fabulous_fpga-2.0.0b1/tests/__init__.py +6 -0
  271. fabulous_fpga-2.0.0b1/tests/conftest.py +130 -0
  272. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/__init__.py +1 -0
  273. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/configmem_test/test_configmem_rtl.py +291 -0
  274. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/configmem_test/test_gen_configmem.py +319 -0
  275. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/configmem_test/test_parse_configmem.py +631 -0
  276. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/conftest.py +365 -0
  277. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/test_intergration.py +41 -0
  278. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/testdata/models.v +21 -0
  279. fabulous_fpga-2.0.0b1/tests/fabric_gen_test/testdata/models.vhd +40 -0
  280. fabulous_fpga-2.0.0b1/tests/guide.md +96 -0
  281. fabulous_fpga-2.0.0b1/tests/reference_tests/.gitignore +1 -0
  282. fabulous_fpga-2.0.0b1/tests/reference_tests/README.md +101 -0
  283. fabulous_fpga-2.0.0b1/tests/reference_tests/__init__.py +5 -0
  284. fabulous_fpga-2.0.0b1/tests/reference_tests/conftest.py +109 -0
  285. fabulous_fpga-2.0.0b1/tests/reference_tests/helpers.py +319 -0
  286. fabulous_fpga-2.0.0b1/tests/reference_tests/reference_projects_test.py +192 -0
  287. fabulous_fpga-2.0.0b1/tests/utils_test/conftest.py +19 -0
  288. fabulous_fpga-2.0.0b1/tests/utils_test/test_FABulous_settings.py +735 -0
  289. fabulous_fpga-2.0.0b1/tests/utils_test/test_yosys_obj.py +271 -0
  290. fabulous_fpga-2.0.0b1/uv.lock +930 -0
@@ -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,117 @@
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: "If false, ghdl mcode won't be installed and the oss-cad-suite llvm version is used"
23
+ required: false
24
+ default: "true"
25
+
26
+ runs:
27
+ using: "composite"
28
+ steps:
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: ${{ inputs.python_version }}
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@v6
35
+ with:
36
+ version: "latest"
37
+ enable-cache: true
38
+ - name: Get OSS CAD Suite version
39
+ id: oss-cad-version
40
+ shell: bash
41
+ run: |
42
+ # Get the latest release info from YosysHQ/oss-cad-suite-build
43
+ # Use authenticated API call to avoid rate limits
44
+
45
+ if ${{ inputs.oss-cad-suite-nightly }}; then
46
+ echo "Get latest oss-cad-suite nightly version"
47
+ if [ -n "${{ github.token }}"]; then
48
+ VERSION=$(curl -s -H "Authorization: Bearer ${{ github.token }}" \
49
+ "https://api.github.com/repos/YosysHQ/oss-cad-suite-build/releases/latest" | \
50
+ jq -r '.tag_name // "unknown"')
51
+ else
52
+ VERSION=$(curl -s "https://api.github.com/repos/YosysHQ/oss-cad-suite-build/releases/latest" | \
53
+ jq -r '.tag_name // "unknown"')
54
+ fi
55
+
56
+ # Fallback to a fixed version if API call fails
57
+ if [ "$VERSION" = "unknown" ] || [ "$VERSION" = "null" ] || [ -z "$VERSION" ]; then
58
+ echo "Warning: Failed to get OSS CAD Suite version from API, using fallback"
59
+ VERSION="2025-07-01" # Use a recent stable version as fallback
60
+ fi
61
+
62
+ else
63
+ echo "Get latest known working OSS CAD Suite version."
64
+ VERSION="2025-07-01" # Use a recent stable version as fallback
65
+ fi
66
+
67
+ echo "Using OSS CAD Suite version: $VERSION"
68
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
69
+ - name: Cache OSS CAD Suite
70
+ id: cache-oss-cad
71
+ uses: actions/cache@v4
72
+ with:
73
+ path: |
74
+ ${{ runner.temp }}/oss-cad-suite
75
+ key: oss-cad-suite-${{ runner.os }}-${{ steps.oss-cad-version.outputs.version }}
76
+ restore-keys: |
77
+ oss-cad-suite-${{ runner.os }}-${{ steps.oss-cad-version.outputs.version }}
78
+ - name: set up OSS CAD path
79
+ if: ${{ steps.cache-oss-cad.outputs.cache-hit == 'true' }}
80
+ shell: bash
81
+ run: |
82
+ echo "${{ runner.temp }}/oss-cad-suite/bin:$PATH" >> "$GITHUB_PATH"
83
+ - name: Set up OSS CAD suite
84
+ if: ${{ steps.cache-oss-cad.outputs.cache-hit != 'true' }}
85
+ uses: YosysHQ/setup-oss-cad-suite@v3
86
+ with:
87
+ github-token: ${{ github.token }}
88
+ version: ${{ steps.oss-cad-version.outputs.version }}
89
+ - name: Install GHDL mcode nightly
90
+ # GHDL mcode is required to test our fabric.
91
+ # The oss-cad-suite action installs GHDL, but with the LLVM backend, which is much slower for our simulation
92
+ uses: ghdl/setup-ghdl@v1
93
+ if: ${{ inputs.install_ghdl_mcode != 'false' }}
94
+ with:
95
+ version: nightly
96
+ backend: mcode
97
+ investigate: true
98
+ - name: Install additional ubuntu packages
99
+ if: ${{ inputs.additional_system_packages != '' }}
100
+ shell: bash
101
+ run: |
102
+ sudo apt-get update
103
+ sudo apt-get install -y ${{ inputs.additional_system_packages }}
104
+ - name: Install additional python packages
105
+ if: ${{ inputs.additional_python_packages != '' }}
106
+ shell: bash
107
+ run: |
108
+ uv add ${{ inputs.additional_python_packages }}
109
+ - name: Install FABulous with dev dependencies
110
+ shell: bash
111
+ run: |
112
+ uv sync --dev --locked --all-extras
113
+ uv pip install -e .
114
+ - name: Set PATH
115
+ shell: bash
116
+ run: |
117
+ echo "/home/runner/work/FABulous/FABulous/install/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH" >> "$GITHUB_PATH"
@@ -0,0 +1,7 @@
1
+ We use pytest as our testing infrastructure
2
+
3
+ We use numpy style documentation
4
+
5
+ We use loguru for logging
6
+
7
+
@@ -0,0 +1,40 @@
1
+ name: Test fabric generation against base branch
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - 'FABulous/**'
7
+ - 'tests/**'
8
+ - 'pyproject.toml'
9
+ - '.github/workflows/backwards-compatibility.yml'
10
+ - '.github/actions/**'
11
+
12
+ jobs:
13
+ run_sim_makefile_on_base_project:
14
+ name: Run fabric generator flow and simulation with FABulous makefile against base branch
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ matrix:
18
+ include:
19
+ - name: Verilog
20
+ type: verilog
21
+ - name: VHDL
22
+ type: vhdl
23
+
24
+ steps:
25
+ - uses: actions/checkout@v5
26
+ with:
27
+ ref: ${{ github.base_ref }}
28
+ - uses: ./.github/actions/prepare_FABulous_container
29
+ - name: generate old project
30
+ run: |
31
+ uv run FABulous -c /tmp/demo_${{ matrix.type }} -w ${{ matrix.type }}
32
+
33
+ - uses: actions/checkout@v5
34
+ - uses: ./.github/actions/prepare_FABulous_container
35
+ - name: Run fabric generator flow and simulation with FABulous makefile
36
+ id: run_simulation
37
+ continue-on-error: true
38
+ run: |
39
+ cd /tmp/demo_${{ matrix.type }}/Test
40
+ make FAB_sim
@@ -0,0 +1,59 @@
1
+ name: Nix environment CI
2
+
3
+ on:
4
+ push:
5
+ paths:
6
+ - "flake.nix"
7
+ - "*.lock"
8
+ - "nix/**"
9
+ - ".github/workflows/nix-env.yml"
10
+ pull_request:
11
+ paths:
12
+ - "flake.nix"
13
+ - "*.lock"
14
+ - "nix/**"
15
+ - ".github/workflows/nix-env.yml"
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ concurrency:
22
+ group: ${{ github.workflow }}-${{ github.ref }}
23
+ cancel-in-progress: true
24
+
25
+ jobs:
26
+ nix-smoke-test:
27
+ name: Smoke test (Nix ${{ matrix.os }})
28
+ runs-on: ${{ matrix.os }}
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ os: [ubuntu-latest, macos-latest, ubuntu-22.04]
33
+ steps:
34
+ - name: Checkout
35
+ uses: actions/checkout@v4
36
+
37
+ - name: Install Nix
38
+ uses: nixbuild/nix-quick-install-action@v34
39
+ with:
40
+ nix_version: "2.31.2"
41
+ nix_conf: |
42
+ substituters = https://cache.nixos.org https://nix-cache.fossi-foundation.org
43
+ extra-trusted-public-keys = nix-cache.fossi-foundation.org:3+K59iFwXqKsL7BNu6Guy0v+uTlwsxYQxjspXzqLYQs=
44
+
45
+ # - name: Enable magic Nix cache
46
+ # uses: DeterminateSystems/magic-nix-cache-action@v8
47
+
48
+ - name: Print Nix version
49
+ run: nix --version
50
+
51
+ - name: Build default package (smoke)
52
+ run: nix build
53
+
54
+ - name: DevShell smoke test
55
+ run: |
56
+ nix develop --command bash -c "which FABulous"
57
+ nix develop --command bash -c "FABulous --version"
58
+ nix develop --command bash -c "which openroad"
59
+ nix develop --command bash -c "openroad -version"
@@ -0,0 +1,20 @@
1
+ name: Run pre-commit hooks
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ pre-commit:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v5
10
+ - name: Install uv
11
+ uses: astral-sh/setup-uv@v6
12
+ - name: Install the project
13
+ run: |
14
+ echo "UV_SYSTEM_PYTHON=1" >> $GITHUB_ENV
15
+ uv sync --locked --all-extras --dev
16
+
17
+ - name: run pre-commit
18
+ run: |
19
+ uv run pre-commit install
20
+ SKIP=no-commit-to-branch uv run pre-commit run --show-diff-on-failure --color=always --all-files
@@ -0,0 +1,62 @@
1
+ name: Publish FABulous to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build distribution
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v5
14
+ with:
15
+ fetch-depth: 0
16
+ persist-credentials: false
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v7.1.2
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v6
21
+ with:
22
+ python-version: "3.12"
23
+ - name: Build a binary wheel and a source tarball
24
+ run: uv build
25
+ - name: Store the distribution packages
26
+ uses: actions/upload-artifact@v4
27
+ with:
28
+ name: python-package-distributions
29
+ path: dist/
30
+
31
+ publish-to-pypi:
32
+ name: Publish to PyPI (${{ github.event.release.prerelease && 'Pre-release' || 'Stable' }})
33
+ needs:
34
+ - build
35
+ runs-on: ubuntu-latest
36
+
37
+ environment:
38
+ name: pypi
39
+ url: https://pypi.org/p/FABulous-FPGA
40
+
41
+ permissions:
42
+ id-token: write # IMPORTANT: mandatory for trusted publishing
43
+
44
+ steps:
45
+ - name: Download all the dists
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ name: python-package-distributions
49
+ path: dist/
50
+
51
+ - name: Check release type
52
+ run: |
53
+ if [ "${{ github.event.release.prerelease }}" = "true" ]; then
54
+ echo "📦 Publishing PRE-RELEASE to PyPI"
55
+ echo "Users will need to use: pip install FABulous-FPGA --pre"
56
+ else
57
+ echo "🚀 Publishing STABLE RELEASE to PyPI"
58
+ echo "Users can install with: pip install FABulous-FPGA"
59
+ fi
60
+
61
+ - name: Publish distribution to PyPI
62
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,261 @@
1
+ name: Testing with pytest and cocotb
2
+
3
+ on:
4
+ push:
5
+ paths:
6
+ - 'FABulous/**'
7
+ - 'tests/**'
8
+ - 'pyproject.toml'
9
+ - '.github/workflows/pytest_testing.yml'
10
+ - '.github/actions/**'
11
+ pull_request:
12
+ paths:
13
+ - 'FABulous/**'
14
+ - 'tests/**'
15
+ - 'pyproject.toml'
16
+ - '.github/workflows/pytest_testing.yml'
17
+ - '.github/actions/**'
18
+
19
+ # copy and modified based on https://github.com/jerry-git/pytest-split/issues/20#issuecomment-2576031836
20
+
21
+ jobs:
22
+ restore_test_durations:
23
+ name: Restore test durations
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ # It's mandatory to use the exact same path when saving/restoring cache, otherwise it won't work
27
+ - name: Restore test durations
28
+ id: restore-test-durations
29
+ uses: actions/cache/restore@v4
30
+ with:
31
+ path: /tmp/.test_durations_cached
32
+ key: tests-durations-${{ github.sha }}
33
+ restore-keys: |
34
+ tests-durations-${{ github.sha }}
35
+ tests-durations-
36
+ fail-on-cache-miss: false
37
+
38
+ # Then we upload the restored test durations as an artifact. This way, each matrix job will download
39
+ # it when it starts. When a matrix job will be manually retried, it will also reuse the artifact (to
40
+ # retry the exact same tests, even if the cache has been updated in the meantime).
41
+ - name: Upload test durations
42
+ if: steps.restore-test-durations.outputs.cache-hit != ''
43
+ uses: actions/upload-artifact@v4
44
+ with:
45
+ name: test-durations-before
46
+ path: /tmp/.test_durations_cached
47
+ include-hidden-files: true
48
+ outputs:
49
+ # This output will be used to know if we had a cache hit (exact match or not), or no cache hit at all.
50
+ # > cache-hit - A string value to indicate an exact match was found for the key.
51
+ # > If there's a cache hit, this will be 'true' or 'false' to indicate if there's an exact match for key.
52
+ # > If there's a cache miss, this will be an empty string.
53
+ restored: ${{ steps.restore-test-durations.outputs.cache-hit == '' && 'false' || 'true' }}
54
+
55
+ pytest_testing:
56
+ needs: restore_test_durations
57
+ runs-on: ubuntu-latest
58
+ env:
59
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60
+ strategy:
61
+ fail-fast: false
62
+ matrix:
63
+ job-index: [ 1, 2, 3, 4, 5, 6, 7, 8 ]
64
+ steps:
65
+ # These two steps will be executed only when there IS a cache hit (exact match or not).
66
+ # When a matrix job is retried, it will reuse the same artifact, to execute the exact same split.
67
+ - uses: actions/checkout@v5
68
+ with:
69
+ token: ${{ secrets.GITHUB_TOKEN }}
70
+ - name: Download test durations
71
+ if: needs.restore_test_durations.outputs.restored == 'true'
72
+ uses: actions/download-artifact@v4
73
+ with:
74
+ name: test-durations-before
75
+ - name: Use cached test durations
76
+ if: needs.restore_test_durations.outputs.restored == 'true'
77
+ run: mv .test_durations_cached .test_durations
78
+
79
+ # This step will be executed only when there is NO cache hit.
80
+ # You need to commit file `.test_durations_fallback`.
81
+ # You can also refresh it manually from time to time to keep an up-to-date fallback
82
+ # (see step "Upload final test durations" below).
83
+ - name: Use fallback test durations
84
+ if: needs.restore_test_durations.outputs.restored == 'false'
85
+ run: |
86
+ if [ -f .test_durations_fallback ]; then
87
+ mv .test_durations_fallback .test_durations
88
+ else
89
+ echo ".test_durations_fallback does not exist! Run with default even splits."
90
+ fi
91
+
92
+ - uses: ./.github/actions/prepare_FABulous_container
93
+ with:
94
+ additional_system_packages: "iverilog"
95
+
96
+ # When running pytest, we write the new test durations using options
97
+ # `--store-durations --clean-durations`.
98
+ # Option `--clean-durations` is undocumented
99
+ # Removes the test duration info for tests which are not present
100
+ # while running the suite with '--store-durations'.
101
+ - name: Run pytest
102
+ env:
103
+ COVERAGE_FILE: .coverage.${{ matrix.job-index }}
104
+ run: |
105
+ echo "Running at PATH=$PATH"
106
+ which ghdl
107
+ which iverilog
108
+ # Ensure no stale coverage data from previous attempts (no coverage module needed)
109
+ rm -f .coverage* || true
110
+ uv run pytest \
111
+ --splits ${{ strategy.job-total }} --group ${{ matrix.job-index }} \
112
+ --store-durations --clean-durations -v -x --runslow \
113
+ --cov=FABulous --cov-branch --cov-config=pyproject.toml --cov-report= \
114
+ || {
115
+ exit_code=$?
116
+ if [ $exit_code -eq 5 ]; then
117
+ echo "No tests were collected (exit code 5). This is expected for some groups."
118
+ exit 0
119
+ else
120
+ echo "pytest failed with exit code $exit_code"
121
+ exit $exit_code
122
+ fi
123
+ }
124
+
125
+ - name: Show coverage data files
126
+ if: github.run_attempt == 1
127
+ run: |
128
+ echo "Listing coverage data files in $PWD"
129
+ ls -la .coverage* || true
130
+
131
+ # Each matrix job uploads its freshly updated partial test durations. We regroup them all
132
+ # within one final file in the "Merge all partial test durations" step below.
133
+ - name: Upload test durations
134
+ if: github.run_attempt == 1
135
+ uses: actions/upload-artifact@v4
136
+ with:
137
+ name: test-durations-after-partial-${{ matrix.job-index }}
138
+ path: .test_durations
139
+ if-no-files-found: error
140
+ include-hidden-files: true
141
+
142
+ - name: Upload coverage data
143
+ uses: actions/upload-artifact@v4
144
+ with:
145
+ name: coverage-after-partial-attempt-${{ github.run_attempt }}-${{ matrix.job-index }}
146
+ path: .coverage*
147
+ if-no-files-found: warn
148
+ include-hidden-files: true
149
+
150
+ cache_test_durations:
151
+ name: Cache test durations
152
+ needs: pytest_testing
153
+ if: github.run_attempt == 1 && (success() || failure())
154
+ runs-on: ubuntu-latest
155
+ steps:
156
+ - name: Download all partial test durations
157
+ uses: actions/download-artifact@v4
158
+ with:
159
+ pattern: test-durations-after-partial-*
160
+
161
+ # This step regroups the 8 partial files and sorts keys alphabetically:
162
+ - name: Merge all partial test durations
163
+ run: |
164
+ jq -s 'add' test-durations-after-partial-*/.test_durations \
165
+ | jq 'to_entries | sort_by(.key) | from_entries' \
166
+ > /tmp/.test_durations_cached
167
+
168
+ # This step uploads the final file as an artifact. You can then download it from the Github GUI,
169
+ # and use it to manually commit file `.test_durations_fallback` from time to time,
170
+ # to keep an up-to-date fallback:
171
+ - name: Upload final test durations
172
+ uses: actions/upload-artifact@v4
173
+ with:
174
+ name: test-durations-after
175
+ path: /tmp/.test_durations_cached
176
+ if-no-files-found: error
177
+ include-hidden-files: true
178
+
179
+ # Finally, we cache the new test durations. This file will be restored in next CI execution
180
+ - name: Cache final test durations
181
+ uses: actions/cache/save@v4
182
+ with:
183
+ path: /tmp/.test_durations_cached
184
+ key: tests-durations-${{ github.sha }}
185
+
186
+ coverage_check:
187
+ name: Combine, publish, and check coverage
188
+ needs: pytest_testing
189
+ runs-on: ubuntu-latest
190
+ permissions:
191
+ id-token: write
192
+ contents: read
193
+ pull-requests: write
194
+ issues: write
195
+ env:
196
+ COVERAGE_FAIL_UNDER: '70'
197
+ steps:
198
+ - uses: actions/checkout@v5
199
+ - name: Download all partial coverage artifacts
200
+ uses: actions/download-artifact@v4
201
+ with:
202
+ pattern: coverage-after-partial-*
203
+ merge-multiple: false
204
+
205
+ - name: Set up Python for coverage
206
+ uses: actions/setup-python@v5
207
+ with:
208
+ python-version: '3.12'
209
+
210
+ - name: Install coverage tool
211
+ run: |
212
+ python -m pip install --upgrade pip
213
+ pip install coverage
214
+
215
+ - name: Combine coverage and generate reports
216
+ env:
217
+ COVERAGE_FILE: .coverage
218
+ shell: bash
219
+ run: |
220
+ echo "Found coverage artifacts:"
221
+ set -e
222
+ files=$(find . -type f -regextype posix-extended -regex "./coverage-after-partial-.*/\.coverage(\..+)?" -print | sort || true)
223
+ echo "$files"
224
+ if [ -z "$files" ]; then
225
+ echo "No coverage files found. Skipping report generation."
226
+ exit 0
227
+ fi
228
+ echo "Combining the following coverage data files:"
229
+ printf '%s\n' $files
230
+ coverage combine $files
231
+ coverage xml -o coverage.xml
232
+ coverage html -d coverage_html
233
+ coverage report --skip-covered --format=markdown > code-coverage-results.md || true
234
+
235
+ - name: Upload combined coverage XML
236
+ uses: actions/upload-artifact@v4
237
+ with:
238
+ name: coverage-xml
239
+ path: coverage.xml
240
+ if-no-files-found: error
241
+
242
+ - name: Upload combined coverage HTML
243
+ uses: actions/upload-artifact@v4
244
+ with:
245
+ name: coverage-html
246
+ path: coverage_html
247
+ if-no-files-found: error
248
+
249
+ - name: Add coverage summary to job summary
250
+ if: ${{ hashFiles('code-coverage-results.md') != '' }}
251
+ shell: bash
252
+ run: |
253
+ echo "Coverage Summary" >> "$GITHUB_STEP_SUMMARY"
254
+ cat code-coverage-results.md >> "$GITHUB_STEP_SUMMARY"
255
+ - name: Enforce coverage threshold
256
+ if: ${{ hashFiles('coverage.xml') != '' }}
257
+ shell: bash
258
+ run: |
259
+ echo "Enforcing coverage threshold: ${COVERAGE_FAIL_UNDER}%"
260
+ coverage report --fail-under=${COVERAGE_FAIL_UNDER}
261
+
@@ -0,0 +1,42 @@
1
+ on:
2
+ push:
3
+ branches:
4
+ - main
5
+
6
+ permissions:
7
+ contents: write
8
+ pull-requests: write
9
+
10
+ name: release-please
11
+
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/create-github-app-token@v2
18
+ id: app-token
19
+ with:
20
+ app-id: ${{ vars.RP_APP_ID }}
21
+ private-key: ${{ secrets.RP_APP_PK }}
22
+ owner: ${{ github.repository_owner }}
23
+ repositories: ${{ github.event.repository.name }}
24
+ - uses: googleapis/release-please-action@v4
25
+ id: release
26
+ with:
27
+ token: ${{ steps.app-token.outputs.token }}
28
+ release-type: python
29
+
30
+ - name: tag major and minor versions
31
+ if: ${{ steps.release.outputs.release_created }}
32
+ run: |
33
+ git config user.name github-actions[bot]
34
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
35
+ git tag -d v${{ steps.release.outputs.major }} || true
36
+ git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
37
+ git push origin :v${{ steps.release.outputs.major }} || true
38
+ git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
39
+ git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
40
+ git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
41
+ git push origin v${{ steps.release.outputs.major }}
42
+ git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
@@ -0,0 +1,14 @@
1
+ demo*
2
+ **/__pycache__
3
+ *.egg-info/
4
+ .venv
5
+ venv
6
+ .env
7
+ .vscode
8
+ oss-cad-suite
9
+
10
+ # Documentation build artifacts (auto-generated in CI)
11
+ docs/build/
12
+ docs/source/references/*.rst
13
+ !docs/source/references/index.rst
14
+ docs/source/generated_doc/