I want to know about lifespan of objects created during run_phase because to compare between 2 methods for receiving data in scoreboard.
-
IP Monitor : Input monitor will have analysis port so it will broadcast the input
Scoreboard : Scoreboard will have uvm_tlm_analysis_fifoRight now analysis port has only 1 subscriber so handle of seq_item will only be pass to scoreboard. Now only uvm_tlm_analysis_fifo has handle of seq_item sent from input_monitor. So if I do get method on it I will retrieve the handle, and when next time I do get the last handle will no longer be referenced by any variable in TB. So should the memory space of that object destroy instantly or it will be destroyed after run time.(I am aware about provision that SV provides that it depends upon simulator design. If your answer is tool specific then I am specifically asking about Siemens Questa. But I am more interested in generalized answer which method is better which one should I use.)
In this method I will create object inside driver s forever loop and IP monitor will pass it’s handle. So every loop will create new object of seq_item and I assume they are getting destroyed after use and get derferenced.
- IP Monitor : Input monitor will have analysis port so it will broadcast the input
Scoreboard : Scoreboard will have uvm_analysis_imp_port
In this method I will create a queue to store input then process input(from ip monitor) and output from (op monitor), then process input compare with DUT output and then discard it. This method will surely destroy memory of the object after use.
In this method I will create object outside driver s forever loop only one time and IP monitor will pass it’s handle and in scoreboard my data will be copied down into seq_item handle and store inside queue so the next time when data gets randomize it will not be corrupted.
So the comparison is between using this two methods. Because method 2 is of no use if method 1 is memory efficient to write. Because in method 1 you have to provide you own write method implementation in scoreboard and also you have to create a queue insert element into it.