SimplHDL 0.0.6__tar.gz → 0.1.0__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.6 → simplhdl-0.1.0}/PKG-INFO +3 -1
- {simplhdl-0.0.6 → simplhdl-0.1.0}/pyproject.toml +2 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/SimplHDL.egg-info/PKG-INFO +3 -1
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/SimplHDL.egg-info/SOURCES.txt +5 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/SimplHDL.egg-info/requires.txt +2 -0
- simplhdl-0.1.0/src/simplhdl/__init__.py +1 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/cocotb.py +0 -1
- simplhdl-0.1.0/src/simplhdl/flows/flake8/flake8flow.py +83 -0
- simplhdl-0.1.0/src/simplhdl/flows/lint/lintflow.py +72 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/questasim/questasimflow.py +26 -3
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/simulationflow.py +30 -5
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/verible/veribleflow.py +24 -23
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/vsg/vsgflow.py +30 -16
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/generators/spd.py +8 -3
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/parser.py +17 -1
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/plugins.py +2 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/pyedaa/__init__.py +11 -1
- simplhdl-0.1.0/src/simplhdl/resources/templates/flake8/setup.cfg.j2 +10 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/quartus/project.tcl.j2 +3 -3
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/questasim/Makefile.j2 +1 -1
- {simplhdl-0.0.6/src/simplhdl/resources/templates/rivierapro → simplhdl-0.1.0/src/simplhdl/resources/templates/questasim}/files.j2 +1 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/rivierapro → simplhdl-0.1.0/src/simplhdl/resources/templates/questasim}/project.mk.j2 +5 -3
- simplhdl-0.1.0/src/simplhdl/resources/templates/questasim/run.do.j2 +14 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/vcs → simplhdl-0.1.0/src/simplhdl/resources/templates/rivierapro}/files.j2 +1 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/xsim → simplhdl-0.1.0/src/simplhdl/resources/templates/vcs}/files.j2 +1 -0
- simplhdl-0.1.0/src/simplhdl/resources/templates/verible/rules.cfg.j2 +58 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/utils.py +3 -2
- {simplhdl-0.0.6 → simplhdl-0.1.0}/tox.ini +1 -0
- simplhdl-0.0.6/src/simplhdl/__init__.py +0 -1
- {simplhdl-0.0.6 → simplhdl-0.1.0}/.github/workflows/publish.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/.gitignore +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/.readthedocs.yaml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/LICENSE +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/README.md +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/_static/simplhdl_dark.png +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/_static/simplhdl_light.png +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/_static/simplhdl_light_1.png +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/conf.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/drawing.svg +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows/ghdl.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows/icarus.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows/quartus.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows/questasim.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows/vcs.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows/vivado.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows/xsim.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/flows.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/index.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/intel-ips.md +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/introduction.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/plugins.rst +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/docs/requirements.txt +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/adder.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/hdl/adder.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/sim/testbench.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/sim/testbench.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/syn/build.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/syn/placement.xdc +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/syn/timing.xdc +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/adder/syn/top.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/alu.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/hdl/add.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/hdl/alu.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/hdl/mul.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/hdl/sub.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/alu_vip/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/alu_vip/agent.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/alu_vip/aluif.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/alu_vip/driver.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/alu_vip/monitor.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/alu_vip/sequenceitem.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/alu_vip/sequencer.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/clock_vip/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/clock_vip/agent.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/clock_vip/clockif.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/pyuvm.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/test/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/test/env.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/test/seq_lib.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/test/test.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/pyuvm/testbench.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/alu_vip/agent.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/alu_vip/alu_vip.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/alu_vip/driver.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/alu_vip/env.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/alu_vip/monitor.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/alu_vip/sequence_item.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/add_seq.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/tb_env/seq_lib/base_seq.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/tb_env/tb_env.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/tb_env/tb_env.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/tb_env/test/base_test.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/tb_env/test/test_add.svh +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/testbench/alu_if.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/testbench/testbench.sv +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/testbench/testbench.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/sim/uvm/testcases/test_add/test_add.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/syn/build.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/syn/placement.xdc +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/alu/syn/timing.xdc +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/hello/build.sbt +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/hello/hello.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/hello/src/main/scala/Hello.scala +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/hdl/hello/syn/build.yml +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/plugins/simple_parser/setup.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/plugins/simple_parser/src/simple_parser/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/examples/plugins/simple_parser/src/simple_parser/simple_parser.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/setup.cfg +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/SimplHDL.egg-info/dependency_links.txt +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/SimplHDL.egg-info/entry_points.txt +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/SimplHDL.egg-info/top_level.txt +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/__main__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/implementationflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/modelsimflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/quartusdse/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/quartusdse/quartusdseflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/quartusflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/questasim/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/rivierapro/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/rivierapro/rivieraproflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/vcs/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/vcs/vcsflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/verible/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/vivadoflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/vsg/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/xsim/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/flows/xsim/xsimflow.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/generator.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/generators/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/generators/chisel.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/generators/ipxact.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/generators/systemrdl.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/info.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/parsers/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/parsers/fusesocparser.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/parsers/simplhdlparser.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/pyedaa/attributes.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/pyedaa/design.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/pyedaa/fileset.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/pyedaa/filetypes.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/pyedaa/project.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/pyedaa/vhdllibrary.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/repo.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/__init__.py +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/quartus → simplhdl-0.1.0/src/simplhdl/resources/templates/flake8}/__init__.py +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/questasim → simplhdl-0.1.0/src/simplhdl/resources/templates/quartus}/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/quartus/run.tcl.j2 +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/rivierapro → simplhdl-0.1.0/src/simplhdl/resources/templates/questasim}/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/questasim/cocotb.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/questasim/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/questasim/fileset.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/questasim/gui.do.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/rivierapro/Makefile.j2 +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/vcs → simplhdl-0.1.0/src/simplhdl/resources/templates/rivierapro}/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/rivierapro/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/rivierapro/fileset.j2 +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/questasim → simplhdl-0.1.0/src/simplhdl/resources/templates/rivierapro}/project.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/Makefile.j2 +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/verible → simplhdl-0.1.0/src/simplhdl/resources/templates/vcs}/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/cocotb.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/fileset.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/pli.tab.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/project.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/synopsys_sim.setup.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vcs/vcs.parameters.j2 +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/vivado → simplhdl-0.1.0/src/simplhdl/resources/templates/verible}/__init__.py +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/vsg → simplhdl-0.1.0/src/simplhdl/resources/templates/vivado}/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vivado/launch_run.sh.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vivado/project.tcl.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vivado/run.tcl.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vivado/steps.tcl.j2 +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/xsim → simplhdl-0.1.0/src/simplhdl/resources/templates/vsg}/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vsg/files.json.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/vsg/rules.yml.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/xsim/Makefile.j2 +0 -0
- /simplhdl-0.0.6/src/simplhdl/resources/templates/verible/rules.cfg.j2 → /simplhdl-0.1.0/src/simplhdl/resources/templates/xsim/__init__.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/xsim/cocotb.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/xsim/dependencies.mk.j2 +0 -0
- {simplhdl-0.0.6/src/simplhdl/resources/templates/questasim → simplhdl-0.1.0/src/simplhdl/resources/templates/xsim}/files.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/xsim/fileset.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/resources/templates/xsim/project.mk.j2 +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/simplhdl.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/src/simplhdl/tools.py +0 -0
- {simplhdl-0.0.6 → simplhdl-0.1.0}/tests/test_dummy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SimplHDL
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.1.0
|
|
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>
|
|
@@ -53,6 +53,8 @@ Requires-Dist: jinja2
|
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
54
|
Requires-Dist: rich
|
|
55
55
|
Requires-Dist: vsg
|
|
56
|
+
Requires-Dist: flake8
|
|
57
|
+
Requires-Dist: black
|
|
56
58
|
|
|
57
59
|
## Introduction
|
|
58
60
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: SimplHDL
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.1.0
|
|
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>
|
|
@@ -53,6 +53,8 @@ Requires-Dist: jinja2
|
|
|
53
53
|
Requires-Dist: GitPython
|
|
54
54
|
Requires-Dist: rich
|
|
55
55
|
Requires-Dist: vsg
|
|
56
|
+
Requires-Dist: flake8
|
|
57
|
+
Requires-Dist: black
|
|
56
58
|
|
|
57
59
|
## Introduction
|
|
58
60
|
|
|
@@ -103,6 +103,8 @@ src/simplhdl/flows/modelsimflow.py
|
|
|
103
103
|
src/simplhdl/flows/quartusflow.py
|
|
104
104
|
src/simplhdl/flows/simulationflow.py
|
|
105
105
|
src/simplhdl/flows/vivadoflow.py
|
|
106
|
+
src/simplhdl/flows/flake8/flake8flow.py
|
|
107
|
+
src/simplhdl/flows/lint/lintflow.py
|
|
106
108
|
src/simplhdl/flows/quartusdse/__init__.py
|
|
107
109
|
src/simplhdl/flows/quartusdse/quartusdseflow.py
|
|
108
110
|
src/simplhdl/flows/questasim/__init__.py
|
|
@@ -134,6 +136,8 @@ src/simplhdl/pyedaa/project.py
|
|
|
134
136
|
src/simplhdl/pyedaa/vhdllibrary.py
|
|
135
137
|
src/simplhdl/resources/__init__.py
|
|
136
138
|
src/simplhdl/resources/templates/__init__.py
|
|
139
|
+
src/simplhdl/resources/templates/flake8/__init__.py
|
|
140
|
+
src/simplhdl/resources/templates/flake8/setup.cfg.j2
|
|
137
141
|
src/simplhdl/resources/templates/quartus/__init__.py
|
|
138
142
|
src/simplhdl/resources/templates/quartus/project.tcl.j2
|
|
139
143
|
src/simplhdl/resources/templates/quartus/run.tcl.j2
|
|
@@ -145,6 +149,7 @@ src/simplhdl/resources/templates/questasim/files.j2
|
|
|
145
149
|
src/simplhdl/resources/templates/questasim/fileset.j2
|
|
146
150
|
src/simplhdl/resources/templates/questasim/gui.do.j2
|
|
147
151
|
src/simplhdl/resources/templates/questasim/project.mk.j2
|
|
152
|
+
src/simplhdl/resources/templates/questasim/run.do.j2
|
|
148
153
|
src/simplhdl/resources/templates/rivierapro/Makefile.j2
|
|
149
154
|
src/simplhdl/resources/templates/rivierapro/__init__.py
|
|
150
155
|
src/simplhdl/resources/templates/rivierapro/cocotb.mk.j2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from importlib.resources import files as resources_files
|
|
3
|
+
except ImportError:
|
|
4
|
+
from importlib_resources import files as resources_files
|
|
5
|
+
import os
|
|
6
|
+
import shutil
|
|
7
|
+
import logging
|
|
8
|
+
from argparse import Namespace
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from jinja2 import Environment, FileSystemLoader
|
|
11
|
+
|
|
12
|
+
from simplhdl.resources.templates import flake8 as templates
|
|
13
|
+
from simplhdl.utils import sh, CalledShError, generate_from_template
|
|
14
|
+
from simplhdl.flow import FlowFactory, FlowBase
|
|
15
|
+
from simplhdl.pyedaa.project import Project
|
|
16
|
+
from simplhdl.pyedaa import PythonSourceFile
|
|
17
|
+
|
|
18
|
+
logger = logging.getLogger(__name__)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@FlowFactory.register('flake8')
|
|
22
|
+
class Flake8Flow(FlowBase):
|
|
23
|
+
|
|
24
|
+
@classmethod
|
|
25
|
+
def parse_args(self, subparsers) -> None:
|
|
26
|
+
parser = subparsers.add_parser('flake8', help='Lint Flow for Python code')
|
|
27
|
+
parser.add_argument(
|
|
28
|
+
'--fix',
|
|
29
|
+
action='store_true',
|
|
30
|
+
help="Fix style formatting (Note: this modifies the source)"
|
|
31
|
+
)
|
|
32
|
+
parser.add_argument(
|
|
33
|
+
'-f', '--files',
|
|
34
|
+
type=lambda p: Path(p).absolute(),
|
|
35
|
+
nargs='+',
|
|
36
|
+
default=[],
|
|
37
|
+
help="Manually specify file list"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
41
|
+
super().__init__(name, args, project, builddir)
|
|
42
|
+
self.templates = templates
|
|
43
|
+
|
|
44
|
+
def setup(self):
|
|
45
|
+
os.makedirs(self.builddir, exist_ok=True)
|
|
46
|
+
if self.args.files:
|
|
47
|
+
self.files = [Path(f) for f in self.args.files if Path(f).suffix == '.py']
|
|
48
|
+
else:
|
|
49
|
+
self.files = [f.Path for f in self.project.DefaultDesign.DefaultFileSet.Files(PythonSourceFile)]
|
|
50
|
+
|
|
51
|
+
def generate(self):
|
|
52
|
+
config = os.getenv('SIMPLHDL_FLAKE8_RULES')
|
|
53
|
+
if config:
|
|
54
|
+
shutil.copy(config, self.builddir.joinpath('setup.cfg'))
|
|
55
|
+
else:
|
|
56
|
+
templatedir = resources_files(self.templates)
|
|
57
|
+
environment = Environment(
|
|
58
|
+
loader=FileSystemLoader(templatedir),
|
|
59
|
+
trim_blocks=True)
|
|
60
|
+
template = environment.get_template('setup.cfg.j2')
|
|
61
|
+
generate_from_template(template, self.builddir)
|
|
62
|
+
|
|
63
|
+
def execute(self):
|
|
64
|
+
if self.args.fix:
|
|
65
|
+
for file in self.files:
|
|
66
|
+
sh(['black', str(file.absolute())])
|
|
67
|
+
else:
|
|
68
|
+
command = ['flake8'] + [str(f.absolute()) for f in self.files]
|
|
69
|
+
try:
|
|
70
|
+
sh(command, cwd=self.builddir, output=True)
|
|
71
|
+
except CalledShError as e:
|
|
72
|
+
print(e)
|
|
73
|
+
raise SystemError
|
|
74
|
+
|
|
75
|
+
# flake = flake8.get_style_guide()
|
|
76
|
+
# report = flake.check_files(self.files)
|
|
77
|
+
# if report.get_statistics('E'):
|
|
78
|
+
# raise SystemError
|
|
79
|
+
|
|
80
|
+
def run(self) -> None:
|
|
81
|
+
self.setup()
|
|
82
|
+
self.generate()
|
|
83
|
+
self.execute()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import logging
|
|
3
|
+
from argparse import Namespace
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from simplhdl.flow import FlowFactory, FlowBase
|
|
7
|
+
from simplhdl.pyedaa.project import Project
|
|
8
|
+
from simplhdl.flows.verible.veribleflow import VeribleFlow
|
|
9
|
+
from simplhdl.flows.vsg.vsgflow import VsgFlow
|
|
10
|
+
from simplhdl.flows.flake8.flake8flow import Flake8Flow
|
|
11
|
+
|
|
12
|
+
logger = logging.getLogger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@FlowFactory.register('lint')
|
|
16
|
+
class LintFlow(FlowBase):
|
|
17
|
+
|
|
18
|
+
@classmethod
|
|
19
|
+
def parse_args(self, subparsers) -> None:
|
|
20
|
+
parser = subparsers.add_parser('lint', help='Lint Flow for Design and Verification code')
|
|
21
|
+
parser.add_argument(
|
|
22
|
+
'--fix',
|
|
23
|
+
action='store_true',
|
|
24
|
+
help="Fix style formatting (Note: this modifies the source)"
|
|
25
|
+
)
|
|
26
|
+
parser.add_argument(
|
|
27
|
+
'-f', '--files',
|
|
28
|
+
type=lambda p: Path(p).absolute(),
|
|
29
|
+
nargs='+',
|
|
30
|
+
default=[],
|
|
31
|
+
help="Manually specify file list"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
35
|
+
super().__init__(name, args, project, builddir)
|
|
36
|
+
|
|
37
|
+
def setup(self):
|
|
38
|
+
os.makedirs(self.builddir, exist_ok=True)
|
|
39
|
+
|
|
40
|
+
def generate(self):
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
def execute(self):
|
|
44
|
+
verible_args = Namespace(rules=None, files=self.args.files, fix=self.args.fix)
|
|
45
|
+
verible = VeribleFlow('verible', verible_args, self.project, self.builddir)
|
|
46
|
+
vsg_args = Namespace(rules=None, files=self.args.files, fix=self.args.fix, output_format='syntastic')
|
|
47
|
+
vsg = VsgFlow('vsg', vsg_args, self.project, self.builddir)
|
|
48
|
+
flake_args = Namespace(files=self.args.files, fix=self.args.fix)
|
|
49
|
+
flake = Flake8Flow('flake8', flake_args, self.project, self.builddir)
|
|
50
|
+
system_error = False
|
|
51
|
+
try:
|
|
52
|
+
verible.run()
|
|
53
|
+
except SystemError:
|
|
54
|
+
system_error = True
|
|
55
|
+
|
|
56
|
+
try:
|
|
57
|
+
vsg.run()
|
|
58
|
+
except SystemError:
|
|
59
|
+
system_error = True
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
flake.run()
|
|
63
|
+
except SystemError:
|
|
64
|
+
system_error = True
|
|
65
|
+
|
|
66
|
+
if system_error:
|
|
67
|
+
raise SystemError
|
|
68
|
+
|
|
69
|
+
def run(self) -> None:
|
|
70
|
+
self.setup()
|
|
71
|
+
self.generate()
|
|
72
|
+
self.execute()
|
|
@@ -31,10 +31,22 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
31
31
|
)
|
|
32
32
|
parser.add_argument(
|
|
33
33
|
'-w',
|
|
34
|
-
'--
|
|
34
|
+
'--wavedump',
|
|
35
35
|
action='store_true',
|
|
36
36
|
help="Dump waveforms"
|
|
37
37
|
)
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
'--waveformat',
|
|
40
|
+
action='store',
|
|
41
|
+
choices=['wlf', 'vcd', 'evcd'],
|
|
42
|
+
default='wlf',
|
|
43
|
+
help="Wave file format"
|
|
44
|
+
)
|
|
45
|
+
parser.add_argument(
|
|
46
|
+
'--debug',
|
|
47
|
+
action='store_true',
|
|
48
|
+
help="Enable full debug capabilities"
|
|
49
|
+
)
|
|
38
50
|
parser.add_argument(
|
|
39
51
|
'--gui',
|
|
40
52
|
action='store_true',
|
|
@@ -111,13 +123,16 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
111
123
|
globals['vcom_args'] = self.vcom_args()
|
|
112
124
|
globals['vopt_args'] = self.vopt_args()
|
|
113
125
|
globals['vsim_args'] = self.vsim_args()
|
|
126
|
+
globals['wavedump'] = self.args.wavedump
|
|
127
|
+
globals['waveformat'] = self.args.waveformat
|
|
114
128
|
return globals
|
|
115
129
|
|
|
116
130
|
def get_project_templates(self, environment) -> List[Template]:
|
|
117
131
|
return [
|
|
118
132
|
environment.get_template('Makefile.j2'),
|
|
119
133
|
environment.get_template('project.mk.j2'),
|
|
120
|
-
environment.get_template('gui.do.j2')
|
|
134
|
+
environment.get_template('gui.do.j2'),
|
|
135
|
+
environment.get_template('run.do.j2')
|
|
121
136
|
]
|
|
122
137
|
|
|
123
138
|
def get_cocotb_templates(self, environment):
|
|
@@ -144,6 +159,8 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
144
159
|
args = set()
|
|
145
160
|
if self.args.verbose == 0:
|
|
146
161
|
args.add('-quiet')
|
|
162
|
+
for name in self.get_libraries().keys():
|
|
163
|
+
args.add(f"-L {name}")
|
|
147
164
|
for name, value in self.project.Defines.items():
|
|
148
165
|
args.add(f"+define+{name}={escape(value)}")
|
|
149
166
|
return ' '.join(list(args) + [self.args.vlog_args])
|
|
@@ -170,7 +187,11 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
170
187
|
args.add(f"-g{name}={escape(value)}")
|
|
171
188
|
for name, value in self.project.Parameters.items():
|
|
172
189
|
args.add(f"-g{name}={escape(value)}")
|
|
173
|
-
if self.args.
|
|
190
|
+
if self.args.debug:
|
|
191
|
+
args.add('+acc')
|
|
192
|
+
args.add('-debugdb')
|
|
193
|
+
args.add('-fsmdebug')
|
|
194
|
+
elif self.args.gui or self.args.do or self.args.wavedump or self.cocotb.enabled:
|
|
174
195
|
args.add('+acc=npr')
|
|
175
196
|
return ' '.join(list(args) + [self.args.vopt_args])
|
|
176
197
|
|
|
@@ -188,6 +209,8 @@ class QuestaSimFlow(SimulationFlow):
|
|
|
188
209
|
args.add('-onfinish final')
|
|
189
210
|
else:
|
|
190
211
|
args.add('-onfinish exit')
|
|
212
|
+
if self.args.debug:
|
|
213
|
+
args.add('-debugDB')
|
|
191
214
|
|
|
192
215
|
return ' '.join(list(args) + [self.args.vsim_args])
|
|
193
216
|
|
|
@@ -4,6 +4,7 @@ except ImportError:
|
|
|
4
4
|
from importlib_resources import files as resources_files
|
|
5
5
|
import os
|
|
6
6
|
import logging
|
|
7
|
+
import shutil
|
|
7
8
|
|
|
8
9
|
from typing import Callable, Generator, List, Dict, Tuple, Any
|
|
9
10
|
from jinja2 import Environment, FileSystemLoader
|
|
@@ -15,9 +16,11 @@ from simplhdl.pyedaa.project import Project
|
|
|
15
16
|
from simplhdl.pyedaa.attributes import UsedIn
|
|
16
17
|
from simplhdl.cocotb import Cocotb
|
|
17
18
|
from simplhdl.pyedaa.fileset import FileSet
|
|
18
|
-
from simplhdl.pyedaa import (
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
from simplhdl.pyedaa import (
|
|
20
|
+
File, VerilogSourceFile, VerilogIncludeFile, SystemVerilogSourceFile, VHDLSourceFile,
|
|
21
|
+
MemoryInitFile
|
|
22
|
+
)
|
|
23
|
+
from simplhdl.utils import generate_from_template, md5sum, md5check, md5write, append_suffix
|
|
21
24
|
|
|
22
25
|
logger = logging.getLogger(__name__)
|
|
23
26
|
|
|
@@ -28,10 +31,11 @@ class SimulationFlow(FlowBase):
|
|
|
28
31
|
super().__init__(name, args, project, builddir)
|
|
29
32
|
self.category = FlowCategory.SIMULATION
|
|
30
33
|
self.hdl_language = None
|
|
31
|
-
self.cocotb = Cocotb(project)
|
|
32
34
|
self.templates = None
|
|
35
|
+
self.hashfile = self.builddir.joinpath('filesets.hash')
|
|
33
36
|
|
|
34
37
|
def run(self) -> None:
|
|
38
|
+
self.cocotb = Cocotb(self.project)
|
|
35
39
|
self.validate()
|
|
36
40
|
self.configure()
|
|
37
41
|
self.generate()
|
|
@@ -74,6 +78,8 @@ class SimulationFlow(FlowBase):
|
|
|
74
78
|
for template in self.get_project_templates(env) + self.get_cocotb_templates(env):
|
|
75
79
|
generate_from_template(template, self.builddir, self.get_globals())
|
|
76
80
|
self.generate_make_rules(env)
|
|
81
|
+
self.copy_memory_files()
|
|
82
|
+
self.is_filesets_changed()
|
|
77
83
|
|
|
78
84
|
def generate_make_rules(self, environment):
|
|
79
85
|
walker = FileSetWalker()
|
|
@@ -126,7 +132,8 @@ class SimulationFlow(FlowBase):
|
|
|
126
132
|
template,
|
|
127
133
|
base.with_suffix('.files'),
|
|
128
134
|
target=base.with_suffix('.fileset').name,
|
|
129
|
-
files=[f.Path.absolute() for f in files]
|
|
135
|
+
files=[f.Path.absolute() for f in files],
|
|
136
|
+
hashfile=self.hashfile.name)
|
|
130
137
|
template = environment.get_template('fileset.j2')
|
|
131
138
|
output = base.with_suffix('.fileset')
|
|
132
139
|
includes = {f.Path.parent.absolute() for f in files if isinstance(f, VerilogIncludeFile)}
|
|
@@ -135,6 +142,10 @@ class SimulationFlow(FlowBase):
|
|
|
135
142
|
generated.append(output)
|
|
136
143
|
return generated
|
|
137
144
|
|
|
145
|
+
def copy_memory_files(self):
|
|
146
|
+
for file in self.project.DefaultDesign.Files(MemoryInitFile):
|
|
147
|
+
shutil.copy(file.Path.absolute(), self.builddir.absolute())
|
|
148
|
+
|
|
138
149
|
def is_uvm(self):
|
|
139
150
|
for plusarg in self.project.PlusArgs.keys():
|
|
140
151
|
if plusarg.startswith('UVM_'):
|
|
@@ -159,6 +170,20 @@ class SimulationFlow(FlowBase):
|
|
|
159
170
|
libraries.update(self.project.DefaultDesign.ExternalVHDLLibraries)
|
|
160
171
|
return libraries
|
|
161
172
|
|
|
173
|
+
def is_filesets_changed(self) -> bool:
|
|
174
|
+
"""
|
|
175
|
+
Check if there are any changes in filesets since last run.
|
|
176
|
+
"""
|
|
177
|
+
filesets = []
|
|
178
|
+
walker = FileSetWalker()
|
|
179
|
+
for fileset in walker.walk(self.project.DefaultDesign.DefaultFileSet):
|
|
180
|
+
filesets += [Path(f.Name) for f in FileSetWalker().walk(fileset) if Path(f.Name).is_file()]
|
|
181
|
+
if self.hashfile.is_file() and md5check(*filesets, filename=self.hashfile):
|
|
182
|
+
return True
|
|
183
|
+
else:
|
|
184
|
+
md5write(*filesets, filename=self.hashfile)
|
|
185
|
+
return False
|
|
186
|
+
|
|
162
187
|
|
|
163
188
|
class FileSetWalker:
|
|
164
189
|
|
|
@@ -23,11 +23,11 @@ class VeribleFlow(FlowBase):
|
|
|
23
23
|
@classmethod
|
|
24
24
|
def parse_args(self, subparsers) -> None:
|
|
25
25
|
parser = subparsers.add_parser('verible-verilog-lint', help='Verible Lint Flow')
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
parser.add_argument(
|
|
27
|
+
'--fix',
|
|
28
|
+
action='store_true',
|
|
29
|
+
help="Fix style formatting (Note: this modifies the source)"
|
|
30
|
+
)
|
|
31
31
|
parser.add_argument(
|
|
32
32
|
'-r', '--rules',
|
|
33
33
|
action='store',
|
|
@@ -49,29 +49,30 @@ class VeribleFlow(FlowBase):
|
|
|
49
49
|
os.makedirs(self.builddir, exist_ok=True)
|
|
50
50
|
|
|
51
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
52
|
if self.args.rules:
|
|
63
|
-
rules = self.args.rules
|
|
53
|
+
self.rules = self.args.rules
|
|
64
54
|
elif os.getenv('SIMPLHDL_VERIBLE_RULES'):
|
|
65
|
-
rules = self.args.rules
|
|
55
|
+
self.rules = self.args.rules
|
|
66
56
|
else:
|
|
67
|
-
|
|
57
|
+
templatedir = resources_files(self.templates)
|
|
58
|
+
environment = Environment(
|
|
59
|
+
loader=FileSystemLoader(templatedir),
|
|
60
|
+
trim_blocks=True)
|
|
61
|
+
template = environment.get_template('rules.cfg.j2')
|
|
62
|
+
generate_from_template(template, self.builddir)
|
|
63
|
+
self.rules = 'rules.cfg'
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
def execute(self):
|
|
66
|
+
errors = False
|
|
67
|
+
command = [
|
|
68
|
+
"verible-verilog-lint",
|
|
69
|
+
"--check_syntax=false",
|
|
70
|
+
"--ruleset=all",
|
|
71
|
+
"--rules_config", self.rules
|
|
72
|
+
]
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
# else:
|
|
74
|
-
# command += f"-ap -of {self.args.output_format}".split()
|
|
74
|
+
if self.args.fix:
|
|
75
|
+
command += ["--autofix=inplace"]
|
|
75
76
|
|
|
76
77
|
file_types = [VerilogIncludeFile, VerilogSourceFile, SystemVerilogSourceFile]
|
|
77
78
|
files = [f for f in self.project.DefaultDesign.Files() if f.FileType in file_types]
|
|
@@ -8,13 +8,14 @@ from argparse import Namespace
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from jinja2 import Environment, FileSystemLoader
|
|
10
10
|
|
|
11
|
-
from simplhdl.flow import FlowFactory, FlowBase
|
|
11
|
+
from simplhdl.flow import FlowFactory, FlowBase, FlowError
|
|
12
12
|
from simplhdl.resources.templates import vsg as templates
|
|
13
13
|
from simplhdl.utils import sh, CalledShError, generate_from_template
|
|
14
14
|
from simplhdl.pyedaa import VHDLSourceFile
|
|
15
15
|
from simplhdl.pyedaa.project import Project
|
|
16
16
|
from simplhdl.pyedaa.attributes import UsedIn
|
|
17
17
|
|
|
18
|
+
|
|
18
19
|
logger = logging.getLogger(__name__)
|
|
19
20
|
|
|
20
21
|
|
|
@@ -31,7 +32,7 @@ class VsgFlow(FlowBase):
|
|
|
31
32
|
'syntastic',
|
|
32
33
|
'summary'
|
|
33
34
|
],
|
|
34
|
-
default=
|
|
35
|
+
default=None,
|
|
35
36
|
help="Display output format"
|
|
36
37
|
)
|
|
37
38
|
parser.add_argument(
|
|
@@ -55,6 +56,8 @@ class VsgFlow(FlowBase):
|
|
|
55
56
|
def __init__(self, name, args: Namespace, project: Project, builddir: Path):
|
|
56
57
|
super().__init__(name, args, project, builddir)
|
|
57
58
|
self.templates = templates
|
|
59
|
+
# file limit to change output for to summary
|
|
60
|
+
self.file_limit: int = 5
|
|
58
61
|
|
|
59
62
|
def setup(self):
|
|
60
63
|
os.makedirs(self.builddir, exist_ok=True)
|
|
@@ -69,32 +72,43 @@ class VsgFlow(FlowBase):
|
|
|
69
72
|
VHDLSourceFile=VHDLSourceFile,
|
|
70
73
|
project=self.project,
|
|
71
74
|
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
75
|
if self.args.rules:
|
|
78
|
-
rules = self.args.rules
|
|
76
|
+
self.rules = self.args.rules
|
|
79
77
|
elif os.getenv('SIMPLHDL_VSG_RULES'):
|
|
80
|
-
rules = self.args.rules
|
|
78
|
+
self.rules = self.args.rules
|
|
81
79
|
else:
|
|
82
|
-
|
|
80
|
+
template = environment.get_template('rules.yml.j2')
|
|
81
|
+
generate_from_template(template, self.builddir)
|
|
82
|
+
self.rules = 'rules.yml'
|
|
83
|
+
|
|
84
|
+
def execute(self):
|
|
85
|
+
command = ["vsg"]
|
|
86
|
+
user_files = len(self.args.files)
|
|
87
|
+
project_files = len(list(self.project.DefaultDesign.DefaultFileSet.Files(VHDLSourceFile)))
|
|
83
88
|
|
|
84
89
|
if self.args.fix:
|
|
85
90
|
command.append("--fix")
|
|
91
|
+
elif self.args.output_format is None:
|
|
92
|
+
if user_files > self.file_limit:
|
|
93
|
+
format = "summary"
|
|
94
|
+
elif project_files > self.file_limit and not user_files:
|
|
95
|
+
format = "summary"
|
|
96
|
+
else:
|
|
97
|
+
format = "vsg"
|
|
98
|
+
command += f"-ap -of {format}".split()
|
|
86
99
|
else:
|
|
87
100
|
command += f"-ap -of {self.args.output_format}".split()
|
|
88
101
|
|
|
89
|
-
if
|
|
90
|
-
if rules:
|
|
91
|
-
command += f"-c {rules}".split()
|
|
92
|
-
command += ['-f'] + self.args.files
|
|
102
|
+
if user_files:
|
|
103
|
+
if self.rules:
|
|
104
|
+
command += f"-c {self.rules}".split()
|
|
105
|
+
command += ['-f'] + [str(f.absolute()) for f in self.args.files]
|
|
106
|
+
elif project_files:
|
|
107
|
+
command += f"-c {self.rules} files.json".split()
|
|
93
108
|
else:
|
|
94
|
-
|
|
109
|
+
raise FlowError("No VHDL files")
|
|
95
110
|
|
|
96
111
|
try:
|
|
97
|
-
logger.debug(command)
|
|
98
112
|
sh(command, cwd=self.builddir, output=True)
|
|
99
113
|
except CalledShError as e:
|
|
100
114
|
print(e)
|
|
@@ -11,12 +11,13 @@ from shutil import copy, copytree
|
|
|
11
11
|
from ..pyedaa import (
|
|
12
12
|
File, SystemVerilogSourceFile, VHDLSourceFile, VerilogSourceFile,
|
|
13
13
|
QuartusIPSpecificationFile, HDLLibrary, ConstraintFile, HDLSourceFile,
|
|
14
|
-
QuartusIPCompressedSpecificationFile, QuartusQSYSSpecificationFile
|
|
14
|
+
QuartusIPCompressedSpecificationFile, QuartusQSYSSpecificationFile,
|
|
15
|
+
MemoryInitFile
|
|
15
16
|
)
|
|
16
17
|
from ..pyedaa.fileset import FileSet
|
|
17
18
|
from ..flow import FlowBase, FlowCategory, FlowTools
|
|
18
19
|
from ..generator import GeneratorFactory, GeneratorBase, GeneratorError
|
|
19
|
-
from ..utils import md5write, md5check
|
|
20
|
+
from ..utils import md5write, md5check, sh
|
|
20
21
|
|
|
21
22
|
logger = logging.getLogger(__name__)
|
|
22
23
|
|
|
@@ -29,6 +30,7 @@ FILETYPE_MAP = {
|
|
|
29
30
|
'VHDL': VHDLSourceFile,
|
|
30
31
|
'VHDL_ENCRYPT': VHDLSourceFile,
|
|
31
32
|
'SDC_ENTITY': ConstraintFile,
|
|
33
|
+
'HEX': MemoryInitFile
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
TOOL_MAP = {
|
|
@@ -51,7 +53,10 @@ class Spd:
|
|
|
51
53
|
self.simulators = set()
|
|
52
54
|
spdfile = filename.parent.joinpath(filename.stem, filename.name).with_suffix('.spd')
|
|
53
55
|
if not spdfile.exists():
|
|
54
|
-
|
|
56
|
+
command = f"qsys-generate --simulation=VERILOG {filename.absolute()}".split()
|
|
57
|
+
sh(command, cwd=filename.parent)
|
|
58
|
+
if not spdfile.exists():
|
|
59
|
+
raise FileNotFoundError(f"{spdfile}: doesn't exits")
|
|
55
60
|
self.tree = parse(spdfile)
|
|
56
61
|
self.root = self.tree.getroot()
|
|
57
62
|
self.location = spdfile.parent.absolute()
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
|
|
1
3
|
from pathlib import Path
|
|
2
4
|
from typing import Callable
|
|
3
5
|
from abc import ABCMeta, abstractmethod
|
|
@@ -6,6 +8,8 @@ from argparse import Namespace
|
|
|
6
8
|
from .pyedaa.fileset import FileSet
|
|
7
9
|
from .pyedaa.project import Project
|
|
8
10
|
|
|
11
|
+
logger = logging.getLogger(__name__)
|
|
12
|
+
|
|
9
13
|
|
|
10
14
|
class ParserBase(metaclass=ABCMeta):
|
|
11
15
|
|
|
@@ -21,6 +25,17 @@ class ParserBase(metaclass=ABCMeta):
|
|
|
21
25
|
pass
|
|
22
26
|
|
|
23
27
|
|
|
28
|
+
class NoParser(ParserBase):
|
|
29
|
+
"""
|
|
30
|
+
This parser always returns an empty fileset
|
|
31
|
+
"""
|
|
32
|
+
def is_valid_format(self, filename: Path) -> bool:
|
|
33
|
+
return True
|
|
34
|
+
|
|
35
|
+
def parse(self, filename: Path, project: Project, args: Namespace) -> 'FileSet':
|
|
36
|
+
return FileSet('Empty')
|
|
37
|
+
|
|
38
|
+
|
|
24
39
|
class ParserFactory:
|
|
25
40
|
"""
|
|
26
41
|
Factory for creating parsers
|
|
@@ -47,7 +62,8 @@ class ParserFactory:
|
|
|
47
62
|
if parser.is_valid_format(filename):
|
|
48
63
|
return parser
|
|
49
64
|
if filename is None:
|
|
50
|
-
|
|
65
|
+
logger.info("No project specification found, continue with empty project")
|
|
66
|
+
return NoParser()
|
|
51
67
|
else:
|
|
52
68
|
raise ParserError(f"Couldn't find Parser for parsing '{filename}'")
|
|
53
69
|
|
|
@@ -30,6 +30,8 @@ def load_builtin_plugins() -> None:
|
|
|
30
30
|
import_module('simplhdl.flows.quartusdse.quartusdseflow')
|
|
31
31
|
import_module('simplhdl.flows.vsg.vsgflow')
|
|
32
32
|
import_module('simplhdl.flows.verible.veribleflow')
|
|
33
|
+
import_module('simplhdl.flows.lint.lintflow')
|
|
34
|
+
import_module('simplhdl.flows.flake8.flake8flow')
|
|
33
35
|
packages = chain(
|
|
34
36
|
iter_namespace(simplhdl.parsers),
|
|
35
37
|
iter_namespace(simplhdl.flows),
|
|
@@ -73,7 +73,11 @@ class VHDLSourceFile(HDLSourceFile, pm.HumanReadableContent):
|
|
|
73
73
|
pass
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
class
|
|
76
|
+
class PythonSourceFile(pm.PythonSourceFile):
|
|
77
|
+
pass
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class CocotbPythonFile(PythonSourceFile, FileMixIn):
|
|
77
81
|
def _registerAttributes(self):
|
|
78
82
|
super()._registerAttributes()
|
|
79
83
|
FileMixIn._registerAttributes(self)
|
|
@@ -164,3 +168,9 @@ class ScalaBuildFile(File):
|
|
|
164
168
|
|
|
165
169
|
class ChiselBuildFile(ScalaBuildFile):
|
|
166
170
|
pass
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class MemoryInitFile(File):
|
|
174
|
+
def _registerAttributes(self):
|
|
175
|
+
super()._registerAttributes()
|
|
176
|
+
FileMixIn._registerAttributes(self)
|