ImplicitClock
chisel3.ImplicitClock
trait ImplicitClock
Provides an implicit Clock for use within the RawModule
Be careful to define the Clock value before trying to use it. Due to Scala initialization order, the actual val defining the Clock must occur before any uses of the implicit Clock.
Attributes
- Example
-
class MyModule extends RawModule with ImplicitClock { // Define a Clock value, it need not be called "implicitClock" val clk = IO(Input(Clock())) // Implement the virtual method to tell Chisel about this Clock value // Note that though this is a def, the actual Clock is assigned to a val (clk above) override protected def implicitClock = clk // Now we have a Clock to use in this RawModule val reg = Reg(UInt(8.W)) } - 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