fusesoc 2.2.1__tar.gz → 2.4__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.
- {fusesoc-2.2.1 → fusesoc-2.4}/.github/workflows/ci.yml +11 -4
- {fusesoc-2.2.1 → fusesoc-2.4}/.github/workflows/lint.yml +2 -2
- {fusesoc-2.2.1 → fusesoc-2.4}/.pre-commit-config.yaml +1 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/.readthedocs.yml +8 -1
- {fusesoc-2.2.1 → fusesoc-2.4}/NEWS +38 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/PKG-INFO +17 -9
- {fusesoc-2.2.1 → fusesoc-2.4}/README.md +0 -1
- fusesoc-2.4/doc/requirements.txt +4 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/conf.py +19 -7
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/ref/index.rst +1 -1
- fusesoc-2.4/doc/source/user/build_system/filters.rst +99 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/index.rst +1 -0
- fusesoc-2.4/doc/source/user/knowledgebase.rst +119 -0
- fusesoc-2.4/doc/source/user/optional_deps.png +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/capi2/core.py +11 -5
- fusesoc-2.4/fusesoc/capi2/inheritance.py +39 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/capi2/json_schema.py +17 -10
- fusesoc-2.4/fusesoc/config.py +309 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/coremanager.py +45 -8
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/edalizer.py +46 -15
- fusesoc-2.4/fusesoc/filters/autotype.py +28 -0
- fusesoc-2.4/fusesoc/filters/custom.py +31 -0
- fusesoc-2.4/fusesoc/filters/dot.py +24 -0
- fusesoc-2.4/fusesoc/fusesoc.py +173 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/librarymanager.py +1 -1
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/main.py +158 -227
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/provider/provider.py +6 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/utils.py +17 -10
- fusesoc-2.4/fusesoc/version.py +16 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc.egg-info/PKG-INFO +17 -9
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc.egg-info/SOURCES.txt +15 -5
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc.egg-info/requires.txt +3 -2
- fusesoc-2.4/pyproject.toml +61 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/deptree/generated_child_a.core +7 -0
- fusesoc-2.4/tests/capi2_cores/misc/filters.core +15 -0
- fusesoc-2.4/tests/capi2_cores/misc/syntax_error.core +6 -0
- fusesoc-2.4/tests/capi2_cores/override/1/basic.core +9 -0
- fusesoc-2.4/tests/capi2_cores/override/2/basic.core +9 -0
- fusesoc-2.4/tests/capi2_cores/parser/inheritance.core +59 -0
- fusesoc-2.4/tests/capi2_cores/virtual/top_impl1.core +21 -0
- fusesoc-2.4/tests/capi2_cores/virtual/top_impl2.core +21 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_capi2.py +85 -2
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_config.py +52 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_coremanager.py +41 -11
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_edalizer.py +88 -1
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_ignored_dirs.py +8 -5
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_libraries.py +12 -20
- {fusesoc-2.2.1 → fusesoc-2.4}/tox.ini +7 -10
- fusesoc-2.2.1/doc/requirements.txt +0 -3
- fusesoc-2.2.1/doc/source/user/knowledgebase.rst +0 -28
- fusesoc-2.2.1/fusesoc/__init__.py +0 -8
- fusesoc-2.2.1/fusesoc/capi2/__init__.py +0 -3
- fusesoc-2.2.1/fusesoc/config.py +0 -176
- fusesoc-2.2.1/fusesoc/parser/__init__.py +0 -3
- fusesoc-2.2.1/fusesoc/provider/__init__.py +0 -9
- fusesoc-2.2.1/fusesoc/version.py +0 -5
- fusesoc-2.2.1/setup.py +0 -62
- {fusesoc-2.2.1 → fusesoc-2.4}/.editorconfig +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/.flake8 +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/.git-blame-ignore-revs +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/.gitignore +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/LICENSE +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/dev-requirements.txt +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/_static/theme_overrides.css +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/dev/devsetup.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/dev/index.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/index.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/ref/capi1.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/ref/glossary.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/ref/migrations.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/core_files.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/dependencies.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/eda_flows.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/flags.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/flow_options.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/generators.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/hooks.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/tool_options.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/build_system/vpi.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/cli.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/index.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/installation.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/introduction.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/overview.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/doc/source/user/package_manager/index.rst +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/extras/bash-completion +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/capi2/coredata.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/capi2/coreparser.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/capi2/exprs.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/capi2/generator.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/core.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/parser/coreparser.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/provider/git.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/provider/github.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/provider/local.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/provider/opencores.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/provider/url.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc/vlnv.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc.egg-info/dependency_links.txt +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc.egg-info/entry_points.txt +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/fusesoc.egg-info/top_level.txt +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/setup.cfg +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/deptree/child1.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/deptree/child2.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/deptree/child3.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/deptree/child4.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/deptree/generated_child_a.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/deptree/root.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/files_out_of_hierarchy/bad.sv +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/files_out_of_hierarchy/subdir/files_out_of_hierarchy.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/files_out_of_hierarchy/subdir/good.sv +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/append.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/depends.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/dontpickthisfile +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/dummy.tcl +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/empty.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/f1 +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/f2 +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/f3 +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/f4 +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/files.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/flags.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/flow.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/generate/file_cachetest +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/generate/generate.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/generate/generators.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/generate/testgen.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/hooks.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/parameters.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/scriptfile +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/subdir/dummy.extra +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/targets.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/toplevel.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/typecheck.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/uncachable.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/vhdlfile +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/vlogfile +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/vpi.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/misc/vpifile +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/parser/no_additional_properties.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/parser/with_additional_properties.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/providers/url_simple.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/providers/url_simple_with_user_agent.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/providers/url_tar.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/providers/url_zip.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/virtual/impl1.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/virtual/impl2.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/capi2_cores/virtual/user.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/adv_debug_sys/adv_debug_sys.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/atlys/atlys.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/atlys/data/atlys.ucf +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/atlys/data/dummy_backend_tcl_file.tcl +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/elf-loader/check_libelf.sh +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/elf-loader/elf-loader.c +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/elf-loader/elf-loader.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/elf-loader/vpi_wrapper.c +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/gpio/gpio.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/jtag_tap/jtag_tap-1.13.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/libstorage/libstorage-1.0.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/c3demo.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/c3demo.pcf +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/copytocore/copytocore.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/copytocore/dummy.tcl +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/copytocore/subdir/dummy.extra +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/dummy.tcl +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/dummy.xci +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/filetypes.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/ghdltest.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/gitcore.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/no_exe_script.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/nomain.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/opencorescore.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/paramtest.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/scripts/no_exe_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/scripts/post_build_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/scripts/post_run_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/scripts/pre_build_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/scripts/pre_run_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/scriptscore.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/misc/subdir/dummy.extra +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/mor1kx/mor1kx-3.1.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/mor1kx-arty/mor1kx-arty.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/mor1kx-arty/mor1kx-arty.system +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/mor1kx-generic/mor1kx-generic.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/mor1kx-generic/scripts/post_run_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/mor1kx-generic/scripts/pre_build_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/mor1kx-generic/scripts/pre_run_script +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/sockit/sockit.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/uart16550/uart16550-1.5.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/verilator_tb_utils/verilator_tb_utils.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/verilog-arbiter/verilog-arbiter-r1.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/verilog_utils/verilog_utils.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/verilog_utils/verilog_utils.vh +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/vga_lcd/vga_lcd.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/vlog_tb_utils/files/0001-testpatch.patch +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/vlog_tb_utils/vlog_tb_utils-1.1.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/wb_common/wb_common.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/wb_common/wb_common.v +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/wb_common/wb_common_params.v +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/wb_intercon/dummy_icarus.v +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/cores/wb_intercon/wb_intercon-1.0.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_capi2/generators.info +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_capi2/targets.info +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_common.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_exprs.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_provider/file.tar.gz +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_provider/file.v +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_provider/file.zip +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_provider/vlog_functions.v +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_provider.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/test_vlnv.py +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/blinky/blinky.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/blinky/data/nexys_video.xdc +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/blinky/rtl/blinky.sv +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/blinky/rtl/macros.svh +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/blinky/tb/blinky_tb.sv +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/dualblinky/data/nexys_video.xdc +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/dualblinky/dualblinky.core +0 -0
- {fusesoc-2.2.1 → fusesoc-2.4}/tests/userguide/dualblinky/rtl/dualblinky.sv +0 -0
|
@@ -23,21 +23,28 @@ jobs:
|
|
|
23
23
|
# https://github.com/olofk/fusesoc/issues/528
|
|
24
24
|
#- { icon: 🧊, name: windows-latest }
|
|
25
25
|
pyver:
|
|
26
|
-
- '3.6'
|
|
27
26
|
- '3.7'
|
|
28
27
|
- '3.8'
|
|
29
28
|
- '3.9'
|
|
30
29
|
- '3.10'
|
|
31
|
-
- '3.11
|
|
30
|
+
- '3.11'
|
|
31
|
+
- '3.12'
|
|
32
|
+
exclude:
|
|
33
|
+
#Fails because github can't find an arm64 image for Python 3.7???
|
|
34
|
+
- os: {name: macos-latest}
|
|
35
|
+
pyver: '3.7'
|
|
36
|
+
#Fails because one test expects a different output during an exception
|
|
37
|
+
- os: {name: macos-latest}
|
|
38
|
+
pyver: '3.8'
|
|
32
39
|
runs-on: ${{ matrix.os.name }}
|
|
33
40
|
name: ${{ matrix.os.icon }} ${{ matrix.os.name }} | ${{ matrix.pyver }}
|
|
34
41
|
steps:
|
|
35
42
|
|
|
36
43
|
- name: 🧰 Repository Checkout
|
|
37
|
-
uses: actions/checkout@
|
|
44
|
+
uses: actions/checkout@v4
|
|
38
45
|
|
|
39
46
|
- name: 🐍 Set up Python ${{ matrix.pyver }}
|
|
40
|
-
uses: actions/setup-python@
|
|
47
|
+
uses: actions/setup-python@v5
|
|
41
48
|
with:
|
|
42
49
|
python-version: ${{ matrix.pyver }}
|
|
43
50
|
|
|
@@ -11,8 +11,15 @@ formats: all
|
|
|
11
11
|
|
|
12
12
|
# Optionally set the version of Python and requirements required to build your docs
|
|
13
13
|
python:
|
|
14
|
-
version: 3
|
|
15
14
|
install:
|
|
16
15
|
- requirements: doc/requirements.txt
|
|
17
16
|
- method: pip
|
|
18
17
|
path: .
|
|
18
|
+
|
|
19
|
+
build:
|
|
20
|
+
os: "ubuntu-22.04"
|
|
21
|
+
tools:
|
|
22
|
+
python: "3.11"
|
|
23
|
+
jobs:
|
|
24
|
+
post_checkout:
|
|
25
|
+
- git fetch --unshallow || true
|
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
2.4 2024-10-02 Olof Kindgren <olof.kindgren@gmail.com>
|
|
2
|
+
======================================================
|
|
3
|
+
* Add conflict handling for virtual cores
|
|
4
|
+
* Connect generated cores in EDAM dependency graph
|
|
5
|
+
* Support implicit name in library add command
|
|
6
|
+
* Migrate from setup.py to pyproject.toml
|
|
7
|
+
* Add support for EDAM filter plugins
|
|
8
|
+
|
|
9
|
+
Contributors:
|
|
10
|
+
Alexander Williams <awill@opentitan.org>
|
|
11
|
+
Alfred E Neuman <quinky@gmx.ch>
|
|
12
|
+
Daniel Copley <djcopley@users.noreply.github.com>
|
|
13
|
+
Jelle van der Waa <jelle@vdwaa.nl>
|
|
14
|
+
Olof Kindgren <olof.kindgren@gmail.com>
|
|
15
|
+
Phillipe Jean-Jumeau <pljeanjumeau@gmail.com>
|
|
16
|
+
|
|
17
|
+
2.3 2023-11-17 Olof Kindgren <olof.kindgren@gmail.com>
|
|
18
|
+
======================================================
|
|
19
|
+
* Add CLI to read/write config settings
|
|
20
|
+
* Separate CLI from library to ease integration
|
|
21
|
+
* Add --work-root to directly set output dir
|
|
22
|
+
* Show core filename with "fusesoc core show"
|
|
23
|
+
* Allow matching against only "name" component in VLNV
|
|
24
|
+
* Improve inheritance rules between targets
|
|
25
|
+
* Warn on duplicate cores
|
|
26
|
+
* Support prepend keyword for generators
|
|
27
|
+
* Reenable Windows tests
|
|
28
|
+
* + improved error handling, bug fixes and refactoring
|
|
29
|
+
|
|
30
|
+
Contributors:
|
|
31
|
+
Benjamin Hallenrud <Benjamin.hallenrud@gmail.com>
|
|
32
|
+
Erik Waling <erik.waling@gmail.com>
|
|
33
|
+
Ethan Sifferman <ethan@sifferman.dev>
|
|
34
|
+
Mykyta Haranko <mykyta.haranko@gmail.com>
|
|
35
|
+
Olof Kindgren <olof.kindgren@gmail.com>
|
|
36
|
+
Shareef Jalloq <shareef.jalloq@idexbiometrics.com>
|
|
37
|
+
William D. Jones <thor0505@comcast.net>
|
|
38
|
+
|
|
1
39
|
2.2 2023-04-18 Olof Kindgren <olof.kindgren@gmail.com>
|
|
2
40
|
======================================================
|
|
3
41
|
* Use jsonschema to describe and validate CAPI2 files
|
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fusesoc
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
Version: 2.4
|
|
4
|
+
Summary: Award-winnning package manager and build abstraction tool for HDL code
|
|
5
|
+
Author-email: Olof Kindgren <olof@award-winning.me>
|
|
6
|
+
Maintainer-email: Olof Kindgren <olof@award-winning.me>
|
|
7
|
+
Project-URL: Homepage, https://fusesoc.net
|
|
8
|
+
Project-URL: Documentation, https://fusesoc.readthedocs.io
|
|
9
|
+
Project-URL: Repository, https://github.com/olofk/fusesoc
|
|
10
|
+
Project-URL: Issues, https://github.com/olofk/fusesoc/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/olofk/fusesoc/blob/main/NEWS
|
|
12
|
+
Keywords: VHDL,verilog,hdl,rtl,synthesis,FPGA,simulation,ASIC
|
|
10
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
14
|
Classifier: Topic :: Utilities
|
|
12
15
|
Classifier: Topic :: Software Development :: Build Tools
|
|
13
16
|
Classifier: License :: OSI Approved :: BSD License
|
|
14
|
-
Requires-Python:
|
|
17
|
+
Requires-Python: <4,>=3.6
|
|
15
18
|
Description-Content-Type: text/markdown
|
|
16
19
|
License-File: LICENSE
|
|
20
|
+
Requires-Dist: edalize>=0.4.1
|
|
21
|
+
Requires-Dist: pyparsing>=2.3.1
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Requires-Dist: simplesat>=0.8.0
|
|
24
|
+
Requires-Dist: fastjsonschema
|
|
25
|
+
Requires-Dist: jsonschema2md
|
|
17
26
|
|
|
18
27
|
# FuseSoC
|
|
19
28
|
|
|
20
29
|
[](https://github.com/olofk/fusesoc/actions?query=workflow%3ACI)
|
|
21
30
|
[](https://pypi.org/project/fusesoc/)
|
|
22
|
-
[](https://www.librecores.org/olofk/FuseSoC)
|
|
23
31
|
|
|
24
32
|
## Introduction
|
|
25
33
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/olofk/fusesoc/actions?query=workflow%3ACI)
|
|
4
4
|
[](https://pypi.org/project/fusesoc/)
|
|
5
|
-
[](https://www.librecores.org/olofk/FuseSoC)
|
|
6
5
|
|
|
7
6
|
## Introduction
|
|
8
7
|
|
|
@@ -14,8 +14,11 @@ import sys
|
|
|
14
14
|
from datetime import datetime
|
|
15
15
|
from distutils.version import LooseVersion
|
|
16
16
|
|
|
17
|
+
import jsonschema2md
|
|
18
|
+
|
|
17
19
|
import fusesoc
|
|
18
|
-
from fusesoc.capi2.
|
|
20
|
+
from fusesoc.capi2.json_schema import capi2_schema
|
|
21
|
+
from fusesoc.utils import yaml_read
|
|
19
22
|
|
|
20
23
|
# -- Path setup --------------------------------------------------------------
|
|
21
24
|
|
|
@@ -33,7 +36,12 @@ copyright = f"2018-{datetime.now().year}, Olof Kindgren"
|
|
|
33
36
|
author = "Olof Kindgren"
|
|
34
37
|
|
|
35
38
|
# The full version, including alpha/beta/rc tags.
|
|
36
|
-
|
|
39
|
+
try:
|
|
40
|
+
from fusesoc.version import version as __version__
|
|
41
|
+
except ImportError:
|
|
42
|
+
__version__ = "unknown"
|
|
43
|
+
|
|
44
|
+
release = __version__
|
|
37
45
|
# The short X.Y version.
|
|
38
46
|
v_major, v_minor = LooseVersion(release).version[:2]
|
|
39
47
|
version = f"{v_major}.{v_minor}"
|
|
@@ -56,6 +64,7 @@ extensions = [
|
|
|
56
64
|
"sphinx.ext.intersphinx",
|
|
57
65
|
"sphinx.ext.todo",
|
|
58
66
|
"sphinxcontrib.programoutput",
|
|
67
|
+
"myst_parser",
|
|
59
68
|
]
|
|
60
69
|
|
|
61
70
|
intersphinx_mapping = {"https://docs.python.org/3": None}
|
|
@@ -67,8 +76,7 @@ templates_path = ["_templates"]
|
|
|
67
76
|
# The suffix(es) of source filenames.
|
|
68
77
|
# You can specify multiple suffix as a list of string:
|
|
69
78
|
#
|
|
70
|
-
|
|
71
|
-
source_suffix = ".rst"
|
|
79
|
+
source_suffix = [".rst", ".md"]
|
|
72
80
|
|
|
73
81
|
# The master toctree document.
|
|
74
82
|
master_doc = "index"
|
|
@@ -203,7 +211,11 @@ texinfo_documents = [
|
|
|
203
211
|
|
|
204
212
|
# -- Extension configuration -------------------------------------------------
|
|
205
213
|
|
|
214
|
+
p = jsonschema2md.Parser(
|
|
215
|
+
examples_as_yaml=False,
|
|
216
|
+
show_examples="all",
|
|
217
|
+
)
|
|
218
|
+
md_lines = p.parse_schema(yaml_read(capi2_schema))
|
|
206
219
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
f.write(s)
|
|
220
|
+
with open(os.path.join(os.path.abspath("."), "ref/capi2.md"), "w") as f:
|
|
221
|
+
f.write("".join(md_lines))
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
.. _ug_build_system_filters:
|
|
2
|
+
|
|
3
|
+
Filters: Make system-wide modifications to the EDAM structure
|
|
4
|
+
=============================================================
|
|
5
|
+
|
|
6
|
+
The last thing FuseSoC does before handing over to Edalize, is to prepare an EDAM file containing a description of the complete system and everything that the EDA tools need to know. It is sometimes useful to make system-wide changes after the system is assembled, and this is where filters come in. Filters are additional tasks that can be run to analyze and modify the EDAM structure, and through that structure the filters have access to the complete dependency tree and all source files.
|
|
7
|
+
|
|
8
|
+
FuseSoC ships with a few built-in filters for generally useful tasks:
|
|
9
|
+
|
|
10
|
+
* autotype: Sets file types according to the file name prefix for files that don't have an explicit file type set.
|
|
11
|
+
* custom: Runs the command specified with the environment variable `FUSESOC_CUSTOM_FILTER`. Two arguments are passed to the command. The first specifies the EDAM (yaml) file the custom command is supposed to read. The second specifies the name of the file that the filter should use to return the modified EDAM struct.
|
|
12
|
+
* dot: Creates a GraphViz dot file of the dependency tree
|
|
13
|
+
|
|
14
|
+
All filters are run from the work root directory.
|
|
15
|
+
|
|
16
|
+
.. note::
|
|
17
|
+
Technically, an Edalize frontend can perform the exact same task as a FuseSoC EDAM filter. The difference is more philosophical in that a filter can be seen as something that fixes up the system before it is ready to be consumed by an EDA tool, while an Edalize frontend typically *is* an EDA tool. The filters will also possibly have access to more FuseSoC internals in the future.
|
|
18
|
+
|
|
19
|
+
Using filters
|
|
20
|
+
-------------
|
|
21
|
+
|
|
22
|
+
There are three way to enable which filters to be applied. These three options have various use-cases.
|
|
23
|
+
|
|
24
|
+
Filters in targets
|
|
25
|
+
~~~~~~~~~~~~~~~~~~
|
|
26
|
+
|
|
27
|
+
Filters specified in a target section of a core are typically required for the the build to work. In order to enable a filter for a target, add a list of filters using the `filters` key.
|
|
28
|
+
|
|
29
|
+
.. code-block:: yaml
|
|
30
|
+
|
|
31
|
+
# An excerpt from a core file.
|
|
32
|
+
targets:
|
|
33
|
+
sim:
|
|
34
|
+
# ...
|
|
35
|
+
filters: [autotype, dot] # Apply the autotype and dot filters in that order
|
|
36
|
+
|
|
37
|
+
Filters in the configuration file
|
|
38
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
39
|
+
|
|
40
|
+
Filters can be set in the configuration file as a list of space-separated strings in the `main` section. These can be set with the fusesoc config cli, e.g. `fusesoc config filters "filter1 filter2"`. Filters set in the config file are typically used when all targets of the cores in the workspace need some filter to be applied, or just as a convenienence for users who like to have som particular filter always enabled. These filters are applied after the ones from the core file targets.
|
|
41
|
+
|
|
42
|
+
Filters on the command-line
|
|
43
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
44
|
+
|
|
45
|
+
It is also possible to set filters on the command-line. This is typically used for one-off filters, e.g. to generate some debug info. They are enabled with the `--filter` parameters, e.g. `fusesoc run --filter=dot --target=sim ...`. The `--filter` parameter can be specified multiple times to add more filters. Filters on the command-line are applied after the ones from the configuration file.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Creating additional filters
|
|
49
|
+
---------------------------
|
|
50
|
+
|
|
51
|
+
A filter is a Python module that contains a class with the same name as the module, but capitalized. The class needs to implement a function called `run` which takes the EDAM struct as the first argumen and the work root as the second argument. The function needs to return the new EDAM struct even if it is unmodified.
|
|
52
|
+
|
|
53
|
+
Filter template::
|
|
54
|
+
|
|
55
|
+
import logging
|
|
56
|
+
import os
|
|
57
|
+
|
|
58
|
+
logger = logging.getLogger(__name__)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class Customfilter:
|
|
62
|
+
def run(self, edam, work_root):
|
|
63
|
+
# Print file sizes of all verilog files in the system
|
|
64
|
+
for f in edam["files"]:
|
|
65
|
+
if f["file_type"].startswith("verilogSource"):
|
|
66
|
+
size = os.path.getsize(os.path.join(work_root, f["name"]))
|
|
67
|
+
print(f"{f['name']} is {size} bytes")
|
|
68
|
+
|
|
69
|
+
# Add an additional parameter
|
|
70
|
+
edam["parameters"]["my_number"] = {"datatype" : "int",
|
|
71
|
+
"paramtype": "vlogdefine",
|
|
72
|
+
"default" : 5446}
|
|
73
|
+
|
|
74
|
+
# Change the system name
|
|
75
|
+
edam["name"] = "bestsystemever"
|
|
76
|
+
|
|
77
|
+
# Return modified EDAM struct
|
|
78
|
+
return edam
|
|
79
|
+
|
|
80
|
+
FuseSoC implements support for implicit namespace packages (https://peps.python.org/pep-0420/) This means that subclasses that logically belong to FuseSoC can be distributed over several physical locations and is something we can take advantage of to add new filters outside of the FuseSoC code base.
|
|
81
|
+
|
|
82
|
+
In order to do that we will create a directory structure that mirrors the structure of FuseSoC like the example below::
|
|
83
|
+
|
|
84
|
+
externalplugin/
|
|
85
|
+
fusesoc/
|
|
86
|
+
filters/
|
|
87
|
+
customfilter.py
|
|
88
|
+
anothercustomfilter.py
|
|
89
|
+
|
|
90
|
+
There are two common options for making the above `customfilter.py` and `anothercustomfilter.py` available to FuseSoC.
|
|
91
|
+
|
|
92
|
+
The first way is to add the `externalplugin` path to ``PYTHONPATH``. The other is to add a `setup.py` in the `externalplugin` directory and install the filter plugin with pip as with other Python packages.
|
|
93
|
+
|
|
94
|
+
A `setup.py` in its absolutely most minimal form is listed below and is enough to install the plugin as a package in development mode using ``pip install --user -e .`` from the `externalplugin` directory.::
|
|
95
|
+
|
|
96
|
+
from setuptools import setup
|
|
97
|
+
setup()
|
|
98
|
+
|
|
99
|
+
A real `setup.py` like the one used by FuseSoC normally contains a lot more information.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
*****************************
|
|
2
|
+
Common Problems and Solutions
|
|
3
|
+
*****************************
|
|
4
|
+
|
|
5
|
+
Making changes to cores in a library
|
|
6
|
+
====================================
|
|
7
|
+
|
|
8
|
+
A common situation is that a user wants to use their own copy of a core,
|
|
9
|
+
instead of the one provided by a library, for example to fix a bug or
|
|
10
|
+
add new functionality. The following steps can be used to achieve this:
|
|
11
|
+
|
|
12
|
+
**Example.** Replace a core in a library with a user-specified version
|
|
13
|
+
|
|
14
|
+
#. Create a new directory to keep the user-copies of the cores (this
|
|
15
|
+
directory will be referred to as ``$corelib`` from now on)
|
|
16
|
+
#. Download the core source (the repository or URL can be found in the
|
|
17
|
+
``[provider]`` section of the original core)
|
|
18
|
+
#. *If the downloaded core already contains a .core file, this step is
|
|
19
|
+
ignored* Copy the original .core file to the root of the downloaded
|
|
20
|
+
core. Edit the file and remove the ``[provider]`` section. (This will
|
|
21
|
+
stop FuseSoC from downloading the core and use files from the
|
|
22
|
+
directory containing the .core file instead)
|
|
23
|
+
#. Add ``$corelib`` to the end of your library search path, either by
|
|
24
|
+
editing ``fusesoc.conf`` or by adding ``--cores-root=$corelib`` to
|
|
25
|
+
the command-line arguments
|
|
26
|
+
#. Verify that the new core is found by running fusesoc core-info $core. Check
|
|
27
|
+
the output to see that “Core root:” is set to the directory where the core
|
|
28
|
+
was downloaded
|
|
29
|
+
|
|
30
|
+
Dependency tree for a core with optional components
|
|
31
|
+
===================================================
|
|
32
|
+
|
|
33
|
+
Many cores have a part that is only used in some flows. This could for example be a BFM, VIP or some kind of behavioral model that is only used in simulation flows. Or it could be timing constraints for synthesis. As long as these are only by the core itself, it's easiest to put them into different filesets and let each simulation or synthesis target pick the right subset of filesets.
|
|
34
|
+
|
|
35
|
+
A more complicated situation arises when a user uses this core as a dependency and wants to have different filesets for different flows in the toplevel core. In this case, it is typically better to split out the optional part into its own cores and have the toplevel filesets depend on the different cores.
|
|
36
|
+
|
|
37
|
+
**Example** Let's assume a core (comp) comes with a BFM. We want to use the BFM when doing block-level simulations of the core and when doing full system simulations which uses this core. We don't want to have the BFM present when doing full system synthesis. The most general solution is to split out the BFM to a separate core file. The following example shows a setup with a component (comp.core) that has a BFM (comp_bfm.core) which is used inside a larger system (top.core). The component has a testbench target (sim) and the larger system has two testbenches (tb1 and tb2) which both uses the BFM and the component. The larger system can also be synthesized without the BFM.
|
|
38
|
+
|
|
39
|
+
.. image:: optional_deps.png
|
|
40
|
+
:alt: Alternative text
|
|
41
|
+
|
|
42
|
+
.. code-block:: yaml
|
|
43
|
+
:caption: comp_bfm.core
|
|
44
|
+
|
|
45
|
+
CAPI=2:
|
|
46
|
+
|
|
47
|
+
name : ::comp_bfm:0
|
|
48
|
+
|
|
49
|
+
filesets:
|
|
50
|
+
bfm:
|
|
51
|
+
files: {comp_bfm.sv : {file_type : systemVerilogSource}}
|
|
52
|
+
|
|
53
|
+
targets:
|
|
54
|
+
default:
|
|
55
|
+
filesets : [bfm]
|
|
56
|
+
|
|
57
|
+
.. code-block:: yaml
|
|
58
|
+
:caption: comp.core
|
|
59
|
+
|
|
60
|
+
CAPI=2:
|
|
61
|
+
|
|
62
|
+
name : ::comp:0
|
|
63
|
+
|
|
64
|
+
filesets:
|
|
65
|
+
rtl:
|
|
66
|
+
files: {comp.sv : {file_type : systemVerilogSource}}
|
|
67
|
+
|
|
68
|
+
tb_files:
|
|
69
|
+
files: {comp_tb.sv : {file_type : systemVerilogSource}}
|
|
70
|
+
depend: [comp_bfm]
|
|
71
|
+
|
|
72
|
+
targets:
|
|
73
|
+
default:
|
|
74
|
+
filesets : [rtl]
|
|
75
|
+
|
|
76
|
+
sim:
|
|
77
|
+
filesets : [rtl, tb_files]
|
|
78
|
+
|
|
79
|
+
.. code-block:: yaml
|
|
80
|
+
:caption: top.core
|
|
81
|
+
|
|
82
|
+
CAPI=2:
|
|
83
|
+
|
|
84
|
+
name : ::top:0
|
|
85
|
+
|
|
86
|
+
filesets:
|
|
87
|
+
rtl:
|
|
88
|
+
files: {top.sv : {file_type : systemVerilogSource}}
|
|
89
|
+
depend: [comp]
|
|
90
|
+
|
|
91
|
+
tb_common:
|
|
92
|
+
files: {tb_common.sv : {file_type : systemVerilogSource}}
|
|
93
|
+
depend: [comp_bfm]
|
|
94
|
+
|
|
95
|
+
tb1_files:
|
|
96
|
+
files: {tb1.sv : {file_type : systemVerilogSource}}
|
|
97
|
+
|
|
98
|
+
tb2_files:
|
|
99
|
+
files: {tb1.sv : {file_type : systemVerilogSource}}
|
|
100
|
+
|
|
101
|
+
synth_files:
|
|
102
|
+
files: {constraints.sdc : {file_type : SDC}}
|
|
103
|
+
|
|
104
|
+
targets:
|
|
105
|
+
sim: &sim
|
|
106
|
+
filesets : [rtl, tb_files]
|
|
107
|
+
|
|
108
|
+
tb1:
|
|
109
|
+
<<: *sim
|
|
110
|
+
filesets_append : [tb1_files]
|
|
111
|
+
|
|
112
|
+
tb2:
|
|
113
|
+
<<: *sim
|
|
114
|
+
filesets_append : [tb2_files]
|
|
115
|
+
|
|
116
|
+
synth:
|
|
117
|
+
filesets : [rtl, synth_files]
|
|
118
|
+
|
|
119
|
+
An alternative solution to the above, is to use flags, as described in :ref:`ug_build_system_flags`, where the inclusion of the optional files are controlled by flags. These flags can be assigned default values in the top level targets for convenience.
|
|
Binary file
|
|
@@ -13,7 +13,7 @@ from filecmp import cmp
|
|
|
13
13
|
|
|
14
14
|
from fusesoc import utils
|
|
15
15
|
from fusesoc.capi2.coredata import CoreData
|
|
16
|
-
from fusesoc.provider import get_provider
|
|
16
|
+
from fusesoc.provider.provider import get_provider
|
|
17
17
|
from fusesoc.vlnv import Vlnv
|
|
18
18
|
|
|
19
19
|
logger = logging.getLogger(__name__)
|
|
@@ -33,8 +33,7 @@ class Core:
|
|
|
33
33
|
|
|
34
34
|
self.cache_root = cache_root
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
self.core_basename = os.path.basename(self.core_file)
|
|
38
37
|
self.core_root = os.path.dirname(self.core_file)
|
|
39
38
|
|
|
40
39
|
# Populated by CoreDB._solve(). TODO: Find a better solution for that.
|
|
@@ -107,7 +106,6 @@ class Core:
|
|
|
107
106
|
FutureWarning,
|
|
108
107
|
)
|
|
109
108
|
if not os.path.isabs(f):
|
|
110
|
-
|
|
111
109
|
if os.path.exists(os.path.join(self.core_root, f)):
|
|
112
110
|
src = os.path.join(self.core_root, f)
|
|
113
111
|
elif os.path.exists(os.path.join(self.files_root, f)):
|
|
@@ -130,7 +128,7 @@ class Core:
|
|
|
130
128
|
for root, dirs, files in os.walk(dst_dir):
|
|
131
129
|
for f in files:
|
|
132
130
|
_abs_f = os.path.join(root, f)
|
|
133
|
-
if not os.path.relpath(_abs_f, dst_dir) in src_files:
|
|
131
|
+
if not os.path.relpath(_abs_f, dst_dir).replace("\\", "/") in src_files:
|
|
134
132
|
os.remove(_abs_f)
|
|
135
133
|
|
|
136
134
|
def _get_script_names(self, flags):
|
|
@@ -174,8 +172,14 @@ class Core:
|
|
|
174
172
|
# Special case for tool as we get it from default_tool
|
|
175
173
|
flags["tool"] = str(target["default_tool"])
|
|
176
174
|
|
|
175
|
+
else:
|
|
176
|
+
raise RuntimeError(f"'{self.name}' has no target '{target_name}'")
|
|
177
177
|
return flags
|
|
178
178
|
|
|
179
|
+
def get_filters(self, flags):
|
|
180
|
+
target_name, target = self._get_target(flags)
|
|
181
|
+
return target.get("filters", [])
|
|
182
|
+
|
|
179
183
|
def get_flow(self, flags):
|
|
180
184
|
self._debug("Getting flow for flags {}".format(str(flags)))
|
|
181
185
|
flow = None
|
|
@@ -516,6 +520,7 @@ class Core:
|
|
|
516
520
|
Name: {}
|
|
517
521
|
Description: {}
|
|
518
522
|
Core root: {}
|
|
523
|
+
Core file: {}
|
|
519
524
|
|
|
520
525
|
Targets:
|
|
521
526
|
{}"""
|
|
@@ -539,6 +544,7 @@ Targets:
|
|
|
539
544
|
str(self.name),
|
|
540
545
|
str(self.get_description() or "<No description>"),
|
|
541
546
|
str(self.core_root),
|
|
547
|
+
str(self.core_basename),
|
|
542
548
|
targets,
|
|
543
549
|
)
|
|
544
550
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Copyright FuseSoC contributors
|
|
2
|
+
# Licensed under the 2-Clause BSD License, see LICENSE for details.
|
|
3
|
+
# SPDX-License-Identifier: BSD-2-Clause
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import re
|
|
7
|
+
|
|
8
|
+
from fusesoc import utils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Inheritance:
|
|
12
|
+
MERGE_OPERATOR = "<<__FUSESOC_MERGE_OVERLOAD__<<"
|
|
13
|
+
|
|
14
|
+
def yaml_merge_2_fusesoc_merge(capi):
|
|
15
|
+
"""
|
|
16
|
+
Replace YAML merge key operator (<<) with FuseSoC merge operator
|
|
17
|
+
"""
|
|
18
|
+
yaml_merge_pattern = (
|
|
19
|
+
r"((?:\n|{|\{\s*(?:[^{}]*\{[^{}]*\})*[^{}]*\},)\s*)<<(?=\s*:)"
|
|
20
|
+
)
|
|
21
|
+
while re.search(yaml_merge_pattern, capi):
|
|
22
|
+
capi = re.sub(yaml_merge_pattern, r"\1" + Inheritance.MERGE_OPERATOR, capi)
|
|
23
|
+
return capi
|
|
24
|
+
|
|
25
|
+
def elaborate_inheritance(capi):
|
|
26
|
+
if not isinstance(capi, dict):
|
|
27
|
+
return capi
|
|
28
|
+
|
|
29
|
+
for key, value in capi.items():
|
|
30
|
+
if isinstance(value, dict):
|
|
31
|
+
capi[key] = Inheritance.elaborate_inheritance(copy.deepcopy(value))
|
|
32
|
+
|
|
33
|
+
parent = capi.pop(Inheritance.MERGE_OPERATOR, {})
|
|
34
|
+
if isinstance(parent, dict):
|
|
35
|
+
capi = utils.merge_dict(parent, capi, concat_list_appends_only=True)
|
|
36
|
+
else:
|
|
37
|
+
raise SyntaxError("Invalid use of inheritance operator")
|
|
38
|
+
|
|
39
|
+
return capi
|
|
@@ -110,7 +110,7 @@ capi2_schema = """
|
|
|
110
110
|
"additionalProperties": false,
|
|
111
111
|
"required": [
|
|
112
112
|
"name",
|
|
113
|
-
"repo"
|
|
113
|
+
"repo"
|
|
114
114
|
]
|
|
115
115
|
},
|
|
116
116
|
{
|
|
@@ -272,7 +272,7 @@ capi2_schema = """
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
},
|
|
275
|
-
"additionalProperties": false
|
|
275
|
+
"additionalProperties": false
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
"additionalProperties": false
|
|
@@ -289,9 +289,9 @@ capi2_schema = """
|
|
|
289
289
|
"type": "string"
|
|
290
290
|
},
|
|
291
291
|
"position": {
|
|
292
|
-
"description": "Where to insert the generated core. Legal values are *first*, *append* or *last*. *append* will insert core after the core that called the generator",
|
|
292
|
+
"description": "Where to insert the generated core. Legal values are *first*, *prepend*, *append* or *last*. *prepend* (*append*) will insert core before (after) the core that called the generator",
|
|
293
293
|
"type": "string",
|
|
294
|
-
"pattern": "^first|append|last$"
|
|
294
|
+
"pattern": "^first|prepend|append|last$"
|
|
295
295
|
},
|
|
296
296
|
"parameters": {
|
|
297
297
|
"description": "Generator-specific parameters. ``fusesoc gen show $generator`` might show available parameters. ",
|
|
@@ -317,7 +317,7 @@ capi2_schema = """
|
|
|
317
317
|
"type": "string"
|
|
318
318
|
},
|
|
319
319
|
"interpreter": {
|
|
320
|
-
"description": "If the command needs a custom interpreter (such as python) this will be inserted as the first argument before command when calling the generator. The interpreter needs to be on the system PATH.",
|
|
320
|
+
"description": "If the command needs a custom interpreter (such as python) this will be inserted as the first argument before command when calling the generator. The interpreter needs to be on the system PATH; specifically, shutil.which needs to be able to find the interpreter).",
|
|
321
321
|
"type": "string"
|
|
322
322
|
},
|
|
323
323
|
"cache_type": {
|
|
@@ -375,7 +375,7 @@ capi2_schema = """
|
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
},
|
|
378
|
-
"additionalProperties": false
|
|
378
|
+
"additionalProperties": false
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
},
|
|
@@ -386,7 +386,7 @@ capi2_schema = """
|
|
|
386
386
|
"^.+$": {
|
|
387
387
|
"patternProperties": {
|
|
388
388
|
"^default_tool$": {
|
|
389
|
-
"description": "Default tool to use unless overridden with ``--tool=``",
|
|
389
|
+
"description": "Default tool to use unless overridden with ``--tool=`` This key is used by the Edalize Tool API and is ignored if the Flow API is used instead.",
|
|
390
390
|
"type": "string"
|
|
391
391
|
},
|
|
392
392
|
"^description$": {
|
|
@@ -394,11 +394,11 @@ capi2_schema = """
|
|
|
394
394
|
"type": "string"
|
|
395
395
|
},
|
|
396
396
|
"^flow$": {
|
|
397
|
-
"description": "Edalize backend flow to use for target",
|
|
397
|
+
"description": "Edalize backend flow to use for target. Setting this key enables the flow API instead of the legacy Tool API.",
|
|
398
398
|
"type": "string"
|
|
399
399
|
},
|
|
400
400
|
"^flow_options$": {
|
|
401
|
-
"description": "Tool- and flow-specific options",
|
|
401
|
+
"description": "Tool- and flow-specific options. Used by the Flow API. The Edalize documentation contains information on available options for different flows (https://edalize.readthedocs.io/en/latest/edam/api.html#flow-options)",
|
|
402
402
|
"type": "object",
|
|
403
403
|
"patternProperties": {
|
|
404
404
|
"^.+$": {
|
|
@@ -458,7 +458,7 @@ capi2_schema = """
|
|
|
458
458
|
"additionalProperties": false
|
|
459
459
|
},
|
|
460
460
|
"^tools$": {
|
|
461
|
-
"description": "Tool-specific options for target",
|
|
461
|
+
"description": "Tool-specific options for target. Used by the legacy Tool API. The contents of this section is handled by Edalize, and a list of available tool options for each tool can be found in the Edalize documentation (https://edalize.readthedocs.io/en/latest/edam/api.html#tool-options)",
|
|
462
462
|
"type": "object",
|
|
463
463
|
"patternProperties": {
|
|
464
464
|
"^.+$": {
|
|
@@ -508,6 +508,13 @@ capi2_schema = """
|
|
|
508
508
|
"type": "string"
|
|
509
509
|
}
|
|
510
510
|
},
|
|
511
|
+
"^filters(_append)?$": {
|
|
512
|
+
"description": "EDAM filters to apply",
|
|
513
|
+
"type": "array",
|
|
514
|
+
"items": {
|
|
515
|
+
"type": "string"
|
|
516
|
+
}
|
|
517
|
+
},
|
|
511
518
|
"^generate(_append)?$": {
|
|
512
519
|
"description": "Parameterized generators to run for this target with optional parametrization",
|
|
513
520
|
"type": "array",
|