dfhdl.compiler.stages

Members list

Type members

Classlikes

case object AddClkRst extends Stage

This stage adds clock and reset ports across the entire design. For each design, clock and reset ports are added once per unique domain configuration.

This stage adds clock and reset ports across the entire design. For each design, clock and reset ports are added once per unique domain configuration.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
AddClkRst.type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case object ConnectClkRst extends Stage

This connects clock and reset ports across the entire design

This connects clock and reset ports across the entire design

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object DFHDLUniqueNames

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object DropBAssignFromSeqProc extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object DropBinds extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
DropBinds.type
case object DropCondDcls extends DropLocalDcls

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
abstract class DropLocalDcls(keepProcessDcls: Boolean) extends Stage

Attributes

Companion
object
Supertypes
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object DropCondDcls.type
object DropLocalDcls.type
case object DropLocalDcls extends DropLocalDcls

Attributes

Companion
class
Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object DropRegAliases extends Stage

This stage drops register aliases (e.g., x.reg) and replaces them with explicit register variables. The most complex mechanism about this stage is the naming conversion convention.

This stage drops register aliases (e.g., x.reg) and replaces them with explicit register variables. The most complex mechanism about this stage is the naming conversion convention.

  1. If .reg is applied on a named immutable value x or a mutated wire/port that is mutated only once, then that register variable will be named x_reg. If we have several register stages applied, then we create an enumeration. So x.reg(2) yields x_reg1 and x_reg2.
  2. If .reg is applied on a named mutable wire x that is mutated more than once, then we treat every new .reg application as a new version of x. In this case we get an enumeration of the version. E.g.:
      val i = DFUInt(8) <> IN
      val o = DFUInt(8) <> OUT
      val x = DFUInt(8) <> WIRE
      x := i
      o := x.reg //x_ver1_reg
      x := i + 1
      o := x.reg(2) //x_ver2_reg1, x_ver2_reg2
  1. If .reg is applied on an anonymous value, then extrapolate a name suggestion based on the destination variable. This is part of the destination, so it adds _part suffix to the name of the destination. In case of several parts, we create an enumeration. E.g.:
      val i = DFUInt(8) <> IN
      val o = DFUInt(8) <> OUT
      val z = DFUInt(8) <> OUT
      o := (i + 1).reg //o_part_reg
      z := ((i + 1).reg + 7).reg(2) //z_part1_reg, z_part2_reg1, z_part2_reg2

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object DropRegsWires extends Stage

This stage transforms a register-transfer (RT) design/domain into a valid event-driven (ED) design/domain. For this purpose it does the following: a. Adds clock and reset ports and connects them across designs. a. Converts the design/domain domainType from RT to ED. a. Adds combinational process blocks and moves the core logic to it. a. Drops register and wire declarations in favor of regular variable declarations. There are two kinds of variable declarations: local and global. Local variable declarations will appear inside the combinational process block and assignments to these variables are always blocking. Global variables are declared outside the process blocks (within the scope of the design/domain) and assignments to them are always non-blocking. a. Adds a sequential process block according to the clock and reset parameters and adds the register next value assignments to it.

This stage transforms a register-transfer (RT) design/domain into a valid event-driven (ED) design/domain. For this purpose it does the following: a. Adds clock and reset ports and connects them across designs. a. Converts the design/domain domainType from RT to ED. a. Adds combinational process blocks and moves the core logic to it. a. Drops register and wire declarations in favor of regular variable declarations. There are two kinds of variable declarations: local and global. Local variable declarations will appear inside the combinational process block and assignments to these variables are always blocking. Global variables are declared outside the process blocks (within the scope of the design/domain) and assignments to them are always non-blocking. a. Adds a sequential process block according to the clock and reset parameters and adds the register next value assignments to it.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object DropUnreferencedAnons extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object DropUnreferencedVars extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object ExplicitClkRstCfg extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object ExplicitNamedVars extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object ExplicitPrev extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
trait HasDB[T]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object given_HasDB_DB.type
object HasDB

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
HasDB.type
object NamedAliases

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case object NamedPrev

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
NamedPrev.type
case object NamedSelection

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
object OrderMembers

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case object PrintCodeString extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object SanityCheck extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object SimpleOrderMembers

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
abstract class Stage extends Product, Serializable, HasTypeName

Attributes

Supertypes
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object VerilogBackend.type
object VHDLBackend.type
object AddClkRst.type
object ConnectClkRst.type
object DropBinds.type
object DropCondDcls.type
object DropLocalDcls.type
object DropRegAliases.type
object DropRegsWires.type
object DropUnreferencedAnons.type
object DropUnreferencedVars.type
object ExplicitClkRstCfg.type
object ExplicitNamedVars.type
object ExplicitPrev.type
object PrintCodeString.type
object SanityCheck.type
object ToED.type
object ToRT.type
object UniqueDesigns.type
object VHDLProcToVerilog.type
object ViaConnection.type
Show all
class StageRunner(using co: CompilerOptions) extends LogSupport

Attributes

Companion
object
Supertypes
trait LogSupport
trait LazyLogger
trait LoggingMethods
trait Serializable
class Object
trait Matchable
class Any
Show all
object StageRunner

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class StagedDesign[D <: Design]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object StagedDesign

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
case object ToED extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
ToED.type
case object ToRT extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
ToRT.type
case object UniqueDesigns extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object VHDLProcToVerilog extends Stage

This stage transforms a sequential process from a VHDL style to Verilog style. E.g.,

This stage transforms a sequential process from a VHDL style to Verilog style. E.g.,

 process(clk):
   if (clk.rising)
     ....

is transformed into

 process(clk.rising):
   ....

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case object ViaConnection extends Stage

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
class Stage
trait HasTypeName
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Types

opaque type CompiledDesign[D <: Design]

Extensions

Extensions

extension (sm: AssignMap)(sm: AssignMap)(using MemberGetSet)
def assignTo(toVal: DFVal, assignBitSet: BitSet): AssignMap
def branchEntry(firstBranch: Boolean): AssignMap
def branchExit(lastBranch: Boolean, exhaustive: Boolean): AssignMap
extension [T](t: T)(t: T)
def toED: DB
extension [T](t: T)(t: T)
extension [T](t: T)(t: T)
def db: DB
extension [T](t: T)(t: T)
def toRT: DB
extension [T](t: T)(t: T)
extension [T](t: T)(t: T)
def getCodeString: String
extension [T](t: T)(t: T)(implicit evidence$1: HasDB[T])
def getCodeString(align: Boolean): String
extension [T](t: T)(t: T)(implicit evidence$3: HasDB[T], po: PrinterOptions, co: CompilerOptions)
extension [T](t: T)(t: T)
extension [T](t: T)(t: T)
def uniqueDesigns: DB
extension [T](t: T)(t: T)
def dropLocalDcls: DB
extension [T](t: T)(t: T)
def dropCondDcls: DB
extension [T](t: T)(t: T)
def simpleOrder: DB
extension [T](t: T)(t: T)
def connectClkRst: DB
extension [T](t: T)(t: T)
extension [T](t: T)(t: T)(implicit evidence$1: HasDB[T])
def uniqueNames(reservedNames: Set[String], caseSensitive: Boolean): DB
extension [T](t: T)(t: T)
def viaConnection: DB
extension [T](t: T)(t: T)
def namedSelection: DB
extension [T](t: T)(t: T)
extension [T](t: T)(t: T)
def namedPrev: DB
extension [T](t: T)(t: T)
def addClkRst: DB
extension [T](t: T)(t: T)(implicit evidence$1: HasDB[T], CompilerOptions)
def sanityCheck: DB
extension [T](t: T)(t: T)
def dropBinds: DB
extension [T](t: T)(t: T)
def dropRegAliases: DB
extension [T](t: T)(t: T)
def dropRegsWires: DB
extension [T](t: T)(t: T)
def explicitPrev: DB