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.
- fabulous_fpga-2/.cursorrules +56 -0
- fabulous_fpga-2/.devcontainer/Dockerfile +76 -0
- fabulous_fpga-2/.devcontainer/codespace/devcontainer.json +57 -0
- fabulous_fpga-2/.devcontainer/devshell.sh.tpl +8 -0
- fabulous_fpga-2/.devcontainer/display-switch.sh +35 -0
- fabulous_fpga-2/.devcontainer/local/devcontainer.json +47 -0
- fabulous_fpga-2/.gitattributes +2 -0
- fabulous_fpga-2/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- fabulous_fpga-2/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
- fabulous_fpga-2/.github/PULL_REQUEST_TEMPLATE.md +18 -0
- fabulous_fpga-2/.github/actions/create_failure_issue/action.yaml +54 -0
- fabulous_fpga-2/.github/actions/prepare_FABulous_container/action.yaml +126 -0
- fabulous_fpga-2/.github/actions/prepare_nix_environment/action.yaml +52 -0
- fabulous_fpga-2/.github/copilot-instructions.md +56 -0
- fabulous_fpga-2/.github/dependabot.yml +101 -0
- fabulous_fpga-2/.github/workflows/all-clean.yml +23 -0
- fabulous_fpga-2/.github/workflows/backwards-compatibility.yml +67 -0
- fabulous_fpga-2/.github/workflows/dependabot-auto-merge.yml +36 -0
- fabulous_fpga-2/.github/workflows/docker-image.yml +86 -0
- fabulous_fpga-2/.github/workflows/gds-flow-ci.yml +335 -0
- fabulous_fpga-2/.github/workflows/nix-env.yml +44 -0
- fabulous_fpga-2/.github/workflows/pre-commit-hooks.yml +20 -0
- fabulous_fpga-2/.github/workflows/publish_to_pypi.yml +62 -0
- fabulous_fpga-2/.github/workflows/pytest_testing.yml +275 -0
- fabulous_fpga-2/.github/workflows/release_please.yml +72 -0
- fabulous_fpga-2/.gitignore +22 -0
- fabulous_fpga-2/.pre-commit-config.yaml +90 -0
- fabulous_fpga-2/.readthedocs.yaml +28 -0
- fabulous_fpga-2/.svlint.toml +10 -0
- fabulous_fpga-2/.test_durations_fallback +1209 -0
- fabulous_fpga-2/.vsg.yaml +8 -0
- fabulous_fpga-2/AGENTS.md +56 -0
- fabulous_fpga-2/AUTHORS.md +21 -0
- fabulous_fpga-2/CHANGELOG.md +52 -0
- fabulous_fpga-2/CLAUDE.md +56 -0
- fabulous_fpga-2/CONTRIBUTING.md +34 -0
- fabulous_fpga-2/FABulous_FPGA.egg-info/PKG-INFO +226 -0
- fabulous_fpga-2/FABulous_FPGA.egg-info/SOURCES.txt +466 -0
- fabulous_fpga-2/FABulous_FPGA.egg-info/dependency_links.txt +1 -0
- fabulous_fpga-2/FABulous_FPGA.egg-info/entry_points.txt +3 -0
- fabulous_fpga-2/FABulous_FPGA.egg-info/requires.txt +26 -0
- fabulous_fpga-2/FABulous_FPGA.egg-info/top_level.txt +3 -0
- fabulous_fpga-2/LICENSE +201 -0
- fabulous_fpga-2/PKG-INFO +226 -0
- fabulous_fpga-2/README.md +183 -0
- fabulous_fpga-2/Taskfile.yml +71 -0
- fabulous_fpga-2/build_hooks.py +58 -0
- fabulous_fpga-2/docs/.gitignore +3 -0
- fabulous_fpga-2/docs/Makefile +76 -0
- fabulous_fpga-2/docs/environment.yml +10 -0
- fabulous_fpga-2/docs/make.bat +35 -0
- fabulous_fpga-2/docs/pyproject.toml +38 -0
- fabulous_fpga-2/docs/readme.md +134 -0
- fabulous_fpga-2/docs/requirements.txt +5 -0
- fabulous_fpga-2/docs/source/FAB_logo.png +0 -0
- fabulous_fpga-2/docs/source/_ext/docstring_renderer.py +323 -0
- fabulous_fpga-2/docs/source/_ext/generate_cli_docs.py +483 -0
- fabulous_fpga-2/docs/source/_ext/generate_configvar_docs.py +407 -0
- fabulous_fpga-2/docs/source/_ext/generate_gds_variable_docs.py +321 -0
- fabulous_fpga-2/docs/source/_static/custom.css +196 -0
- fabulous_fpga-2/docs/source/_static/toc_sidebar.js +102 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/index.rst +22 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/python/class.rst +57 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/python/data.rst +47 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/python/function.rst +23 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/python/method.rst +23 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/python/module.rst +156 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/python/package.rst +1 -0
- fabulous_fpga-2/docs/source/_templates/autoapi/python/property.rst +23 -0
- fabulous_fpga-2/docs/source/_templates/base.html +6 -0
- fabulous_fpga-2/docs/source/_templates/cli_commands.md.jinja +26 -0
- fabulous_fpga-2/docs/source/_templates/flow_variable.md.jinja +29 -0
- fabulous_fpga-2/docs/source/_templates/gds_variable.md.jinja +18 -0
- fabulous_fpga-2/docs/source/_templates/sidebar/brand.html +18 -0
- fabulous_fpga-2/docs/source/conf.py +406 -0
- fabulous_fpga-2/docs/source/conf_helper.py +53 -0
- fabulous_fpga-2/docs/source/developer_guide/development.md +375 -0
- fabulous_fpga-2/docs/source/figs/FAB_logo.png +0 -0
- fabulous_fpga-2/docs/source/figs/FAB_logo.svg +273 -0
- fabulous_fpga-2/docs/source/figs/FABulous_help.jpg +0 -0
- fabulous_fpga-2/docs/source/figs/FABulouslogo_wide_2.png +0 -0
- fabulous_fpga-2/docs/source/figs/FABulouslogo_wide_2.svg +271 -0
- fabulous_fpga-2/docs/source/figs/FORTE_tapeouts.svg +14810 -0
- fabulous_fpga-2/docs/source/figs/Ibex_eFPGA.pdf +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/step1.png +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/step2.png +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-1.png +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-2.png +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-3.png +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-4.png +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-5.png +0 -0
- fabulous_fpga-2/docs/source/figs/dev-container/vnc-step-6.png +0 -0
- fabulous_fpga-2/docs/source/figs/eFPGA_chip.png +0 -0
- fabulous_fpga-2/docs/source/figs/fabulous_ecosystem.png +0 -0
- fabulous_fpga-2/docs/source/figs/workflows.svg +653 -0
- fabulous_fpga-2/docs/source/gallery/index.md +37 -0
- fabulous_fpga-2/docs/source/getting_started/codespaces.md +146 -0
- fabulous_fpga-2/docs/source/getting_started/index.md +10 -0
- fabulous_fpga-2/docs/source/getting_started/installation/cad-tool.md +41 -0
- fabulous_fpga-2/docs/source/getting_started/installation/docker.md +144 -0
- fabulous_fpga-2/docs/source/getting_started/installation/index.md +24 -0
- fabulous_fpga-2/docs/source/getting_started/installation/nix-env.md +94 -0
- fabulous_fpga-2/docs/source/getting_started/installation/uv.md +51 -0
- fabulous_fpga-2/docs/source/getting_started/installation/venv.md +50 -0
- fabulous_fpga-2/docs/source/getting_started/quickstart.md +88 -0
- fabulous_fpga-2/docs/source/index.md +54 -0
- fabulous_fpga-2/docs/source/misc/contact.md +3 -0
- fabulous_fpga-2/docs/source/misc/publications.bib +61 -0
- fabulous_fpga-2/docs/source/misc/publications.md +6 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/_static/clock_leader.svg +65 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/_static/pin_layout_order.svg +59 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/building_fabric.md +138 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/fabric_automation.md +1356 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/fabric_definition.md +1384 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/fabric_gds.md +346 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/FABulous_flow2.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/Fabric_spreadsheet.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/Ibex_eFPGA.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/SuperTILE_examples.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/SuperTILE_functionality.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/abstract_tile_view.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/adjacency.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/bitstream_mask_mapping.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/east_terminate.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/mid_wires.jpg +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/tile_CLB_example.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/wire_nesting_indexing.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/wire_tile_grid.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/figs/wires_model.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/index.md +13 -0
- fabulous_fpga-2/docs/source/user_guide/building_doc/timing_characterization.md +236 -0
- fabulous_fpga-2/docs/source/user_guide/cli_doc/cli_feature.md +222 -0
- fabulous_fpga-2/docs/source/user_guide/cli_doc/fabulous_variable.md +52 -0
- fabulous_fpga-2/docs/source/user_guide/cli_doc/index.md +11 -0
- fabulous_fpga-2/docs/source/user_guide/index.md +13 -0
- fabulous_fpga-2/docs/source/user_guide/simulation/emulation.md +37 -0
- fabulous_fpga-2/docs/source/user_guide/simulation/figs/bitbang1.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/simulation/figs/bitbang2.png +0 -0
- fabulous_fpga-2/docs/source/user_guide/simulation/gate_level_simulation.md +117 -0
- fabulous_fpga-2/docs/source/user_guide/simulation/index.md +29 -0
- fabulous_fpga-2/docs/source/user_guide/simulation/simulation.md +227 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/bitstream/bitstream_generation.md +49 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/index.md +10 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/pnr/index.md +8 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/pnr/nextpnr.md +62 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/pnr/nextpnr_compilation.md +143 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/synthesis/index.md +8 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/synthesis/yosys.md +38 -0
- fabulous_fpga-2/docs/source/user_guide/using_doc/synthesis/yosys_compilation.md +62 -0
- fabulous_fpga-2/docs/uv.lock +2963 -0
- fabulous_fpga-2/fabulous/__init__.py +5 -0
- fabulous_fpga-2/fabulous/custom_exception.py +66 -0
- fabulous_fpga-2/fabulous/fabric_cad/README.md +152 -0
- fabulous_fpga-2/fabulous/fabric_cad/__init__.py +5 -0
- fabulous_fpga-2/fabulous/fabric_cad/gen_bitstream_spec.py +286 -0
- fabulous_fpga-2/fabulous/fabric_cad/gen_design_top_wrapper.py +246 -0
- fabulous_fpga-2/fabulous/fabric_cad/gen_npnr_model.py +253 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/FABulous_timing_model.py +1037 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/FABulous_timing_model_interface.py +104 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/__init__.py +8 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/__init__.py +7 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/hdlnx_timing_model.py +89 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/__init__.py +6 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/sdf_to_graph.py +362 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/sdf_to_graph_base.py +200 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/sdfnx/timing_graph.py +329 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/hdlnx/verilog_gate_level.py +1046 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/models.py +427 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/__init__.py +6 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/specification.py +248 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/sta_tools/__init__.py +6 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/sta_tools/opensta.py +359 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/synth_tools/__init__.py +4 -0
- fabulous_fpga-2/fabulous/fabric_cad/timing_model/tools/synth_tools/yosys.py +467 -0
- fabulous_fpga-2/fabulous/fabric_definition/__init__.py +17 -0
- fabulous_fpga-2/fabulous/fabric_definition/bel.py +167 -0
- fabulous_fpga-2/fabulous/fabric_definition/cell_spec.py +230 -0
- fabulous_fpga-2/fabulous/fabric_definition/configmem.py +35 -0
- fabulous_fpga-2/fabulous/fabric_definition/define.py +163 -0
- fabulous_fpga-2/fabulous/fabric_definition/fabric.py +726 -0
- fabulous_fpga-2/fabulous/fabric_definition/gen_io.py +64 -0
- fabulous_fpga-2/fabulous/fabric_definition/port.py +292 -0
- fabulous_fpga-2/fabulous/fabric_definition/supertile.py +311 -0
- fabulous_fpga-2/fabulous/fabric_definition/switch_matrix.py +71 -0
- fabulous_fpga-2/fabulous/fabric_definition/tile.py +428 -0
- fabulous_fpga-2/fabulous/fabric_definition/wire.py +107 -0
- fabulous_fpga-2/fabulous/fabric_definition/yosys_obj.py +521 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Fabric/gds_config.yaml +61 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Fabric/std_cell_library.yaml +96 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/.gitignore +17 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/build_fabulous_fabric.tcl +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/compile.Taskfile.yml +62 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Test/makehex.py +28 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP.csv +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_bot/DSP_bot.csv +8 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_bot/DSP_bot_switch_matrix.list +230 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_top/DSP_top.csv +7 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/DSP_top/DSP_top_switch_matrix.list +215 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/DSP/gds_config.yaml +6 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB.csv +17 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB_ConfigMem.csv +21 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/LUT4AB_switch_matrix.list +301 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/LUT4AB/gds_config.yaml +6 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/N_term_DSP.csv +14 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/N_term_DSP_switch_matrix.list +15 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_DSP/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/N_term_RAM_IO.csv +12 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/N_term_RAM_IO_switch_matrix.list +16 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_RAM_IO/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/N_term_single.csv +15 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/N_term_single_switch_matrix.list +15 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/N_term_single2.csv +14 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/N_term_single2_switch_matrix.list +15 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/N_term_single2/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/RAM_IO.csv +45 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/RAM_IO_switch_matrix.list +230 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RAM_IO/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RegFile/RegFile.csv +6 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RegFile/RegFile_switch_matrix.list +222 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/RegFile/gds_config.yaml +6 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/S_term_DSP.csv +14 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/S_term_DSP_switch_matrix.list +15 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_DSP/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/S_term_RAM_IO.csv +12 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/S_term_RAM_IO_switch_matrix.list +16 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_RAM_IO/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/S_term_single.csv +16 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/S_term_single_switch_matrix.list +17 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/S_term_single2.csv +14 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/S_term_single2_switch_matrix.list +15 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/S_term_single2/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/W_IO/W_IO.csv +22 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/W_IO/W_IO_switch_matrix.list +69 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/W_IO/gds_config.yaml +4 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/Base.csv +43 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/Base.list +75 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/gds_config.yaml +61 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/Tile/include/gf180mcuD_latchmap.v +7 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/fabric.csv +47 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_common/user_design/top_wrapper.v +159 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/FABulous.tcl +7 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/BlockRAM_1KB.v +216 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/ConfigFSM.v +106 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/Frame_Data_Reg.v +19 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/Frame_Select.v +21 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/bitbang.v +84 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/config_UART.v +633 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/eFPGA_Config.v +99 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Fabric/models_pack.v +204 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/Makefile +83 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/README.md +28 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/Taskfile.yml +232 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/gen_gl_xinit.py +303 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Test/sequential_16bit_en_tb.v +126 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/DSP/DSP_bot/MULADD.v +86 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/LUT4AB/LUT4c_frame_config_dffesr.v +123 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/LUT4AB/MUX8LUT_frame_config_mux.v +156 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/Config_access.v +21 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/InPass4_frame_config_mux.v +75 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RAM_IO/OutPass4_frame_config_mux.v +79 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/RegFile/RegFile_32x4.v +77 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/W_IO/Config_access.v +23 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/Tile/W_IO/IO_1_bidirectional_frame_config_pass.v +50 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_verilog/user_design/sequential_16bit_en.v +22 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/FABulous.tcl +2 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/BlockRAM_1KB.vhdl +262 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/ConfigFSM.vhdl +160 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/Frame_Data_Reg.vhdl +52 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/Frame_Select.vhdl +52 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/bitbang.vhdl +124 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/config_UART.vhdl +716 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/eFPGA_Config.vhdl +166 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Fabric/models_pack.vhdl +456 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/Makefile +155 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/README.md +33 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/Taskfile.yml +195 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Test/sequential_16bit_en_tb.vhdl +270 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/DSP/DSP_bot/MULADD.vhdl +106 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/LUT4AB/LUT4c_frame_config_dffesr.vhdl +228 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/LUT4AB/MUX8LUT_frame_config_mux.vhdl +202 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/Config_access.vhdl +50 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/InPass4_frame_config_mux.vhdl +115 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RAM_IO/OutPass4_frame_config_mux.vhdl +113 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/RegFile/RegFile_32x4.vhdl +90 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/W_IO/Config_access.vhdl +50 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/Tile/W_IO/IO_1_bidirectional_frame_config_pass.vhdl +83 -0
- fabulous_fpga-2/fabulous/fabric_files/FABulous_project_template_vhdl/user_design/sequential_16bit_en.vhdl +45 -0
- fabulous_fpga-2/fabulous/fabric_files/__init__.py +1 -0
- fabulous_fpga-2/fabulous/fabric_files/dummy_files/DUMMY_switch_matrix.list +310 -0
- fabulous_fpga-2/fabulous/fabric_generator/.gitignore +13 -0
- fabulous_fpga-2/fabulous/fabric_generator/__init__.py +17 -0
- fabulous_fpga-2/fabulous/fabric_generator/code_generator/__init__.py +6 -0
- fabulous_fpga-2/fabulous/fabric_generator/code_generator/code_generator.py +853 -0
- fabulous_fpga-2/fabulous/fabric_generator/code_generator/code_generator_VHDL.py +745 -0
- fabulous_fpga-2/fabulous/fabric_generator/code_generator/code_generator_Verilog.py +546 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/__init__.py +1 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/__init__.py +5 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/fabric_macro_flow.py +729 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/fabric_optimisation_flow.py +616 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/flow_define.py +188 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/flows/tile_macro_flow.py +286 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/gen_io_pin_config_yaml.py +298 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/helper.py +167 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/__init__.py +1 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/add_buffers.tcl +57 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/extract_site_info.tcl +20 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/fabric_io_place.py +205 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/odb_power.py +130 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/odb_protocol.py +46 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/pdn.tcl +55 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/pdn_config.tcl +138 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/tile_io_place.py +1179 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/script/vhdl_json_header.py +73 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/__init__.py +5 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/add_buffer.py +76 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/auto_diode.py +148 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/condition_magic_drc.py +24 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/custom_pdn.py +46 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/diodes_on_ports.py +34 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/extract_pdk_info.py +58 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/fabric_IO_placement.py +72 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/fabric_area_opt.py +846 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/magic_streamout.py +38 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/odb_connect_pdn.py +44 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/round_die_area.py +56 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/tile_IO_placement.py +97 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/tile_area_opt.py +673 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/timed_detailed_routing.py +109 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/vhdl_json_header.py +45 -0
- fabulous_fpga-2/fabulous/fabric_generator/gds_generator/steps/while_step.py +171 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/__init__.py +14 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/fabric_automation.py +879 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_configmem.py +532 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_fabric.py +602 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_helper.py +200 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_switchmatrix.py +591 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_tile.py +1137 -0
- fabulous_fpga-2/fabulous/fabric_generator/gen_fabric/gen_top_wrapper.py +368 -0
- fabulous_fpga-2/fabulous/fabric_generator/parser/__init__.py +1 -0
- fabulous_fpga-2/fabulous/fabric_generator/parser/parse_configmem.py +178 -0
- fabulous_fpga-2/fabulous/fabric_generator/parser/parse_csv.py +887 -0
- fabulous_fpga-2/fabulous/fabric_generator/parser/parse_hdl.py +336 -0
- fabulous_fpga-2/fabulous/fabric_generator/parser/parse_switchmatrix.py +216 -0
- fabulous_fpga-2/fabulous/fabulous.py +992 -0
- fabulous_fpga-2/fabulous/fabulous_api.py +916 -0
- fabulous_fpga-2/fabulous/fabulous_cli/__init__.py +5 -0
- fabulous_fpga-2/fabulous/fabulous_cli/cmd_compile_design.py +235 -0
- fabulous_fpga-2/fabulous/fabulous_cli/cmd_run_simulation.py +343 -0
- fabulous_fpga-2/fabulous/fabulous_cli/fabulous_cli.py +1846 -0
- fabulous_fpga-2/fabulous/fabulous_cli/helper.py +1000 -0
- fabulous_fpga-2/fabulous/fabulous_settings.py +692 -0
- fabulous_fpga-2/fabulous/geometry_generator/__init__.py +22 -0
- fabulous_fpga-2/fabulous/geometry_generator/bel_geometry.py +223 -0
- fabulous_fpga-2/fabulous/geometry_generator/fabric_geometry.py +420 -0
- fabulous_fpga-2/fabulous/geometry_generator/geometry_gen.py +71 -0
- fabulous_fpga-2/fabulous/geometry_generator/geometry_obj.py +55 -0
- fabulous_fpga-2/fabulous/geometry_generator/port_geometry.py +138 -0
- fabulous_fpga-2/fabulous/geometry_generator/sm_geometry.py +531 -0
- fabulous_fpga-2/fabulous/geometry_generator/tile_geometry.py +696 -0
- fabulous_fpga-2/fabulous/geometry_generator/wire_geometry.py +391 -0
- fabulous_fpga-2/fabulous/processpool.py +43 -0
- fabulous_fpga-2/flake.lock +305 -0
- fabulous_fpga-2/flake.nix +394 -0
- fabulous_fpga-2/nix/default.nix +53 -0
- fabulous_fpga-2/nix/overlay/python.nix +60 -0
- fabulous_fpga-2/nix/tools/fabulator.nix +114 -0
- fabulous_fpga-2/nix/tools/ghdl-bin.nix +69 -0
- fabulous_fpga-2/nix/tools/nextpnr.nix +53 -0
- fabulous_fpga-2/nix/tools/yosys.nix +102 -0
- fabulous_fpga-2/pyproject.toml +182 -0
- fabulous_fpga-2/ruff.toml +159 -0
- fabulous_fpga-2/schema/std_cell_library.schema.json +91 -0
- fabulous_fpga-2/scripts/run_tests.py +266 -0
- fabulous_fpga-2/scripts/svlint_wrapper.py +235 -0
- fabulous_fpga-2/scripts/sync_demo_tile_gds_config.py +80 -0
- fabulous_fpga-2/setup.cfg +4 -0
- fabulous_fpga-2/tests/__init__.py +5 -0
- fabulous_fpga-2/tests/cli_test/conftest.py +100 -0
- fabulous_fpga-2/tests/cli_test/test_arguments.py +1273 -0
- fabulous_fpga-2/tests/cli_test/test_cli.py +626 -0
- fabulous_fpga-2/tests/cli_test/test_compile_design.py +332 -0
- fabulous_fpga-2/tests/cli_test/test_helper.py +402 -0
- fabulous_fpga-2/tests/cli_test/test_run_simulation.py +256 -0
- fabulous_fpga-2/tests/conftest.py +301 -0
- fabulous_fpga-2/tests/fabric_definition/conftest.py +52 -0
- fabulous_fpga-2/tests/fabric_definition/test_cell_spec.py +232 -0
- fabulous_fpga-2/tests/fabric_definition/test_fabric.py +163 -0
- fabulous_fpga-2/tests/fabric_definition/test_sjump_supertile.py +368 -0
- fabulous_fpga-2/tests/fabric_definition/test_supertile.py +203 -0
- fabulous_fpga-2/tests/fabric_definition/test_tile.py +125 -0
- fabulous_fpga-2/tests/fabric_gen_test/__init__.py +1 -0
- fabulous_fpga-2/tests/fabric_gen_test/configmem_test/test_configmem_rtl.py +306 -0
- fabulous_fpga-2/tests/fabric_gen_test/configmem_test/test_gen_configmem.py +476 -0
- fabulous_fpga-2/tests/fabric_gen_test/configmem_test/test_parse_configmem.py +631 -0
- fabulous_fpga-2/tests/fabric_gen_test/conftest.py +668 -0
- fabulous_fpga-2/tests/fabric_gen_test/fabric_test/__init__.py +0 -0
- fabulous_fpga-2/tests/fabric_gen_test/fabric_test/test_gen_fabric.py +116 -0
- fabulous_fpga-2/tests/fabric_gen_test/fabric_test/test_gen_fabric_child_index.py +69 -0
- fabulous_fpga-2/tests/fabric_gen_test/fabric_test/test_gen_supertile.py +425 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/__init__.py +1 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/conftest.py +721 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/test_designs_pattern.py +250 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/test_designs_pattern_gl.py +83 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/test_full_intergration.py +41 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/addition.v +16 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/addition.vhdl +22 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_ones.v +14 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_ones.vhdl +23 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_zeros.v +14 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/all_zeros.vhdl +21 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/constraints.pcf +48 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/counter.v +29 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/counter.vhdl +53 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/multiplication.v +16 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/multiplication.vhdl +22 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/passthrough.v +15 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/passthrough.vhdl +20 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/sys_reset.v +29 -0
- fabulous_fpga-2/tests/fabric_gen_test/integration_test/user_designs/sys_reset.vhdl +50 -0
- fabulous_fpga-2/tests/fabric_gen_test/parser_test/test_parse_csv.py +128 -0
- fabulous_fpga-2/tests/fabric_gen_test/switchmatrix_test/test_gen_switchmatrix.py +273 -0
- fabulous_fpga-2/tests/fabric_gen_test/switchmatrix_test/test_gen_switchmatrix_generic.py +84 -0
- fabulous_fpga-2/tests/fabric_gen_test/switchmatrix_test/test_parse_switchmatrix.py +354 -0
- fabulous_fpga-2/tests/fabric_gen_test/testdata/models.v +24 -0
- fabulous_fpga-2/tests/fabric_gen_test/testdata/models.vhd +45 -0
- fabulous_fpga-2/tests/gds_flow_test/flow_test/conftest.py +262 -0
- fabulous_fpga-2/tests/gds_flow_test/flow_test/test_fabric_macro_flow.py +536 -0
- fabulous_fpga-2/tests/gds_flow_test/flow_test/test_fabric_optimisation_flow.py +498 -0
- fabulous_fpga-2/tests/gds_flow_test/flow_test/test_gen_io_pin_config_yaml.py +767 -0
- fabulous_fpga-2/tests/gds_flow_test/flow_test/test_tile_macro_flow.py +585 -0
- fabulous_fpga-2/tests/gds_flow_test/script_test/conftest.py +757 -0
- fabulous_fpga-2/tests/gds_flow_test/script_test/test_fabric_io_place.py +218 -0
- fabulous_fpga-2/tests/gds_flow_test/script_test/test_odb_power.py +510 -0
- fabulous_fpga-2/tests/gds_flow_test/script_test/test_tile_io_place.py +1509 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/conftest.py +103 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_add_buffer.py +59 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_auto_diode.py +204 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_condition_magic_drc.py +42 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_custom_pdn.py +28 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_extract_pdk_info.py +39 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_fabric_area_opt.py +458 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_io_placement.py +95 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_odb_connect_power.py +122 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_tile_area_opt.py +525 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_timed_detailed_routing.py +70 -0
- fabulous_fpga-2/tests/gds_flow_test/step_test/test_while_step.py +151 -0
- fabulous_fpga-2/tests/gds_flow_test/test_gds_generator_helper.py +332 -0
- fabulous_fpga-2/tests/guide.md +95 -0
- fabulous_fpga-2/tests/reference_test/.gitignore +1 -0
- fabulous_fpga-2/tests/reference_test/README.md +126 -0
- fabulous_fpga-2/tests/reference_test/__init__.py +5 -0
- fabulous_fpga-2/tests/reference_test/conftest.py +109 -0
- fabulous_fpga-2/tests/reference_test/helpers.py +404 -0
- fabulous_fpga-2/tests/reference_test/reference_projects_test.py +237 -0
- fabulous_fpga-2/tests/test_fabulous_main.py +224 -0
- fabulous_fpga-2/tests/timing_model_test/test_FABulous_timing_model.py +1583 -0
- fabulous_fpga-2/tests/timing_model_test/test_sdf_to_graph.py +567 -0
- fabulous_fpga-2/tests/timing_model_test/test_sdf_to_graph_base.py +342 -0
- fabulous_fpga-2/tests/timing_model_test/test_specification.py +211 -0
- fabulous_fpga-2/tests/timing_model_test/test_timing_graph.py +371 -0
- fabulous_fpga-2/tests/timing_model_test/test_verilog_gate_level.py +358 -0
- fabulous_fpga-2/tests/utils_test/conftest.py +19 -0
- fabulous_fpga-2/tests/utils_test/test_fabulous_settings.py +1202 -0
- fabulous_fpga-2/tests/utils_test/test_processpool.py +69 -0
- fabulous_fpga-2/tests/utils_test/test_yosys_obj.py +336 -0
- 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,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.
|