Parse the concrete syntax of a FIRRTL firrtl.ir.Circuit, e.g.
Parse the concrete syntax of a FIRRTL firrtl.ir.Circuit, e.g.
"""circuit Top: | module Top: | input x: UInt | node y = x |""".stripMargin
becomes:
Circuit( NoInfo, Seq(Module( NoInfo, "Top", Seq(Port(NoInfo, "x", Input, UIntType(UnknownWidth))), Block(DefNode(NoInfo, "y", Ref("x", UnknownType))) )), "Top" )
concrete Circuit syntax
Takes Iterator over lines of FIRRTL, returns FirrtlNode (root node is Circuit)
Parses a org.antlr.v4.runtime.CharStream and returns a parsed Circuit
Parse the concrete syntax of a FIRRTL firrtl.ir.DefModule, e.g.
Parse the concrete syntax of a FIRRTL firrtl.ir.DefModule, e.g.
"""module Top: | input x: UInt | node y = x |""".stripMargin
becomes:
Module( NoInfo, "Top", Seq(Port(NoInfo, "x", Input, UIntType(UnknownWidth))), Block(DefNode(NoInfo, "y", Ref("x", UnknownType))) )
concrete DefModule syntax
Parse the concrete syntax of a FIRRTL firrtl.ir.Expression, e.g.
Parse the concrete syntax of a FIRRTL firrtl.ir.Expression, e.g. "add(x, y)" becomes:
DoPrim(Add, Seq(Ref("x", UnknownType), Ref("y", UnknownType), Nil, UnknownType)
concrete Expression syntax
Parses a file in a given filename and returns a parsed Circuit
Parse the concrete syntax of a FIRRTL firrtl.ir.Info, e.g.
Parse the concrete syntax of a FIRRTL firrtl.ir.Info, e.g. "@[FPU.scala 509:25]" becomes:
FileInfo("FPU.scala 509:25")
concrete Info syntax
Parse the concrete syntax of a FIRRTL firrtl.ir.Port, e.g.
Parse the concrete syntax of a FIRRTL firrtl.ir.Port, e.g. "input x: UInt" becomes:
Port(NoInfo, "x", Input, UIntType(UnknownWidth))
concrete Port syntax
Parse the concrete syntax of a FIRRTL firrtl.ir.Statement, e.g.
Parse the concrete syntax of a FIRRTL firrtl.ir.Statement, e.g. "wire x: UInt" becomes:
DefWire(NoInfo, "x", UIntType(UnknownWidth))
concrete Statement syntax
Parses a String and returns a parsed Circuit
Parse the concrete syntax of a FIRRTL firrtl.ir.Type, e.g.
Parse the concrete syntax of a FIRRTL firrtl.ir.Type, e.g. "UInt<3>" becomes:
UIntType(IntWidth(BigInt(3)))
concrete Type syntax