With complex bundle types showing up in the arguments of components, it seems that a more general technique to represent IO interfaces is in need. Borrowing ideas from Chisel, I think we can use the concept of Bundle (different from filament bundles which are just arrays).
The high-level idea is that a struct definition has a delay and it ensures that all sub-fields hold onto values for less time than the delay of the struct:
Type-checking should reject this struct definition because the id field holds onto values for 4 cycles while the PacketInfo specifies that the event G reoccurs every cycle. This is problematic because this means that providing a new PacketInfo every cycle will cause problems.
With complex bundle types showing up in the arguments of components, it seems that a more general technique to represent IO interfaces is in need. Borrowing ideas from Chisel, I think we can use the concept of
Bundle
(different from filament bundles which are just arrays).The high-level idea is that a struct definition has a delay and it ensures that all sub-fields hold onto values for less time than the delay of the struct:
Type-checking should reject this
struct
definition because theid
field holds onto values for4
cycles while thePacketInfo
specifies that the eventG
reoccurs every cycle. This is problematic because this means that providing a newPacketInfo
every cycle will cause problems.Components like
Mac
can be defined like this now:Of course, you should be able to specify parameters for your structs.