[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
  Schedule::Load
  SVN::S4
  Synopsys-modes
  SystemPerl
  Verilog-Pli
  Voneline
  Vregs
General Info
  Papers

Issue #96

Possible error with void' casting

Added by David A almost 3 years ago. Updated over 2 years ago.

Status:Closed Start date:06/05/2009
Priority:Normal Due date:
Assignee:Wilson Snyder % Done:

0%

Category:-
Target version:-

Description

Hi Wilson,

If I'm not mistaken, the SigParser currently doesn't support void' casting of functions return data? (see IEEE 1800-2005 section 12.3.2 "Discarding function return values").

Was this omitted intentionally? or is it just not supported yet?

Thanks in advance,

David

void_check.pl - Verilog-Perl based script (357 Bytes) David A, 06/26/2009 08:12 pm

voiding_interface_function_call_example.sv - SystemVerilog sample file to be processed by the script (1.5 kB) David A, 06/26/2009 08:12 pm

History

Updated by Wilson Snyder almost 3 years ago

Works for me; please send an example.

  task void_recast;
   void'( afunc(1'b1) );
  endtask

Updated by Wilson Snyder almost 3 years ago

  • Status changed from New to AskedReporter
  • Assignee set to Wilson Snyder

Updated by David A almost 3 years ago

Hi Wilson,

I havent prepared an example yet, I'm tracing the problem, and it seems to be related to functions inside interfaces. Something like this:

interface my_fifo_interface (...);
   // some signals....
   ...
   // a function definition
   // this function returns a single bit
   function automatic bit try_push ( input t_data data  );
      ...
      ...
      return  ... //(1'b1 if push succeded, '0 otherwise);
   endfunction
   ...
   // A modport exporting this function
   modport push_mp ( import try_push, ...);
   ...
endinterface
// now a module that receives this interface and uses the function
module fifo_client ( my_fifo_interface i, ... );
   ...
   // some process
   always_comb begin
     ...
     void'(i.try_push(local_data));
     ...
   end
   ...
endmodule

As soon as I have a working (or failing in this case) example, I'll upload it, in the mean time this is what I have gathered about the problem.

Thanks, David

Updated by David A almost 3 years ago

Here is a sample, I hope it helps.

Updated by Wilson Snyder almost 3 years ago

Thanks for the example, it works fine for me. Maybe you're not using the latest version?

Updated by Wilson Snyder over 2 years ago

  • Status changed from AskedReporter to Closed

Issue believe fixed in earlier release as example passes.

Also available in: Atom