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

Non-synthesizable verilog should be guarded with preprocessor macros #1434

Closed
matth2k opened this issue May 2, 2023 · 2 comments
Closed

Comments

@matth2k
Copy link
Collaborator

matth2k commented May 2, 2023

When I use the verilog backend, verilog.rs generates some blocks to check for invalid assignments.

https://github.com/cucapra/calyx/blob/1b8bd1dfdd196f9df653a9160e896d60a0fe5746/src/backend/verilog.rs#L496-L508

However, Xilinx Vivado has a problem with this because its not synthesizable code.

I think the solution is to simply add some macros so Vivado skips over those lines like such:

`ifdef VERILATOR
  `ifndef SYNTHESIS
    // Non-synthesizable calls here
    always_comb begin
    if(~$onehot0({_guard465, _guard462})) begin
      $fatal(2, "Multiple assignment to port `while_2_arg0_reg.in'.");
    end
    end
  `endif
`endif
@rachitnigam
Copy link
Contributor

You have to pass --disable-verify --synthesis --disable-init to the compiler to remove these (see #1400)

@rachitnigam
Copy link
Contributor

Closing this in favor of #1400

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

2 participants