SimplHDL 0.0.5__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.5 → simplhdl-0.0.6}/PKG-INFO +2 -1
- {simplhdl-0.0.5 → simplhdl-0.0.6}/pyproject.toml +1 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/SimplHDL.egg-info/PKG-INFO +2 -1
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/SimplHDL.egg-info/SOURCES.txt +12 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/SimplHDL.egg-info/requires.txt +1 -0
- simplhdl-0.0.6/src/simplhdl/__init__.py +1 -0
- {simplhdl-0.0.5 → 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.5 → simplhdl-0.0.6}/src/simplhdl/flows/questasim/questasimflow.py +13 -8
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/rivierapro/rivieraproflow.py +5 -5
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/simulationflow.py +6 -2
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/vcs/vcsflow.py +3 -3
- 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.5 → simplhdl-0.0.6}/src/simplhdl/flows/xsim/xsimflow.py +5 -5
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/info.py +0 -1
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/plugins.py +3 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/Makefile.j2 +8 -6
- 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.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/Makefile.j2 +4 -4
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2 +11 -8
- simplhdl-0.0.6/src/simplhdl/resources/templates/vcs/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/cocotb.mk.j2 +4 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/vcs.parameters.j2 +1 -1
- 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.5 → 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.6/src/simplhdl/resources/templates/xsim/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/utils.py +11 -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.6}/.github/workflows/publish.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/.gitignore +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/.readthedocs.yaml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/LICENSE +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/README.md +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/_static/simplhdl_dark.png +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/_static/simplhdl_light.png +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/_static/simplhdl_light_1.png +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/conf.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/drawing.svg +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows/ghdl.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows/icarus.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows/quartus.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows/questasim.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows/vcs.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows/vivado.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows/xsim.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/flows.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/index.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/intel-ips.md +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/introduction.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/plugins.rst +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/docs/requirements.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/adder.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/hdl/adder.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/sim/testbench.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/sim/testbench.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/syn/build.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/syn/placement.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/syn/timing.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/adder/syn/top.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/alu.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/hdl/add.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/hdl/alu.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/hdl/mul.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/hdl/sub.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/agent.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/aluif.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/driver.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/monitor.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/sequenceitem.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/alu_vip/sequencer.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/clock_vip/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/clock_vip/agent.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/clock_vip/clockif.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/pyuvm.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/env.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/seq_lib.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/test/test.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/pyuvm/testbench.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/agent.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/driver.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/env.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/monitor.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/alu_vip/sequence_item.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/add_seq.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/base_seq.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/tb_env.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/tb_env.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/test/base_test.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/tb_env/test/test_add.svh +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testbench/alu_if.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testbench/testbench.sv +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testbench/testbench.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/sim/uvm/testcases/test_add/test_add.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/syn/build.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/syn/placement.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/alu/syn/timing.xdc +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/hello/build.sbt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/hello/hello.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/hello/src/main/scala/Hello.scala +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/hdl/hello/syn/build.yml +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/plugins/simple_parser/setup.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/plugins/simple_parser/src/simple_parser/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/examples/plugins/simple_parser/src/simple_parser/simple_parser.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/setup.cfg +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/SimplHDL.egg-info/dependency_links.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/SimplHDL.egg-info/entry_points.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/SimplHDL.egg-info/top_level.txt +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flow.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/implementationflow.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/modelsimflow.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/questasim → simplhdl-0.0.6/src/simplhdl/flows/quartusdse}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/quartusflow.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/rivierapro → simplhdl-0.0.6/src/simplhdl/flows/questasim}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/vcs → simplhdl-0.0.6/src/simplhdl/flows/rivierapro}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/flows/xsim → simplhdl-0.0.6/src/simplhdl/flows/vcs}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/generators → simplhdl-0.0.6/src/simplhdl/flows/verible}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/flows/vivadoflow.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/parsers → simplhdl-0.0.6/src/simplhdl/flows/vsg}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources → simplhdl-0.0.6/src/simplhdl/flows/xsim}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/generator.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates → simplhdl-0.0.6/src/simplhdl/generators}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/generators/chisel.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/generators/ipxact.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/generators/spd.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/generators/systemrdl.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/parser.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/quartus → simplhdl-0.0.6/src/simplhdl/parsers}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/parsers/fusesocparser.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/parsers/simplhdlparser.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/pyedaa/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/pyedaa/attributes.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/pyedaa/design.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/pyedaa/fileset.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/pyedaa/filetypes.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/pyedaa/project.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/pyedaa/vhdllibrary.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/repo.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/questasim → simplhdl-0.0.6/src/simplhdl/resources}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/rivierapro → simplhdl-0.0.6/src/simplhdl/resources/templates}/__init__.py +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/vcs → simplhdl-0.0.6/src/simplhdl/resources/templates/quartus}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/quartus/project.tcl.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/quartus/run.tcl.j2 +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/vivado → simplhdl-0.0.6/src/simplhdl/resources/templates/questasim}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/files.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/questasim/project.mk.j2 +0 -0
- {simplhdl-0.0.5/src/simplhdl/resources/templates/xsim → simplhdl-0.0.6/src/simplhdl/resources/templates/rivierapro}/__init__.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/files.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/rivierapro/project.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/Makefile.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/files.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/pli.tab.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/project.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vivado/launch_run.sh.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vivado/run.tcl.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/vivado/steps.tcl.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/Makefile.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/cocotb.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/files.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/fileset.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/resources/templates/xsim/project.mk.j2 +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/simplhdl.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/src/simplhdl/tools.py +0 -0
- {simplhdl-0.0.5 → simplhdl-0.0.6}/tests/test_dummy.py +0 -0
- {simplhdl-0.0.5 → 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>
|
|
@@ -52,6 +52,7 @@ Requires-Dist: argcomplete
|
|
|
52
52
|
Requires-Dist: jinja2
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
54
|
Requires-Dist: rich
|
|
55
|
+
Requires-Dist: vsg
|
|
55
56
|
|
|
56
57
|
## Introduction
|
|
57
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>
|
|
@@ -52,6 +52,7 @@ Requires-Dist: argcomplete
|
|
|
52
52
|
Requires-Dist: jinja2
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
54
|
Requires-Dist: rich
|
|
55
|
+
Requires-Dist: vsg
|
|
55
56
|
|
|
56
57
|
## Introduction
|
|
57
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
|
|
@@ -155,11 +162,16 @@ 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
|
|
157
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
|
|
158
167
|
src/simplhdl/resources/templates/vivado/__init__.py
|
|
159
168
|
src/simplhdl/resources/templates/vivado/launch_run.sh.j2
|
|
160
169
|
src/simplhdl/resources/templates/vivado/project.tcl.j2
|
|
161
170
|
src/simplhdl/resources/templates/vivado/run.tcl.j2
|
|
162
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
|
|
163
175
|
src/simplhdl/resources/templates/xsim/Makefile.j2
|
|
164
176
|
src/simplhdl/resources/templates/xsim/__init__.py
|
|
165
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")
|
|
@@ -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:
|
|
@@ -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
|
|
|
@@ -9,7 +9,7 @@ from typing import Dict, Any, List
|
|
|
9
9
|
from jinja2 import Template
|
|
10
10
|
from simplhdl.pyedaa.fileset import FileSet
|
|
11
11
|
from simplhdl.pyedaa.project import Project
|
|
12
|
-
from simplhdl.utils import sh
|
|
12
|
+
from simplhdl.utils import sh, escape
|
|
13
13
|
from simplhdl.flow import FlowFactory, FlowTools
|
|
14
14
|
from simplhdl.resources.templates import vcs as vcstemplates
|
|
15
15
|
from ..simulationflow import SimulationFlow
|
|
@@ -150,7 +150,7 @@ class VcsFlow(SimulationFlow):
|
|
|
150
150
|
def vlogan_args(self) -> str:
|
|
151
151
|
args = set()
|
|
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
|
if self.args.verbose == 0:
|
|
155
155
|
args.add('-q')
|
|
156
156
|
elif self.args.verbose > 1:
|
|
@@ -194,7 +194,7 @@ class VcsFlow(SimulationFlow):
|
|
|
194
194
|
if self.args.seed != '1':
|
|
195
195
|
args.add(f"+ntb_random_seed={self.args.seed}")
|
|
196
196
|
for name, value in self.project.PlusArgs.items():
|
|
197
|
-
args.add(f"+{name}={value}")
|
|
197
|
+
args.add(f"+{name}={escape(value)}")
|
|
198
198
|
return ' '.join(list(args) + [self.args.simv_args])
|
|
199
199
|
|
|
200
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()
|
|
@@ -0,0 +1,106 @@
|
|
|
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 vsg as templates
|
|
13
|
+
from simplhdl.utils import sh, CalledShError, generate_from_template
|
|
14
|
+
from simplhdl.pyedaa import VHDLSourceFile
|
|
15
|
+
from simplhdl.pyedaa.project import Project
|
|
16
|
+
from simplhdl.pyedaa.attributes import UsedIn
|
|
17
|
+
|
|
18
|
+
logger = logging.getLogger(__name__)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@FlowFactory.register('vhdl-style-guide')
|
|
22
|
+
class VsgFlow(FlowBase):
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def parse_args(self, subparsers) -> None:
|
|
26
|
+
parser = subparsers.add_parser('vhdl-style-guide', help='VHDL Style Guide Flow')
|
|
27
|
+
parser.add_argument(
|
|
28
|
+
'--output-format',
|
|
29
|
+
choices=[
|
|
30
|
+
'vsg',
|
|
31
|
+
'syntastic',
|
|
32
|
+
'summary'
|
|
33
|
+
],
|
|
34
|
+
default='vsg',
|
|
35
|
+
help="Display output format"
|
|
36
|
+
)
|
|
37
|
+
parser.add_argument(
|
|
38
|
+
'--fix',
|
|
39
|
+
action='store_true',
|
|
40
|
+
help="Fix style formatting (Note: this modifies the source)"
|
|
41
|
+
)
|
|
42
|
+
parser.add_argument(
|
|
43
|
+
'-r', '--rules',
|
|
44
|
+
action='store',
|
|
45
|
+
help="Rule configuration file"
|
|
46
|
+
)
|
|
47
|
+
parser.add_argument(
|
|
48
|
+
'-f', '--files',
|
|
49
|
+
type=lambda p: Path(p).absolute(),
|
|
50
|
+
nargs='+',
|
|
51
|
+
default=[],
|
|
52
|
+
help="Manually specify file list"
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
56
|
+
super().__init__(name, args, project, builddir)
|
|
57
|
+
self.templates = templates
|
|
58
|
+
|
|
59
|
+
def setup(self):
|
|
60
|
+
os.makedirs(self.builddir, exist_ok=True)
|
|
61
|
+
|
|
62
|
+
def generate(self):
|
|
63
|
+
templatedir = resources_files(self.templates)
|
|
64
|
+
environment = Environment(
|
|
65
|
+
loader=FileSystemLoader(templatedir),
|
|
66
|
+
trim_blocks=True)
|
|
67
|
+
template = environment.get_template('files.json.j2')
|
|
68
|
+
generate_from_template(template, self.builddir,
|
|
69
|
+
VHDLSourceFile=VHDLSourceFile,
|
|
70
|
+
project=self.project,
|
|
71
|
+
UsedIn=UsedIn)
|
|
72
|
+
template = environment.get_template('rules.yml.j2')
|
|
73
|
+
generate_from_template(template, self.builddir)
|
|
74
|
+
|
|
75
|
+
def execute(self):
|
|
76
|
+
command = ["vsg"]
|
|
77
|
+
if self.args.rules:
|
|
78
|
+
rules = self.args.rules
|
|
79
|
+
elif os.getenv('SIMPLHDL_VSG_RULES'):
|
|
80
|
+
rules = self.args.rules
|
|
81
|
+
else:
|
|
82
|
+
rules = 'rules.yml'
|
|
83
|
+
|
|
84
|
+
if self.args.fix:
|
|
85
|
+
command.append("--fix")
|
|
86
|
+
else:
|
|
87
|
+
command += f"-ap -of {self.args.output_format}".split()
|
|
88
|
+
|
|
89
|
+
if self.args.files:
|
|
90
|
+
if rules:
|
|
91
|
+
command += f"-c {rules}".split()
|
|
92
|
+
command += ['-f'] + self.args.files
|
|
93
|
+
else:
|
|
94
|
+
command += f"-c {rules} files.json".split()
|
|
95
|
+
|
|
96
|
+
try:
|
|
97
|
+
logger.debug(command)
|
|
98
|
+
sh(command, cwd=self.builddir, output=True)
|
|
99
|
+
except CalledShError as e:
|
|
100
|
+
print(e)
|
|
101
|
+
raise SystemError
|
|
102
|
+
|
|
103
|
+
def run(self) -> None:
|
|
104
|
+
self.setup()
|
|
105
|
+
self.generate()
|
|
106
|
+
self.execute()
|