davyzhu
Advanced Member level 1

Hi all,
I use Clocking Block to construct testbench component like driver.
And I am confused with what time Clocking Block to synchronize data.
For example, there is "sync_fifo_if_i" interface instance and "wr_driver_cb" clocking block.
The clocking block is
The data assignment sequence is
The questions are
1. Will data assignment (synchronize) at the first @... or the second @...theoretically?
2. Is
and
(note the ; difference in @) difference?
Thanks!
Best regards,
Davy
I use Clocking Block to construct testbench component like driver.
And I am confused with what time Clocking Block to synchronize data.
For example, there is "sync_fifo_if_i" interface instance and "wr_driver_cb" clocking block.
The clocking block is
Code:
//-----
clocking wr_driver_cb @ (posedge clk);
default input #setup_time output #hold_time;
input full,almost_full;
output din,wr;
endclocking : wr_driver_cb
//-----
The data assignment sequence is
Code:
//-----
@(sync_fifo_if_i.wr_driver_cb)
din <= data_in;
wr <= 1'b1;
@(sync_fifo_if_i.wr_driver_cb)
//-----
The questions are
1. Will data assignment (synchronize) at the first @... or the second @...theoretically?
2. Is
Code:
@(...) din<=data_in;
Code:
@(...); din<=data_in;
Thanks!
Best regards,
Davy