Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtlsim fails when using Vivado 2019.2 #89

Closed
quetric opened this issue May 5, 2020 · 3 comments
Closed

rtlsim fails when using Vivado 2019.2 #89

quetric opened this issue May 5, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@quetric
Copy link
Collaborator

quetric commented May 5, 2020

How to reproduce:

sh run-docker.sh
python setup.py test --addopts "-k test_fpgadataflow_fclayer_rtlsim --pdb"

Expected behaviour: test passes

Actual behaviour: test fails with an error in the pyverilator compile stage:

%Error: /tmp/finn_dev_lpetrica/code_gen_ipgen_StreamingFCLayer_Batch_0_vew52yqa/project_StreamingFCLayer_Batch_0/sol1/impl/verilog/StreamingFCLayer_Batch_0_StreamingFCLayer_Batch_0.v:118: Cannot find file containing module: regslice_both

Note that in contrast to 2019.1 and earlier, 2019.2 puts regslice modules in a separate verilog file.

@quetric
Copy link
Collaborator Author

quetric commented May 8, 2020

Debugged this further. Problem is caused by the naming of the verilog file containing regslice modules, which starting in 2019.2, is called regslice_core.v. Verilator assumes modules are found in (System)Verilog files of the same name, which is not the case here.

The solution is to pass both the top Verilog file and regslice_core.v to verilator along with a --top-module argument indicating the name of the top module. However, PyVerilator does not support either passing of --top-module or providing multiple verilog files to Verilator.

@quetric
Copy link
Collaborator Author

quetric commented May 8, 2020

Submitted issue to PyVerilator: csail-csg/pyverilator#10

@maltanar
Copy link
Collaborator

Thanks for finding and fixing this @quetric. Changes have been merged into our fork of PyVerilator and I've updated dev to use the latest version in 5ab626e -- hopefully this fixes the issues you have observed with Vivado 2019.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants