Issue #96
Possible error with void' casting
| 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
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
- File void_check.pl added
- File voiding_interface_function_call_example.sv added
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
![[logo]](/img/veripool_small.png)