How does sb identify which agent sent the data?

Basic clarification needed please. If I have 2 input agents(i_agt) both sending the same transaction type, only one scoreboard, then when we do this connection in the env file, how does the sb distinguish/identify/record which input_agent sent the data, since we are using the same sb.before_export for all the agents?

 foreach (i_agt[i]) begin
   i_agt[i].analysis_port.connect(sb.before_export);
 end

Thanks

In reply to UVM_beginner:

Hard to answer without knowing what you plan do do with the knowledge that they came from two different agents. You could have two different exports in your scoreboard, or you could have a field in your transaction that indicates where it came from.

Hi Dave,

Assuming there is no field in the transaction as “port_id” to indicate where it came from, then for each “input” agent I can have a dedicated export?

Let us say the design is a router with 16 input and 16 output ports, there are 16 input agents(from input monitor) and 16 output agents(from output monitor), then that would make it 32 exports?

I am not using uvm_in_order comparator.

Thanks

In reply to UVM_beginner:

You might want to create an array of exports and make connections from each agent/monitor to the individual export index.
If you are only giving me little pieces of your problem, it’d going to be hard to help you here on this forum. You may want to reach out to others in your organization for help.

In reply to dave_59:

I apologize Dave. I thought a generic way of framing the question will take less time from your side. Seems like I have defeated the purpose of trying to keep it simple.

The TB is a router with 16 input ports and 16 input agents(monitor, driver, sequencer), one scoreboard and 16 output ports and 16 output agents(with only a monitor inside).

So my original doubt was : how will one SB work across all the input/output ports since multiple streams could come in at the same time and also it is OOO.