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.
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.
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.
If you want to compare the data back in sequence you will have to pass it through driver.
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
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.
In reply to hungvn:
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.