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

Fix beh_lib.sv syntax error when using RV_FPGA_OPTIMIZE #12

Closed
wants to merge 1 commit into from

Conversation

olofk
Copy link
Collaborator

@olofk olofk commented Aug 27, 2019

As was reported in chipsalliance/VeeRwolf#1 , verilator reports a syntax error in beh_lib.sv when using RV_FPGA_OPTIMIZE. Older versions of Verilator parses this fine, but it seems there has been a stricter check introduced somewhere between versions 4.006 and 4.010. I also noticed that Icarus verilog doesn't handle this syntax either. This patch simplifies the expression to work in all cases

@robertgolla
Copy link

robertgolla commented Aug 27, 2019

Actually with that change we will no longer be able to run our testbench to validate that RV_FPGA_OPTIMIZE works or not (hierarchy must match with w/out the RV_FPGA_OPTIMIZE).

Can you try the following:

`ifndef PHYSICAL

if (WIDTH >= 8) begin: genblock

`endif

 rvdffs #(WIDTH) dff ( .* );

`ifndef PHYSICAL

end

`endif

That should work fine.

@olofk
Copy link
Collaborator Author

olofk commented Aug 29, 2019

That seems to work fine. Should I send an updated patch or do you take care of it on your side?

@robertgolla
Copy link

I will take care of this from my side tomorrow. Will let you know when it is pushed. Thanks for helping with this.

@robertgolla
Copy link

This is now fixed as part of the 1.3 release.

@olofk olofk closed this Sep 6, 2019
@olofk olofk deleted the beh_lib_syntax branch September 6, 2019 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants