SimplHDL 0.1.2__tar.gz → 0.2.1__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.1.2 → simplhdl-0.2.1}/PKG-INFO +1 -1
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/SimplHDL.egg-info/PKG-INFO +1 -1
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/SimplHDL.egg-info/SOURCES.txt +15 -9
- simplhdl-0.2.1/src/simplhdl/__init__.py +1 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/cocotb.py +38 -2
- simplhdl-0.1.2/src/simplhdl/flows/questasim/questasimflow.py → simplhdl-0.2.1/src/simplhdl/flows/modelsim/modelsimflow.py +35 -34
- simplhdl-0.2.1/src/simplhdl/flows/questasim/questasimflow.py +361 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/simulationflow.py +3 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/generators/spd.py +3 -1
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/plugins.py +1 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/pyedaa/__init__.py +8 -5
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/pyedaa/fileset.py +6 -2
- {simplhdl-0.1.2/src/simplhdl/resources/templates/questasim → simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim}/Makefile.j2 +1 -4
- simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim/modelsim.tcl.j2 +32 -0
- simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim/run.do.j2 +12 -0
- simplhdl-0.2.1/src/simplhdl/resources/templates/questasim/modelsim.tcl.j2 +33 -0
- simplhdl-0.2.1/src/simplhdl/resources/templates/questasim/project.qrun.j2 +26 -0
- simplhdl-0.2.1/src/simplhdl/resources/templates/questasim/visualizer.tcl.j2 +31 -0
- simplhdl-0.2.1/src/simplhdl/resources/templates/questasim/vsim-run.do.j2 +12 -0
- simplhdl-0.2.1/src/simplhdl/resources/templates/vsg/__init__.py +0 -0
- simplhdl-0.2.1/src/simplhdl/resources/templates/xsim/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/utils.py +2 -2
- simplhdl-0.1.2/src/simplhdl/__init__.py +0 -1
- simplhdl-0.1.2/src/simplhdl/flows/modelsimflow.py +0 -32
- simplhdl-0.1.2/src/simplhdl/resources/templates/questasim/gui.do.j2 +0 -18
- simplhdl-0.1.2/src/simplhdl/resources/templates/questasim/run.do.j2 +0 -14
- {simplhdl-0.1.2 → simplhdl-0.2.1}/.github/workflows/publish.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/.gitignore +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/.readthedocs.yaml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/LICENSE +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/README.md +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/_static/simplhdl_dark.png +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/_static/simplhdl_light.png +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/_static/simplhdl_light_1.png +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/conf.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/drawing.svg +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows/ghdl.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows/icarus.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows/quartus.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows/questasim.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows/vcs.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows/vivado.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows/xsim.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/flows.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/index.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/intel-ips.md +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/introduction.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/plugins.rst +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/docs/requirements.txt +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/adder.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/hdl/adder.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/sim/testbench.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/sim/testbench.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/syn/build.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/syn/placement.xdc +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/syn/timing.xdc +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/adder/syn/top.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/alu.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/hdl/add.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/hdl/alu.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/hdl/mul.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/hdl/sub.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/alu_vip/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/alu_vip/agent.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/alu_vip/aluif.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/alu_vip/driver.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/alu_vip/monitor.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/alu_vip/sequenceitem.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/alu_vip/sequencer.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/clock_vip/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/clock_vip/agent.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/clock_vip/clockif.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/pyuvm.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/test/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/test/env.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/test/seq_lib.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/test/test.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/pyuvm/testbench.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/alu_vip/agent.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/alu_vip/driver.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/alu_vip/env.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/alu_vip/monitor.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/alu_vip/sequence_item.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/add_seq.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/base_seq.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/tb_env/tb_env.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/tb_env/tb_env.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/tb_env/test/base_test.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/tb_env/test/test_add.svh +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/testbench/alu_if.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/testbench/testbench.sv +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/testbench/testbench.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/sim/uvm/testcases/test_add/test_add.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/syn/build.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/syn/placement.xdc +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/alu/syn/timing.xdc +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/hello/build.sbt +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/hello/hello.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/hello/src/main/scala/Hello.scala +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/hdl/hello/syn/build.yml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/plugins/simple_parser/setup.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/plugins/simple_parser/src/simple_parser/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/examples/plugins/simple_parser/src/simple_parser/simple_parser.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/pyproject.toml +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/setup.cfg +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/SimplHDL.egg-info/dependency_links.txt +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/SimplHDL.egg-info/entry_points.txt +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/SimplHDL.egg-info/requires.txt +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/SimplHDL.egg-info/top_level.txt +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/__main__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flow.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/flake8/flake8flow.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/implementationflow.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/lint/lintflow.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/flows/quartusdse → simplhdl-0.2.1/src/simplhdl/flows/modelsim}/__init__.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/flows/questasim → simplhdl-0.2.1/src/simplhdl/flows/quartusdse}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/quartusdse/quartusdseflow.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/quartusflow.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/flows/rivierapro → simplhdl-0.2.1/src/simplhdl/flows/questasim}/__init__.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/flows/vcs → simplhdl-0.2.1/src/simplhdl/flows/rivierapro}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/rivierapro/rivieraproflow.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/flows/verible → simplhdl-0.2.1/src/simplhdl/flows/vcs}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/vcs/vcsflow.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/flows/vsg → simplhdl-0.2.1/src/simplhdl/flows/verible}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/verible/veribleflow.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/vivadoflow.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/flows/xsim → simplhdl-0.2.1/src/simplhdl/flows/vsg}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/vsg/vsgflow.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/generators → simplhdl-0.2.1/src/simplhdl/flows/xsim}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/flows/xsim/xsimflow.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/generator.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/parsers → simplhdl-0.2.1/src/simplhdl/generators}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/generators/chisel.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/generators/ipxact.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/generators/systemrdl.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/info.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/parser.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources → simplhdl-0.2.1/src/simplhdl/parsers}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/parsers/fusesocparser.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/parsers/simplhdlparser.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/pyedaa/attributes.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/pyedaa/design.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/pyedaa/filetypes.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/pyedaa/project.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/pyedaa/vhdllibrary.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/repo.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates → simplhdl-0.2.1/src/simplhdl/resources}/__init__.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/flake8 → simplhdl-0.2.1/src/simplhdl/resources/templates}/__init__.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/quartus → simplhdl-0.2.1/src/simplhdl/resources/templates/flake8}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/flake8/setup.cfg.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/questasim → simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim}/__init__.py +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/questasim → simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim}/cocotb.mk.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/questasim → simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim}/dependencies.mk.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/questasim → simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim}/files.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/questasim → simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim}/fileset.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/questasim → simplhdl-0.2.1/src/simplhdl/resources/templates/modelsim}/project.mk.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/rivierapro → simplhdl-0.2.1/src/simplhdl/resources/templates/quartus}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/quartus/project.tcl.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/quartus/run.tcl.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/vcs → simplhdl-0.2.1/src/simplhdl/resources/templates/questasim}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/rivierapro/Makefile.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/verible → simplhdl-0.2.1/src/simplhdl/resources/templates/rivierapro}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/rivierapro/dependencies.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/rivierapro/files.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/rivierapro/fileset.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/rivierapro/project.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/Makefile.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/vivado → simplhdl-0.2.1/src/simplhdl/resources/templates/vcs}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/cocotb.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/dependencies.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/files.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/fileset.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/pli.tab.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/project.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vcs/vcs.parameters.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/vsg → simplhdl-0.2.1/src/simplhdl/resources/templates/verible}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/verible/rules.cfg.j2 +0 -0
- {simplhdl-0.1.2/src/simplhdl/resources/templates/xsim → simplhdl-0.2.1/src/simplhdl/resources/templates/vivado}/__init__.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vivado/launch_run.sh.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vivado/project.tcl.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vivado/run.tcl.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vivado/steps.tcl.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vsg/files.json.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/vsg/rules.yml.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/xsim/Makefile.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/xsim/cocotb.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/xsim/dependencies.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/xsim/files.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/xsim/fileset.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/resources/templates/xsim/project.mk.j2 +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/simplhdl.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/src/simplhdl/tools.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/tests/test_dummy.py +0 -0
- {simplhdl-0.1.2 → simplhdl-0.2.1}/tox.ini +0 -0
|
@@ -99,12 +99,13 @@ src/simplhdl/tools.py
|
|
|
99
99
|
src/simplhdl/utils.py
|
|
100
100
|
src/simplhdl/flows/__init__.py
|
|
101
101
|
src/simplhdl/flows/implementationflow.py
|
|
102
|
-
src/simplhdl/flows/modelsimflow.py
|
|
103
102
|
src/simplhdl/flows/quartusflow.py
|
|
104
103
|
src/simplhdl/flows/simulationflow.py
|
|
105
104
|
src/simplhdl/flows/vivadoflow.py
|
|
106
105
|
src/simplhdl/flows/flake8/flake8flow.py
|
|
107
106
|
src/simplhdl/flows/lint/lintflow.py
|
|
107
|
+
src/simplhdl/flows/modelsim/__init__.py
|
|
108
|
+
src/simplhdl/flows/modelsim/modelsimflow.py
|
|
108
109
|
src/simplhdl/flows/quartusdse/__init__.py
|
|
109
110
|
src/simplhdl/flows/quartusdse/quartusdseflow.py
|
|
110
111
|
src/simplhdl/flows/questasim/__init__.py
|
|
@@ -138,18 +139,23 @@ src/simplhdl/resources/__init__.py
|
|
|
138
139
|
src/simplhdl/resources/templates/__init__.py
|
|
139
140
|
src/simplhdl/resources/templates/flake8/__init__.py
|
|
140
141
|
src/simplhdl/resources/templates/flake8/setup.cfg.j2
|
|
142
|
+
src/simplhdl/resources/templates/modelsim/Makefile.j2
|
|
143
|
+
src/simplhdl/resources/templates/modelsim/__init__.py
|
|
144
|
+
src/simplhdl/resources/templates/modelsim/cocotb.mk.j2
|
|
145
|
+
src/simplhdl/resources/templates/modelsim/dependencies.mk.j2
|
|
146
|
+
src/simplhdl/resources/templates/modelsim/files.j2
|
|
147
|
+
src/simplhdl/resources/templates/modelsim/fileset.j2
|
|
148
|
+
src/simplhdl/resources/templates/modelsim/modelsim.tcl.j2
|
|
149
|
+
src/simplhdl/resources/templates/modelsim/project.mk.j2
|
|
150
|
+
src/simplhdl/resources/templates/modelsim/run.do.j2
|
|
141
151
|
src/simplhdl/resources/templates/quartus/__init__.py
|
|
142
152
|
src/simplhdl/resources/templates/quartus/project.tcl.j2
|
|
143
153
|
src/simplhdl/resources/templates/quartus/run.tcl.j2
|
|
144
|
-
src/simplhdl/resources/templates/questasim/Makefile.j2
|
|
145
154
|
src/simplhdl/resources/templates/questasim/__init__.py
|
|
146
|
-
src/simplhdl/resources/templates/questasim/
|
|
147
|
-
src/simplhdl/resources/templates/questasim/
|
|
148
|
-
src/simplhdl/resources/templates/questasim/
|
|
149
|
-
src/simplhdl/resources/templates/questasim/
|
|
150
|
-
src/simplhdl/resources/templates/questasim/gui.do.j2
|
|
151
|
-
src/simplhdl/resources/templates/questasim/project.mk.j2
|
|
152
|
-
src/simplhdl/resources/templates/questasim/run.do.j2
|
|
155
|
+
src/simplhdl/resources/templates/questasim/modelsim.tcl.j2
|
|
156
|
+
src/simplhdl/resources/templates/questasim/project.qrun.j2
|
|
157
|
+
src/simplhdl/resources/templates/questasim/visualizer.tcl.j2
|
|
158
|
+
src/simplhdl/resources/templates/questasim/vsim-run.do.j2
|
|
153
159
|
src/simplhdl/resources/templates/rivierapro/Makefile.j2
|
|
154
160
|
src/simplhdl/resources/templates/rivierapro/__init__.py
|
|
155
161
|
src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import re
|
|
3
|
+
import os
|
|
3
4
|
|
|
4
5
|
from pathlib import Path
|
|
5
|
-
from typing import Optional
|
|
6
|
+
from typing import Optional, Dict
|
|
6
7
|
|
|
7
8
|
from .utils import sh
|
|
8
9
|
from .pyedaa.project import Project
|
|
@@ -28,7 +29,16 @@ class Cocotb:
|
|
|
28
29
|
raise FileNotFoundError(f"{path}: not found")
|
|
29
30
|
return path
|
|
30
31
|
|
|
32
|
+
def libpython(self) -> str:
|
|
33
|
+
output = sh(['cocotb-config', '--libpython'])
|
|
34
|
+
path = Path(output)
|
|
35
|
+
if not path.exists():
|
|
36
|
+
raise FileNotFoundError(f"{path}: not found")
|
|
37
|
+
return path
|
|
38
|
+
|
|
31
39
|
def module(self) -> Optional[str]:
|
|
40
|
+
if not self.enabled:
|
|
41
|
+
return None
|
|
32
42
|
set_ = set()
|
|
33
43
|
try:
|
|
34
44
|
modules = self.project.DefaultDesign._topLevel.split()
|
|
@@ -40,7 +50,7 @@ class Cocotb:
|
|
|
40
50
|
# TODO: What if more than one module match?
|
|
41
51
|
set_.add(module)
|
|
42
52
|
if not set_:
|
|
43
|
-
|
|
53
|
+
raise FlowError('CocoTB module not specified')
|
|
44
54
|
elif len(set_) == 1:
|
|
45
55
|
return next(iter(set_))
|
|
46
56
|
else:
|
|
@@ -115,3 +125,29 @@ class Cocotb:
|
|
|
115
125
|
def pythonpath(self) -> str:
|
|
116
126
|
directories = {str(f.Path.parent.absolute()) for f in self.files()}
|
|
117
127
|
return ':'.join(directories)
|
|
128
|
+
|
|
129
|
+
def args(self) -> str:
|
|
130
|
+
if self.duttype == VHDLSourceFile:
|
|
131
|
+
lib_name_path = self.lib_name_path("questa", "fli")
|
|
132
|
+
return f'-foreign "cocotb_init {lib_name_path}"'
|
|
133
|
+
elif self.duttype == VerilogSourceFile:
|
|
134
|
+
lib_name_path = self.lib_name_path("questa", "vpi")
|
|
135
|
+
return f'-pli {lib_name_path}'
|
|
136
|
+
|
|
137
|
+
def env(self) -> Dict[str, str]:
|
|
138
|
+
e = os.environ.copy()
|
|
139
|
+
e['MODULE'] = self.top
|
|
140
|
+
e['TOPLEVEL'] = self.dut
|
|
141
|
+
e['PYTHONPYCACHEPREFIX'] = './pycache'
|
|
142
|
+
e['LIBPYTHON_LOC'] = self.libpython()
|
|
143
|
+
if self.duttype == VHDLSourceFile:
|
|
144
|
+
lib_name_path = self.lib_name_path("questa", "vpi")
|
|
145
|
+
e['GPI_EXTRA'] = f"{lib_name_path}:cocotbvpi_entry_point"
|
|
146
|
+
elif self.duttype == VerilogSourceFile:
|
|
147
|
+
lib_name_path = self.lib_name_path("questa", "fli")
|
|
148
|
+
e['GPI_EXTRA'] = f"{lib_name_path}:cocotbfli_entry_point"
|
|
149
|
+
if 'PYTHONPATH' in e:
|
|
150
|
+
e['PYTHONPATH'] = self.pythonpath + os.pathsep + e.get('PYTHONPATH')
|
|
151
|
+
else:
|
|
152
|
+
e['PYTHONPATH'] = self.pythonpath
|
|
153
|
+
return e
|
|
@@ -10,18 +10,25 @@ from simplhdl.pyedaa.project import Project
|
|
|
10
10
|
from simplhdl.pyedaa.fileset import FileSet
|
|
11
11
|
from simplhdl.utils import sh, escape
|
|
12
12
|
from simplhdl.flow import FlowFactory, FlowTools
|
|
13
|
-
from simplhdl.resources.templates import
|
|
13
|
+
from simplhdl.resources.templates import modelsim as modelsimtemplates
|
|
14
14
|
from simplhdl.flows.simulationflow import SimulationFlow
|
|
15
15
|
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
class Flag(list):
|
|
20
|
+
|
|
21
|
+
def add(self, item):
|
|
22
|
+
if item not in self:
|
|
23
|
+
self.append(item)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@FlowFactory.register('modelsim')
|
|
27
|
+
class ModelSimFlow(SimulationFlow):
|
|
21
28
|
|
|
22
29
|
@classmethod
|
|
23
30
|
def parse_args(self, subparsers) -> None:
|
|
24
|
-
parser = subparsers.add_parser('
|
|
31
|
+
parser = subparsers.add_parser('modelsim', help='ModelSim HDL Simulation Flow')
|
|
25
32
|
parser.add_argument(
|
|
26
33
|
'--step',
|
|
27
34
|
action='store',
|
|
@@ -32,15 +39,10 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
32
39
|
parser.add_argument(
|
|
33
40
|
'-w',
|
|
34
41
|
'--wavedump',
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
parser.add_argument(
|
|
39
|
-
'--waveformat',
|
|
40
|
-
action='store',
|
|
42
|
+
nargs='?',
|
|
43
|
+
const='wlf',
|
|
41
44
|
choices=['wlf', 'vcd', 'evcd'],
|
|
42
|
-
|
|
43
|
-
help="Wave file format"
|
|
45
|
+
help="Dump waveforms using wlf, vcd or evcd format"
|
|
44
46
|
)
|
|
45
47
|
parser.add_argument(
|
|
46
48
|
'--debug',
|
|
@@ -50,42 +52,42 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
50
52
|
parser.add_argument(
|
|
51
53
|
'--gui',
|
|
52
54
|
action='store_true',
|
|
53
|
-
help="Open project in
|
|
55
|
+
help="Open project in ModelSim GUI"
|
|
54
56
|
)
|
|
55
57
|
parser.add_argument(
|
|
56
58
|
'--vsim-args',
|
|
57
59
|
default='',
|
|
58
60
|
action='store',
|
|
59
61
|
metavar='ARGS',
|
|
60
|
-
help="Extra arguments for
|
|
62
|
+
help="Extra arguments for ModelSim vsim command"
|
|
61
63
|
)
|
|
62
64
|
parser.add_argument(
|
|
63
65
|
'--vopt-args',
|
|
64
66
|
default='',
|
|
65
67
|
action='store',
|
|
66
68
|
metavar='ARGS',
|
|
67
|
-
help="Extra arguments for
|
|
69
|
+
help="Extra arguments for ModelSim vopt command"
|
|
68
70
|
)
|
|
69
71
|
parser.add_argument(
|
|
70
72
|
'--vmap-args',
|
|
71
73
|
default='',
|
|
72
74
|
action='store',
|
|
73
75
|
metavar='ARGS',
|
|
74
|
-
help="Extra arguments for
|
|
76
|
+
help="Extra arguments for ModelSim vmap command"
|
|
75
77
|
)
|
|
76
78
|
parser.add_argument(
|
|
77
79
|
'--vcom-args',
|
|
78
80
|
default='',
|
|
79
81
|
action='store',
|
|
80
82
|
metavar='ARGS',
|
|
81
|
-
help="Extra arguments for
|
|
83
|
+
help="Extra arguments for ModelSim vcom command"
|
|
82
84
|
)
|
|
83
85
|
parser.add_argument(
|
|
84
86
|
'--vlog-args',
|
|
85
87
|
default='',
|
|
86
88
|
action='store',
|
|
87
89
|
metavar='ARGS',
|
|
88
|
-
help="Extra arguments for
|
|
90
|
+
help="Extra arguments for ModelSim vlog command"
|
|
89
91
|
)
|
|
90
92
|
parser.add_argument(
|
|
91
93
|
'--seed',
|
|
@@ -109,13 +111,13 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
109
111
|
'--timescale',
|
|
110
112
|
default='1ns/1ps',
|
|
111
113
|
action='store',
|
|
112
|
-
help="Set the simulator timescale for
|
|
114
|
+
help="Set the simulator timescale for ModelSim"
|
|
113
115
|
)
|
|
114
116
|
|
|
115
117
|
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
116
118
|
super().__init__(name, args, project, builddir)
|
|
117
|
-
self.templates =
|
|
118
|
-
self.tools.add(FlowTools.
|
|
119
|
+
self.templates = modelsimtemplates
|
|
120
|
+
self.tools.add(FlowTools.MODELSIM)
|
|
119
121
|
|
|
120
122
|
def get_globals(self) -> Dict[str, Any]:
|
|
121
123
|
globals = super().get_globals()
|
|
@@ -124,14 +126,13 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
124
126
|
globals['vopt_args'] = self.vopt_args()
|
|
125
127
|
globals['vsim_args'] = self.vsim_args()
|
|
126
128
|
globals['wavedump'] = self.args.wavedump
|
|
127
|
-
globals['waveformat'] = self.args.waveformat
|
|
128
129
|
return globals
|
|
129
130
|
|
|
130
131
|
def get_project_templates(self, environment) -> List[Template]:
|
|
131
132
|
return [
|
|
132
133
|
environment.get_template('Makefile.j2'),
|
|
133
134
|
environment.get_template('project.mk.j2'),
|
|
134
|
-
environment.get_template('
|
|
135
|
+
environment.get_template('modelsim.tcl.j2'),
|
|
135
136
|
environment.get_template('run.do.j2')
|
|
136
137
|
]
|
|
137
138
|
|
|
@@ -156,7 +157,7 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
156
157
|
return f"-2008 -work {library.Name}"
|
|
157
158
|
|
|
158
159
|
def vlog_args(self) -> str:
|
|
159
|
-
args =
|
|
160
|
+
args = Flag()
|
|
160
161
|
if self.args.verbose == 0:
|
|
161
162
|
args.add('-quiet')
|
|
162
163
|
for name in self.get_libraries().keys():
|
|
@@ -166,17 +167,17 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
166
167
|
return ' '.join(list(args) + [self.args.vlog_args])
|
|
167
168
|
|
|
168
169
|
def vcom_args(self) -> str:
|
|
169
|
-
args =
|
|
170
|
+
args = Flag()
|
|
170
171
|
if self.args.verbose == 0:
|
|
171
172
|
args.add('-quiet')
|
|
172
173
|
return ' '.join(list(args) + [self.args.vcom_args])
|
|
173
174
|
|
|
174
175
|
def vmap_args(self) -> str:
|
|
175
|
-
args =
|
|
176
|
+
args = Flag()
|
|
176
177
|
return ' '.join(list(args) + [self.args.vmap_args])
|
|
177
178
|
|
|
178
179
|
def vopt_args(self) -> str:
|
|
179
|
-
args =
|
|
180
|
+
args = Flag()
|
|
180
181
|
if self.args.verbose == 0:
|
|
181
182
|
args.add('-quiet')
|
|
182
183
|
for name in self.get_libraries().keys():
|
|
@@ -196,7 +197,7 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
196
197
|
return ' '.join(list(args) + [self.args.vopt_args])
|
|
197
198
|
|
|
198
199
|
def vsim_args(self) -> str:
|
|
199
|
-
args =
|
|
200
|
+
args = Flag()
|
|
200
201
|
args.add(f"-sv_seed {self.args.seed}")
|
|
201
202
|
timescale = self.timescale()
|
|
202
203
|
if timescale:
|
|
@@ -273,17 +274,17 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
273
274
|
shutil.which('vcom') is None or
|
|
274
275
|
shutil.which('vlib') is None or
|
|
275
276
|
shutil.which('vmap') is None):
|
|
276
|
-
raise Exception("
|
|
277
|
-
# NOTE: If
|
|
277
|
+
raise Exception("ModelSim is not setup correctly")
|
|
278
|
+
# NOTE: If modelsim's bin directory is appended to the PATH variable,
|
|
278
279
|
# the vdir command is found in /bin/vdir which is not the
|
|
279
|
-
#
|
|
280
|
+
# ModelSim vdir command
|
|
280
281
|
vdir = Path(shutil.which('vdir'))
|
|
281
282
|
vsim = Path(shutil.which('vsim'))
|
|
282
283
|
if vdir.parent != vsim.parent:
|
|
283
284
|
logger.warning(
|
|
284
|
-
"
|
|
285
|
+
"ModelSim is not setup correctly. "
|
|
285
286
|
f"The 'vdir' command is pointing to {vdir}, which "
|
|
286
|
-
"is not part of the
|
|
287
|
-
"prepend
|
|
287
|
+
"is not part of the ModelSim installation. Try to "
|
|
288
|
+
"prepend Modelsim to the PATH environment variable."
|
|
288
289
|
)
|
|
289
290
|
os.environ['PATH'] = f"{vsim.parent}:{os.environ['PATH']}"
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from importlib.resources import files as resources_files
|
|
3
|
+
except ImportError:
|
|
4
|
+
from importlib_resources import files as resources_files
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
8
|
+
import logging
|
|
9
|
+
import shutil
|
|
10
|
+
|
|
11
|
+
from jinja2 import Environment, FileSystemLoader
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from typing import Any, List, Dict, Optional
|
|
14
|
+
from argparse import Namespace
|
|
15
|
+
from jinja2 import Template
|
|
16
|
+
from simplhdl.pyedaa.project import Project
|
|
17
|
+
from simplhdl.utils import sh, escape
|
|
18
|
+
from simplhdl.flow import FlowFactory, FlowTools
|
|
19
|
+
from simplhdl.resources.templates import questasim as questasimtemplates
|
|
20
|
+
from simplhdl.flows.simulationflow import SimulationFlow, FileSetWalker
|
|
21
|
+
from simplhdl.utils import generate_from_template
|
|
22
|
+
|
|
23
|
+
logger = logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
qrunfile = "project.qrun"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Flag(list):
|
|
29
|
+
|
|
30
|
+
def add(self, item):
|
|
31
|
+
if item not in self:
|
|
32
|
+
self.append(item)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@FlowFactory.register('questasim')
|
|
36
|
+
class QuestaSimFlow(SimulationFlow):
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def parse_args(self, subparsers) -> None:
|
|
40
|
+
parser = subparsers.add_parser('questasim', help='QuestaSim HDL Simulation Flow')
|
|
41
|
+
parser.add_argument(
|
|
42
|
+
'--step',
|
|
43
|
+
action='store',
|
|
44
|
+
choices=['generate', 'compile', 'elaborate', 'simulate'],
|
|
45
|
+
default='',
|
|
46
|
+
help="flow step to run"
|
|
47
|
+
)
|
|
48
|
+
parser.add_argument(
|
|
49
|
+
'-w',
|
|
50
|
+
'--wavedump',
|
|
51
|
+
nargs='?',
|
|
52
|
+
const='wlf',
|
|
53
|
+
choices=['wlf', 'vcd', 'evcd'],
|
|
54
|
+
help="Dump waveforms using wlf, vcd or evcd format"
|
|
55
|
+
)
|
|
56
|
+
parser.add_argument(
|
|
57
|
+
'--debug',
|
|
58
|
+
action='store_true',
|
|
59
|
+
help="Enable full debug capabilities"
|
|
60
|
+
)
|
|
61
|
+
parser.add_argument(
|
|
62
|
+
'--clean',
|
|
63
|
+
action='store_true',
|
|
64
|
+
help="Clean project"
|
|
65
|
+
)
|
|
66
|
+
parser.add_argument(
|
|
67
|
+
'--gui',
|
|
68
|
+
nargs='?',
|
|
69
|
+
const=os.getenv('SIMPLHDL_QUESTASIM_GUI', 'vsim'),
|
|
70
|
+
choices=['vsim', 'visualizer'],
|
|
71
|
+
help="Open project in QuestaSim GUI using vsim or visualizer"
|
|
72
|
+
)
|
|
73
|
+
parser.add_argument(
|
|
74
|
+
'--qrun-args',
|
|
75
|
+
default='',
|
|
76
|
+
action='store',
|
|
77
|
+
metavar='ARGS',
|
|
78
|
+
help="Extra arguments for QuestaSim qrun command"
|
|
79
|
+
)
|
|
80
|
+
parser.add_argument(
|
|
81
|
+
'--vsim-args',
|
|
82
|
+
default='',
|
|
83
|
+
action='store',
|
|
84
|
+
metavar='ARGS',
|
|
85
|
+
help="Extra arguments for QuestaSim vsim command"
|
|
86
|
+
)
|
|
87
|
+
parser.add_argument(
|
|
88
|
+
'--vopt-args',
|
|
89
|
+
default='',
|
|
90
|
+
action='store',
|
|
91
|
+
metavar='ARGS',
|
|
92
|
+
help="Extra arguments for QuestaSim vopt command"
|
|
93
|
+
)
|
|
94
|
+
parser.add_argument(
|
|
95
|
+
'--vcom-args',
|
|
96
|
+
default='',
|
|
97
|
+
action='store',
|
|
98
|
+
metavar='ARGS',
|
|
99
|
+
help="Extra arguments for QuestaSim vcom command"
|
|
100
|
+
)
|
|
101
|
+
parser.add_argument(
|
|
102
|
+
'--vlog-args',
|
|
103
|
+
default='',
|
|
104
|
+
action='store',
|
|
105
|
+
metavar='ARGS',
|
|
106
|
+
help="Extra arguments for QuestaSim vlog command"
|
|
107
|
+
)
|
|
108
|
+
parser.add_argument(
|
|
109
|
+
'--seed',
|
|
110
|
+
type=int,
|
|
111
|
+
default=1,
|
|
112
|
+
action='store',
|
|
113
|
+
help="Seed to initialize random generator"
|
|
114
|
+
)
|
|
115
|
+
parser.add_argument(
|
|
116
|
+
'--random-seed',
|
|
117
|
+
action='store_true',
|
|
118
|
+
help="Generate a random seed to initialize random generator"
|
|
119
|
+
)
|
|
120
|
+
parser.add_argument(
|
|
121
|
+
'--do',
|
|
122
|
+
metavar='COMMAND',
|
|
123
|
+
action='store',
|
|
124
|
+
help="Do command to start simulation"
|
|
125
|
+
)
|
|
126
|
+
parser.add_argument(
|
|
127
|
+
'--timescale',
|
|
128
|
+
default='1ns/1ps',
|
|
129
|
+
action='store',
|
|
130
|
+
help="Set the simulator timescale for QuestaSim"
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
134
|
+
super().__init__(name, args, project, builddir)
|
|
135
|
+
self.templates = questasimtemplates
|
|
136
|
+
self.tools.add(FlowTools.QUESTASIM)
|
|
137
|
+
|
|
138
|
+
def get_globals(self) -> Dict[str, Any]:
|
|
139
|
+
globals = super().get_globals()
|
|
140
|
+
globals['qrunfile'] = qrunfile
|
|
141
|
+
globals['wavedump'] = self.args.wavedump
|
|
142
|
+
globals['filesets'] = self.get_filesets()
|
|
143
|
+
globals['vlog_args'] = self.vlog_args()
|
|
144
|
+
globals['vcom_args'] = self.vcom_args()
|
|
145
|
+
globals['vopt_args'] = self.vopt_args()
|
|
146
|
+
globals['vsim_args'] = self.vsim_args()
|
|
147
|
+
globals['qrun_args'] = self.qrun_args()
|
|
148
|
+
return globals
|
|
149
|
+
|
|
150
|
+
def vlog_args(self) -> str:
|
|
151
|
+
args = Flag()
|
|
152
|
+
args.add('-sv')
|
|
153
|
+
args.add('-suppress vlog-2720')
|
|
154
|
+
for name, value in self.project.Defines.items():
|
|
155
|
+
args.add(f"+define+{name}={escape(value)}")
|
|
156
|
+
return ' '.join(list(args) + [self.args.vlog_args])
|
|
157
|
+
|
|
158
|
+
def vcom_args(self) -> str:
|
|
159
|
+
args = Flag()
|
|
160
|
+
args.add('-2008')
|
|
161
|
+
return ' '.join(list(args) + [self.args.vcom_args])
|
|
162
|
+
|
|
163
|
+
def vopt_args(self) -> str:
|
|
164
|
+
args = Flag()
|
|
165
|
+
if self.args.timescale:
|
|
166
|
+
args.add(f"-timescale {self.args.timescale}")
|
|
167
|
+
for name, value in self.project.Generics.items():
|
|
168
|
+
args.add(f"-g{name}={escape(value)}")
|
|
169
|
+
for name, value in self.project.Parameters.items():
|
|
170
|
+
args.add(f"-g{name}={escape(value)}")
|
|
171
|
+
if self.args.debug:
|
|
172
|
+
args.add('+acc')
|
|
173
|
+
args.add('-debugdb')
|
|
174
|
+
args.add('-fsmdebug')
|
|
175
|
+
elif self.args.gui or self.args.do or self.args.wavedump or self.cocotb.enabled:
|
|
176
|
+
args.add('+acc=npr')
|
|
177
|
+
return ' '.join(list(args) + [self.args.vopt_args])
|
|
178
|
+
|
|
179
|
+
def vsim_args(self) -> str:
|
|
180
|
+
args = Flag()
|
|
181
|
+
args.add(f"-sv_seed {self.args.seed}")
|
|
182
|
+
timescale = self.timescale()
|
|
183
|
+
if timescale:
|
|
184
|
+
args.add(timescale)
|
|
185
|
+
if self.args.verbose == 0:
|
|
186
|
+
args.add('-quiet')
|
|
187
|
+
for name, value in self.project.PlusArgs.items():
|
|
188
|
+
args.add(f"+{name}={escape(value)}")
|
|
189
|
+
if self.cocotb.enabled:
|
|
190
|
+
args.add(self.cocotb.args())
|
|
191
|
+
if self.args.gui:
|
|
192
|
+
args.add('-onfinish final')
|
|
193
|
+
else:
|
|
194
|
+
args.add('-onfinish exit')
|
|
195
|
+
return ' '.join(list(args) + [self.args.vsim_args])
|
|
196
|
+
|
|
197
|
+
def qrun_args(self) -> str:
|
|
198
|
+
args = Flag()
|
|
199
|
+
for top in self.cocotb.toplevels.split():
|
|
200
|
+
if self.args.verbose > 0:
|
|
201
|
+
args.add("-verbose")
|
|
202
|
+
if self.version > 2023.0:
|
|
203
|
+
args.add("-defaultHDLCompiler=vcom")
|
|
204
|
+
args.add("-noautoorder")
|
|
205
|
+
if self.is_uvm():
|
|
206
|
+
args.add("-uvm")
|
|
207
|
+
args.add(f"-top {top}")
|
|
208
|
+
return list(args) + [self.args.qrun_args]
|
|
209
|
+
|
|
210
|
+
def execute(self, step: str) -> None:
|
|
211
|
+
"""
|
|
212
|
+
Execute the QuestaSim simulation flow.
|
|
213
|
+
|
|
214
|
+
Parameters
|
|
215
|
+
----------
|
|
216
|
+
step : str
|
|
217
|
+
The step to execute. If not provided, the flow will execute
|
|
218
|
+
the 'simulate' step.
|
|
219
|
+
|
|
220
|
+
Returns
|
|
221
|
+
-------
|
|
222
|
+
None
|
|
223
|
+
"""
|
|
224
|
+
if self.args.clean:
|
|
225
|
+
sh(['qrun', '-clean'], cwd=self.builddir, output=True)
|
|
226
|
+
return
|
|
227
|
+
|
|
228
|
+
self.run_hooks('pre')
|
|
229
|
+
|
|
230
|
+
if step == 'generate':
|
|
231
|
+
return
|
|
232
|
+
|
|
233
|
+
command = self.get_command(step)
|
|
234
|
+
env = self.get_environment(command)
|
|
235
|
+
|
|
236
|
+
sh(command, cwd=self.builddir, output=True, env=env)
|
|
237
|
+
if step in ['simulate', '']:
|
|
238
|
+
self.run_hooks('post')
|
|
239
|
+
|
|
240
|
+
def get_command(self, step: str) -> List[str]:
|
|
241
|
+
|
|
242
|
+
"""
|
|
243
|
+
Construct the command list to run qrun based on the given step and any command line arguments.
|
|
244
|
+
|
|
245
|
+
Parameters
|
|
246
|
+
----------
|
|
247
|
+
step : str
|
|
248
|
+
The step to run. If None or not given, the default step is used.
|
|
249
|
+
|
|
250
|
+
Returns
|
|
251
|
+
-------
|
|
252
|
+
command : List[str]
|
|
253
|
+
The command list to execute qrun with.
|
|
254
|
+
"""
|
|
255
|
+
command = ['qrun', '-f', qrunfile]
|
|
256
|
+
|
|
257
|
+
if self.args.gui:
|
|
258
|
+
if self.use_visualizer():
|
|
259
|
+
command.append('-visualizer')
|
|
260
|
+
command.append('-gui')
|
|
261
|
+
elif self.args.step:
|
|
262
|
+
command.append(f'-{step}')
|
|
263
|
+
|
|
264
|
+
if self.args.do:
|
|
265
|
+
if Path(self.args.do).exists():
|
|
266
|
+
command += ['-do', str(Path(self.args.do).absolute())]
|
|
267
|
+
else:
|
|
268
|
+
command += ['-do', self.args.do]
|
|
269
|
+
elif not self.use_visualizer() and not self.args.gui:
|
|
270
|
+
command += ['-do', 'vsim-run.do']
|
|
271
|
+
return command
|
|
272
|
+
|
|
273
|
+
def get_environment(self, command: List[str]) -> Dict[str, str]:
|
|
274
|
+
"""
|
|
275
|
+
Construct the environment for running qrun based on the given command and any
|
|
276
|
+
enabled cocotb features.
|
|
277
|
+
|
|
278
|
+
Parameters
|
|
279
|
+
----------
|
|
280
|
+
command : List[str]
|
|
281
|
+
The command to run qrun with.
|
|
282
|
+
|
|
283
|
+
Returns
|
|
284
|
+
-------
|
|
285
|
+
env : Dict[str, str]
|
|
286
|
+
A dictionary of environment variables to run qrun with.
|
|
287
|
+
"""
|
|
288
|
+
if self.cocotb.enabled:
|
|
289
|
+
env = self.cocotb.env()
|
|
290
|
+
else:
|
|
291
|
+
env = os.environ.copy()
|
|
292
|
+
|
|
293
|
+
# Add the command as environment variables for use in the
|
|
294
|
+
# QuestaSim GUI and Tcl scripts
|
|
295
|
+
env['SIMPLHDL_QUESTASIM_VSIM_COMMAND'] = ' '.join(command)
|
|
296
|
+
return env
|
|
297
|
+
|
|
298
|
+
def run_hooks(self, name):
|
|
299
|
+
try:
|
|
300
|
+
for command in self.project.Hooks[name]:
|
|
301
|
+
logger.info(f"Running {name} hook: {command}")
|
|
302
|
+
sh(command.split(), cwd=self.builddir, output=True)
|
|
303
|
+
except KeyError:
|
|
304
|
+
# NOTE: Continue if no hook is registret
|
|
305
|
+
pass
|
|
306
|
+
|
|
307
|
+
def timescale(self) -> Optional[str]:
|
|
308
|
+
"""
|
|
309
|
+
Sets the timescale for VHDL based on the Verilog timescale
|
|
310
|
+
resolution.
|
|
311
|
+
"""
|
|
312
|
+
if self.args.timescale.endswith('ps'):
|
|
313
|
+
return "-t ps"
|
|
314
|
+
elif self.args.timescale.endswith('fs'):
|
|
315
|
+
return "-t fs"
|
|
316
|
+
|
|
317
|
+
def is_tool_setup(self) -> None:
|
|
318
|
+
if (shutil.which('qrun') is None):
|
|
319
|
+
raise Exception("QuestaSim is not setup correctly")
|
|
320
|
+
self.version = self.get_qrun_version()
|
|
321
|
+
|
|
322
|
+
def has_visualizer(self) -> bool:
|
|
323
|
+
if (shutil.which('visualizer') is None):
|
|
324
|
+
return False
|
|
325
|
+
else:
|
|
326
|
+
return True
|
|
327
|
+
|
|
328
|
+
def use_visualizer(self) -> bool:
|
|
329
|
+
if self.args.gui == 'visualizer':
|
|
330
|
+
if self.has_visualizer():
|
|
331
|
+
return True
|
|
332
|
+
else:
|
|
333
|
+
logger.warning("Visualizer is not setup correctly")
|
|
334
|
+
return False
|
|
335
|
+
|
|
336
|
+
def generate(self):
|
|
337
|
+
templatedir = resources_files(self.templates)
|
|
338
|
+
env = Environment(
|
|
339
|
+
loader=FileSystemLoader(templatedir),
|
|
340
|
+
trim_blocks=True)
|
|
341
|
+
templates: List[Template] = [
|
|
342
|
+
env.get_template(f'{qrunfile}.j2'),
|
|
343
|
+
env.get_template('vsim-run.do.j2'),
|
|
344
|
+
env.get_template('modelsim.tcl.j2'),
|
|
345
|
+
env.get_template('visualizer.tcl.j2')
|
|
346
|
+
]
|
|
347
|
+
for template in templates:
|
|
348
|
+
generate_from_template(template, self.builddir, self.get_globals())
|
|
349
|
+
self.copy_memory_files()
|
|
350
|
+
|
|
351
|
+
def get_qrun_version(self) -> float:
|
|
352
|
+
output = sh(['qrun', '-version'], self.builddir)
|
|
353
|
+
m = re.search(r'qrun\s+([\d.]+)', output)
|
|
354
|
+
return float(m.group(1))
|
|
355
|
+
|
|
356
|
+
def get_filesets(self):
|
|
357
|
+
walker = FileSetWalker()
|
|
358
|
+
filesets = list()
|
|
359
|
+
for fileset in walker.walk(self.project.DefaultDesign.DefaultFileSet, reverse=True):
|
|
360
|
+
filesets.append(fileset)
|
|
361
|
+
return filesets
|