You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been worked around in many ways, from assigning all the parts separately, to manually writing functions that can be invoked in one line but do the assignments inside, to compile-time-unsafe Maps. Theoretically, it should be possible to use macros to generate a companion object that constructs a bundle literal.
For example, if I have
@bundle
class MyBundle extends Bundle {
val a = Bool()
val b = UInt(8.W)
}
I want to be able to do
wire := MyBundle(a=true.B, b=0x42.U)
(ideally, like above, it would require a full set of keyword arguments, though how to accomplish this is uncertain...)
Also, if something could be done that addresses #417, this would be super useful in a testing context since it would not require the compile-time-unsafe string maps.
The text was updated successfully, but these errors were encountered:
This has been worked around in many ways, from assigning all the parts separately, to manually writing functions that can be invoked in one line but do the assignments inside, to compile-time-unsafe Maps. Theoretically, it should be possible to use macros to generate a companion object that constructs a bundle literal.
For example, if I have
I want to be able to do
(ideally, like above, it would require a full set of keyword arguments, though how to accomplish this is uncertain...)
Also, if something could be done that addresses #417, this would be super useful in a testing context since it would not require the compile-time-unsafe string maps.
The text was updated successfully, but these errors were encountered: