[Backend] Unbundle dataflow-types into individual signals before RTL export #139
Labels
enhancement
Improvement to existing feature of Dynamatic
good first issue
Good for newcomers
nice-to-have
Cosmetic and/or light improvements to the framework
The IR spilled by the
--lower-handhsake-to-hw
(HandhsakeToHW
) conversion pass still contains instances of the Handshake-level types representing dataflow channels. These arehandshake::ChannelType
andhandshake::ControlType
.The
export-rtl
tool, which takes as input the IR produced by the conversion pass, currently has to unbundle these dataflow-typed values into their individual component signals on the fly, which yields difficult to read/maintain code. A nicer solution would be to run a transformation pass after--lower-handhsake-to-hw
---let's call it--hw-unpack-handshake-types
---that applies this dataflow-typed value unbundling on the IR itself, transforming it into an IR that does not contain any instance of Handshake-level types. Theexport-rtl
tool will then only have to support "raw" types that each map to a single port/signal in the final RTL, simplifying its implementation.This hypothetical
--hw-unpack-handshake-types
pass will most likely be a "transformation pass" that matches on module-like operations to recursively unpack all dataflow-like types into their individual constituents in all nested operations. CIRCT has a similar pass that operates on ESI channels (their version of Handshake channels basically) which one may take strong inspiration from.The
handshake::UnbundleOp
andhandshake::Bundle
operations (which exist as part of Handshake but are not used in any pass at this point) will most likely be involved in the pass, even if just as "transient operations" useful during the transformation but that get canonicalized/folded away at the end of the pass.The text was updated successfully, but these errors were encountered: