I want to define two address regions such that they are non overlapping.
class constraint_eg;
rand bit [1:0] enable;
rand bit[1:0] [4:0] start_address;
rand bit [1:0] [4:0] end_address;
constraint adress{
foreach(enable[ii])
end_address[ii]>start_address[ii];
};
endclass
The above code doesnot gurantee the non overlapping of the two address region defined, how can I modify my constraint so that it meets the below requirement::
end_address[ii]>start_address[ii];
and
start_address[ii+1]> end_address[ii]