How to compare the data between two uvm_tlm_analysis in scoreboard

I have coded a scoreboard
class scoreboard extends uvm_scoreboard;
seq_item tx;
uvm_analysis_imp#(seq_item,scoreboard) imp;
bit [65:0]entxd;

`uvm_component_utils(scoreboard)

function new(string name,uvm_component parent);
super.new(name,parent);
endfunction

function void build_phase(uvm_phase phase);
imp=new(“imp”,this);
tx=seq_item::type_id::create(“tx”);
compare();
endfunction

function void write(seq_item tx1);
this.tx=tx1;
compare();
endfunction
virtual function void compare();
if(tx.rst==1)
begin
entxd=66’b0;
if(entxd==tx.entxd)
begin

    $display( "Result match",  "tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
    end
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		     end
		      
	      else if(tx.txc==16'h00)
 begin
  
  entxd={tx.txd[63:56],tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],tx.txd[7:0],2'b01};
  $display("entxd=%h",entxd);
   $display("tx.entxd=%h",tx.entxd);
  
  
  if(tx.entxd==entxd)
    $display( "Result match", "tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result mismatch"  ,"tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
end
		      
		      else if(tx.txc==16'hff)
  begin
    
    entxd={tx.txd[63:56],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],tx.txd[28:22],tx.txd[21:15],tx.txd[14:8],16'h1e ,2'b10};
    if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result mismatch","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
  end
   else if(tx.txc==16'h01)
    begin
      
      entxd={tx.txd[63:56],tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'h78,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      end
  		        else if(tx.txc==16'hf1)
    begin
     
    entxd={28'b0,tx.txd[36:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'h4b,2'b10};
    if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      end
    else if(tx.txc==16'hff)
    begin
      
      entxd={tx.txd[63:56],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],tx.txd[28:22],tx.txd[21:15],7'b0000000,16'h87,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==16'hfe)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],tx.txd[28:22],6'b000000,tx.txd[15:8],16'h99,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
     else if(tx.txc==16'hfc)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],5'b00000,tx.txd[23:16],tx.txd[15:8],16'haa,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==16'hf8)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],4'b0000,tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hb4,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==16'hf0)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],3'b000,tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hcc,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==16'he0)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],2'b00,tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hd2,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==16'hc0)
    begin
     
      entxd={tx.txd[63:57],1'b0,tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'he1,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==16'h80)
    begin
      
     
      entxd={tx.txd[63:56],tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hd2,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end

endfunction

endclass

I have write 5 transaction packet in sequence body task in repeat

class base_seq extends uvm_sequence#(seq_item);
seq_item tx;
`uvm_object_utils(base_seq)

function new(string name=“base_seq”);
super.new(name);
endfunction

 task body();

  repeat(5) begin
    
   tx=seq_item::type_id::create("tx");
   
   start_item(tx);
    assert(tx.randomize);
    tx.print();
   finish_item(tx);
  end

 endtask

endclass

after the simulation only one packet is displayed in scoreboard is my campare logic is wrong?


UVM_INFO @ 0: reporter [RNTST] Running test base_test…

entxd=00000000000000001

tx.entxd=00000000000000000

Result mismatchtx.entxd=0 & entxd=1 $time= 0

-------------------------------------------------------------------------------

Name Type Size Value

-------------------------------------------------------------------------------

tx seq_item - @667

begin_time time 64 0

depth int 32 'd2

parent sequence (name) string 3 seq

parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

sequencer string 28 uvm_test_top.env1.agent1.sqr

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------

Name Type Size Value

-------------------------------------------------------------------------------

tx seq_item - @696

begin_time time 64 20

depth int 32 'd2

parent sequence (name) string 3 seq

parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

sequencer string 28 uvm_test_top.env1.agent1.sqr

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------

Name Type Size Value

-------------------------------------------------------------------------------

tx seq_item - @700

begin_time time 64 30

depth int 32 'd2

parent sequence (name) string 3 seq

parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

sequencer string 28 uvm_test_top.env1.agent1.sqr

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------

Name Type Size Value

-------------------------------------------------------------------------------

tx seq_item - @704

begin_time time 64 40

depth int 32 'd2

parent sequence (name) string 3 seq

parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

sequencer string 28 uvm_test_top.env1.agent1.sqr

-------------------------------------------------------------------------------

-------------------------------------------------------------------------------

Name Type Size Value

-------------------------------------------------------------------------------

tx seq_item - @708

begin_time time 64 50

depth int 32 'd2

parent sequence (name) string 3 seq

parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

sequencer string 28 uvm_test_top.env1.agent1.sqr

-------------------------------------------------------------------------------

UVM_INFO verilog_src/uvm-1.0p1/src/base/uvm_objection.svh(1116) @ 60: reporter [TEST_DONE] ‘run’ phase is ready to proceed to the ‘extract’ phase

— UVM Report Summary —

In reply to taufeeq_khan:

You are using an incredibly old version of the UVM and old tools. And it is difficult to reproduce your problem the way it is posted. Please try your example on EDAPlayground. Asking better questions on the Verification Academy Forums with EDAPlayground - Verification Horizons

In reply to cgales:
thanks for reply
I put my code in edaplayground on tool aldec riviera pro 2020.04
code link Simple UVM Testbench(1) - EDA Playground

after the simulation do not displayed any packed in scoreboard
please tell me where i am doing wrong

In reply to taufeeq_khan:

What you posted on EDA Playground does not match what is in your first post. Specifically, the write() function in your scoreboard doesn’t call the ‘compare()’ function while the code in your first post does.

You have several significant errors where your reset conditions are mismatched. Also, the size of ‘txc’ is sometimes 8 bits and sometimes 16 bits.

In reply to cgales:
I have abolish some error
I have matched reset and also txc have taken 8 bit
here the code link Simple UVM Testbench(3) - EDA Playground

but after simulation driver displayed rst started and rst ended but in scoreboard does not displayed value compare function does not work why compare function does not work

output-

VSIMSA: Configuration file changed: `/home/runner/library.cfg’
ALIB: Library “work” attached.
work = /home/runner/work/work.lib
MESSAGE “Pass 1. Scanning modules hierarchy.”
MESSAGE_SP VCP2124 “Package uvm_pkg found in library uvm_1_2.”
MESSAGE “Pass 2. Processing instantiations.”
MESSAGE “Pass 3. Processing behavioral statements.”
MESSAGE “Running Assertions Compiler.”
MESSAGE “Running Optimizer.”
MESSAGE “ELB/DAG code generating.”
MESSAGE “Unit top modules: top.”
MESSAGE “$root top modules: top.”
SUCCESS “Compile success 0 Errors 0 Warnings Analysis time: 5[s].”
ALOG: Warning: The source is compiled without the -dbg switch. Line breakpoints and assertion debug will not be available.
done

Aldec, Inc. Riviera-PRO version 2020.04.130.7729 built for Linux64 on June 10, 2020.

HDL, SystemC, and Assertions simulator, debugger, and design environment.

(c) 1999-2020 Aldec, Inc. All rights reserved.

ELBREAD: Elaboration process.

ELBREAD: Warning: Package ‘uvm_pkg’ does not have a `timescale directive, but previous modules do.

ELBREAD: Elaboration time 0.6 [s].

KERNEL: Main thread initiated.

KERNEL: Kernel process initialization phase.

ELAB2: Elaboration final pass…

KERNEL: PLI/VHPI kernel’s engine initialization done.

PLI: Loading library ‘/usr/share/Riviera-PRO/bin/libsystf.so’

ELAB2: Create instances …

KERNEL: Info: Loading library: /usr/share/Riviera-PRO/bin/uvm_1_2_dpi

KERNEL: Time resolution set to 1ns.

ELAB2: Create instances complete.

SLP: Started

SLP: Elaboration phase …

SLP: Elaboration phase … done : 0.0 [s]

SLP: Generation phase …

SLP: Generation phase … done : 0.1 [s]

SLP: Finished : 0.1 [s]

SLP: 0 primitives and 2 (25.00%) other processes in SLP

SLP: 11 (0.04%) signals in SLP and 5 (0.02%) interface signals

ELAB2: Elaboration final pass complete - time: 3.1 [s].

KERNEL: SLP loading done - time: 0.0 [s].

KERNEL: Warning: You are using the Riviera-PRO EDU Edition. The performance of simulation is reduced.

KERNEL: Warning: Contact Aldec for available upgrade options - sales@aldec.com.

KERNEL: SLP simulation initialization done - time: 0.0 [s].

KERNEL: Kernel process initialization done.

Allocation: Simulator allocated 29079 kB (elbread=2090 elab2=22322 kernel=4666 sdf=0)

KERNEL: UVM_INFO /home/build/vlib1/vlib/uvm-1.2/src/base/uvm_root.svh(392) @ 0: reporter [UVM/RELNOTES]

KERNEL: ----------------------------------------------------------------

KERNEL: UVM-1.2

KERNEL: (C) 2007-2014 Mentor Graphics Corporation

KERNEL: (C) 2007-2014 Cadence Design Systems, Inc.

KERNEL: (C) 2006-2014 Synopsys, Inc.

KERNEL: (C) 2011-2013 Cypress Semiconductor Corp.

KERNEL: (C) 2013-2014 NVIDIA Corporation

KERNEL: ----------------------------------------------------------------

KERNEL:

KERNEL: *********** IMPORTANT RELEASE NOTES ************

KERNEL:

KERNEL: You are using a version of the UVM library that has been compiled

KERNEL: with `UVM_NO_DEPRECATED undefined.

KERNEL: See 404 for more details.

KERNEL:

KERNEL: You are using a version of the UVM library that has been compiled

KERNEL: with `UVM_OBJECT_DO_NOT_NEED_CONSTRUCTOR undefined.

KERNEL: See 404 for more details.

KERNEL:

KERNEL: (Specify +UVM_NO_RELNOTES to turn off this notice)

KERNEL:

KERNEL: ASDB file was created in location /home/runner/dataset.asdb

KERNEL: UVM_INFO @ 0: reporter [RNTST] Running test base_test…

KERNEL: ----rst started-----

KERNEL: ----rst ended-----

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @603

KERNEL: begin_time time 64 10

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @630

KERNEL: begin_time time 64 20

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @631

KERNEL: begin_time time 64 30

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @632

KERNEL: begin_time time 64 40

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @633

KERNEL: begin_time time 64 50

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: UVM_INFO /home/build/vlib1/vlib/uvm-1.2/src/base/uvm_objection.svh(1271) @ 60: reporter [TEST_DONE] ‘run’ phase is ready to proceed to the ‘extract’ phase

KERNEL: UVM_INFO /home/build/vlib1/vlib/uvm-1.2/src/base/uvm_report_server.svh(869) @ 60: reporter [UVM/REPORT/SERVER]

KERNEL: — UVM Report Summary —

KERNEL:

KERNEL: ** Report counts by severity

KERNEL: UVM_INFO : 3

KERNEL: UVM_WARNING : 0

KERNEL: UVM_ERROR : 0

KERNEL: UVM_FATAL : 0

KERNEL: ** Report counts by id

KERNEL: [RNTST] 1

KERNEL: [TEST_DONE] 1

KERNEL: [UVM/RELNOTES] 1

KERNEL:

RUNTIME: Info: RUNTIME_0068 uvm_root.svh (521): $finish called.

KERNEL: Time: 60 ns, Iteration: 62, Instance: /top, Process: @INITIAL#519_0@.

KERNEL: stopped at time: 60 ns

VSIM: Simulation has finished. There are no more test vectors to simulate.

VSIM: Simulation has finished.

Done

In reply to taufeeq_khan:

You didn’t read my response fully. Your write() function in the scoreboard isn’t calling the compare() function.

In reply to cgales:

now compare write() function calling the compare function and after simulation values are displayed but actual outpput and expected output both displayed zero at any time
my code Simple UVM Testbench(1) - EDA Playground

scoreboard class

class scoreboard extends uvm_scoreboard;
seq_item tx;
uvm_analysis_imp#(seq_item,scoreboard) imp;
bit [65:0]entxd;

`uvm_component_utils(scoreboard)

function new(string name,uvm_component parent);
super.new(name,parent);
endfunction

function void build_phase(uvm_phase phase);
imp=new(“imp”,this);
tx=seq_item::type_id::create(“tx”);
//compare();
endfunction

function void write(seq_item tx1);
this.tx=tx1;
compare();
endfunction
virtual function void compare();
if(tx.rst==0)
begin
entxd=66’b0;
if(entxd==tx.entxd)

    $display( "Result match",  " tx.txd=%h tx.entxd=%0d & entxd=%0d  $time=%t",tx.txd,tx.entxd,entxd,$time);
    
	    else
  		      $display( "Result mismatch","tx.txd=%h tx.entxd=%0d & entxd=%0d  $time=%t",tx.txd,tx.entxd,entxd,$time);
		     end
		      
    else if(tx.txc==8'h00)
 begin
  
  entxd={tx.txd[63:56],tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],tx.txd[7:0],2'b01};
 // $display("entxd=%h",entxd);
   //$display("tx.entxd=%h",tx.entxd);
  

  if(tx.entxd==entxd)
    $display( "Result match", "tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result mismatch"  ,"tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		    end  

		      
    else if(tx.txc==8'hff)
  begin
    
    entxd={tx.txd[63:56],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],tx.txd[28:22],tx.txd[21:15],tx.txd[14:8],16'h1e ,2'b10};
    if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result mismatch","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
  end
    else if(tx.txc==8'h01)
    begin
      
      entxd={tx.txd[63:56],tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'h78,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      end
    else if(tx.txc==8'hf1)
    begin
     
    entxd={28'b0,tx.txd[36:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'h4b,2'b10};
    if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      end
    else if(tx.txc==8'hff)
    begin
      
      entxd={tx.txd[63:56],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],tx.txd[28:22],tx.txd[21:15],7'b0000000,16'h87,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==8'hfe)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],tx.txd[28:22],6'b000000,tx.txd[15:8],16'h99,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==8'hfc)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],5'b00000,tx.txd[23:16],tx.txd[15:8],16'haa,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==8'hf8)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],4'b0000,tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hb4,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==8'hf0)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],tx.txd[49:43],3'b000,tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hcc,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==8'he0)
    begin
      
      entxd={tx.txd[63:57],tx.txd[56:50],2'b00,tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hd2,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==8'hc0)
    begin
     
      entxd={tx.txd[63:57],1'b0,tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'he1,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end
    else if(tx.txc==8'h80)
    begin
      
     
      entxd={tx.txd[63:56],tx.txd[55:48],tx.txd[47:40],tx.txd[39:32],tx.txd[31:24],tx.txd[23:16],tx.txd[15:8],16'hd2,2'b10};
      if(entxd==tx.entxd)
    $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
	    else
  		      $display( "Result match","tx.entxd=%0d & entxd=%0d  $time=%t",tx.entxd,entxd,$time);
		      
    end

endfunction

endclass

output:-

KERNEL: ----rst started-----

KERNEL: ----rst ended-----

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @603

KERNEL: begin_time time 64 10

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: Result match tx.txd=5a74fb2d4fe5e6e3 tx.entxd=0 & entxd=0 $time= 20

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @630

KERNEL: begin_time time 64 20

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: Result match tx.txd=177fbfe20445f14c tx.entxd=0 & entxd=0 $time= 30

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @631

KERNEL: begin_time time 64 30

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: Result match tx.txd=9195494c6d06061e tx.entxd=0 & entxd=0 $time= 40

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @632

KERNEL: begin_time time 64 40

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: Result match tx.txd=c8b5976b8a262559 tx.entxd=0 & entxd=0 $time= 50

KERNEL: -------------------------------------------------------------------------------

KERNEL: Name Type Size Value

KERNEL: -------------------------------------------------------------------------------

KERNEL: tx seq_item - @633

KERNEL: begin_time time 64 50

KERNEL: depth int 32 'd2

KERNEL: parent sequence (name) string 3 seq

KERNEL: parent sequence (full name) string 32 uvm_test_top.env1.agent1.sqr.seq

KERNEL: sequencer string 28 uvm_test_top.env1.agent1.sqr

KERNEL: -------------------------------------------------------------------------------

KERNEL: Result match tx.txd=bce0aa3f5ba64efd tx.entxd=0 & entxd=0 $time= 60

KERNEL: UVM_INFO /home/build/vlib1/vlib/uvm-1.2/src/base/uvm_objection.svh(1271) @ 60: reporter [TEST_DONE] ‘run’ phase is ready to proceed to the ‘extract’ phase

KERNEL: UVM_INFO /home/build/vlib1/vlib/uvm-1.2/src/base/uvm_report_server.svh(869) @ 60: reporter [UVM/REPORT/SERVER]

KERNEL: — UVM Report Summary —

KERNEL:

KERNEL: ** Report counts by severity

KERNEL: UVM_INFO : 3

KERNEL: UVM_WARNING : 0

KERNEL: UVM_ERROR : 0

KERNEL: UVM_FATAL : 0

KERNEL: ** Report counts by id

KERNEL: [RNTST] 1

KERNEL: [TEST_DONE] 1

KERNEL: [UVM/RELNOTES] 1

KERNEL:

RUNTIME: Info: RUNTIME_0068 uvm_root.svh (521): $finish called.

KERNEL: Time: 60 ns, Iteration: 62, Instance: /top, Process: @INITIAL#513_0@.

KERNEL: stopped at time: 60 ns

VSIM: Simulation has finished. There are no more test vectors to simulate.

VSIM: Simulation has finished.

Done

In reply to taufeeq_khan:

This is due to your design and scoreboard behaving exactly as you have coded them.You need to examine what values of ‘txc’ you are sending to the DUT and how this affects your output.

And please stop posting the entire scoreboard code if you have it on EDA Playground.

In reply to cgales:

I have examine to txc when txc takes a if conditions value then tx.entxd is taking the data but entxd will not take any value it will always zero but i have given to the data to entxd
i.e entxd={tx.txd[63:56],tx.txd[56:50],tx.txd[49:43],tx.txd[42:36],tx.txd[35:29],tx.txd[28:22],tx.txd[21:15],tx.txd[14:8],16’h1e ,2’b10};

but entxd is not giving any value why?
EDA Playground my code link Edit code - EDA Playground

In reply to taufeeq_khan:

You obviously don’t understand what your DUT is doing. Try to understand what inputs to your DUT give what outputs. HINT: txc needs certain specific values to get output.

In reply to taufeeq_khan:

in scoreboard rst is always zero so entxd will be a zero why rst how can rst will be disable

In reply to cgales:

yes txc will take specific value to get output but when txc takes a specific value
the output will be mismatched tx.entxd is giving a output according to dut but entxd is take always in a reset mode it is giving a zero only reset condition is occure in scoreboard compare function

In reply to taufeeq_khan:

You have to set constraints for txc to get the interesting values. It works fine for me. Please see here:

In reply to chr_sue:

thanks chr_sue