Hi All,
I would like to request for your help in getting best implementation method for RTL top Parameter change, based on different testcase.
Let me give you a some background.
I have a DUT which has top level Parameters/Generics. I have built an UVM based testbench for this DUT, using the example code “Parameterised Virtual Interface” from the below link.
https://verificationacademy.com/cookbook/code-examples
So based on this code, I have a class inside tb_params_pkg.sv file where the parameter values are defined.
like this:
class SFR;
localparam sfr_addr_width = 16;
localparam sfr_data_width = 32;
endclass
In my hdl_top file I use this class value to configure my agent and DUT parameters
Like this:
sfr_master_bfm #(.ADDR_WIDTH(SFR::sfr_addr_width),
.DATA_WIDTH(SFR::sfr_data_width)) SFR_MASTER(.clk(clk),
.reset(reset),
.address(address),
.write_data(write_data),
.read_data(read_data),
.re(re),
.we(we));
sfr_dut #(.ADDR_WIDTH(SFR::sfr_addr_width),
.DATA_WIDTH(SFR::sfr_data_width))
dut (.clk(clk),
.reset(reset),
.address(address),
.write_data(write_data),
.we(we),
.re(re),
.read_data(read_data));
These Parameter Values may change depending on different test scenarios.
So i want to create different test cases which will have different values for these parameters.
I would like to know what would be the best way to implement this requirement.
Any help would be appreciated.
Thanks.