ImplicitReset
chisel3.ImplicitReset
trait ImplicitReset
Provides an implicit Reset for use within the RawModule
Be careful to define the Reset value before trying to use it. Due to Scala initialization order, the actual val defining the Reset object must occur before any uses of the implicit Reset.
Attributes
- Example
-
class MyModule extends RawModule with ImplicitReset { // Define a Reset value, it need not be called "implicitReset" val rst = IO(Input(AsyncReset())) // Implement the virtual method to tell Chisel about this Reset value // Note that though this is a def, the actual Reset is assigned to a val (rst above) override protected def implicitReset = clk // Now we have a Reset to use in this RawModule // Registers also require a clock val clock = IO(Input(Clock())) val reg = withClock(clock)(RegInit(0.U)) // Combine with ImplicitClock to get rid of this withClock } - Source
- Module.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Moduleclass PRNGclass FibonacciLFSRclass MaxPeriodFibonacciLFSRclass GaloisLFSRclass MaxPeriodGaloisLFSRtrait LFSRclass Arbiter[T]class LockingArbiterLike[T]class LockingArbiter[T]class LockingRRArbiter[T]class RRArbiter[T]class Pipe[T]class Queue[T]class FixedIOModule[A]trait RequireAsyncResettrait RequireSyncResetclass SimulationTestHarnessclass TestHarness[M]
- Self type
Members list
In this article