# Connecting Sequence to Scoreboard

**URL:** <https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924>\
**Category:** UVM\
**Tags:** analysis-port, UVM-scoreboard, UVM, sequence\
**Created:** [August 7, 2020, 7:19pm UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924 "2020-08-07T19:19:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant.makhecha](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/ea666f/32.png) [@prashant.makhecha](https://verificationacademy.com/forums/u/prashant.makhecha)\
**Post date:** [August 7, 2020, 7:19pm UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/1 "2020-08-07T19:19:10Z")

</div>

I want to pass some data to Scoreboard directly without using monitor so how can I achieve?  
Scoreboard had to compare data from RTL which will come to Scoreboard using analysis port from one agent but for expected data I have another sequence through which I have to pass data so I wonder how can I get this done.  
Can anyone help me as I am new to UVM I am very much confused in this.  
But 1 thing is sure this sequence does not belongs to any agent so it can’t use any agent components directly. This sequence is overall functioning of testcase. I am calling multiple sequences into this sequence and those data are going into scoreboard too using analysis port of those sequences but not here at one point I need to pass data to be compared by scoreboard or else if there’s a way to access received data of scoreboard to sequence so either or way I just have to compare 1 byte of data.

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [August 8, 2020, 12:30pm UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/2 "2020-08-08T12:30:32Z")

</div>

_In reply to [om30](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924):_

A sequence does not have a position in your UVM topology, i.e. you cannot connect the seuence to your scoreboard. But you can send from the sequence seq\_items to the scoreboard.  
You ushould think about compairing your data in the sequence itself and not in the scoreboard. This is not he standard approach but is is legal.

---

<div class="post-metadata">

**Author:** ![prashant.makhecha](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/ea666f/32.png) [@prashant.makhecha](https://verificationacademy.com/forums/u/prashant.makhecha)\
**Post date:** [August 8, 2020, 2:19pm UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/3 "2020-08-08T14:19:54Z")

</div>

Ok I agree to your point then how will I be able to compare data in sequence. How will I get the data which is coming from RTL to some agent. I am unable to connect anything like that can you please guide me sir.

Thanks in Advance

---

<div class="post-metadata">

**Author:** ![rag123](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@rag123](https://verificationacademy.com/forums/u/rag123)\
**Post date:** [August 8, 2020, 5:53pm UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/4 "2020-08-08T17:53:00Z")

</div>

_In reply to [om30](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/3):_

If you want to compare the data back in sequence you will have to pass it through driver.

```verilog

wait for the response back,

seq_item_port.get(req); // Start processing req item
    m_bfm.drive(req, rsp);
    rsp.set_id_info(req); // Set the rsp id = req id
    seq_item_port.put(rsp);

In driver to get the read data back,
 $cast(rsp, req.clone()); // Clone the req
  if (req.read_not_write == 1) begin
    rsp.read_data = read_data; // Copy read data response

In the sequence you can do the comparison

if(rsp.read_not_write == 1) begin
	  if (mem[rsp.addr] == rsp.read_data) begin
	  `uvm_info("seq_body", "READ WRITE MATCH", UVM_LOW)
	  end 
      else begin
		error_count++;
		`uvm_error("body", "READ WRITE ERROR")
	  end
	end 
    else begin
	  mem[req.addr] = req.write_data;
	end
  end
```

---

<div class="post-metadata">

**Author:** ![hungvn](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/hungvn/32/1858_2.png) [@hungvn](https://verificationacademy.com/forums/u/hungvn)\
**Post date:** [August 10, 2020, 4:40am UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/5 "2020-08-10T04:40:55Z")

</div>

_In reply to [om30](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/4):_

As chr\_sue response: “A sequence does not have a position in your UVM topology”. But the sequencer has, and from the sequence you can access to sequencer which your sequence is running on.  
So I think in this case I will create a fifo in custom sequencer, put the transaction from sequence to the fifo, and then the scoreboard can get the transaction to compare from this fifo.

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [August 10, 2020, 5:43am UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/6 "2020-08-10T05:43:18Z")

</div>

_In reply to [hungvn](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/5):_  
Yoiou have always different options to solve a problem. Beside the transfer through uvm\_components you can also transfer data along of events. This does not require a component. You can do this from an objet to a component. This is what I was proposing to om30.

---

<div class="post-metadata">

**Author:** ![hungvn](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/hungvn/32/1858_2.png) [@hungvn](https://verificationacademy.com/forums/u/hungvn)\
**Post date:** [August 10, 2020, 10:02am UTC](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/7 "2020-08-10T10:02:59Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/connecting-sequence-to-scoreboard/37924/6):_

ah, I actually do not experience event very often in the testbench, thanks for sharing that.
