SimplHDL 0.0.5__tar.gz → 0.0.7__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.
- {simplhdl-0.0.5 → simplhdl-0.0.7}/PKG-INFO +4 -1
- {simplhdl-0.0.5 → simplhdl-0.0.7}/pyproject.toml +3 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/SimplHDL.egg-info/PKG-INFO +4 -1
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/SimplHDL.egg-info/SOURCES.txt +16 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/SimplHDL.egg-info/requires.txt +3 -0
- simplhdl-0.0.7/src/simplhdl/__init__.py +1 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/__main__.py +2 -0
- simplhdl-0.0.7/src/simplhdl/cocotb.py +117 -0
- simplhdl-0.0.7/src/simplhdl/flows/flake8/flake8flow.py +83 -0
- simplhdl-0.0.7/src/simplhdl/flows/lint/lintflow.py +72 -0
- simplhdl-0.0.7/src/simplhdl/flows/quartusdse/quartusdseflow.py +82 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/questasim/questasimflow.py +13 -8
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/rivierapro/rivieraproflow.py +5 -5
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/simulationflow.py +26 -5
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/vcs/vcsflow.py +3 -3
- simplhdl-0.0.7/src/simplhdl/flows/verible/veribleflow.py +93 -0
- simplhdl-0.0.7/src/simplhdl/flows/vsg/vsgflow.py +121 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/xsim/xsimflow.py +5 -5
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/info.py +0 -1
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/parser.py +17 -1
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/plugins.py +5 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/pyedaa/__init__.py +5 -1
- simplhdl-0.0.7/src/simplhdl/resources/templates/flake8/setup.cfg.j2 +10 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/questasim/Makefile.j2 +8 -6
- simplhdl-0.0.7/src/simplhdl/resources/templates/questasim/cocotb.mk.j2 +22 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/rivierapro → simplhdl-0.0.7/src/simplhdl/resources/templates/questasim}/files.j2 +1 -0
- simplhdl-0.0.7/src/simplhdl/resources/templates/questasim/gui.do.j2 +18 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/rivierapro/Makefile.j2 +4 -4
- simplhdl-0.0.7/src/simplhdl/resources/templates/rivierapro/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2 +11 -8
- {simplhdl-0.0.5/src/simplhdl/resources/templates/vcs → simplhdl-0.0.7/src/simplhdl/resources/templates/rivierapro}/files.j2 +1 -0
- simplhdl-0.0.7/src/simplhdl/resources/templates/vcs/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/cocotb.mk.j2 +4 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/xsim → simplhdl-0.0.7/src/simplhdl/resources/templates/vcs}/files.j2 +1 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/vcs.parameters.j2 +1 -1
- simplhdl-0.0.7/src/simplhdl/resources/templates/verible/__init__.py +0 -0
- simplhdl-0.0.7/src/simplhdl/resources/templates/verible/rules.cfg.j2 +58 -0
- simplhdl-0.0.7/src/simplhdl/resources/templates/vivado/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vivado/project.tcl.j2 +17 -17
- simplhdl-0.0.7/src/simplhdl/resources/templates/vsg/__init__.py +0 -0
- simplhdl-0.0.7/src/simplhdl/resources/templates/vsg/files.json.j2 +7 -0
- simplhdl-0.0.7/src/simplhdl/resources/templates/vsg/rules.yml.j2 +15 -0
- simplhdl-0.0.7/src/simplhdl/resources/templates/xsim/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/utils.py +14 -2
- {simplhdl-0.0.5 → simplhdl-0.0.7}/tox.ini +1 -0
- simplhdl-0.0.5/src/simplhdl/__init__.py +0 -1
- simplhdl-0.0.5/src/simplhdl/cocotb.py +0 -52
- simplhdl-0.0.5/src/simplhdl/resources/templates/questasim/cocotb.mk.j2 +0 -19
- {simplhdl-0.0.5 → simplhdl-0.0.7}/.github/workflows/publish.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/.gitignore +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/.readthedocs.yaml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/LICENSE +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/README.md +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/_static/simplhdl_dark.png +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/_static/simplhdl_light.png +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/_static/simplhdl_light_1.png +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/conf.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/drawing.svg +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows/ghdl.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows/icarus.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows/quartus.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows/questasim.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows/vcs.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows/vivado.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows/xsim.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/flows.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/index.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/intel-ips.md +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/introduction.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/plugins.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/docs/requirements.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/adder.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/hdl/adder.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/sim/testbench.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/sim/testbench.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/syn/build.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/syn/placement.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/syn/timing.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/adder/syn/top.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/alu.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/hdl/add.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/hdl/alu.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/hdl/mul.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/hdl/sub.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/alu_vip/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/alu_vip/agent.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/alu_vip/aluif.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/alu_vip/driver.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/alu_vip/monitor.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/alu_vip/sequenceitem.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/alu_vip/sequencer.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/clock_vip/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/clock_vip/agent.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/clock_vip/clockif.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/pyuvm.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/test/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/test/env.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/test/seq_lib.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/test/test.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/pyuvm/testbench.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/alu_vip/agent.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/alu_vip/driver.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/alu_vip/env.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/alu_vip/monitor.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/alu_vip/sequence_item.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/add_seq.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/base_seq.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/tb_env/tb_env.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/tb_env/tb_env.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/tb_env/test/base_test.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/tb_env/test/test_add.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/testbench/alu_if.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/testbench/testbench.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/testbench/testbench.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/sim/uvm/testcases/test_add/test_add.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/syn/build.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/syn/placement.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/alu/syn/timing.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/hello/build.sbt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/hello/hello.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/hello/src/main/scala/Hello.scala +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/hdl/hello/syn/build.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/plugins/simple_parser/setup.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/plugins/simple_parser/src/simple_parser/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/examples/plugins/simple_parser/src/simple_parser/simple_parser.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/setup.cfg +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/SimplHDL.egg-info/dependency_links.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/SimplHDL.egg-info/entry_points.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/SimplHDL.egg-info/top_level.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flow.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/implementationflow.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/modelsimflow.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/questasim → simplhdl-0.0.7/src/simplhdl/flows/quartusdse}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/quartusflow.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/rivierapro → simplhdl-0.0.7/src/simplhdl/flows/questasim}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/vcs → simplhdl-0.0.7/src/simplhdl/flows/rivierapro}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/xsim → simplhdl-0.0.7/src/simplhdl/flows/vcs}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/generators → simplhdl-0.0.7/src/simplhdl/flows/verible}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/flows/vivadoflow.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/parsers → simplhdl-0.0.7/src/simplhdl/flows/vsg}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources → simplhdl-0.0.7/src/simplhdl/flows/xsim}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/generator.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates → simplhdl-0.0.7/src/simplhdl/generators}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/generators/chisel.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/generators/ipxact.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/generators/spd.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/generators/systemrdl.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/quartus → simplhdl-0.0.7/src/simplhdl/parsers}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/parsers/fusesocparser.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/parsers/simplhdlparser.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/pyedaa/attributes.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/pyedaa/design.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/pyedaa/fileset.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/pyedaa/filetypes.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/pyedaa/project.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/pyedaa/vhdllibrary.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/repo.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/questasim → simplhdl-0.0.7/src/simplhdl/resources}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/rivierapro → simplhdl-0.0.7/src/simplhdl/resources/templates}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/vcs → simplhdl-0.0.7/src/simplhdl/resources/templates/flake8}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/vivado → simplhdl-0.0.7/src/simplhdl/resources/templates/quartus}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/quartus/project.tcl.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/quartus/run.tcl.j2 +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/xsim → simplhdl-0.0.7/src/simplhdl/resources/templates/questasim}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/questasim/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/questasim/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/questasim/project.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/rivierapro/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/rivierapro/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/rivierapro/project.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/Makefile.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/pli.tab.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/project.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vivado/launch_run.sh.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vivado/run.tcl.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/vivado/steps.tcl.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/xsim/Makefile.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/xsim/cocotb.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/xsim/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/questasim → simplhdl-0.0.7/src/simplhdl/resources/templates/xsim}/files.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/xsim/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/resources/templates/xsim/project.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/simplhdl.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/src/simplhdl/tools.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.7}/tests/test_dummy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SimplHDL
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: A framework for simulating and implementing HDL designs
|
|
5
5
|
Author-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
|
|
6
6
|
Maintainer-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
|
|
@@ -52,6 +52,9 @@ Requires-Dist: argcomplete
|
|
|
52
52
|
Requires-Dist: jinja2
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
54
|
Requires-Dist: rich
|
|
55
|
+
Requires-Dist: vsg
|
|
56
|
+
Requires-Dist: flake8
|
|
57
|
+
Requires-Dist: black
|
|
55
58
|
|
|
56
59
|
## Introduction
|
|
57
60
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SimplHDL
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.7
|
|
4
4
|
Summary: A framework for simulating and implementing HDL designs
|
|
5
5
|
Author-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
|
|
6
6
|
Maintainer-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
|
|
@@ -52,6 +52,9 @@ Requires-Dist: argcomplete
|
|
|
52
52
|
Requires-Dist: jinja2
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
54
|
Requires-Dist: rich
|
|
55
|
+
Requires-Dist: vsg
|
|
56
|
+
Requires-Dist: flake8
|
|
57
|
+
Requires-Dist: black
|
|
55
58
|
|
|
56
59
|
## Introduction
|
|
57
60
|
|
|
@@ -103,12 +103,20 @@ src/simplhdl/flows/modelsimflow.py
|
|
|
103
103
|
src/simplhdl/flows/quartusflow.py
|
|
104
104
|
src/simplhdl/flows/simulationflow.py
|
|
105
105
|
src/simplhdl/flows/vivadoflow.py
|
|
106
|
+
src/simplhdl/flows/flake8/flake8flow.py
|
|
107
|
+
src/simplhdl/flows/lint/lintflow.py
|
|
108
|
+
src/simplhdl/flows/quartusdse/__init__.py
|
|
109
|
+
src/simplhdl/flows/quartusdse/quartusdseflow.py
|
|
106
110
|
src/simplhdl/flows/questasim/__init__.py
|
|
107
111
|
src/simplhdl/flows/questasim/questasimflow.py
|
|
108
112
|
src/simplhdl/flows/rivierapro/__init__.py
|
|
109
113
|
src/simplhdl/flows/rivierapro/rivieraproflow.py
|
|
110
114
|
src/simplhdl/flows/vcs/__init__.py
|
|
111
115
|
src/simplhdl/flows/vcs/vcsflow.py
|
|
116
|
+
src/simplhdl/flows/verible/__init__.py
|
|
117
|
+
src/simplhdl/flows/verible/veribleflow.py
|
|
118
|
+
src/simplhdl/flows/vsg/__init__.py
|
|
119
|
+
src/simplhdl/flows/vsg/vsgflow.py
|
|
112
120
|
src/simplhdl/flows/xsim/__init__.py
|
|
113
121
|
src/simplhdl/flows/xsim/xsimflow.py
|
|
114
122
|
src/simplhdl/generators/__init__.py
|
|
@@ -128,6 +136,8 @@ src/simplhdl/pyedaa/project.py
|
|
|
128
136
|
src/simplhdl/pyedaa/vhdllibrary.py
|
|
129
137
|
src/simplhdl/resources/__init__.py
|
|
130
138
|
src/simplhdl/resources/templates/__init__.py
|
|
139
|
+
src/simplhdl/resources/templates/flake8/__init__.py
|
|
140
|
+
src/simplhdl/resources/templates/flake8/setup.cfg.j2
|
|
131
141
|
src/simplhdl/resources/templates/quartus/__init__.py
|
|
132
142
|
src/simplhdl/resources/templates/quartus/project.tcl.j2
|
|
133
143
|
src/simplhdl/resources/templates/quartus/run.tcl.j2
|
|
@@ -137,6 +147,7 @@ src/simplhdl/resources/templates/questasim/cocotb.mk.j2
|
|
|
137
147
|
src/simplhdl/resources/templates/questasim/dependencies.mk.j2
|
|
138
148
|
src/simplhdl/resources/templates/questasim/files.j2
|
|
139
149
|
src/simplhdl/resources/templates/questasim/fileset.j2
|
|
150
|
+
src/simplhdl/resources/templates/questasim/gui.do.j2
|
|
140
151
|
src/simplhdl/resources/templates/questasim/project.mk.j2
|
|
141
152
|
src/simplhdl/resources/templates/rivierapro/Makefile.j2
|
|
142
153
|
src/simplhdl/resources/templates/rivierapro/__init__.py
|
|
@@ -155,11 +166,16 @@ src/simplhdl/resources/templates/vcs/pli.tab.j2
|
|
|
155
166
|
src/simplhdl/resources/templates/vcs/project.mk.j2
|
|
156
167
|
src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2
|
|
157
168
|
src/simplhdl/resources/templates/vcs/vcs.parameters.j2
|
|
169
|
+
src/simplhdl/resources/templates/verible/__init__.py
|
|
170
|
+
src/simplhdl/resources/templates/verible/rules.cfg.j2
|
|
158
171
|
src/simplhdl/resources/templates/vivado/__init__.py
|
|
159
172
|
src/simplhdl/resources/templates/vivado/launch_run.sh.j2
|
|
160
173
|
src/simplhdl/resources/templates/vivado/project.tcl.j2
|
|
161
174
|
src/simplhdl/resources/templates/vivado/run.tcl.j2
|
|
162
175
|
src/simplhdl/resources/templates/vivado/steps.tcl.j2
|
|
176
|
+
src/simplhdl/resources/templates/vsg/__init__.py
|
|
177
|
+
src/simplhdl/resources/templates/vsg/files.json.j2
|
|
178
|
+
src/simplhdl/resources/templates/vsg/rules.yml.j2
|
|
163
179
|
src/simplhdl/resources/templates/xsim/Makefile.j2
|
|
164
180
|
src/simplhdl/resources/templates/xsim/__init__.py
|
|
165
181
|
src/simplhdl/resources/templates/xsim/cocotb.mk.j2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.7"
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
from .utils import sh
|
|
8
|
+
from .pyedaa.project import Project
|
|
9
|
+
from .pyedaa import VerilogIncludeFile, VerilogSourceFile, SystemVerilogSourceFile, VHDLSourceFile, CocotbPythonFile
|
|
10
|
+
from .flow import FlowError
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Cocotb:
|
|
16
|
+
|
|
17
|
+
def __init__(self, project: Project) -> None:
|
|
18
|
+
self.project = project
|
|
19
|
+
self.top = self.module()
|
|
20
|
+
self.dut = self.get_dut()
|
|
21
|
+
self.toplevels = self.hdltoplevels()
|
|
22
|
+
self.duttype = self.hdltype()
|
|
23
|
+
|
|
24
|
+
def lib_name_path(self, simulator: str, interface: str) -> Path:
|
|
25
|
+
output = sh(['cocotb-config', '--lib-name-path', interface, simulator])
|
|
26
|
+
path = Path(output)
|
|
27
|
+
if not path.exists():
|
|
28
|
+
raise FileNotFoundError(f"{path}: not found")
|
|
29
|
+
return path
|
|
30
|
+
|
|
31
|
+
def module(self) -> Optional[str]:
|
|
32
|
+
set_ = set()
|
|
33
|
+
try:
|
|
34
|
+
modules = self.project.DefaultDesign._topLevel.split()
|
|
35
|
+
except AttributeError:
|
|
36
|
+
raise FlowError("No top levels found")
|
|
37
|
+
|
|
38
|
+
for module in modules:
|
|
39
|
+
if self.is_python_module(module):
|
|
40
|
+
# TODO: What if more than one module match?
|
|
41
|
+
set_.add(module)
|
|
42
|
+
if not set_:
|
|
43
|
+
return None
|
|
44
|
+
elif len(set_) == 1:
|
|
45
|
+
return next(iter(set_))
|
|
46
|
+
else:
|
|
47
|
+
raise NotImplementedError(f"More than one CocoTB module found: {set_}")
|
|
48
|
+
|
|
49
|
+
def hdltoplevels(self) -> str:
|
|
50
|
+
tops = []
|
|
51
|
+
for t in self.project.DefaultDesign._topLevel.split():
|
|
52
|
+
if t != self.top:
|
|
53
|
+
tops.append(t)
|
|
54
|
+
return ' '.join(tops)
|
|
55
|
+
|
|
56
|
+
def get_dut(self) -> str:
|
|
57
|
+
for top in self.project.DefaultDesign._topLevel.split():
|
|
58
|
+
if top != self.top:
|
|
59
|
+
return top
|
|
60
|
+
|
|
61
|
+
def hdltype(self): # noqa: C901
|
|
62
|
+
logger.debug(f"Cocotb hdl dut '{self.dut}'")
|
|
63
|
+
lib = next(iter(self.project.DefaultDesign.VHDLLibraries))
|
|
64
|
+
if '.' in self.dut:
|
|
65
|
+
lib, name = self.dut.split('.')
|
|
66
|
+
else:
|
|
67
|
+
name = self.dut
|
|
68
|
+
|
|
69
|
+
files = list(self.project.DefaultDesign.Files())
|
|
70
|
+
try:
|
|
71
|
+
for file in reversed(files):
|
|
72
|
+
if file.FileType in [VHDLSourceFile]:
|
|
73
|
+
with open(file.Path, 'r', errors='replace') as f:
|
|
74
|
+
lines = f.readlines()
|
|
75
|
+
for line in lines:
|
|
76
|
+
if re.search(rf'^\s*entity\s+{name}\s+is', line, re.IGNORECASE):
|
|
77
|
+
if file.Library.Name == lib:
|
|
78
|
+
logger.info(f"Cocotb dut '{self.dut}' is VHDL")
|
|
79
|
+
return VHDLSourceFile
|
|
80
|
+
else:
|
|
81
|
+
logger.warning(f"Found HDL entity {name} in ",
|
|
82
|
+
f"library '{file.Library.Name}' expected '{lib}'")
|
|
83
|
+
if file.FileType in [VerilogIncludeFile, VerilogSourceFile, SystemVerilogSourceFile]:
|
|
84
|
+
with open(file.Path, 'r', errors='replace') as f:
|
|
85
|
+
lines = f.readlines()
|
|
86
|
+
for line in lines:
|
|
87
|
+
if re.search(rf'^\s*module\s+{name}(\s+|\(|;|$)', line):
|
|
88
|
+
if file.Library.Name == lib:
|
|
89
|
+
logger.info(f"Cocotb dut '{self.dut}' is Verilog")
|
|
90
|
+
return VerilogSourceFile
|
|
91
|
+
else:
|
|
92
|
+
logger.warning(f"Found HDL module {name} in ",
|
|
93
|
+
f"library '{file.Library.Name}' expected '{lib}'")
|
|
94
|
+
else:
|
|
95
|
+
continue
|
|
96
|
+
except UnicodeDecodeError:
|
|
97
|
+
logger.warning(f"Can't decode {file.Path}")
|
|
98
|
+
raise FlowError(f"Could not find HDL entity/module '{name}' in library '{lib}'")
|
|
99
|
+
|
|
100
|
+
def is_python_module(self, name: str):
|
|
101
|
+
# TODO: Should we also search in installed packages?
|
|
102
|
+
if [f for f in self.files() if f.Path.stem == name]:
|
|
103
|
+
return True
|
|
104
|
+
|
|
105
|
+
def files(self):
|
|
106
|
+
return self.project.DefaultDesign.Files(CocotbPythonFile)
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def enabled(self) -> bool:
|
|
110
|
+
for file in self.files():
|
|
111
|
+
return True
|
|
112
|
+
return False
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def pythonpath(self) -> str:
|
|
116
|
+
directories = {str(f.Path.parent.absolute()) for f in self.files()}
|
|
117
|
+
return ':'.join(directories)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from importlib.resources import files as resources_files
|
|
3
|
+
except ImportError:
|
|
4
|
+
from importlib_resources import files as resources_files
|
|
5
|
+
import os
|
|
6
|
+
import shutil
|
|
7
|
+
import logging
|
|
8
|
+
from argparse import Namespace
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from jinja2 import Environment, FileSystemLoader
|
|
11
|
+
|
|
12
|
+
from simplhdl.resources.templates import flake8 as templates
|
|
13
|
+
from simplhdl.utils import sh, CalledShError, generate_from_template
|
|
14
|
+
from simplhdl.flow import FlowFactory, FlowBase
|
|
15
|
+
from simplhdl.pyedaa.project import Project
|
|
16
|
+
from simplhdl.pyedaa import PythonSourceFile
|
|
17
|
+
|
|
18
|
+
logger = logging.getLogger(__name__)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@FlowFactory.register('flake8')
|
|
22
|
+
class Flake8Flow(FlowBase):
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def parse_args(self, subparsers) -> None:
|
|
26
|
+
parser = subparsers.add_parser('flake8', help='Lint Flow for Python code')
|
|
27
|
+
parser.add_argument(
|
|
28
|
+
'--fix',
|
|
29
|
+
action='store_true',
|
|
30
|
+
help="Fix style formatting (Note: this modifies the source)"
|
|
31
|
+
)
|
|
32
|
+
parser.add_argument(
|
|
33
|
+
'-f', '--files',
|
|
34
|
+
type=lambda p: Path(p).absolute(),
|
|
35
|
+
nargs='+',
|
|
36
|
+
default=[],
|
|
37
|
+
help="Manually specify file list"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
41
|
+
super().__init__(name, args, project, builddir)
|
|
42
|
+
self.templates = templates
|
|
43
|
+
|
|
44
|
+
def setup(self):
|
|
45
|
+
os.makedirs(self.builddir, exist_ok=True)
|
|
46
|
+
if self.args.files:
|
|
47
|
+
self.files = [Path(f) for f in self.args.files if Path(f).suffix == '.py']
|
|
48
|
+
else:
|
|
49
|
+
self.files = [f.Path for f in self.project.DefaultDesign.DefaultFileSet.Files(PythonSourceFile)]
|
|
50
|
+
|
|
51
|
+
def generate(self):
|
|
52
|
+
config = os.getenv('SIMPLHDL_FLAKE8_RULES')
|
|
53
|
+
if config:
|
|
54
|
+
shutil.copy(config, self.builddir.joinpath('setup.cfg'))
|
|
55
|
+
else:
|
|
56
|
+
templatedir = resources_files(self.templates)
|
|
57
|
+
environment = Environment(
|
|
58
|
+
loader=FileSystemLoader(templatedir),
|
|
59
|
+
trim_blocks=True)
|
|
60
|
+
template = environment.get_template('setup.cfg.j2')
|
|
61
|
+
generate_from_template(template, self.builddir)
|
|
62
|
+
|
|
63
|
+
def execute(self):
|
|
64
|
+
if self.args.fix:
|
|
65
|
+
for file in self.files:
|
|
66
|
+
sh(['black', str(file.absolute())])
|
|
67
|
+
else:
|
|
68
|
+
command = ['flake8'] + [str(f.absolute()) for f in self.files]
|
|
69
|
+
try:
|
|
70
|
+
sh(command, cwd=self.builddir, output=True)
|
|
71
|
+
except CalledShError as e:
|
|
72
|
+
print(e)
|
|
73
|
+
raise SystemError
|
|
74
|
+
|
|
75
|
+
# flake = flake8.get_style_guide()
|
|
76
|
+
# report = flake.check_files(self.files)
|
|
77
|
+
# if report.get_statistics('E'):
|
|
78
|
+
# raise SystemError
|
|
79
|
+
|
|
80
|
+
def run(self) -> None:
|
|
81
|
+
self.setup()
|
|
82
|
+
self.generate()
|
|
83
|
+
self.execute()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import logging
|
|
3
|
+
from argparse import Namespace
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from simplhdl.flow import FlowFactory, FlowBase
|
|
7
|
+
from simplhdl.pyedaa.project import Project
|
|
8
|
+
from simplhdl.flows.verible.veribleflow import VeribleFlow
|
|
9
|
+
from simplhdl.flows.vsg.vsgflow import VsgFlow
|
|
10
|
+
from simplhdl.flows.flake8.flake8flow import Flake8Flow
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@FlowFactory.register('lint')
|
|
16
|
+
class LintFlow(FlowBase):
|
|
17
|
+
|
|
18
|
+
@classmethod
|
|
19
|
+
def parse_args(self, subparsers) -> None:
|
|
20
|
+
parser = subparsers.add_parser('lint', help='Lint Flow for Design and Verification code')
|
|
21
|
+
parser.add_argument(
|
|
22
|
+
'--fix',
|
|
23
|
+
action='store_true',
|
|
24
|
+
help="Fix style formatting (Note: this modifies the source)"
|
|
25
|
+
)
|
|
26
|
+
parser.add_argument(
|
|
27
|
+
'-f', '--files',
|
|
28
|
+
type=lambda p: Path(p).absolute(),
|
|
29
|
+
nargs='+',
|
|
30
|
+
default=[],
|
|
31
|
+
help="Manually specify file list"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
35
|
+
super().__init__(name, args, project, builddir)
|
|
36
|
+
|
|
37
|
+
def setup(self):
|
|
38
|
+
os.makedirs(self.builddir, exist_ok=True)
|
|
39
|
+
|
|
40
|
+
def generate(self):
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
def execute(self):
|
|
44
|
+
verible_args = Namespace(rules=None, files=self.args.files, fix=self.args.fix)
|
|
45
|
+
verible = VeribleFlow('verible', verible_args, self.project, self.builddir)
|
|
46
|
+
vsg_args = Namespace(rules=None, files=self.args.files, fix=self.args.fix, output_format='syntastic')
|
|
47
|
+
vsg = VsgFlow('vsg', vsg_args, self.project, self.builddir)
|
|
48
|
+
flake_args = Namespace(files=self.args.files, fix=self.args.fix)
|
|
49
|
+
flake = Flake8Flow('flake8', flake_args, self.project, self.builddir)
|
|
50
|
+
system_error = False
|
|
51
|
+
try:
|
|
52
|
+
verible.run()
|
|
53
|
+
except SystemError:
|
|
54
|
+
system_error = True
|
|
55
|
+
|
|
56
|
+
try:
|
|
57
|
+
vsg.run()
|
|
58
|
+
except SystemError:
|
|
59
|
+
system_error = True
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
flake.run()
|
|
63
|
+
except SystemError:
|
|
64
|
+
system_error = True
|
|
65
|
+
|
|
66
|
+
if system_error:
|
|
67
|
+
raise SystemError
|
|
68
|
+
|
|
69
|
+
def run(self) -> None:
|
|
70
|
+
self.setup()
|
|
71
|
+
self.generate()
|
|
72
|
+
self.execute()
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
import logging
|
|
3
|
+
|
|
4
|
+
from argparse import Namespace
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from simplhdl.flow import FlowFactory, FlowTools
|
|
8
|
+
from simplhdl.flows.implementationflow import ImplementationFlow
|
|
9
|
+
from simplhdl.flows.quartusflow import QuartusFlow
|
|
10
|
+
from simplhdl.resources.templates import quartus as templates
|
|
11
|
+
from simplhdl.utils import sh
|
|
12
|
+
from simplhdl.pyedaa.project import Project
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@FlowFactory.register('quartus-dse')
|
|
18
|
+
class QuartusDseFlow(ImplementationFlow):
|
|
19
|
+
|
|
20
|
+
@classmethod
|
|
21
|
+
def parse_args(self, subparsers) -> None:
|
|
22
|
+
parser = subparsers.add_parser('quartus-dse', help='Quartus Design Space Explore Flow')
|
|
23
|
+
parser.add_argument(
|
|
24
|
+
'--gui',
|
|
25
|
+
action='store_true',
|
|
26
|
+
help="Open project in Quartus GUI"
|
|
27
|
+
)
|
|
28
|
+
parser.add_argument(
|
|
29
|
+
'--dse-args',
|
|
30
|
+
default='',
|
|
31
|
+
action='store',
|
|
32
|
+
metavar='ARGS',
|
|
33
|
+
help="Extra arguments for Quartus Design Space Explore command"
|
|
34
|
+
)
|
|
35
|
+
parser.add_argument(
|
|
36
|
+
'--dse-file',
|
|
37
|
+
action='store',
|
|
38
|
+
metavar='FILE',
|
|
39
|
+
help="The .dse configuration file to be used for this project"
|
|
40
|
+
)
|
|
41
|
+
parser.add_argument(
|
|
42
|
+
'--num-seeds',
|
|
43
|
+
action='store',
|
|
44
|
+
help="Number of seeds to sweep as part of the exploration space. "
|
|
45
|
+
+ "DSE auto-generates seed values when this is provided"
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
49
|
+
super().__init__(name, args, project, builddir)
|
|
50
|
+
self.templates = templates
|
|
51
|
+
self.tools.add(FlowTools.QUARTUS)
|
|
52
|
+
|
|
53
|
+
def run(self) -> None:
|
|
54
|
+
quartus = QuartusFlow('quartus', None, self.project, self.builddir)
|
|
55
|
+
quartus.validate()
|
|
56
|
+
quartus.configure()
|
|
57
|
+
quartus.generate()
|
|
58
|
+
self.execute()
|
|
59
|
+
|
|
60
|
+
def execute(self):
|
|
61
|
+
name = self.project.Name
|
|
62
|
+
if self.args.gui:
|
|
63
|
+
sh(['quartus_dsew', name], cwd=self.builddir)
|
|
64
|
+
return
|
|
65
|
+
args = self.args.dse_args
|
|
66
|
+
if self.args.num_seeds:
|
|
67
|
+
args += f" --num-seeds {self.args.num_seeds}"
|
|
68
|
+
if self.args.dse_file:
|
|
69
|
+
args += f" --use-dse-file {self.args.dse_file}"
|
|
70
|
+
command = f"quartus_dse {args} {name}".split()
|
|
71
|
+
sh(command, cwd=self.builddir, output=True)
|
|
72
|
+
|
|
73
|
+
def is_tool_setup(self) -> None:
|
|
74
|
+
exit: bool = False
|
|
75
|
+
if shutil.which('quartus_sh') is None:
|
|
76
|
+
logger.error('quartus_sh: not found in PATH')
|
|
77
|
+
exit = True
|
|
78
|
+
if shutil.which('quartus') is None:
|
|
79
|
+
logger.error('quartus: not found in PATH')
|
|
80
|
+
exit = True
|
|
81
|
+
if exit:
|
|
82
|
+
raise FileNotFoundError("Quartus is not setup correctly")
|
|
@@ -8,7 +8,7 @@ from argparse import Namespace
|
|
|
8
8
|
from jinja2 import Template
|
|
9
9
|
from simplhdl.pyedaa.project import Project
|
|
10
10
|
from simplhdl.pyedaa.fileset import FileSet
|
|
11
|
-
from simplhdl.utils import sh
|
|
11
|
+
from simplhdl.utils import sh, escape
|
|
12
12
|
from simplhdl.flow import FlowFactory, FlowTools
|
|
13
13
|
from simplhdl.resources.templates import questasim as questasimtemplates
|
|
14
14
|
from simplhdl.flows.simulationflow import SimulationFlow
|
|
@@ -25,7 +25,7 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
25
25
|
parser.add_argument(
|
|
26
26
|
'--step',
|
|
27
27
|
action='store',
|
|
28
|
-
choices=['compile', 'elaborate', 'simulate'],
|
|
28
|
+
choices=['generate', 'compile', 'elaborate', 'simulate'],
|
|
29
29
|
default='simulate',
|
|
30
30
|
help="flow step to run"
|
|
31
31
|
)
|
|
@@ -116,7 +116,8 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
116
116
|
def get_project_templates(self, environment) -> List[Template]:
|
|
117
117
|
return [
|
|
118
118
|
environment.get_template('Makefile.j2'),
|
|
119
|
-
environment.get_template('project.mk.j2')
|
|
119
|
+
environment.get_template('project.mk.j2'),
|
|
120
|
+
environment.get_template('gui.do.j2')
|
|
120
121
|
]
|
|
121
122
|
|
|
122
123
|
def get_cocotb_templates(self, environment):
|
|
@@ -144,7 +145,7 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
144
145
|
if self.args.verbose == 0:
|
|
145
146
|
args.add('-quiet')
|
|
146
147
|
for name, value in self.project.Defines.items():
|
|
147
|
-
args.add(f"+define+{name}={value}")
|
|
148
|
+
args.add(f"+define+{name}={escape(value)}")
|
|
148
149
|
return ' '.join(list(args) + [self.args.vlog_args])
|
|
149
150
|
|
|
150
151
|
def vcom_args(self) -> str:
|
|
@@ -166,9 +167,9 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
166
167
|
if self.args.timescale:
|
|
167
168
|
args.add(f"-timescale {self.args.timescale}")
|
|
168
169
|
for name, value in self.project.Generics.items():
|
|
169
|
-
args.add(f"-g{name}={value}")
|
|
170
|
+
args.add(f"-g{name}={escape(value)}")
|
|
170
171
|
for name, value in self.project.Parameters.items():
|
|
171
|
-
args.add(f"-g{name}={value}")
|
|
172
|
+
args.add(f"-g{name}={escape(value)}")
|
|
172
173
|
if self.args.gui or self.args.do or self.args.wave or self.cocotb.enabled:
|
|
173
174
|
args.add('+acc=npr')
|
|
174
175
|
return ' '.join(list(args) + [self.args.vopt_args])
|
|
@@ -182,7 +183,7 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
182
183
|
if self.args.verbose == 0:
|
|
183
184
|
args.add('-quiet')
|
|
184
185
|
for name, value in self.project.PlusArgs.items():
|
|
185
|
-
args.add(f"+{name}={value}")
|
|
186
|
+
args.add(f"+{name}={escape(value)}")
|
|
186
187
|
if self.args.gui:
|
|
187
188
|
args.add('-onfinish final')
|
|
188
189
|
else:
|
|
@@ -202,8 +203,12 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
202
203
|
|
|
203
204
|
def execute(self, step: str) -> None:
|
|
204
205
|
self.run_hooks('pre')
|
|
205
|
-
|
|
206
|
+
|
|
207
|
+
if step == 'generate':
|
|
208
|
+
return
|
|
209
|
+
|
|
206
210
|
if step == 'compile':
|
|
211
|
+
sh(['make', 'compile'], cwd=self.builddir, output=True)
|
|
207
212
|
return
|
|
208
213
|
|
|
209
214
|
if self.args.do:
|
|
@@ -8,7 +8,7 @@ from argparse import Namespace
|
|
|
8
8
|
from jinja2 import Template
|
|
9
9
|
from simplhdl.pyedaa.project import Project
|
|
10
10
|
from simplhdl.pyedaa.fileset import FileSet
|
|
11
|
-
from simplhdl.utils import sh
|
|
11
|
+
from simplhdl.utils import sh, escape
|
|
12
12
|
from simplhdl.flow import FlowFactory, FlowTools
|
|
13
13
|
from simplhdl.resources.templates import rivierapro as rivieraprotemplates
|
|
14
14
|
from simplhdl.flows.simulationflow import SimulationFlow
|
|
@@ -150,7 +150,7 @@ class RivieraProFlow(SimulationFlow):
|
|
|
150
150
|
if self.args.gui:
|
|
151
151
|
args.add('-dbg')
|
|
152
152
|
for name, value in self.project.Defines.items():
|
|
153
|
-
args.add(f"+define+{name}={value}")
|
|
153
|
+
args.add(f"+define+{name}={escape(value)}")
|
|
154
154
|
return ' '.join(list(args) + [self.args.vlog_args])
|
|
155
155
|
|
|
156
156
|
def vcom_args(self) -> str:
|
|
@@ -175,11 +175,11 @@ class RivieraProFlow(SimulationFlow):
|
|
|
175
175
|
for name in self.get_libraries().keys():
|
|
176
176
|
args.add(f"-L {name}")
|
|
177
177
|
for name, value in self.project.Generics.items():
|
|
178
|
-
args.add(f"-g{name}={value}")
|
|
178
|
+
args.add(f"-g{name}={escape(value)}")
|
|
179
179
|
for name, value in self.project.Parameters.items():
|
|
180
|
-
args.add(f"-g{name}={value}")
|
|
180
|
+
args.add(f"-g{name}={escape(value)}")
|
|
181
181
|
for name, value in self.project.PlusArgs.items():
|
|
182
|
-
args.add(f"+{name}={value}")
|
|
182
|
+
args.add(f"+{name}={escape(value)}")
|
|
183
183
|
if self.args.gui:
|
|
184
184
|
args.add('-dbg +access +r')
|
|
185
185
|
if self.cocotb.enabled:
|
|
@@ -17,7 +17,7 @@ from simplhdl.cocotb import Cocotb
|
|
|
17
17
|
from simplhdl.pyedaa.fileset import FileSet
|
|
18
18
|
from simplhdl.pyedaa import (File, VerilogSourceFile, VerilogIncludeFile,
|
|
19
19
|
SystemVerilogSourceFile, VHDLSourceFile)
|
|
20
|
-
from simplhdl.utils import generate_from_template, md5sum, append_suffix
|
|
20
|
+
from simplhdl.utils import generate_from_template, md5sum, md5check, md5write, append_suffix
|
|
21
21
|
|
|
22
22
|
logger = logging.getLogger(__name__)
|
|
23
23
|
|
|
@@ -28,10 +28,11 @@ class SimulationFlow(FlowBase):
|
|
|
28
28
|
super().__init__(name, args, project, builddir)
|
|
29
29
|
self.category = FlowCategory.SIMULATION
|
|
30
30
|
self.hdl_language = None
|
|
31
|
-
self.cocotb = Cocotb(project)
|
|
32
31
|
self.templates = None
|
|
32
|
+
self.hashfile = self.builddir.joinpath('filesets.hash')
|
|
33
33
|
|
|
34
34
|
def run(self) -> None:
|
|
35
|
+
self.cocotb = Cocotb(self.project)
|
|
35
36
|
self.validate()
|
|
36
37
|
self.configure()
|
|
37
38
|
self.generate()
|
|
@@ -56,9 +57,13 @@ class SimulationFlow(FlowBase):
|
|
|
56
57
|
globals['libraries'] = (list(self.project.DefaultDesign.VHDLLibraries.values()))
|
|
57
58
|
globals['external_libraries'] = list(self.project.DefaultDesign.ExternalVHDLLibraries.values())
|
|
58
59
|
globals['defaultlib'] = 'work'
|
|
59
|
-
globals['toplevels'] =
|
|
60
|
-
[t for t in self.project.DefaultDesign.TopLevel.split() if t != self.cocotb.module()])
|
|
60
|
+
globals['toplevels'] = self.cocotb.toplevels
|
|
61
61
|
globals['pythonpath'] = self.cocotb.pythonpath
|
|
62
|
+
globals['cocotbtop'] = self.cocotb.top
|
|
63
|
+
globals['cocotbhdltype'] = self.cocotb.duttype
|
|
64
|
+
globals['cocotbdut'] = self.cocotb.dut
|
|
65
|
+
globals['VerilogSourceFile'] = VerilogSourceFile
|
|
66
|
+
globals['VHDLSourceFile'] = VHDLSourceFile
|
|
62
67
|
globals['uvm'] = self.is_uvm()
|
|
63
68
|
return globals
|
|
64
69
|
|
|
@@ -70,6 +75,7 @@ class SimulationFlow(FlowBase):
|
|
|
70
75
|
for template in self.get_project_templates(env) + self.get_cocotb_templates(env):
|
|
71
76
|
generate_from_template(template, self.builddir, self.get_globals())
|
|
72
77
|
self.generate_make_rules(env)
|
|
78
|
+
self.is_filesets_changed()
|
|
73
79
|
|
|
74
80
|
def generate_make_rules(self, environment):
|
|
75
81
|
walker = FileSetWalker()
|
|
@@ -122,7 +128,8 @@ class SimulationFlow(FlowBase):
|
|
|
122
128
|
template,
|
|
123
129
|
base.with_suffix('.files'),
|
|
124
130
|
target=base.with_suffix('.fileset').name,
|
|
125
|
-
files=[f.Path.absolute() for f in files]
|
|
131
|
+
files=[f.Path.absolute() for f in files],
|
|
132
|
+
hashfile=self.hashfile.name)
|
|
126
133
|
template = environment.get_template('fileset.j2')
|
|
127
134
|
output = base.with_suffix('.fileset')
|
|
128
135
|
includes = {f.Path.parent.absolute() for f in files if isinstance(f, VerilogIncludeFile)}
|
|
@@ -155,6 +162,20 @@ class SimulationFlow(FlowBase):
|
|
|
155
162
|
libraries.update(self.project.DefaultDesign.ExternalVHDLLibraries)
|
|
156
163
|
return libraries
|
|
157
164
|
|
|
165
|
+
def is_filesets_changed(self) -> bool:
|
|
166
|
+
"""
|
|
167
|
+
Check if there are any changes in filesets since last run.
|
|
168
|
+
"""
|
|
169
|
+
filesets = []
|
|
170
|
+
walker = FileSetWalker()
|
|
171
|
+
for fileset in walker.walk(self.project.DefaultDesign.DefaultFileSet):
|
|
172
|
+
filesets += [Path(f.Name) for f in FileSetWalker().walk(fileset) if Path(f.Name).is_file()]
|
|
173
|
+
if self.hashfile.is_file() and md5check(*filesets, filename=self.hashfile):
|
|
174
|
+
return True
|
|
175
|
+
else:
|
|
176
|
+
md5write(*filesets, filename=self.hashfile)
|
|
177
|
+
return False
|
|
178
|
+
|
|
158
179
|
|
|
159
180
|
class FileSetWalker:
|
|
160
181
|
|