[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #78

task call problem

Added by Andrea Foletto about 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:04/08/2009
Priority:NormalDue date:
Assignee:Wilson Snyder% Done:

0%

Category:TranslationError
Target version:-

Description

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

aoa.v (1.37 KB) Andrea Foletto, 04/08/2009 02:17 pm

aoa_2.v (1.43 KB) Andrea Foletto, 04/08/2009 02:17 pm

History

#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.

#3 Updated by Wilson Snyder about 4 years ago

  • Status changed from Resolved to Closed

In 3.703.

Also available in: Atom PDF