D
Davy
Guest
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
//-----
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
//-----
@(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 @(...) din<=data_in; and @(...); din<=data_in; (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
//-----
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
//-----
@(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 @(...) din<=data_in; and @(...); din<=data_in; (note the ;
difference in @) difference?
Thanks!
Best regards,
Davy