chisel3.simulator.stimulus.ResetProcedure
See theResetProcedure companion object
trait ResetProcedure[A] extends () => A
Stimulus that will apply a standard reset procedure to a Chisel circuit.
The reset procedure is as follows:
time 0: bring everything up using simulator settings time 1: bring reset out of x and deassert it. time 2: assert reset time 3: first clock edge time 4 + n: deassert reset (where n == additionalResetCycles)
This intentionally structured to guarantee the following properties:
- There is guaranteed to be a time when FIRRTL/Verilog-based randomization can happen at either time 0 or time 1.)
- If time 1 is used for FIRRTL/Verilog-based randomization, then time 0 can be used for simulator-based initialization, e.g.,
+vcs+initreg+random. Simulator initialization will race with FIRRTL/Verilog-based randomization and it is critical that they do not happen at the same time. - Both FIRRTL/Verilog-based randomization and simulator-based randomization should not occur on a clock edge, e.g., an edge when reset is asserted. This can be yet-another race condition that has to be avoided.
- Reset always sees a posedge. This avoids problems with asynchronous reset logic behavior where they may (correctly in Verilog) not fire if you bring the design with reset asserted. Note: it would be fine to do an
x -> 1transition to show an edge, however, it looks cleaner to bring reset to0.
Attributes
- Companion
- object
- Source
- ResetProcedure.scala
- Graph
-
- Supertypes
-
trait A => Unitclass Objecttrait Matchableclass Any
Members list
In this article