avihai Posted August 30, 2015 Report Share Posted August 30, 2015 Hello, I'd like to save in my monitor some values of the previous transaction before the current arrived for some comparing. What is the right way to do it? Thank you annvf4 1 Quote Link to comment Share on other sites More sharing options...
karandeep963 Posted January 8, 2016 Report Share Posted January 8, 2016 Though its late to answer I guess, here is one solution: Create two packets in your monitor as follow; class any_monitor extends uvm_monitor; // rest things task run_phase (uvm_phase phase); my_packet previous_packet = my_packet::type_id::create("previous_packet"); my_packet current_packet = my_packet::type_id::create("current_packet "); // Processing the transaction // Do the needful and before sending the packet through monitor analysis port make a local copy for it as // since we send the packet through analysis port in the end where we are all done with our processing , so upto here you have previous packet available $cast(previous_packet,current_packet ); analysis_port.write(current_packet ); // In this way you can make for more copies , even put these copies in fifo , do whatever flavor your want to implement endtask In the above way you can make for more copies , even put these copies in fifo , do whatever flavor your want to implement. Hope it will meet your requirements. Regards, Karandeep annvf4 1 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.