Mahnedra Posted March 13, 2014 Report Share Posted March 13, 2014 Hi clocking drv_cb @(posedge clk); output data; output sop; output eop; endclocking task rbus_driver::drive_one_pkt(rbus_data trans); vif.sop <= 1'b1; vif.deop <= 1'b1; vif.data <= trans.bytes; @vif.drv_cb;end above is my scenario in this very first data driving starts at negedge of the clk. from second it starts driving from posedge of the clock i don't know why? in the env i have 2 drivers similiar other one driveing perfect from posedge of clk please any body know why? Quote Link to comment Share on other sites More sharing options...
dave_59 Posted March 14, 2014 Report Share Posted March 14, 2014 Did you mean to write task rbus_driver::drive_one_pkt(rbus_data trans); @vif.drv_cb; vif.drv_cb.sop <= 1'b1; vif.drv_cb.deop <= 1'b1; vif.drv_cb.data <= trans.bytes; end Two basic rules about using clocking blocks. If you plan to use clocking block variables, only use those variables, not the raw, unclocked versions of those variables. Make sure a clocking block sample or drive statement is synchronized to the clocking block event. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.