firrtl2
package firrtl2
- Alphabetic
- By Inheritance
- firrtl2
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package analyses
- package annotations
- package backends
- package benchmark
- package checks
- package constraint
- package features
- package graph
- package ir
- package logger
- package options
- package passes
- package renamemap
- package stage
The stage package provides an implementation of the FIRRTL compiler using the firrtl2.options package.
The stage package provides an implementation of the FIRRTL compiler using the firrtl2.options package. This primarily consists of:
- FirrtlStage, the internal and external (command line) interface to the FIRRTL compiler
- A number of Phases that support and compartmentalize the individual operations of FirrtlStage
- FirrtlOptions, a class representing options that are necessary to drive the FirrtlStage and its Phases
- FirrtlOptionsView, a utility that constructs an OptionsView of FirrtlOptions from an AnnotationSeq
- FirrtlCli, the command line options that the FirrtlStage supports
- package transforms
- package traversals
- package util
Type Members
- class AddDescriptionNodes extends Transform
Wraps modules or statements with their respective described nodes.
Wraps modules or statements with their respective described nodes. Descriptions come from DescriptionAnnotation. Describing a module or any of its ports will turn it into a
DescribedMod
. Describing a Statement will turn it into a (private)DescribedStmt
.- Note
should only be used by VerilogEmitter, described nodes will break other transforms.
- type AnnotationSeq = Seq[Annotation]
Container of all annotations for a Firrtl compiler
- case class Attribute(string: StringLit) extends FirrtlNode with Description with Product with Serializable
A Verilog-style attribute.
A Verilog-style attribute.
- string
the attribute
- case class AttributeAnnotation(target: Target, description: String) extends DescriptionAnnotation with Product with Serializable
An Verilog-style attribute.
An Verilog-style attribute.
- target
the object being given an attribute
- description
the attribute
- case class CDefMPort(info: Info, name: String, tpe: Type, mem: String, exps: Seq[Expression], direction: MPortDir) extends Statement with HasInfo with CanBeReferenced with UseSerializer with Product with Serializable
- case class CDefMemory(info: Info, name: String, tpe: Type, size: BigInt, seq: Boolean, readUnderWrite: ir.ReadUnderWrite.Value = ReadUnderWrite.Undefined) extends Statement with HasInfo with CanBeReferenced with UseSerializer with Product with Serializable
- class ChirrtlEmitter extends FirrtlEmitter
- case class CircuitState(circuit: Circuit, annotations: AnnotationSeq, renames: Option[RenameMap]) extends Product with Serializable
Current State of the Circuit
Current State of the Circuit
- circuit
The current state of the Firrtl AST
- annotations
The current collection of Annotation
- renames
A map of Named things that have been renamed. Generally only a return value from Transforms
- trait ConnectEmissionOption extends EmissionOption
Emission customization options for connect
- case class CustomDefaultMemoryEmission(initValue: MemoryInitValue) extends MemoryEmissionOption with NoTargetAnnotation with Product with Serializable
Customize how memory initialization code is emitted
- case class CustomDefaultRegisterEmission(useInitAsPreset: Boolean, disableRandomization: Boolean) extends RegisterEmissionOption with NoTargetAnnotation with Product with Serializable
Control how register initialization code is emitted
- case class CustomTransformException(cause: Throwable) extends Exception with Product with Serializable
Wraps exceptions from CustomTransforms so they can be reported appropriately
- sealed trait Description extends FirrtlNode
Base trait for a description that gives some information about a
FirrtlNode
.Base trait for a description that gives some information about a
FirrtlNode
. Usually, we would like to emit these descriptions in some way. - sealed trait DescriptionAnnotation extends Annotation
A base trait for
Annotation
s that describe aFirrtlNode
.A base trait for
Annotation
s that describe aFirrtlNode
. Usually, we would like to emit these descriptions in some way. - case class DocString(string: StringLit) extends FirrtlNode with Description with Product with Serializable
A docstring description (a comment)
A docstring description (a comment)
- string
a comment
- case class DocStringAnnotation(target: Target, description: String) extends DescriptionAnnotation with Product with Serializable
A docstring description (a comment).
A docstring description (a comment).
- target
the object being described
- description
the docstring describing the object
- trait EmissionOption extends AnyRef
Base type for emission customization options NOTE: all the following traits must be mixed with SingleTargetAnnotation[T <: Named] in order to be taken into account in the Emitter
- case class EmitAllModulesAnnotation(emitter: Class[_ <: Emitter]) extends EmitAnnotation with Product with Serializable
- sealed trait EmitAnnotation extends NoTargetAnnotation
- case class EmitCircuitAnnotation(emitter: Class[_ <: Emitter]) extends EmitAnnotation with Product with Serializable
- trait EmittedAnnotation[T <: EmittedComponent] extends NoTargetAnnotation with CustomFileEmission
Traits for Annotations containing emitted components
- sealed abstract class EmittedCircuit extends EmittedComponent
- sealed trait EmittedCircuitAnnotation[T <: EmittedCircuit] extends EmittedAnnotation[T]
- sealed abstract class EmittedComponent extends AnyRef
- final case class EmittedFirrtlCircuit(name: String, value: String, outputSuffix: String) extends EmittedCircuit with Product with Serializable
- case class EmittedFirrtlCircuitAnnotation(value: EmittedFirrtlCircuit) extends EmittedCircuitAnnotation[EmittedFirrtlCircuit] with Product with Serializable
- final case class EmittedFirrtlModule(name: String, value: String, outputSuffix: String) extends EmittedModule with Product with Serializable
- case class EmittedFirrtlModuleAnnotation(value: EmittedFirrtlModule) extends EmittedModuleAnnotation[EmittedFirrtlModule] with Product with Serializable
- sealed abstract class EmittedModule extends EmittedComponent
- sealed trait EmittedModuleAnnotation[T <: EmittedModule] extends EmittedAnnotation[T]
- final case class EmittedVerilogCircuit(name: String, value: String, outputSuffix: String) extends EmittedCircuit with Product with Serializable
- case class EmittedVerilogCircuitAnnotation(value: EmittedVerilogCircuit) extends EmittedCircuitAnnotation[EmittedVerilogCircuit] with Product with Serializable
- final case class EmittedVerilogModule(name: String, value: String, outputSuffix: String) extends EmittedModule with Product with Serializable
- case class EmittedVerilogModuleAnnotation(value: EmittedVerilogModule) extends EmittedModuleAnnotation[EmittedVerilogModule] with Product with Serializable
- trait Emitter extends Transform
Defines old API for Emission.
Defines old API for Emission. Deprecated
- case class EmitterException(message: String) extends PassException with Product with Serializable
- sealed abstract class FirrtlEmitter extends Transform with Emitter
- class FirrtlUserException extends RuntimeException with NoStackTrace
Exception indicating user error
Exception indicating user error
These exceptions indicate a problem due to bad input and thus do not include a stack trace. This can be extended by custom transform writers.
- trait Flow extends AnyRef
- class HighFirrtlEmitter extends FirrtlEmitter
- case class InvalidEscapeCharException(message: String) extends ParserException with Product with Serializable
- case class InvalidStringLitException(message: String) extends ParserException with Product with Serializable
- trait Kind extends AnyRef
- abstract class LexerHelper extends AnyRef
- class LowFirrtlEmitter extends FirrtlEmitter
- abstract class MPortDir extends FirrtlNode
- class MemoizedHash[T] extends AnyRef
- case class MemoryArrayInit(values: Seq[BigInt]) extends MemoryInitValue with Product with Serializable
- trait MemoryEmissionOption extends EmissionOption
Emission customization options for memories
- case class MemoryFileInlineInit(filename: String, hexOrBinary: FileType) extends MemoryInitValue with Product with Serializable
- sealed trait MemoryInitValue extends AnyRef
Emission customization option for memory initialization
- case class MemoryScalarInit(value: BigInt) extends MemoryInitValue with Product with Serializable
- class MiddleFirrtlEmitter extends FirrtlEmitter
- class MinimumHighFirrtlEmitter extends FirrtlEmitter
- class MinimumVerilogEmitter extends VerilogEmitter with Emitter
- class ModuleGraph extends AnyRef
Maintains a one to many graph of each modules instantiated child module.
Maintains a one to many graph of each modules instantiated child module. This graph can be searched for a path from a child module back to one of it's parents. If one is found a recursive loop has happened The graph is a map between the name of a node to set of names of that nodes children
- class Namespace extends AnyRef
- trait NodeEmissionOption extends EmissionOption
Emission customization options for nodes
- case class ParameterNotSpecifiedException(message: String) extends ParserException with Product with Serializable
- case class ParameterRedefinedException(message: String) extends ParserException with Product with Serializable
- class ParserException extends FirrtlUserException
- trait PortEmissionOption extends EmissionOption
Emission customization options for IO ports
- trait RegisterEmissionOption extends EmissionOption
Emission customization options for registers
- sealed trait RenameMap extends AnyRef
Map old names to new names
Map old names to new names
Transforms that modify names should return a RenameMap with the CircuitState These are mutable datastructures for convenience
- trait ResolvedAnnotationPaths extends AnyRef
Extend for transforms that require resolved targets in their annotations Ensures all targets in annotations of a class in annotationClasses are resolved before the execute method
- abstract class SeqTransform extends Transform with SeqTransformBased
For transformations that are simply a sequence of transforms
- trait SeqTransformBased extends AnyRef
- case class SyntaxErrorsException(message: String) extends ParserException with Product with Serializable
- class SystemVerilogEmitter extends VerilogEmitter
- trait Transform extends TransformLike[CircuitState] with DependencyAPI[Transform]
The basic unit of operating on a Firrtl AST
- case class UnsupportedVersionException(message: String) extends ParserException with Product with Serializable
- case class VRandom(width: BigInt) extends Expression with Product with Serializable
- class VerilogEmitter extends SeqTransform with Emitter
- class Visitor extends AbstractParseTreeVisitor[FirrtlNode] with ParseTreeVisitor[FirrtlNode]
- type WDefInstance = DefInstance
- case class WDefInstanceConnector(info: Info, name: String, module: String, tpe: Type, portCons: Seq[(Expression, Expression)]) extends Statement with IsDeclaration with CanBeReferenced with UseSerializer with Product with Serializable
- type WRef = Reference
- type WSubAccess = SubAccess
- type WSubField = SubField
- type WSubIndex = SubIndex
- trait WireEmissionOption extends EmissionOption
Emission customization options for wires
- class WrappedExpression extends AnyRef
- case class WrappedInt(value: BigInt) extends Product with Serializable
- class WrappedType extends AnyRef
- class WrappedWidth extends AnyRef
Deprecated Type Members
- type TargetDirAnnotation = firrtl2.options.TargetDirAnnotation
- Annotations
- @deprecated
- Deprecated
(Since version FIRRTL 1.2) Use firrtl.options.TargetDirAnnotation
Value Members
- implicit def annoSeqToSeq(as: AnnotationSeq): Seq[Annotation]
- implicit def seqToAnnoSeq(xs: Seq[Annotation]): AnnotationSeq
- case object Addw extends PrimOp with Product with Serializable
- object AnnotationSeq
- case object BuildInfo extends Product with Serializable
This object was generated by sbt-buildinfo.
- object CircuitState extends Serializable
- case object ConnectEmissionOptionDefault extends ConnectEmissionOption with Product with Serializable
default Emitter behavior for connect
- case object Dshlw extends PrimOp with Product with Serializable
- case object DuplexFlow extends Flow with Product with Serializable
- object EmitAllModulesAnnotation extends HasShellOptions with Serializable
- object EmitCircuitAnnotation extends HasShellOptions with Serializable
- case object EmptyExpression extends Expression with UseSerializer with Product with Serializable
- case object ExpKind extends Kind with Product with Serializable
- object FileUtils
- object Implicits
- case object InstanceKind extends Kind with Product with Serializable
- object LowFirrtlOptimizedEmitter extends FirrtlEmitter
- case object MInfer extends MPortDir with Product with Serializable
- case object MRead extends MPortDir with Product with Serializable
- case object MReadWrite extends MPortDir with Product with Serializable
- case object MWrite extends MPortDir with Product with Serializable
- object Mappers
- case object MemKind extends Kind with Product with Serializable
- object MemoizedHash
- case object MemoryEmissionOptionDefault extends MemoryEmissionOption with Product with Serializable
default Emitter behavior for memories
- case object MemoryNoInit extends MemoryInitValue with Product with Serializable
- case object MemoryRandomInit extends MemoryInitValue with Product with Serializable
- object Namespace
- case object NodeEmissionOptionDefault extends NodeEmissionOption with Product with Serializable
default Emitter behavior for nodes
- case object NodeKind extends Kind with Product with Serializable
- object Parser extends LazyLogging
- case object PoisonKind extends Kind with Product with Serializable
- case object PortEmissionOptionDefault extends PortEmissionOption with Product with Serializable
default Emitter behavior for IO ports
- case object PortKind extends Kind with Product with Serializable
- object PrimOps extends LazyLogging
Definitions and Utility functions for ir.PrimOps
- case object RandomKind extends Kind with Product with Serializable
- case object RegKind extends Kind with Product with Serializable
- case object RegisterEmissionOptionDefault extends RegisterEmissionOption with Product with Serializable
default Emitter behavior for registers
- object RenameMap
- case object SinkFlow extends Flow with Product with Serializable
- case object SourceFlow extends Flow with Product with Serializable
- case object Subw extends PrimOp with Product with Serializable
- case object UnknownFlow extends Flow with Product with Serializable
- case object UnknownKind extends Kind with Product with Serializable
- object Utils extends LazyLogging
- object VerilogEmitter
- object WDefInstance
- case object WInvalid extends Expression with UseSerializer with Product with Serializable
- object WRef
- object WSubAccess
- object WSubField
- object WSubIndex
- case object WVoid extends Expression with UseSerializer with Product with Serializable
- case object WireEmissionOptionDefault extends WireEmissionOption with Product with Serializable
default Emitter behavior for wires
- case object WireKind extends Kind with Product with Serializable
- object WrappedExpression
- object WrappedType
- object WrappedWidth
- object bitWidth
Helper object for computing the width of a firrtl type.
- object castRhs
- object connectFields
- object flattenType
- object fromBits
- object getWidth
- object seqCat
- object toBits
Given an expression, return an expression consisting of all sub-expressions concatenated (or flattened).
Deprecated Value Members
- val TargetDirAnnotation: firrtl2.options.TargetDirAnnotation.type
- Annotations
- @deprecated
- Deprecated
(Since version FIRRTL 1.2) Use firrtl.options.TargetDirAnnotation