-
Notifications
You must be signed in to change notification settings - Fork 9
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
Compile error when using struct fields in nested if #116
Comments
@MartinC45 Hi. Thank you very much for trying out DFHDL and reporting this! |
BTW, I have a question, if you don't mind answering. Currently our documentation shows nothing about the struct feature (one of the reasons is to first flush out most of the bugs ourselves). How did you go about learning this feature? |
Hi, no problem and sure. I found it in some slides you shared on Reddit some time ago. Should I wait until the release of the full documentation before opening further issues? |
Feel free to open issues. Your time is valuable and I don't want to waste it, and I want your experience to be fun. But if you like being on the cutting bleeding edge, hack away :) |
This is a more general problem in the RT to ED compilation stage, and fails in this example: class GlobCounter(val width: Int <> CONST) extends RTDesign:
val t = Bit <> IN
val cnt = UInt(width) <> OUT.REG init 0
// doesn't work
if (t || t)
if (t || t)
cnt.din := cnt + 1
end GlobCounter Should be resolved tomorrow. |
@MartinC45 v0.4.4 fixes this issue. |
Yes, it works nicely now. Thanks! |
Description
Trying to use a field of a struct in a level other than the outermost one of a nested if yields an error. It works fine otherwise and also works when assigning the field to a variable and using that variable in an inner level.
Example
Output
When run with scala-cli this is the output
The text was updated successfully, but these errors were encountered: