Reg

chisel3.Reg
object Reg

Utility for constructing hardware registers

The width of a Reg (inferred or not) is copied from the type template

val r0 = Reg(UInt()) // width is inferred
val r1 = Reg(UInt(8.W)) // width is set to 8

val r2 = Reg(Vec(4, UInt())) // width is inferred
val r3 = Reg(Vec(4, UInt(8.W))) // width of each element is set to 8

class MyBundle {
 val unknown = UInt()
 val known   = UInt(8.W)
}
val r4 = Reg(new MyBundle)
// Width of r4.unknown is inferred
// Width of r4.known is set to 8

Attributes

Source
Reg.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Reg.type

Members list

Value members

Concrete methods

def apply[T <: Data](source: => T)(implicit sourceInfo: SourceInfo): T

Construct a Reg from a type template with no initialization value (reset is ignored). Value will not change unless the Reg is given a connection.

Construct a Reg from a type template with no initialization value (reset is ignored). Value will not change unless the Reg is given a connection.

Value parameters

t

The template from which to construct this wire

Attributes

Source
Reg.scala