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

update Verilator-related files to compile on version 4.228 #76

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

Conversation

stuij
Copy link

@stuij stuij commented Oct 14, 2022

  • Starting from Verilator version 4.210, the model class is an interface object. For reaching Verilog variables internal to a module this means that we need to include an extra header in cpp files that reference them (#include "Vj1a___024root.h"). And they're now part of a rootp class which is a member of the model class; we need to add an extra level of indirection. So 'top->v__DOT__ram_prog[i] = v;' becomes 'top->rootp->v__DOT__ram_prog[i] = v;'. See https://verilator.org/guide/latest/connecting.html for more words.

  • I don't know when these were introduced, but Verilator has become more strict about allowing assignments to wires. So 'insn' has become a reg as we assign to it inside a procedural block. And the 'wire uart0_(wr|rd) = ..' wire declarations on line 60/61 were duplicates of the module port declarations.

- Starting from Verilator version 4.210, the model class is an interface
object. For reaching Verilog variables internal to a module this means that we
need to include an extra header in cpp files that reference them (#include
"Vj1a___024root.h"). And they're now part of a rootp class which is a member of
the model class; we need to add an extra level of indirection. So
'top->v__DOT__ram_prog[i] = v;' becomes 'top->rootp->v__DOT__ram_prog[i] =
v;'. See https://verilator.org/guide/latest/connecting.html for more words.

- I don't know when these were introduced, but Verilator has become more strict
about allowing assignments to wires. So 'insn' has become a reg as we assign to
it inside a procedural block. And the 'wire uart0_(wr|rd) = ..' wire
declarations on line 60/61 were duplicates of the module port declarations.
@stuij
Copy link
Author

stuij commented Oct 18, 2022

updated with fixes for J1b

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.

None yet

1 participant