-
Notifications
You must be signed in to change notification settings - Fork 342
[MooreToCore] Support real
constants
#8269
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
Comments
Can I continue working on this? I've made a start, modified MooreToCore.cpp to lower the Also, I'm not sure how to test this. I tried compiling the SystemVerilog input file with |
Hey, @GlowingScrewdriver! Maybe you can use |
Apologies for the long silence. Got busy. I'm unable to figure out how handle Also, I'm thinking I should emit Admittedly, this issue is deeper than I thought it was. @hailongSun2000 Based on your inputs about the approach, I'll decide between continuing on this and choosing a less ambitious SV test to fix. |
It's nothing! 😃 |
If it's possible, keep |
I checked Slang's AST dump. You're right; Slang does emit an integer literal along with each real literal. So far I've added a I see that I have to add a type conversion handler like static void populateTypeConversion(TypeConverter &typeConverter) {
/* ... */
typeConverter.addConversion([&](RealType type) {
// Figure out
});
/* ... */
} so that we can lower "moore.conversion" : (!moore.real) -> * using Now, about bit width:
The easy way out that I can think of is to just generate
Okay, doesn't sound like too big a deal anymore :) |
The other way I can think of is to convert to integer in ImportVerilog itself, before it even reaches Moore. But that way we can't use real values at all in Moore, which I suppose is important for running simulations before synthesis. |
Hey @GlowingScrewdriver! |
Apologies for the silence. |
I'm looking into the failing testcase for
real
constants on sv-tests-results. Just want to put it up here to make sure no one else has already started working on it.The text was updated successfully, but these errors were encountered: