How to connect to seq_item_port of driver?

Hi there,

I have a simple driver which I don’t want to connect to a sequencer. Instead I’d like to be able to manually generate transactions from a higher level of hierarchy and pass them to the seq_item_port.

Is this possible and how should I do it? Or is the seq_item_port only for use with a sequencer and I should really be using a standard port/export pair?

Shareef.

Hi Shareef,

If you reallywant to do this, it is possible to create a component that has an export that matches the export in an ovm_sequencer - an instance of ovm_seq_item_pull_imp. For this to work correctly, you would need to define every sqr_if_base method that could be called by the driver using its seq_item_port, e.g.

class my_trans_generator #(type REQ = ovm_sequence_item, type RSP = REQ)
extends ovm_component;

typedef my_trans_generator #(REQ,RSP) this_gen_type;

ovm_seq_item_pull_imp #(REQ,RSP,this_gen_type) seq_item_export;

function new(string name, ovm_component parent);
  super.new(name,parent);
  seq_item_export = new("seq_item_export",this);
  ...
endfunction: new

...
//interface task and function definitions
task get_next_item(output RSP t);
...
endtask

task try_next_item(output RSP t);
...
endtask

//etc

endclass

It is probably mucheasier to create a transaction generator + driver that make use of the standard TLM ports/exports since these do not require you to define a set of interface methods that you are not likely to need in your driver.

Regards,
Dave

Thanks for that Dave. From the wording in the OVM user guide I thought it was meant to be easy.

I’ll take your advice and use the std ports.