Navigation Menu

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

Possible error with void' casting #96

Closed
veripoolbot opened this issue Jun 5, 2009 · 5 comments
Closed

Possible error with void' casting #96

veripoolbot opened this issue Jun 5, 2009 · 5 comments
Assignees

Comments

@veripoolbot
Copy link
Collaborator


Author Name: David A
Original Redmine Issue: 96 from https://www.veripool.org
Original Date: 2009-06-05
Original Assignee: Wilson Snyder (@wsnyder)


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

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-06-05T19:47:57Z


Works for me; please send an example.

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

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: David A
Original Date: 2009-06-16T16:02:06Z


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

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: David A
Original Date: 2009-06-26T20:12:20Z


Here is a sample, I hope it helps.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-06-27T00:34:07Z


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

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-11-16T23:53:55Z


Issue believe fixed in earlier release as example passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants