Jump to content

Sending transactions over processor bus...


wpiman

Recommended Posts

So I have a standard testbench with a packet "fast path" and a processor "slow path". Basically, the processor agent will get a test_configuration sequence started on its sequencer during the UVM configure_phase. The packet agent will then get a data sequence started on its sequencer during the main_phase, and then the processor agent has a check_results sequence started during a later taskable phase. So far so good.

We are now trying to inject "packets" into the data stream from the processor path during this "main phase". I am a little baffled over the best way to handle this and stay inside the UVM framework.

I can create a processor sequence which creates my packet sequence items (randomly. Packet transactions are in the processor sequence-- ie. composition), and then use the processor commands to inject into the packed packet into the data stream. This works well.

The problem I am running into is how do I get those randomly generated packets from my processor sequence over to the scoreboard. My scoreboard is receiving the "actual" data just fine from the packet monitors on an analysis port, now I just need to get this randomly generated data contained in my processor sequence into the "expected" analysis port.

The sequence is created in the main phase and then started on the processor sequencer then-- so it doesn't exist at the beginning of time-- so I cannot use connect on any analysis ports within the sequence itself (if that is even possible). I tried using an m_sequencer call to write to a uvm_analysis_port there that I could connect-- and that compiles but when I run; at time zero it tells me that it cannot find the analysis port...

in sequencer....

uvm_analysis_port #(phyLayerControlInfo) messagePort; // declaration

under build_phase-- after super.build

message_port = new("message_port", this);

Within the sequence task body...

m_sequencer.message_port.write(messageToSend);

Error:

No field named "message_port"

Am I approaching this the correct way? This has to be common-- how are others doing this?

Link to comment
Share on other sites

Hello,

You said you aren't having trouble collecting packets on the bus so I assume the actual and expected are two different interfaces? Is a reason that you don't want to use a monitor to collect the generated packets too?

You should use p_sequencer instead of m_sequencer. I think m_sequencer is supposed to be protected??? Anyway...

Are you connecting the analysis port in your env or your testbench?

agent.sequencer.messagePort.connect(scoreboard.expected_data_export);

Kathleen

Link to comment
Share on other sites

I do use the monitor to generate the "expected packets" on the incoming packet bus and well as the "actual packets" on the outgoing packet bus. What I am trying to do is determine if the processor bus injected a packet into the fast path.

I suppose I could monitor the processor write and read transactions to determine that. I had not thought of that. It adds another layer of complexity-- ie. I'd have to monitor the processor read/write cycles and generate packets on an analysis port.

Link to comment
Share on other sites

Hello,

You said you aren't having trouble collecting packets on the bus so I assume the actual and expected are two different interfaces? Is a reason that you don't want to use a monitor to collect the generated packets too?

You should use p_sequencer instead of m_sequencer. I think m_sequencer is supposed to be protected??? Anyway...

Are you connecting the analysis port in your env or your testbench?

agent.sequencer.messagePort.connect(scoreboard.expected_data_export);

Kathleen

continued: I would connect the analysis port up if I could access the messagePort. I have not got that far yet.

I used the p_sequencer port on the sequencer by using the uvm_declare_p_sequencer macro and I am getting past the error message. I am still not convinced I am approaching this in the ideal way.

Edit: this is all working very well now. Thanks.

Edited by wpiman
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...