-
Notifications
You must be signed in to change notification settings - Fork 19
SystemVerilog: conversion functions #894
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
Conversation
e58075d
to
3ce9c1c
Compare
d2b7b20
to
f945a97
Compare
// Not a conversion, just reinterpretation | ||
always assert ($bitstoreal(0)==0.0); | ||
always assert ($bitstoreal('h3ff00000_00000000)==1); | ||
// always assert ($bitstoreal('hc0000000_00000000)==-2.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// always assert ($bitstoreal('hc0000000_00000000)==-2.0); | |
// always assert ($bitstoreal('hc0000000_00000000)==-2.0); |
// Not a conversion, just reinterpretation | ||
always assert ($bitstoshortreal(0)==0.0); | ||
always assert ($bitstoshortreal('h3f80_0000)==1.0); | ||
// always assert ($bitstoshortreal('hc000_0000)==-2.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// always assert ($bitstoshortreal('hc000_0000)==-2.0); | |
// always assert ($bitstoshortreal('hc000_0000)==-2.0); |
src/verilog/verilog_lowering.cpp
Outdated
{ | ||
// lower to typecast | ||
DATA_INVARIANT( | ||
arguments.size() == 1, id2string(identifier) + " must have one argument"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arguments.size() == 1, id2string(identifier) + " must have one argument"); | |
arguments.size() == 1, id2string(identifier) + " takes one argument"); |
for consistency with the other cases.
f945a97
to
c02993d
Compare
This adds the conversion functions from 1800-2017 20.5.
c02993d
to
d935c4e
Compare
This adds the conversion functions from 1800-2017 20.5.