Real data type lost/Expected real input to RTOIS
|Assignee:||Wilson Snyder||% Done:|
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
#1 Updated by Wilson Snyder over 1 year ago
- Subject changed from %Error: ...: Expected real input to RTOIS to Real data type lost/Expected real input to RTOIS
- Category set to Parser
- Status changed from New to Resolved
- Assignee set to Wilson Snyder
"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+.