I would like to write a sequence item that is parameterized automatically according to the version of the DUT that the user puts in the test bench. iv’e tried-
Two problems with your approach: parameters can’t be assigned with hierarchical references to other parameters, and you can’t have hierarchical references to anything within a package (assuming your class is defined inside a package).
Something in your compilation script had to choose between the testbench that instantiates DUT_V1 or DUT_V2. That same script could choose between two packages that define global parameters for your verification environment. i.e.