Hi All,
I want to design “configurable OVC” with different type of parameters.
Example: I have configure parameters such as DATA_SIZE and ADDR_SIZE and these can vary based on the DUT under test.
One way I could achieve “Configurability” is using templated classes for all environment classes in the OVC in the following way…
class my_driver #(int DATA_SIZE=8, int ADDR_SIZE=16) extends ovm_driver #(my_seq_item #(DATA_SIZE, ADDR_SIZE));
…
endclass
class my_sequencer #(int DATA_SIZE=8, int ADDR_SIZE=16)
extends ovm_sequencer #(my_seq_item #(DATA_SIZE, ADDR_SIZE));
…
endclass
class my_agent #(int DATA_SIZE=8, ADDR_SIZE=16)
extends ovm_agent;
endclass
interface my_if #(int DATA_SIZE = 8, int ADDR_SIZE = 16)
(input bit clk, input bit rst);
endinterface
But issue with the above method is that using of typedef’s with these parameters.
i.e how can I configure/pass the parameter for the data types which are defined in ovc global params file ?
file: my_data_types_params.svh
typedef enum bit[DATA_SIZE - 1: 0] fifo_type; // Since OVC can be made configurable with Templated parameter but how to make these typedef’s with the same parameters?
Are there any better suggestions to make OVC configurable? Is there any other better way of doing configurable OVC?
Thanks
Santosh