UVM : reusing AHB driver and sequencer for AXI agent

I have a problem where i have an existing AHB driver and sequencer parametrized with ahb_transaction_item. How can i reuse the existing driver and sequencer with minimal changes. As per my understanding , i will have to update transaction_item parameter and run_phase to issue AXI transaction.

In reply to jyotsna:

Hi jyotsna,

i can not give you ans with out existing AHB code, but if we consider top level change then you have to maintain out-of-order transaction mainly and also use hook that can change addr data as per AXI standers, and you can also use defines to select mode like AXI or AHB , if possible also add hook in driver so you get more flexible control on driver.

In reply to jyotsna:

I have a problem where i have an existing AHB driver and sequencer parametrized with ahb_transaction_item. How can i reuse the existing driver and sequencer with minimal changes. As per my understanding , i will have to update transaction_item parameter and run_phase to issue AXI transaction.

The intention of the UVM is to reuse complete agents and not only sequencer/driver pairs.
Reusing an agent implies also to reuse a potential config object as well as the seq_item and the connection to the virtual interface.
Ther are no adaptions necessary. You can simply make a link to the agent data in the new project to the source code of the original agent data.

In reply to chr_sue:

[quote]In reply to jyotsna:

How can i make agent to take AXI as transaction item instead of AHB? When we add driver and sequencer ,we define them like -
my_driver extends#(ahb_transaction_item)

In reply to jyotsna:

Sorry, this was my fault. I was assuming you menat in both cases AHB and not AXI.
I believe you cannot reuse anything without modification.
The timing of the AXI might be different compared to AHB and of course you need another seq_item.
Also the sequencer has to be parameterized for the axi_seq_item.

In reply to chr_sue:

In reply to jyotsna:
Also the sequencer has to be parameterized for the axi_seq_item.

Thanks but is there a way that i can parametrize driver like this -
my_driver extends uvm_driver#(type T= ahb_item);

and from agent level, i can change type T to make it axi_item?

In reply to jyotsna:

You can do this, but the protocol you have to implement is different and this will not be updated with new seq_item type. The proocol implementation means how you have to drive the pinlevel interface from the driver.
The best, fastest and safest way to get a new UVM environment is to use a UVM Framework Generator like this EasierUVM Generator from Doulos. It is free of charge. Please look here:
https://www.doulos.com/knowhow/sysverilog/uvm/

In reply to jyotsna:

we use two type of logic One is define guard or object and component override.
object override complicated.

In reply to dhaval_sanepara:

In reply to jyotsna:
we use two type of logic One is define guard or object and component override.
object override complicated.

It is useless what you are proposing.
The TL interface is the easy one, but you have to consider also the virtual interface and this is different for AHB and AXI. And the bus timing (protocol) is different. It does not make sense to make an override.