Constraint for address to be inside 4k boundary

How about something along the lines of:

rand bit [17:0] mtestAddr;
rand bit [17:0] mtestEndAddr;

// I'm not sure exactly the formula to calculate ending address of the burst, but that shouldn't be too hard to figure out with the AXI spec, I'll just guess:
constraint end_addr { mtestEndAddr == mtestADDR + 2^Awsize * Awlen -1; }

// Then the constraint will just make sure that starting and ending address of the burst have bits [17:12] equal which means they are both inside the 4K boundary
constraint addr_in_4k { (mtestADDR[17:12] == mtestEndAddr[17:12];}