chisel3.domain

package chisel3.domain

Members list

Type members

Classlikes

abstract class Domain()(implicit val sourceInfo: SourceInfo)

A Domain represents a kind information, and the schema of that information, that can be associated with certain hardware in a Chisel design.

A Domain represents a kind information, and the schema of that information, that can be associated with certain hardware in a Chisel design.

A domain is intended to represent a specific kind of hardware-related concern that is not captured with the digital, synchronous logic that core Chisel represents. Examples of domains are clock, reset, and power domains. And while some domains are provided as part of Chisel, domain kinds are intentionall user-extensible.

To create a new user-defined domain kind, define an object that extends the Domain class. Add fields to define the domain's schema by overridding the fields method:

import chisel3.domain.{Domain, Field}

object FooDomain extends Domain {
 override def fields: Seq[(String, Field.Type)] = Seq(
   "bar" -> Field.Boolean,
   "baz" -> Field.Integer,
   "qux" -> Field.String
 )
}

Attributes

See also
Source
Domain.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ClockDomain
Self type
Singleton
object Field

Attributes

Source
Domain.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Field.type
final class Type extends Element

A Data that is used to communicate information of a specific domain kind.

A Data that is used to communicate information of a specific domain kind.

Attributes

Source
Type.scala
Supertypes
class Element
class Data
trait InstanceId
class Object
trait Matchable
class Any
Show all
Self type

Value members

Concrete methods

def addDomain(domain: Domain): LinkedHashSet[Domain]

Add a Domain kind to Chisel's runtime Builder so that it will be unconditionally emitted during FIRRTL emission.

Add a Domain kind to Chisel's runtime Builder so that it will be unconditionally emitted during FIRRTL emission.

Value parameters

domain

the kind of domain to add

Attributes

Source
package.scala
def define[A <: Type](sink: A, source: A)(implicit sourceInfo: SourceInfo): Unit

Forward a domain from a source to a sink.

Forward a domain from a source to a sink.

Value parameters

sink

the destination of the forward

source

the source of the forward

Attributes

Source
package.scala
def unsafeCast[A <: Data, B <: Type](source: A, domains: B*)(implicit sourceInfo: SourceInfo): A

Unsafe cast to a variadic list of domains.

Unsafe cast to a variadic list of domains.

This is an advanced API that is typically only used when building synchronizer libraries. E.g., if you are writing a clock domain synchronizer, you need to use this. If you are using this to work around FIRRTL compilation errors, you may be indavertently hiding bugs.

Value parameters

domains

variadic list of domains to cast to

source

the source Data that should be casted

Attributes

Source
package.scala