# Getting same item from analysis fifo, even though monitor writes only once

**URL:** <https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257>\
**Category:** UVM\
**Tags:** analysis-port, UVM\
**Created:** [March 26, 2018, 4:19pm UTC](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257 "2018-03-26T16:19:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanantvs](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@saravanantvs](https://verificationacademy.com/forums/u/saravanantvs)\
**Post date:** [March 26, 2018, 4:19pm UTC](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/1 "2018-03-26T16:19:41Z")

</div>

Hi,  
-Monitor analysis port is connected scoreboard export  
-scoreboard export is connected to scoreboard’s analysis fifo.

From my monitor i am writing only once, but from analysis fifo, i recive the same item twice. Can anyone tell me what is the mistake i am doing ?

UVM\_INFO …/PSRAMTBsrc/PsramMaster\_PsramMon.sv(68) @ 153855000 ps: uvm\_test\_top.env.ps\_mon [PSRAM\_MON] PKT TYPE : SYNC\_WR(80H)

UVM\_INFO …/PSRAMTBsrc/PsRamSco.sv(349) @ 153855000 ps: uvm\_test\_top.env.sb [uvm\_test\_top.env.sb] GOT PSRAM ITEM : PKT TYPE : SYNC\_WR(80H)

UVM\_INFO …/PSRAMTBsrc/PsRamSco.sv(349) @ 153855000 ps: uvm\_test\_top.env.sb [uvm\_test\_top.env.sb] GOT PSRAM ITEM : PKT TYPE : SYNC\_WR(80H)

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [March 26, 2018, 4:32pm UTC](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/2 "2018-03-26T16:32:11Z")

</div>

_In reply to [saravanantvs](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257):_

Check that you only made _one_ connection.

---

<div class="post-metadata">

**Author:** ![saravanantvs](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@saravanantvs](https://verificationacademy.com/forums/u/saravanantvs)\
**Post date:** [March 27, 2018, 1:22am UTC](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/3 "2018-03-27T01:22:46Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/2):_

Hi Dave,

I found out the issue. socreboard is getting item only once. But the uvm\_info is getting printed two times. May i know how to solve this.

# task PsRamSco::psram\_rcv(); PsramTrns psram\_item\_h; forever begin `uvm_info(get_full_name(),$psprintf("Size of fifo is-1 : %0d",f_mon_analysis_exp.size()),UVM_LOW) f_mon_analysis_exp.get(psram_item_h); $display("JUST CHECKING"); `uvm\_info(get\_full\_name(),$psprintf(“Size of fifo is-2 : %0d”,f\_mon\_analysis\_exp.size()),UVM\_LOW) `uvm\_info(get\_full\_name(),$psprintf(" GOT PSRAM ITEM : %0s",psram\_item\_h.sprint()),UVM\_LOW) if(psram\_item\_h.is\_sync\_wr()) begin processSyncWr(psram\_item\_h); end

JUST CHECKING  
UVM\_INFO ../PSRAMTBsrc/PsRamSco.sv(351) @ 153135000 ps: uvm\_test\_top.env.sb [uvm\_test\_top.env.sb] Size of fifo is-2 : 0  
UVM\_INFO ../PSRAMTBsrc/PsRamSco.sv(351) @ 153135000 ps: uvm\_test\_top.env.sb [uvm\_test\_top.env.sb] Size of fifo is-2 : 0

---

<div class="post-metadata">

**Author:** ![saravanantvs](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@saravanantvs](https://verificationacademy.com/forums/u/saravanantvs)\
**Post date:** [March 27, 2018, 1:32am UTC](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/4 "2018-03-27T01:32:49Z")

</div>

_In reply to [saravanantvs](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/3):_

Hi Dave,

I have found out the problem.  
In report\_severity\_action, if i specify UVM\_DISPLAY | UVM\_LOG. then i am getting same info messages more than once. but once i change it to only UVM\_LOG. Then i am getting only once.  
Any idea why it is happening like this.

axi\_fd = $fopen(“AXI\_MON\_LOG.log”,“w”);  
set\_report\_id\_file(“AXI\_MON”, axi\_fd );  
**//set\_report\_severity\_action(UVM\_LOW, (UVM\_DISPLAY | UVM\_LOG) );**  
set\_report\_severity\_action(UVM\_LOW, UVM\_LOG );

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [March 27, 2018, 6:33am UTC](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/5 "2018-03-27T06:33:12Z")

</div>

_In reply to [saravanantvs](https://verificationacademy.com/forums/t/getting-same-item-from-analysis-fifo-even-though-monitor-writes-only-once/34257/4):_

Your problem is you used   
set\_report\_id\_file( **“AXI\_MON”** , axi\_fd );, but your message ID is   
`uvm\_info(**get\_full\_name()**,…), so your message ID don’t match. The default log file is the display.

You can

1. use set\_report\_default\_file() instead of set\_report\_id\_file()
2. make the IDs match by using set\_report\_id\_file(get\_full\_name(),axi\_fd);
3. make the IDs match by using `uvm\_info(“AXI\_MON”,…)

I prefer options 1 or 3. I don’t like using get\_full\_name for the message ID. It is duplicate information in the message. You should use more unique message IDs for fine-grain control.
