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

Real data type lost/Expected real input to RTOIS #501

Closed
veripoolbot opened this issue Apr 28, 2012 · 2 comments
Closed

Real data type lost/Expected real input to RTOIS #501

veripoolbot opened this issue Apr 28, 2012 · 2 comments
Assignees
Labels
area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Alex Solomatnikov
Original Redmine Issue: 501 from https://www.veripool.org
Original Date: 2012-04-28
Original Assignee: Wilson Snyder (@wsnyder)


Source code:

     function integer ceil;
         input number;
         real number;

         // LMR 4.1.7
         // When either operand of a relational expression is a real operand then the other operand shall be converted
         // to an equivalent real value, and the expression shall be interpreted as a comparison between two real values.
         if (number > $rtoi(number))
             ceil = $rtoi(number) + 1;
         else
             ceil = number;
     endfunction

Errors on both calls to $rtoi():

%Error: ddr3.v:553: Expected real input to RTOIS
%Error: ddr3.v:552: Expected real input to RTOIS

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-05-03T00:54:15Z


"input x" then "real x" wasn't handled while "input real x" worked ok; thus it thought it was an integer and caused the assertion.

Fixed in git towards 3.840+.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-07-31T22:55:41Z


In 3.840.

@veripoolbot veripoolbot added area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants