Declare a class containing 8-bit address and 8-bit data.
a. Randomize this class object such that
i. Generated data must be between ‘h7F and ‘hFF.
ii. Address generated must be even.
Please declare all the constraint outside of the class declaration.
b. Extend the class object. This extended class will have one additional bit called “ctrl” and of size 2-bit and write constraint such that
i. Value of ctrl remains always 2’b01.
ii. Addr must be odd and remains between ‘h7F and ‘hFF. Data must be between ‘hAF and ‘hFF.
in b i am not getting it is inheritance or for object property in another class