Skip to content

Commit

Permalink
Verilator support (#28)
Browse files Browse the repository at this point in the history
* refs #27
* circleci runs verilator
  • Loading branch information
oddball committed May 16, 2021
1 parent a2ac05f commit 46ec24f
Show file tree
Hide file tree
Showing 12 changed files with 390 additions and 320 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
name: Install dependencies
command: |
sudo apt-get update
sudo apt-get install -y pandoc
sudo apt-get install ghdl gtkwave
sudo apt-get install -y pandoc ghdl gtkwave verilator
sudo pip install -e .
- run: python --version
- run: make gen
- run: make compile_ghdl
- run: make compile_verilator

test-2.7:
<<: *test-template
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ example.docx
# virtual env
venv
.venv

source_me
obj_dir/
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ compile_ghdl:
ghdl -e vhd_dut
ghdl -r vhd_dut

compile_verilator:
verilator --cc example/output/example_sv_pkg.sv
verilator --cc example/output_default/example_sv_pkg.sv
verilator --cc example/output_no_default/example_sv_pkg.sv

compile_icarus:
iverilog -g2012 -o foo example/output/*.sv

Expand All @@ -75,3 +80,7 @@ clean:
validate:
xmllint --noout --schema ipxact2systemverilog/xml/component.xsd example/input/test.xml


venv: requirements.txt
python3 -m venv ./venv
venv/bin/pip install --upgrade -r requirements.txt
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ Working in development mode for pypi

TODO
====
* Should compile the verilog output with http://iverilog.icarus.com/ but sadly icarus does not support enough SV yet
* A better testbench for the generated packages should be implemented.
* More complicated IPXACT files should be added and tried out.
* Add support for the SystemVerilog generator to have a register field of an enumerated type.
* Use http://pyxb.sourceforge.net to enable dumping out the modified XML
* Support DIM

Binary file modified example/output/example.docx
Binary file not shown.
Loading

0 comments on commit 46ec24f

Please sign in to comment.