chip_maker Posted August 9, 2012 Report Share Posted August 9, 2012 (edited) Hi, I am having code like this uvm_tlm_analysis_fifo#(an_item) before0_fifo an_item before0_trans; In a task I have the following code before0_fifo.try_get(before0_trans); `uvm_info(get_type_name(), $psprintf("Inside task comparer3: Transfer collected :\n%s", before0_trans.sprint()), UVM_FULL); The execution is returning "NULL pointer dereference." when there are no objects in 'before0_fifo'. I was expecting try_get to be 1. Non-blocking 2. if there are no objects in before0_fifo, then before0_trans should have had previouly gotten value. (As per the UVM Class Reference manual under section 'uvm_tlm_if_base #(T1,T2)', the try_get description reads "If a transaction is immediately available, then it is written to the output argument and 1 is returned. Otherwise, the output argument is not modified and 0 is returned" ) Please let me know what I'm missing. Regards Kal Edited August 9, 2012 by chip_maker Quote Link to comment Share on other sites More sharing options...
dave_59 Posted August 10, 2012 Report Share Posted August 10, 2012 before0_fifo is not a fifo; it is a class that contains a fifo. Did you construct it? 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.