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

core_common.svh and synthesis #3

Open
mosfet-sapeon opened this issue Jun 10, 2024 · 0 comments
Open

core_common.svh and synthesis #3

mosfet-sapeon opened this issue Jun 10, 2024 · 0 comments

Comments

@mosfet-sapeon
Copy link

I'm having trouble actually compiling this core. The core issue (heh) seems to be the pattern:

// Verilog-2001 Module definition:
module core_csrs (
  ...
  input       [XL:0] csr_wdata        , // Data to be written to a CSR
  ...
);

// Common core parameters and constants
`include "core_common.svh"

In the above, "core_common.svh" contains the definition of the localparam "XL". This would have worked in Verilog-1995 standard where inputs and outputs were declared after the module definition but it does not work in Verilog-2001 syntax. You can't just move the "`include "core_common.svh" line before the module definition either as localparams must be placed after module definition.

Suggestion is to make these parameters actual parameters and pass them down instead of localparams.

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

No branches or pull requests

1 participant