A colleague and I were discussing an interview question .
class Base ;
rand bit [ 7:0] b ;
constraint VAL { b < 10 ; }
endclass
class Ext extends Base ;
....................
endclass
If the base class is treated as a black box where even the constraint isn’t visible .
Is there a way to constraint it the opposite way from extended class ( i.e b > 10 ) from extended class ?