Property

chisel3.properties.Property
See theProperty companion object
sealed trait Property[T] extends Element

Property is the base type for all properties.

Properties are similar to normal Data types in that they can be used in ports, connected to other properties, etc. However, they are used to describe a set of non-hardware types, so they have no width, cannot be used in aggregate Data types, and cannot be connected to Data types.

Attributes

Companion
object
Source
Property.scala
Graph
Supertypes
class Element
class Data
trait InstanceId
class Object
trait Matchable
class Any
Show all
Self type

Members list

Grouped members

connection

final def :=(that: => Data)(implicit sourceInfo: SourceInfo): Unit

The "strong connect" operator.

The "strong connect" operator.

For chisel3._, this operator is mono-directioned; all sub-elements of this will be driven by sub-elements of that.

  • Equivalent to this :#= that

For Chisel._, this operator connections bi-directionally via emitting the FIRRTL.<=

  • Equivalent to this :<>= that

Value parameters

that

the Data to connect from

Attributes

Inherited from:
Data
Source
Data.scala
final def <>(that: => Data)(implicit sourceInfo: SourceInfo): Unit

The "bulk connect operator", assigning elements in this Vec from elements in a Vec.

The "bulk connect operator", assigning elements in this Vec from elements in a Vec.

For chisel3._, uses the chisel3.internal.BiConnect algorithm; sub-elements of thatmay end up driving sub-elements ofthis`

  • Complicated semantics, hard to write quickly, will likely be deprecated in the future

For Chisel._, emits the FIRRTL.<- operator

  • Equivalent to this :<>= that without the restrictions that bundle field names and vector sizes must match

Value parameters

that

the Data to connect from

Attributes

Inherited from:
Data
Source
Data.scala

Type members

Classlikes

sealed trait ClassType

Attributes

Source
Property.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

final def *(that: Property[T])(implicit ev: PropertyArithmeticOps[Property[T]], sourceInfo: SourceInfo): Property[T]

Perform multiplication as defined by FIRRTL spec section Integer Multiply Operation.

Perform multiplication as defined by FIRRTL spec section Integer Multiply Operation.

Attributes

Source
Property.scala
final def +(that: Property[T])(implicit ev: PropertyArithmeticOps[Property[T]], sourceInfo: SourceInfo): Property[T]

Perform addition as defined by FIRRTL spec section Integer Add Operation.

Perform addition as defined by FIRRTL spec section Integer Add Operation.

Attributes

Source
Property.scala
final def ++(that: Property[T])(implicit ev: PropertySequenceOps[Property[T]], sourceInfo: SourceInfo): Property[T]

Perform concatenation as defined by FIRRTL spec section List Concatenation Operation.

Perform concatenation as defined by FIRRTL spec section List Concatenation Operation.

Attributes

Source
Property.scala
final def <<(that: Property[T])(implicit ev: PropertyArithmeticOps[Property[T]], sourceInfo: SourceInfo): Property[T]

Perform shift left as defined by FIRRTL spec section Integer Shift Left Operation.

Perform shift left as defined by FIRRTL spec section Integer Shift Left Operation.

Attributes

Source
Property.scala
final def >>(that: Property[T])(implicit ev: PropertyArithmeticOps[Property[T]], sourceInfo: SourceInfo): Property[T]

Perform shift right as defined by FIRRTL spec section Integer Shift Right Operation.

Perform shift right as defined by FIRRTL spec section Integer Shift Right Operation.

Attributes

Source
Property.scala
def as(cls: ClassType): Property[ClassType] & cls.Type
Implicitly added by ClassTypePropertyOps

Attributes

Source
Property.scala
Implicitly added by ClassTypePropertyOps

Attributes

Source
Property.scala
Implicitly added by ClassTypePropertyOps

Attributes

Source
Property.scala
override def cloneType: this.type

Clone type by simply constructing a new Property[T].

Clone type by simply constructing a new Property[T].

Attributes

Definition Classes
Source
Property.scala
override def isLit: Boolean

Return whether this Property is a literal.

Return whether this Property is a literal.

Since we override litOption to always be None, we need to override this method to check the Binding.

Attributes

Definition Classes
Source
Property.scala
override def litOption: Option[BigInt]

If this is a literal that is representable as bits, returns the value as a BigInt. If not a literal, or not representable as bits (for example, is or contains Analog), returns None.

If this is a literal that is representable as bits, returns the value as a BigInt. If not a literal, or not representable as bits (for example, is or contains Analog), returns None.

Attributes

Definition Classes
Source
Property.scala

Default pretty printing

Default pretty printing

Attributes

Source
Property.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Property.scala
override def typeName: String

A non-ambiguous name of this Data for use in generated Verilog names

A non-ambiguous name of this Data for use in generated Verilog names

Attributes

Definition Classes
Source
Property.scala

Inherited methods

def asTypeOf[T <: Data](that: T)(using SourceInfo): T

Does a reinterpret cast of the bits in this node into the format that provides. Returns a new Wire of that type. Does not modify existing nodes.

Does a reinterpret cast of the bits in this node into the format that provides. Returns a new Wire of that type. Does not modify existing nodes.

x.asTypeOf(that) performs the inverse operation of x := that.toBits.

Attributes

Note

bit widths are NOT checked, may pad or drop bits from input

that should have known widths

Inherited from:
DataIntf (hidden)
Source
DataIntf.scala
def asUInt: UInt

Reinterpret cast to UInt.

Reinterpret cast to UInt.

Attributes

Note

value not guaranteed to be preserved: for example, a SInt of width 3 and value -1 (0b111) would become an UInt with value 7

Aggregates are recursively packed with the first element appearing in the least-significant bits of the result.

Inherited from:
DataIntf (hidden)
Source
DataIntf.scala
override def autoSeed(name: String): Data.this.type

Takes the last seed suggested. Multiple calls to this function will take the last given seed, unless this HasId is a module port (see overridden method in Data.scala).

Takes the last seed suggested. Multiple calls to this function will take the last given seed, unless this HasId is a module port (see overridden method in Data.scala).

If the final computed name conflicts with the final name of another signal, the final name may get uniquified by appending a digit at the end of the name.

Is a lower priority than suggestName, in that regardless of whether autoSeed was called, suggestName will always take precedence if it was called.

Value parameters

seed

Seed for the name of this component

Attributes

Returns

this object

Definition Classes
Data -> HasId
Inherited from:
Data
Source
Data.scala
override def containsAFlipped: Boolean

Attributes

Definition Classes
Inherited from:
Element
Source
Element.scala
override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
HasId -> Any
Inherited from:
HasId (hidden)
Source
Builder.scala
final def getWidth: Int

Returns the width, in bits, if currently known.

Returns the width, in bits, if currently known.

Attributes

Inherited from:
Data
Source
Data.scala
def hasSeed: Boolean

Attributes

Returns

Whether either autoName or suggestName has been called

Inherited from:
HasId (hidden)
Source
Builder.scala
override def hashCode: Int

Calculates a hash code value for the object.

Calculates a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Definition Classes
HasId -> Any
Inherited from:
HasId (hidden)
Source
Builder.scala
def instanceName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
final def isWidthKnown: Boolean

Returns whether the width is currently known.

Returns whether the width is currently known.

Attributes

Inherited from:
Data
Source
Data.scala
def litValue: BigInt

Returns the literal value if this is a literal that is representable as bits, otherwise crashes.

Returns the literal value if this is a literal that is representable as bits, otherwise crashes.

Attributes

Inherited from:
Data
Source
Data.scala
def name: String

Attributes

Inherited from:
Element
Source
Element.scala
def parentModName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def parentPathName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def pathName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def suggestName(seed: => String): HasId.this.type

Takes the first seed suggested. Multiple calls to this function will be ignored. If the final computed name conflicts with another name, it may get uniquified by appending a digit at the end.

Takes the first seed suggested. Multiple calls to this function will be ignored. If the final computed name conflicts with another name, it may get uniquified by appending a digit at the end.

Is a higher priority than autoSeed, in that regardless of whether autoSeed was called, suggestName will always take precedence.

Value parameters

seed

The seed for the name of this component

Attributes

Returns

this object

Inherited from:
HasId (hidden)
Source
Builder.scala

Returns a FIRRTL IsMember that refers to the absolute path to this object in the elaborated hardware graph

Returns a FIRRTL IsMember that refers to the absolute path to this object in the elaborated hardware graph

Attributes

Inherited from:
NamedComponent (hidden)
Source
Builder.scala
final def toNamed: ComponentName

Returns a FIRRTL ComponentName that references this object

Returns a FIRRTL ComponentName that references this object

Attributes

Note

Should not be called until circuit elaboration is complete

Inherited from:
NamedComponent (hidden)
Source
Builder.scala
final def toRelativeTarget(root: Option[BaseModule]): ReferenceTarget

Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.

Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.

If root is defined, the target is a hierarchical path starting from root.

If root is not defined, the target is a hierarchical path equivalent to toAbsoluteTarget.

Attributes

Note

If root is defined, and has not finished elaboration, this must be called within atModuleBodyEnd.

The NamedComponent must be a descendant of root, if it is defined.

This doesn't have special handling for Views.

Inherited from:
NamedComponent (hidden)
Source
Builder.scala

Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.

Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.

If root is defined, the target is a hierarchical path starting from root.

If root is not defined, the target is a hierarchical path equivalent to toAbsoluteTarget.

Attributes

Note

If root is defined, and has not finished elaboration, this must be called within atModuleBodyEnd.

The NamedComponent must be a descendant of root, if it is defined.

This doesn't have special handling for Views.

Inherited from:
NamedComponent (hidden)
Source
Builder.scala

Returns a FIRRTL ReferenceTarget that references this object

Returns a FIRRTL ReferenceTarget that references this object

Attributes

Note

Should not be called until circuit elaboration is complete

Inherited from:
NamedComponent (hidden)
Source
Builder.scala
def widthKnown: Boolean

Attributes

Inherited from:
Element
Source
Element.scala
final def widthOption: Option[Int]

Returns Some(width) if the width is known, else None.

Returns Some(width) if the width is known, else None.

Attributes

Inherited from:
Data
Source
Data.scala