ImplicitReset

chisel3.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 Object
trait Matchable
class Any
Known subtypes
class Module
class PRNG
class GaloisLFSR
trait LFSR
class Arbiter[T]
class LockingArbiter[T]
class LockingRRArbiter[T]
class RRArbiter[T]
class Pipe[T]
class Queue[T]
class FixedIOModule[A]
class TestHarness[M]
Show all
Self type

Members list

Value members

Abstract methods

protected def implicitReset: Reset

Method that should point to the user-defined Reset

Method that should point to the user-defined Reset

Attributes

Source
Module.scala