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

Error-BLKANDNBLK with nested modules in generate block #648

Open
veripoolbot opened this issue May 21, 2013 · 2 comments
Open

Error-BLKANDNBLK with nested modules in generate block #648

veripoolbot opened this issue May 21, 2013 · 2 comments
Labels
area: lint Issue involves SystemVerilog lint checking area: scheduling Issue involves scheduling/ordering of events effort: days Expect this issue to require roughly days of invested effort to resolve

Comments

@veripoolbot
Copy link
Contributor


Author Name: Krzysztof Jankowski
Original Redmine Issue: 648 from https://www.veripool.org


The attached code gives error: ??%Error-BLKANDNBLK: condgen.sv:29: Unsupported: Blocked and non-blocking assignments to same variable: v.datat??.
When code gets pasted directly in place of module then the entire example compiles just fine.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-05-22T02:41:22Z


I'm not immediately sure how to fix this. The conflict is at that port since a single bit is selected that is effectively the same as an assignment, causing the message.

The good news is for now you can lint_off that error (it's an error because it can cause bad results if otherwise ignored)

// verilator lint_off BLKANDNBLK
logic [7:0] 	      datat;
// verilator lint_on BLKANDNBLK

Test added as t_param_if_blk.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Olivier D'Arcy
Original Date: 2019-01-26T04:28:27Z


Hi, I experience the same kind of issue with conditional generate statements.

Here (codegen2.sv attached) is another code example that highlights the problem.
You need to remove the lint pragmas. You will hit the Error BLKANDNBLK. Then if you add the lint pragmas for BLKANDNBLK, you get a MULTIDRIVEN warning which prevents the code from compiling. Adding the lint pragmas for the MULTIDRIVEN warning solves the problem.

I was able to go around it by using lint off pragmas.

Still my RISCV RTL codebase heavily uses the generate if/else constructs so I get tons of such BLKANDNBLK errors. Some RTL sources are from third party (memory models generated by memory compilers, etc) so inserting pragmas in these files is not an ideal solution.

@veripoolbot veripoolbot added area: lint Issue involves SystemVerilog lint checking area: scheduling Issue involves scheduling/ordering of events effort: days Expect this issue to require roughly days of invested effort to resolve labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: lint Issue involves SystemVerilog lint checking area: scheduling Issue involves scheduling/ordering of events effort: days Expect this issue to require roughly days of invested effort to resolve
Projects
None yet
Development

No branches or pull requests

1 participant