constraint addr_wrap4_Halfword{
if((burst_mode == WRAP4) && (trans_size == HALFWORD)){
foreach(address[i]){
if(i != 0){
address[i][2:1] == address[i-1][2:1] + 1;
address[i][31:3] == address[i-1][31:3];
}
}
}
}
constraint addr_wrap4_Word{
if((burst_mode == WRAP4) && (trans_size == WORD)){
foreach(address[i]){
if(i != 0){
address[i][3:2] == address[i-1][3:2] + 1;
address[i][31:4] == address[i-1][31:4];
}
}
}
}
In reply to ankit96:
The first constraint says that all address bits 31-3 have to be the same, but bits 2-1 have to be consecutive. This only works if there are 4 or less addresses.
The second constraint says that all address bits 31-4 have to be the same, but bits 3-2 have to be consecutive. This only works if there are 4 or less addresses