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

Change 'function' into 'function automatic' to fix verilator 5.0 compilation abort #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomverbeure
Copy link

Verilator 5.0 has a new IMPLICITSTATIC warning.

When running the default make -f tools/Makefile, it errors out with the following errors:

%Warning-IMPLICITSTATIC: /home/tom/projects/Cores-VeeR-EH1-tvb/testbench/dasm.svi:26:17: Function/task's lifetime implicitly set to static
                                                                                       : ... Suggest use 'function automatic' or 'function static'
   26 | function string dasm(input[31:0] opcode, input[31:0] pc, input[4:0] regn, input[31:0] regv, input tid=0);
      |                 ^~~~
                         /home/tom/projects/Cores-VeeR-EH1-tvb/testbench/tb_top.sv:1103:1: ... note: In file included from tb_top.sv
                         ... For warning description see https://verilator.org/warn/IMPLICITSTATIC?v=5.009
                         ... Use "/* verilator lint_off IMPLICITSTATIC */" and lint_on around source to disable this message.
%Warning-IMPLICITSTATIC: /home/tom/projects/Cores-VeeR-EH1-tvb/testbench/dasm.svi:34:17: Function/task's lifetime implicitly set to static
                                                                                       : ... Suggest use 'function automatic' or 'function static'
   34 | function string dasm16( input[31:0] opcode, input[31:0] pc, input tid=0);
      |                 ^~~~~~
                         /home/tom/projects/Cores-VeeR-EH1-tvb/testbench/tb_top.sv:1103:1: ... note: In file included from tb_top.sv
...

This PR replaces `function` by `function automatic` in `dasm.svi`.

After this, `make -f tools/Makefile` finishes without issues.

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.

1 participant