ImplicitClock

chisel3.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 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 implicitClock: Clock

Method that should point to the user-defined Clock

Method that should point to the user-defined Clock

Attributes

Source
Module.scala