Which region does Testbench use to drive the signal to DUT?

Suppose, I have a clocking block in the interface(let’s say vif) that I am using to connect the testbench to the DUT.
I am using the clocking block to drive(vif.cb.var <= XX) and sample the DUT interface.

  1. In a typical SV-UVM testbench, which clocking region will be used to drive the signals to DUT? Is it prepone, but I read this is used to sample the signals from DUT?
  2. When does the execution of the region start for a clock? Is it with the posedge clk or it doesn’t depend on the clock rather all the event regions go in a cyclic fashion?
  3. Does setting skew for input and output in the clocking block has any effect on the timing regions?

Thanks for your response in advance!

In reply to possible:

  1. For clocking block drives:

For zero skew clocking block outputs with no cycle delay, synchronous drives shall schedule new values in the Re-NBA region of the time step corresponding to the clocking event. For clocking block outputs with nonzero skew, or drives with nonzero cycle delay, the corresponding signal shall be scheduled to change value in the Re-NBA region of a future time step.For clocking block inputs:
If the input skew
is not an explicit #0, then the value sampled corresponds to the signal value at the Postponed region of the time step skew time units prior to the clocking event (see Figure 14-1 in 14.4). If the input skew is an explicit #0, then the value sampled corresponds to the signal value in the Observed region.Note that the sampled value of a signal in the postponed region of the previous time step is by definition the same value of that signal in the preponed region of the current time step.

  1. If you follow the recommended practice of driving your clock with a blocking assignment in a module, the clock gets updated in the active region, and the @(posedge clock) follows in the same active region.
  2. Using #0 for a skew is never recommended, so consider input sampling as always the postponed region of the previous time stamp, the the postponed region of the skewed time step.

In reply to dave_59:

Hi Dave,

From your 1st point regarding Clocking block drives, I have one question, if our TB is written inside a program block then it will definitely go to RE-NBA region, but what if our TB is written inside Module, is it possible that from observed region it can go back to NBA of Active region. Because I have heard there is a feedback from Observed to Active Region.

In reply to mukul1996:

We do not recommend the use of program blocks. To answer your question, a clocking drive updates in the RE-NBA region regardless using modules or programs.