Package

firrtl

passes

Permalink

package passes

Content Hierarchy Learn more about scaladoc diagrams
Visibility
  1. Public
  2. All

Type Members

  1. case class DataRef(exp: Expression, male: String, female: String, mask: String, rdwrite: Boolean) extends Product with Serializable

    Permalink
  2. class Errors extends AnyRef

    Permalink
  3. class InlineInstances extends Transform

    Permalink
  4. case class MPort(name: String, clk: Expression) extends Product with Serializable

    Permalink
  5. case class MPorts(readers: ArrayBuffer[MPort], writers: ArrayBuffer[MPort], readwriters: ArrayBuffer[MPort]) extends Product with Serializable

    Permalink
  6. trait Pass extends Transform

    Permalink

    Pass is simple transform that is generally part of a larger Transform Has an UnknownForm, because larger Transform should specify form

  7. class PassException extends Exception

    Permalink
  8. class PassExceptions extends Exception

    Permalink

Value Members

  1. object CInferMDir extends Transform with Pass

    Permalink
  2. object CInferTypes extends Transform with Pass

    Permalink
  3. object CheckChirrtl extends Transform with Pass

    Permalink
  4. object CheckCombLoops extends Transform with Pass

    Permalink

    Finds and detects combinational logic loops in a circuit, if any exist.

    Finds and detects combinational logic loops in a circuit, if any exist. Returns the input circuit with no modifications.

    Exceptions thrown

    a CombLoopException if a loop is found

    Note

    The pass will throw exceptions on "false paths"

    ,

    The pass cannot find loops that pass through ExtModules

    ,

    The pass looks for loops through combinational-read memories

    ,

    Output form: Low FIRRTL (identity transform)

    ,

    Input form: Low FIRRTL

  5. object CheckGenders extends Transform with Pass

    Permalink
  6. object CheckHighForm extends Transform with Pass

    Permalink
  7. object CheckInitialization extends Transform with Pass

    Permalink

    Reports errors for any references that are not fully initialized

    Reports errors for any references that are not fully initialized

    Note

    Assumes single connection (ie. no last connect semantics)

    ,

    This pass looks for firrtl.WVoids left behind by ExpandWhens

  8. object CheckTypes extends Transform with Pass

    Permalink
  9. object CheckWidths extends Transform with Pass

    Permalink
  10. object CommonSubexpressionElimination extends Transform with Pass

    Permalink
  11. object ConstProp extends Transform with Pass

    Permalink
  12. object ConvertFixedToSInt extends Transform with Pass

    Permalink

    Replaces FixedType with SIntType, and correctly aligns all binary points

  13. object DeadCodeElimination extends Transform with Pass

    Permalink
  14. object ExpandConnects extends Transform with Pass

    Permalink
  15. object ExpandWhens extends Transform with Pass

    Permalink

    Expand Whens

    Expand Whens

    This pass does the following things: $ - Remove last connect semantics $ - Remove conditional blocks $ - Eliminate concept of scoping $ - Consolidate attaches

    Note

    Assumes all references are declared

    ,

    Assumes bulk connects and isInvalids have been expanded

  16. object InferTypes extends Transform with Pass

    Permalink
  17. object InferWidths extends Transform with Pass

    Permalink
  18. object InlineAnnotation

    Permalink
  19. object Legalize extends Transform with Pass

    Permalink
  20. object LowerTypes extends Transform with Pass

    Permalink

    Removes all aggregate types from a firrtl.ir.Circuit

    Removes all aggregate types from a firrtl.ir.Circuit

    Example:
    1. wire foo : { a : UInt<32>, b : UInt<16> }

      lowers to

      wire foo_a : UInt<32>
      wire foo_b : UInt<16>
    Note

    Assumes firrtl.ir.Connects and firrtl.ir.IsInvalids only operate on firrtl.ir.Expressions of ground type

    ,

    Assumes firrtl.ir.SubAccesses have been removed

  21. object MemPortUtils

    Permalink
  22. object PadWidths extends Transform with Pass

    Permalink
  23. object PullMuxes extends Transform with Pass

    Permalink
  24. object RemoveAccesses extends Transform with Pass

    Permalink

    Removes all firrtl.WSubAccess from circuit

  25. object RemoveCHIRRTL extends Transform with Pass

    Permalink
  26. object RemoveEmpty extends Transform with Pass

    Permalink
  27. object RemoveValidIf extends Transform with Pass

    Permalink
  28. object ReplaceAccesses extends Transform with Pass

    Permalink

    Replaces constant firrtl.WSubAccess with firrtl.WSubIndex TODO Fold in to High Firrtl Const Prop

  29. object ResolveGenders extends Transform with Pass

    Permalink
  30. object ResolveKinds extends Transform with Pass

    Permalink
  31. object SplitExpressions extends Transform with Pass

    Permalink
  32. object ToWorkingIR extends Transform with Pass

    Permalink
  33. object Uniquify extends Transform with Pass

    Permalink

    Resolve name collisions that would occur in LowerTypes

    Resolve name collisions that would occur in LowerTypes

    Example:
    1. wire a = { b, c }[2]
      wire a_0

      This lowers to:

      wire a__0_b
      wire a__0_c
      wire a__1_b
      wire a__1_c
      wire a_0

      There wouldn't be a collision even if we didn't map a -> a_, but there WOULD be collisions in references a[0] and a_0 so we still have to rename a

    Note

    Must be run after InferTypes because ir.DefNodes need type

  34. object VerilogModulusCleanup extends Transform with Pass

    Permalink

    Verilog has the width of (a % b) = Max(W(a), W(b)) FIRRTL has the width of (a % b) = Min(W(a), W(b)), which makes more sense, but nevertheless is a problem when emitting verilog

    Verilog has the width of (a % b) = Max(W(a), W(b)) FIRRTL has the width of (a % b) = Min(W(a), W(b)), which makes more sense, but nevertheless is a problem when emitting verilog

    This pass finds every instance of (a % b) and: 1) adds a temporary node equal to (a % b) with width Max(W(a), W(b)) 2) replaces the reference to (a % b) with a bitslice of the temporary node to get back down to width Min(W(a), W(b))

    This is technically incorrect firrtl, but allows the verilog emitter to emit correct verilog without needing to add temporary nodes

  35. object VerilogPrep extends Transform with Pass

    Permalink

    Makes changes to the Firrtl AST to make Verilog emission easier

    Makes changes to the Firrtl AST to make Verilog emission easier

    - For each instance, adds wires to connect to each port

    • Note that no Namespace is required because Uniquify ensures that there will be no collisions with the lowered names of instance ports - Also removes Attaches where a single Port OR Wire connects to 1 or more instance ports
    • These are expressed in the portCons of WDefInstConnectors
    Note

    The result of this pass is NOT legal Firrtl

  36. object VerilogRename extends Transform with Pass

    Permalink
  37. object VerilogWrap extends Transform with Pass

    Permalink
  38. object ZeroWidth extends Transform with Pass

    Permalink
  39. package clocklist

    Permalink
  40. object createMask

    Permalink
  41. package memlib

    Permalink
  42. object toBitMask

    Permalink

    Given a mask, return a bitmask corresponding to the desired datatype.

    Given a mask, return a bitmask corresponding to the desired datatype. Requirements:

    • The mask type and datatype must be equivalent, except any ground type in datatype must be matched by a 1-bit wide UIntType.
    • The mask must be a reference, subfield, or subindex The bitmask is a series of concatenations of the single mask bit over the length of the corresponding ground type, e.g.:
    wire mask: {x: UInt<1>, y: UInt<1>}
    wire data: {x: UInt<2>, y: SInt<2>}
    // this would return:
    cat(cat(mask.x, mask.x), cat(mask.y, mask.y))
  43. package wiring

    Permalink

Ungrouped