SimplHDL 0.0.4__tar.gz → 0.0.6__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.4 → simplhdl-0.0.6}/PKG-INFO +3 -1
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/pyproject.toml +2 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/SimplHDL.egg-info/PKG-INFO +3 -1
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/SimplHDL.egg-info/SOURCES.txt +13 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/SimplHDL.egg-info/requires.txt +2 -0
- simplhdl-0.0.6/src/simplhdl/__init__.py +1 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/__main__.py +2 -0
- simplhdl-0.0.6/src/simplhdl/cocotb.py +118 -0
- simplhdl-0.0.6/src/simplhdl/flows/quartusdse/quartusdseflow.py +82 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/questasim/questasimflow.py +28 -12
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/rivierapro/rivieraproflow.py +5 -5
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/simulationflow.py +7 -3
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/vcs/vcsflow.py +30 -8
- simplhdl-0.0.6/src/simplhdl/flows/verible/veribleflow.py +92 -0
- simplhdl-0.0.6/src/simplhdl/flows/vsg/vsgflow.py +106 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/xsim/xsimflow.py +5 -5
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/info.py +63 -39
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/plugins.py +3 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/pyedaa/__init__.py +4 -1
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/pyedaa/fileset.py +22 -4
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/Makefile.j2 +14 -10
- simplhdl-0.0.6/src/simplhdl/resources/templates/questasim/cocotb.mk.j2 +22 -0
- simplhdl-0.0.6/src/simplhdl/resources/templates/questasim/gui.do.j2 +18 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/Makefile.j2 +8 -8
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2 +11 -8
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/Makefile.j2 +4 -4
- simplhdl-0.0.6/src/simplhdl/resources/templates/vcs/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/cocotb.mk.j2 +4 -0
- simplhdl-0.0.6/src/simplhdl/resources/templates/vcs/vcs.parameters.j2 +3 -0
- simplhdl-0.0.6/src/simplhdl/resources/templates/verible/__init__.py +0 -0
- simplhdl-0.0.6/src/simplhdl/resources/templates/verible/rules.cfg.j2 +0 -0
- simplhdl-0.0.6/src/simplhdl/resources/templates/vivado/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vivado/project.tcl.j2 +17 -17
- simplhdl-0.0.6/src/simplhdl/resources/templates/vsg/__init__.py +0 -0
- simplhdl-0.0.6/src/simplhdl/resources/templates/vsg/files.json.j2 +7 -0
- simplhdl-0.0.6/src/simplhdl/resources/templates/vsg/rules.yml.j2 +15 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/Makefile.j2 +4 -4
- simplhdl-0.0.6/src/simplhdl/resources/templates/xsim/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/utils.py +11 -0
- SimplHDL-0.0.4/src/simplhdl/__init__.py +0 -1
- SimplHDL-0.0.4/src/simplhdl/cocotb.py +0 -52
- SimplHDL-0.0.4/src/simplhdl/resources/templates/questasim/cocotb.mk.j2 +0 -19
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/.github/workflows/publish.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/.gitignore +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/.readthedocs.yaml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/LICENSE +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/README.md +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/_static/simplhdl_dark.png +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/_static/simplhdl_light.png +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/_static/simplhdl_light_1.png +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/conf.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/drawing.svg +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows/ghdl.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows/icarus.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows/quartus.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows/questasim.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows/vcs.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows/vivado.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows/xsim.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/flows.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/index.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/intel-ips.md +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/introduction.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/plugins.rst +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/docs/requirements.txt +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/adder.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/hdl/adder.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/sim/testbench.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/sim/testbench.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/syn/build.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/syn/placement.xdc +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/syn/timing.xdc +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/adder/syn/top.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/alu.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/hdl/add.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/hdl/alu.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/hdl/mul.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/hdl/sub.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/agent.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/aluif.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/driver.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/monitor.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/sequenceitem.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/sequencer.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/clock_vip/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/clock_vip/agent.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/clock_vip/clockif.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/pyuvm.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/env.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/seq_lib.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/test.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/testbench.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/agent.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/driver.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/env.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/monitor.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/sequence_item.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/add_seq.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/base_seq.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/tb_env.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/tb_env.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/test/base_test.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/test/test_add.svh +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testbench/alu_if.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testbench/testbench.sv +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testbench/testbench.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testcases/test_add/test_add.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/syn/build.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/syn/placement.xdc +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/alu/syn/timing.xdc +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/hello/build.sbt +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/hello/hello.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/hello/src/main/scala/Hello.scala +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/hdl/hello/syn/build.yml +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/plugins/simple_parser/setup.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/plugins/simple_parser/src/simple_parser/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/examples/plugins/simple_parser/src/simple_parser/simple_parser.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/setup.cfg +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/SimplHDL.egg-info/dependency_links.txt +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/SimplHDL.egg-info/entry_points.txt +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/SimplHDL.egg-info/top_level.txt +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flow.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/implementationflow.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/modelsimflow.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/flows/questasim → simplhdl-0.0.6/src/simplhdl/flows/quartusdse}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/quartusflow.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/flows/rivierapro → simplhdl-0.0.6/src/simplhdl/flows/questasim}/__init__.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/flows/vcs → simplhdl-0.0.6/src/simplhdl/flows/rivierapro}/__init__.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/flows/xsim → simplhdl-0.0.6/src/simplhdl/flows/vcs}/__init__.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/generators → simplhdl-0.0.6/src/simplhdl/flows/verible}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/flows/vivadoflow.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/parsers → simplhdl-0.0.6/src/simplhdl/flows/vsg}/__init__.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources → simplhdl-0.0.6/src/simplhdl/flows/xsim}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/generator.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources/templates → simplhdl-0.0.6/src/simplhdl/generators}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/generators/chisel.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/generators/ipxact.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/generators/spd.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/generators/systemrdl.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/parser.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources/templates/quartus → simplhdl-0.0.6/src/simplhdl/parsers}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/parsers/fusesocparser.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/parsers/simplhdlparser.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/pyedaa/attributes.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/pyedaa/design.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/pyedaa/filetypes.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/pyedaa/project.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/pyedaa/vhdllibrary.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/repo.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources/templates/questasim → simplhdl-0.0.6/src/simplhdl/resources}/__init__.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources/templates/rivierapro → simplhdl-0.0.6/src/simplhdl/resources/templates}/__init__.py +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources/templates/vcs → simplhdl-0.0.6/src/simplhdl/resources/templates/quartus}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/quartus/project.tcl.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/quartus/run.tcl.j2 +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources/templates/vivado → simplhdl-0.0.6/src/simplhdl/resources/templates/questasim}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/dependencies.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/files.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/fileset.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/project.mk.j2 +0 -0
- {SimplHDL-0.0.4/src/simplhdl/resources/templates/xsim → simplhdl-0.0.6/src/simplhdl/resources/templates/rivierapro}/__init__.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/dependencies.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/files.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/fileset.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/project.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/dependencies.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/files.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/fileset.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/pli.tab.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/project.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vivado/launch_run.sh.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vivado/run.tcl.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vivado/steps.tcl.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/cocotb.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/dependencies.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/files.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/fileset.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/project.mk.j2 +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/simplhdl.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/src/simplhdl/tools.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/tests/test_dummy.py +0 -0
- {SimplHDL-0.0.4 → simplhdl-0.0.6}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SimplHDL
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
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>
|
|
@@ -51,6 +51,8 @@ Requires-Dist: types-PyYAML
|
|
|
51
51
|
Requires-Dist: argcomplete
|
|
52
52
|
Requires-Dist: jinja2
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
|
+
Requires-Dist: rich
|
|
55
|
+
Requires-Dist: vsg
|
|
54
56
|
|
|
55
57
|
## Introduction
|
|
56
58
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SimplHDL
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
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>
|
|
@@ -51,6 +51,8 @@ Requires-Dist: types-PyYAML
|
|
|
51
51
|
Requires-Dist: argcomplete
|
|
52
52
|
Requires-Dist: jinja2
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
|
+
Requires-Dist: rich
|
|
55
|
+
Requires-Dist: vsg
|
|
54
56
|
|
|
55
57
|
## Introduction
|
|
56
58
|
|
|
@@ -103,12 +103,18 @@ 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/quartusdse/__init__.py
|
|
107
|
+
src/simplhdl/flows/quartusdse/quartusdseflow.py
|
|
106
108
|
src/simplhdl/flows/questasim/__init__.py
|
|
107
109
|
src/simplhdl/flows/questasim/questasimflow.py
|
|
108
110
|
src/simplhdl/flows/rivierapro/__init__.py
|
|
109
111
|
src/simplhdl/flows/rivierapro/rivieraproflow.py
|
|
110
112
|
src/simplhdl/flows/vcs/__init__.py
|
|
111
113
|
src/simplhdl/flows/vcs/vcsflow.py
|
|
114
|
+
src/simplhdl/flows/verible/__init__.py
|
|
115
|
+
src/simplhdl/flows/verible/veribleflow.py
|
|
116
|
+
src/simplhdl/flows/vsg/__init__.py
|
|
117
|
+
src/simplhdl/flows/vsg/vsgflow.py
|
|
112
118
|
src/simplhdl/flows/xsim/__init__.py
|
|
113
119
|
src/simplhdl/flows/xsim/xsimflow.py
|
|
114
120
|
src/simplhdl/generators/__init__.py
|
|
@@ -137,6 +143,7 @@ src/simplhdl/resources/templates/questasim/cocotb.mk.j2
|
|
|
137
143
|
src/simplhdl/resources/templates/questasim/dependencies.mk.j2
|
|
138
144
|
src/simplhdl/resources/templates/questasim/files.j2
|
|
139
145
|
src/simplhdl/resources/templates/questasim/fileset.j2
|
|
146
|
+
src/simplhdl/resources/templates/questasim/gui.do.j2
|
|
140
147
|
src/simplhdl/resources/templates/questasim/project.mk.j2
|
|
141
148
|
src/simplhdl/resources/templates/rivierapro/Makefile.j2
|
|
142
149
|
src/simplhdl/resources/templates/rivierapro/__init__.py
|
|
@@ -154,11 +161,17 @@ src/simplhdl/resources/templates/vcs/fileset.j2
|
|
|
154
161
|
src/simplhdl/resources/templates/vcs/pli.tab.j2
|
|
155
162
|
src/simplhdl/resources/templates/vcs/project.mk.j2
|
|
156
163
|
src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2
|
|
164
|
+
src/simplhdl/resources/templates/vcs/vcs.parameters.j2
|
|
165
|
+
src/simplhdl/resources/templates/verible/__init__.py
|
|
166
|
+
src/simplhdl/resources/templates/verible/rules.cfg.j2
|
|
157
167
|
src/simplhdl/resources/templates/vivado/__init__.py
|
|
158
168
|
src/simplhdl/resources/templates/vivado/launch_run.sh.j2
|
|
159
169
|
src/simplhdl/resources/templates/vivado/project.tcl.j2
|
|
160
170
|
src/simplhdl/resources/templates/vivado/run.tcl.j2
|
|
161
171
|
src/simplhdl/resources/templates/vivado/steps.tcl.j2
|
|
172
|
+
src/simplhdl/resources/templates/vsg/__init__.py
|
|
173
|
+
src/simplhdl/resources/templates/vsg/files.json.j2
|
|
174
|
+
src/simplhdl/resources/templates/vsg/rules.yml.j2
|
|
162
175
|
src/simplhdl/resources/templates/xsim/Makefile.j2
|
|
163
176
|
src/simplhdl/resources/templates/xsim/__init__.py
|
|
164
177
|
src/simplhdl/resources/templates/xsim/cocotb.mk.j2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.6"
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
print(file.Path)
|
|
89
|
+
if file.Library.Name == lib:
|
|
90
|
+
logger.info(f"Cocotb dut '{self.dut}' is Verilog")
|
|
91
|
+
return VerilogSourceFile
|
|
92
|
+
else:
|
|
93
|
+
logger.warning(f"Found HDL module {name} in ",
|
|
94
|
+
f"library '{file.Library.Name}' expected '{lib}'")
|
|
95
|
+
else:
|
|
96
|
+
continue
|
|
97
|
+
except UnicodeDecodeError:
|
|
98
|
+
logger.warning(f"Can't decode {file.Path}")
|
|
99
|
+
raise FlowError(f"Could not find HDL entity/module '{name}' in library '{lib}'")
|
|
100
|
+
|
|
101
|
+
def is_python_module(self, name: str):
|
|
102
|
+
# TODO: Should we also search in installed packages?
|
|
103
|
+
if [f for f in self.files() if f.Path.stem == name]:
|
|
104
|
+
return True
|
|
105
|
+
|
|
106
|
+
def files(self):
|
|
107
|
+
return self.project.DefaultDesign.Files(CocotbPythonFile)
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def enabled(self) -> bool:
|
|
111
|
+
for file in self.files():
|
|
112
|
+
return True
|
|
113
|
+
return False
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def pythonpath(self) -> str:
|
|
117
|
+
directories = {str(f.Path.parent.absolute()) for f in self.files()}
|
|
118
|
+
return ':'.join(directories)
|
|
@@ -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")
|
|
@@ -3,12 +3,12 @@ import logging
|
|
|
3
3
|
import shutil
|
|
4
4
|
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import Any, List, Dict
|
|
6
|
+
from typing import Any, List, Dict, Optional
|
|
7
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):
|
|
@@ -143,10 +144,8 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
143
144
|
args = set()
|
|
144
145
|
if self.args.verbose == 0:
|
|
145
146
|
args.add('-quiet')
|
|
146
|
-
for name in self.get_libraries().keys():
|
|
147
|
-
args.add(f"-L {name}")
|
|
148
147
|
for name, value in self.project.Defines.items():
|
|
149
|
-
args.add(f"+define+{name}={value}")
|
|
148
|
+
args.add(f"+define+{name}={escape(value)}")
|
|
150
149
|
return ' '.join(list(args) + [self.args.vlog_args])
|
|
151
150
|
|
|
152
151
|
def vcom_args(self) -> str:
|
|
@@ -168,20 +167,23 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
168
167
|
if self.args.timescale:
|
|
169
168
|
args.add(f"-timescale {self.args.timescale}")
|
|
170
169
|
for name, value in self.project.Generics.items():
|
|
171
|
-
args.add(f"-g{name}={value}")
|
|
170
|
+
args.add(f"-g{name}={escape(value)}")
|
|
172
171
|
for name, value in self.project.Parameters.items():
|
|
173
|
-
args.add(f"-g{name}={value}")
|
|
174
|
-
if self.args.gui or self.cocotb.enabled:
|
|
172
|
+
args.add(f"-g{name}={escape(value)}")
|
|
173
|
+
if self.args.gui or self.args.do or self.args.wave or self.cocotb.enabled:
|
|
175
174
|
args.add('+acc=npr')
|
|
176
175
|
return ' '.join(list(args) + [self.args.vopt_args])
|
|
177
176
|
|
|
178
177
|
def vsim_args(self) -> str:
|
|
179
178
|
args = set()
|
|
180
179
|
args.add(f"-sv_seed {self.args.seed}")
|
|
180
|
+
timescale = self.timescale()
|
|
181
|
+
if timescale:
|
|
182
|
+
args.add(timescale)
|
|
181
183
|
if self.args.verbose == 0:
|
|
182
184
|
args.add('-quiet')
|
|
183
185
|
for name, value in self.project.PlusArgs.items():
|
|
184
|
-
args.add(f"+{name}={value}")
|
|
186
|
+
args.add(f"+{name}={escape(value)}")
|
|
185
187
|
if self.args.gui:
|
|
186
188
|
args.add('-onfinish final')
|
|
187
189
|
else:
|
|
@@ -201,8 +203,12 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
201
203
|
|
|
202
204
|
def execute(self, step: str) -> None:
|
|
203
205
|
self.run_hooks('pre')
|
|
204
|
-
|
|
206
|
+
|
|
207
|
+
if step == 'generate':
|
|
208
|
+
return
|
|
209
|
+
|
|
205
210
|
if step == 'compile':
|
|
211
|
+
sh(['make', 'compile'], cwd=self.builddir, output=True)
|
|
206
212
|
return
|
|
207
213
|
|
|
208
214
|
if self.args.do:
|
|
@@ -228,6 +234,16 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
228
234
|
# NOTE: Continue if no hook is registret
|
|
229
235
|
pass
|
|
230
236
|
|
|
237
|
+
def timescale(self) -> Optional[str]:
|
|
238
|
+
"""
|
|
239
|
+
Sets the timescale for VHDL based on the Verilog timescale
|
|
240
|
+
resolution.
|
|
241
|
+
"""
|
|
242
|
+
if self.args.timescale.endswith('ps'):
|
|
243
|
+
return "-t ps"
|
|
244
|
+
elif self.args.timescale.endswith('fs'):
|
|
245
|
+
return "-t fs"
|
|
246
|
+
|
|
231
247
|
def is_tool_setup(self) -> None:
|
|
232
248
|
if (shutil.which('vlog') is None or
|
|
233
249
|
shutil.which('vsim') is None or
|
|
@@ -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:
|
|
@@ -56,9 +56,13 @@ class SimulationFlow(FlowBase):
|
|
|
56
56
|
globals['libraries'] = (list(self.project.DefaultDesign.VHDLLibraries.values()))
|
|
57
57
|
globals['external_libraries'] = list(self.project.DefaultDesign.ExternalVHDLLibraries.values())
|
|
58
58
|
globals['defaultlib'] = 'work'
|
|
59
|
-
globals['toplevels'] =
|
|
60
|
-
[t for t in self.project.DefaultDesign.TopLevel.split() if t != self.cocotb.module()])
|
|
59
|
+
globals['toplevels'] = self.cocotb.toplevels
|
|
61
60
|
globals['pythonpath'] = self.cocotb.pythonpath
|
|
61
|
+
globals['cocotbtop'] = self.cocotb.top
|
|
62
|
+
globals['cocotbhdltype'] = self.cocotb.duttype
|
|
63
|
+
globals['cocotbdut'] = self.cocotb.dut
|
|
64
|
+
globals['VerilogSourceFile'] = VerilogSourceFile
|
|
65
|
+
globals['VHDLSourceFile'] = VHDLSourceFile
|
|
62
66
|
globals['uvm'] = self.is_uvm()
|
|
63
67
|
return globals
|
|
64
68
|
|
|
@@ -97,7 +101,7 @@ class SimulationFlow(FlowBase):
|
|
|
97
101
|
name = md5sum(fileset.Name)
|
|
98
102
|
dependencies = []
|
|
99
103
|
for language_fileset in [f for f in filelist if f.stem.startswith(name)]:
|
|
100
|
-
for child in fileset.
|
|
104
|
+
for child in fileset.Dependencies(usedin='simulation'):
|
|
101
105
|
child_name = md5sum(child.Name)
|
|
102
106
|
dependencies += [append_suffix(f, '.com').name for f in filelist
|
|
103
107
|
if f.stem.startswith(child_name)]
|
|
@@ -3,12 +3,13 @@ import os
|
|
|
3
3
|
import logging
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
import shutil
|
|
6
|
+
import re
|
|
6
7
|
|
|
7
8
|
from typing import Dict, Any, List
|
|
8
9
|
from jinja2 import Template
|
|
9
10
|
from simplhdl.pyedaa.fileset import FileSet
|
|
10
11
|
from simplhdl.pyedaa.project import Project
|
|
11
|
-
from simplhdl.utils import sh
|
|
12
|
+
from simplhdl.utils import sh, escape
|
|
12
13
|
from simplhdl.flow import FlowFactory, FlowTools
|
|
13
14
|
from simplhdl.resources.templates import vcs as vcstemplates
|
|
14
15
|
from ..simulationflow import SimulationFlow
|
|
@@ -95,13 +96,34 @@ class VcsFlow(SimulationFlow):
|
|
|
95
96
|
globals['vhdlan_args'] = self.vhdlan_args()
|
|
96
97
|
globals['vcs_args'] = self.vcs_args()
|
|
97
98
|
globals['simv_args'] = self.simv_args()
|
|
99
|
+
globals['parameters'] = {**self.project.Generics, **self.project.Parameters}
|
|
100
|
+
globals['format'] = self.format
|
|
98
101
|
return globals
|
|
99
102
|
|
|
103
|
+
def format(self, value: str) -> str:
|
|
104
|
+
"""
|
|
105
|
+
Format the parameter value in relation to it's type.
|
|
106
|
+
"""
|
|
107
|
+
isformat_a = re.compile(r"^\d+#[0-9a-gA-G]+#")
|
|
108
|
+
isformat_b = re.compile(r"^\d*'(h|d|b)[0-9a-fA-F]+")
|
|
109
|
+
isformat_c = re.compile(r"^\d+\.\d+")
|
|
110
|
+
|
|
111
|
+
if (
|
|
112
|
+
value.isnumeric() or
|
|
113
|
+
isformat_a.match(value) or
|
|
114
|
+
isformat_b.match(value) or
|
|
115
|
+
isformat_c.match(value)
|
|
116
|
+
):
|
|
117
|
+
return value
|
|
118
|
+
else:
|
|
119
|
+
return f'"{value}"'
|
|
120
|
+
|
|
100
121
|
def get_project_templates(self, environment) -> List[Template]:
|
|
101
122
|
return [
|
|
102
123
|
environment.get_template('Makefile.j2'),
|
|
103
124
|
environment.get_template('synopsys_sim.setup.j2'),
|
|
104
|
-
environment.get_template('project.mk.j2')
|
|
125
|
+
environment.get_template('project.mk.j2'),
|
|
126
|
+
environment.get_template('vcs.parameters.j2'),
|
|
105
127
|
]
|
|
106
128
|
|
|
107
129
|
def get_cocotb_templates(self, environment):
|
|
@@ -128,7 +150,7 @@ class VcsFlow(SimulationFlow):
|
|
|
128
150
|
def vlogan_args(self) -> str:
|
|
129
151
|
args = set()
|
|
130
152
|
for name, value in self.project.Defines.items():
|
|
131
|
-
args.add(f"+define+{name}={value}")
|
|
153
|
+
args.add(f"+define+{name}={escape(value)}")
|
|
132
154
|
if self.args.verbose == 0:
|
|
133
155
|
args.add('-q')
|
|
134
156
|
elif self.args.verbose > 1:
|
|
@@ -161,10 +183,10 @@ class VcsFlow(SimulationFlow):
|
|
|
161
183
|
args.add('-debug_access+all')
|
|
162
184
|
if self.is_verdi():
|
|
163
185
|
args.add('-kdb')
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
186
|
+
parameters = {**self.project.Generics, **self.project.Parameters}
|
|
187
|
+
if parameters:
|
|
188
|
+
args.add('-gfile vcs.parameters -lca')
|
|
189
|
+
|
|
168
190
|
return ' '.join(list(args) + [self.args.vcs_args])
|
|
169
191
|
|
|
170
192
|
def simv_args(self) -> str:
|
|
@@ -172,7 +194,7 @@ class VcsFlow(SimulationFlow):
|
|
|
172
194
|
if self.args.seed != '1':
|
|
173
195
|
args.add(f"+ntb_random_seed={self.args.seed}")
|
|
174
196
|
for name, value in self.project.PlusArgs.items():
|
|
175
|
-
args.add(f"+{name}={value}")
|
|
197
|
+
args.add(f"+{name}={escape(value)}")
|
|
176
198
|
return ' '.join(list(args) + [self.args.simv_args])
|
|
177
199
|
|
|
178
200
|
def get_library(self, fileset: FileSet) -> str:
|
|
@@ -0,0 +1,92 @@
|
|
|
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 logging
|
|
7
|
+
from argparse import Namespace
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from jinja2 import Environment, FileSystemLoader
|
|
10
|
+
|
|
11
|
+
from simplhdl.flow import FlowFactory, FlowBase
|
|
12
|
+
from simplhdl.resources.templates import verible as templates
|
|
13
|
+
from simplhdl.utils import sh, CalledShError, generate_from_template
|
|
14
|
+
from simplhdl.pyedaa import VerilogIncludeFile, VerilogSourceFile, SystemVerilogSourceFile
|
|
15
|
+
from simplhdl.pyedaa.project import Project
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@FlowFactory.register('verible-verilog-lint')
|
|
21
|
+
class VeribleFlow(FlowBase):
|
|
22
|
+
|
|
23
|
+
@classmethod
|
|
24
|
+
def parse_args(self, subparsers) -> None:
|
|
25
|
+
parser = subparsers.add_parser('verible-verilog-lint', help='Verible Lint Flow')
|
|
26
|
+
# parser.add_argument(
|
|
27
|
+
# '--fix',
|
|
28
|
+
# action='store_true',
|
|
29
|
+
# help="Fix style formatting (Note: this modifies the source)"
|
|
30
|
+
# )
|
|
31
|
+
parser.add_argument(
|
|
32
|
+
'-r', '--rules',
|
|
33
|
+
action='store',
|
|
34
|
+
help="Rule configuration file"
|
|
35
|
+
)
|
|
36
|
+
parser.add_argument(
|
|
37
|
+
'-f', '--files',
|
|
38
|
+
type=lambda p: Path(p).absolute(),
|
|
39
|
+
nargs='+',
|
|
40
|
+
default=[],
|
|
41
|
+
help="Manually specify file list"
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
45
|
+
super().__init__(name, args, project, builddir)
|
|
46
|
+
self.templates = templates
|
|
47
|
+
|
|
48
|
+
def setup(self):
|
|
49
|
+
os.makedirs(self.builddir, exist_ok=True)
|
|
50
|
+
|
|
51
|
+
def generate(self):
|
|
52
|
+
templatedir = resources_files(self.templates)
|
|
53
|
+
environment = Environment(
|
|
54
|
+
loader=FileSystemLoader(templatedir),
|
|
55
|
+
trim_blocks=True)
|
|
56
|
+
template = environment.get_template('rules.cfg.j2')
|
|
57
|
+
generate_from_template(template, self.builddir)
|
|
58
|
+
|
|
59
|
+
def execute(self):
|
|
60
|
+
errors = False
|
|
61
|
+
command = ["verible-verilog-lint"]
|
|
62
|
+
if self.args.rules:
|
|
63
|
+
rules = self.args.rules
|
|
64
|
+
elif os.getenv('SIMPLHDL_VERIBLE_RULES'):
|
|
65
|
+
rules = self.args.rules
|
|
66
|
+
else:
|
|
67
|
+
rules = 'rules.cfg'
|
|
68
|
+
|
|
69
|
+
command += f"--check_syntax=false --rules_config {rules}".split()
|
|
70
|
+
|
|
71
|
+
# if self.args.fix:
|
|
72
|
+
# command.append("--fix")
|
|
73
|
+
# else:
|
|
74
|
+
# command += f"-ap -of {self.args.output_format}".split()
|
|
75
|
+
|
|
76
|
+
file_types = [VerilogIncludeFile, VerilogSourceFile, SystemVerilogSourceFile]
|
|
77
|
+
files = [f for f in self.project.DefaultDesign.Files() if f.FileType in file_types]
|
|
78
|
+
for file in files:
|
|
79
|
+
try:
|
|
80
|
+
cmd = command + [str(file.Path)]
|
|
81
|
+
sh(cmd, cwd=self.builddir, output=True)
|
|
82
|
+
except CalledShError as e:
|
|
83
|
+
errors = True
|
|
84
|
+
print(e)
|
|
85
|
+
|
|
86
|
+
if errors:
|
|
87
|
+
return SystemError
|
|
88
|
+
|
|
89
|
+
def run(self) -> None:
|
|
90
|
+
self.setup()
|
|
91
|
+
self.generate()
|
|
92
|
+
self.execute()
|