object layer
This object contains Chisel language features for creating layers. Layers are collections of hardware that are not always present in the circuit. Layers are intended to be used to hold verification or debug code.
- Source
- Layer.scala
- Alphabetic
- By Inheritance
- layer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait BlockReturnHandler[A] extends AnyRef
A type class that describes how to post-process the return value from a layer block.
- final case class CustomOutputDir(path: Path) extends OutputDirBehavior with Product with Serializable
- abstract class Layer extends AnyRef
A layer declaration.
- sealed trait LayerConfig extends AnyRef
- sealed trait OutputDirBehavior extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addLayer(layer: Layer): Unit
Add a layer and all of its parents to the Builder.
Add a layer and all of its parents to the Builder. This lets the Chisel know that this layer should be emitted into FIRRTL text.
This API can be used to guarantee that a design will always have certain layers defined. By default, layers are only included in the FIRRTL text if they have layer block users.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def block[A](layer: Layer, skipIfAlreadyInBlock: Boolean = false, skipIfLayersEnabled: Boolean = false)(thunk: => A)(implicit tc: BlockReturnHandler[A] = BlockReturnHandler.unit[A], sourceInfo: SourceInfo): R
Create a new layer block.
Create a new layer block. This is hardware that will be enabled collectively when the layer is enabled.
This function automatically creates parent layers as the layer of the current layerblock is an ancestor of the desired layer. The ancestor may be the current layer which causes no layer block to be created. (This is not a _proper_ ancestor requirement.)
By default, the return of the layer block will be either a subtype of Data or Unit, depending on the
thunk
provided. If thethunk
(the hardware that should be constructed inside the layer block) returns a Data, then this will either return a Wire of layer-colored Probe type if a layer block was created or the underlying Data if no layer block was created. If thethunk
returns anything else, this will return Unit. This is controlled by the implicit argumenttc
and may be customized by advanced users to do other things.- layer
the layer this block is associated with
- skipIfAlreadyInBlock
if true, then this will not create a layer if this
block
is already inside another layerblock- skipIfLayersEnabled
if true, then this will not create a layer if any layers have been enabled for the current module block if already inside a layer block
- thunk
the Chisel code that goes into the layer block
- sourceInfo
a source locator
- returns
either a subtype of Data or Unit depending on the
thunk
return type
- Exceptions thrown
java.lang.IllegalArgumentException
if the layer of the currnet layerblock is not an ancestor of the desired layer
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def elideBlocks[A](thunk: => A): A
API that will cause any calls to
block
in thethunk
to not create new layer blocks.API that will cause any calls to
block
in thethunk
to not create new layer blocks.This is an advanced, library-writer's API that is not intended for broad use. You may consider using this if you are writing an API which automatically puts code into layer blocks and you want to provide a way for a user to completely opt out of this.
- thunk
the Chisel code that should not go into a layer block
- final def enable(layer: Layer): Unit
Call this function from within a
Module
body to enable this layer globally for that module. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object ABI
Enumeration of different application binary interfaces (ABIs) for how to enable layers.
Enumeration of different application binary interfaces (ABIs) for how to enable layers. These are implementations of the FIRRTL ABI Specification.
- object BlockReturnHandler
- case object DefaultOutputDir extends OutputDirBehavior with Product with Serializable
- object Layer
- object LayerConfig
- case object NoOutputDir extends OutputDirBehavior with Product with Serializable
Deprecated Value Members
- object Convention
Enumerations of different optional layer conventions.
Enumerations of different optional layer conventions. A layer convention says how a given layer should be lowered to Verilog.
- Annotations
- @deprecated
- Deprecated
(Since version Chisel 7.0.0)
Convention
is being removed in favor ofLayerConfig
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 typesBundle
andVec
.The Chisel package is a compatibility layer that attempts to provide chisel2 compatibility in chisel3.
Utility objects and methods are found in the
util
package.The
testers
package defines the basic interface for chisel testers.