Connecting Scoreboard to sequence

Hi all,
I have block level integrated UVM testbench.
No I want to connect one port of scoreboard to sequence, so is there any mechanism for the same??
If not any possible workaround??

Thanks,
Gaurav

You can’t connect a component (scoreboard) to a sequence, however you can connect a component to a sequencer, which is a component. Then you can use m_sequencer in your sequence.

In reply to dave_59:

Hi dave_59,

  What i am doing. I define the scoreboard in agent and also the sequencer.
  Inside sequencer define the agent and building it. Is this the right way? Or there is 
  any other way better then this. I also have a virtual sequencer.

In reply to dave_59:

can you please explain it more? i have a scenario to connect scoreboard to sequencer.I tried something explained in https://www.verilab.com/files/mastering_reactive_slaves.pdf

//sequence

virtual task seq_body();
forever begin
// wait for a transaction request (get is blocking)
p_sequencer.m_request_fifo.get(m_req);
// generate response based on observed request, e.g:
case (m_req.m_direction)
MY_DIRECTION_WRITE : begin
`uvm_do_with(m_item,{
m_item.m_resp_kind == MY_RESPONSE_ACK;
})
end

//sequencer

class my_slave_sequencer extends uvm_sequencer #(my_seq_item);

uvm_analysis_export #(my_transaction) m_request_export;
uvm_tlm_analysis_fifo #(my_transaction) m_request_fifo;

function new(string name, uvm_component parent);
super.new(name, parent);
m_request_fifo = new(“m_request_fifo”, this);
m_request_export = new(“m_request_export”, this);
endfunction
function void connect_phase(…);
super.connect_phase(phase);
m_request_export.connect(m_request_fifo.analysis_export);
endfunction
endclass

instead of monitor, I connected scoreboard. while running, it is going like infinite.If I comment “p_sequencer.m_request_fifo.get(m_req);”,then no infinite loop.

Please suggest me ?

Thanks in advance,
Roopa

In reply to roopatoms:

Of course you cannot make a connection between a sequence and a UVM component, because the sequence does not have a position in the UVM topology. But what you can do is passing data from a UVM component to a sequence using the uvm_event_pool and passing the data with the uvm_event.
I can provide you a complete example.

In reply to chr_sue:

Please give the example.

I connected scoreboard to sequencer.In the code previously mentioned, they connected monitor to sequencer.

In reply to roopatoms:

Please give me your email address. Thanks.

Hi,

Can I get the code please ?

My maid ID: kanamarlapudisurendrakumar@gmail.com

Hi dave_59,

you mean taking our own component extended from UVM_Component in the agent. and connecting it to the scoreboard ?

In reply to chr_sue:

Can we connect scoreboard in agent class instead of env class ?
If yes can you provide me some details for connection part

In reply to dddvlsique:

You do not connect a scoreboard to an agent or the env. You are connecting it to an analysis port. If you do not have an env you can implement an analysis port in your agent and connect it to the scorboard export.