package domain
- Source
- package.scala
- Alphabetic
- By Inheritance
- domain
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract class Domain extends AnyRef
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
fieldsmethod: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 ) }
- See also
- final class FieldAccessor extends Dynamic
Dynamic accessor for domain fields.
Dynamic accessor for domain fields.
This class uses Scala's Dynamic trait to enable syntax like
field.fieldName. It should be created via thefieldmethod on a domain.Type instance. - final class Type extends Element
A Data that is used to communicate information of a specific domain kind.
Value Members
- 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.
- domain
the kind of domain to add
- 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.
- sink
the destination of the forward
- source
the source of the forward
- def domainOf(a: Data, kind: => Type)(implicit sourceInfo: SourceInfo): Type
For a hardware type Data, get the domain type of that wire for a given domain kind.
For a hardware type Data, get the domain type of that wire for a given domain kind.
- a
some hardware
- kind
a kind of domain
- returns
the domain type of
a
- 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.
- source
the source Data that should be casted
- domains
variadic list of domains to cast to
- object Field
- object Mux
A (glitchy) domain-aware mux
A (glitchy) domain-aware mux
Muxes any
Dataand associates the muxed output with a _new_ domain supplied by the caller (e.g.ClockDomain("_muxed")). This is intended to be used as a very basic domain mux, e.g., as a clock mux. However, this can also be used to mux multiple signals at once, e.g., to mux between both a clock/reset pair and have the resulting pair be on the same domain.- returns
the muxed output data and the output domain it was associated with
- Note
This is a glitchy! This is not safe to use if
selwill change whileoutToroutFare toggling.
This is the documentation for Chisel.
Package structure
The chisel3 package presents the public API of Chisel. It contains the concrete core types
UInt,SInt,Bool,Clock, andReg, the abstract typesBits,Aggregate, andData, and the aggregate typesBundleandVec.The Chisel package is a compatibility layer that attempts to provide chisel2 compatibility in chisel3.
Utility objects and methods are found in the
utilpackage.The
testerspackage defines the basic interface for chisel testers.