task call problem
|Assignee:||Wilson Snyder||% Done:|
Hi I got an error using the task and passing the data. It seems verilator doesn't like the structure that I used. The file aoa.v contain the basic task (it's cut from a bigger source file) and here the error that I got:
verilator -cc aoa.v %Error: aoa.v:34: Assigning to input variable: DDIFF_B %Error: aoa.v:34: Assigning to input variable: DDIFF_B %Error: aoa.v:34: Assigning to input variable: DDIFF_B %Error: aoa.v:34: Assigning to input variable: DDIFF_B %Error: Exiting due to 4 warning(s) %Error: Command Failed verilator_bin -cc aoa.v
I modified the code assigning some operation to temporary register (tmp in file aoa_2.v) and now I got another error that I don't understand (blocked and non-blocking assigments):
verilator -cc aoa_2.v %Warning-WIDTH: aoa_2.v:35: Operator DIV expects 9 bits on the RHS, but RHS's CONST generates 5 bits. %Warning-WIDTH: Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message. %Warning-WIDTH: aoa_2.v:36: Operator TASKREF expects 8 bits on the Function Argument, but Function Argument's VARREF generates 9 bits. %Error-BLKANDNBLK: aoa_2.v:22: Unsupported: Blocked and non-blocking assignments to same variable: AOA_B %Error: Exiting due to 3 warning(s) %Error: Command Failed verilator_bin -cc aoa_2.v
Can you help me ? Thanks Andrea
#1 Updated by Wilson Snyder about 4 years ago
- Category set to TranslationError
- Status changed from New to Assigned
- Assignee set to Wilson Snyder
I'll look at the error case.
The BLKANDNBLK is because you have this:
always @(posedge CLK) AOA_B <= always @* AOA_B = // from inside the task
IE both a flop and gate driving the same net, which makes no sense.
#2 Updated by Wilson Snyder about 4 years ago
- Status changed from Assigned to Resolved
BTW ignore my last comment, I read what was a input and output backwards.
Both errors were due to the same bug, having the "output" first in the task list triggered a bug which eventually resulted in either error.
This is fixed in the git version.