Gets the root declaration of an expression
Gets the root declaration of an expression
the firrtl.ir.Module to search
the firrtl.ir.Expression that refers to some declaration
the firrtl.ir.IsDeclaration of expr
DeclarationNotFoundException
if no declaration of expr
is found
Returns true if t, or any subtype, contains a flipped field
Returns true if t, or any subtype, contains a flipped field
type firrtl.ir.Type to be checked
if t contains firrtl.ir.Flip
Indent the results of ir.FirrtlNode.serialize
Adds a root reference to some SubField/SubIndex chain
Splits an Expression into root Ref and tail
Splits an Expression into root Ref and tail
Given: SubField(SubIndex(Ref("b"), 2), "c") Returns: (Ref("b"), SubField(SubIndex(EmptyExpression, 2), "c")) b[2].c -> (b, EMPTY[2].c)
Given: SubField(SubIndex(SubField(Ref("a", UIntType(IntWidth(32))), "b"), 2), "c") Returns: (Ref("a"), SubField(SubIndex(Ref("b"), 2), "c")) a.b[2].c -> (a, b[2].c)
This function only supports WRef, WSubField, and WSubIndex
Removes all firrtl.ir.EmptyStmt statements and condenses firrtl.ir.Block statements.