I have tried to run the C test case in gcc compiler. In this test case the loop condition is not working. The c code is below.
The C code is compiled output hex file is connect to the UVM testbench.
int main() {
unsigned int volatile *ptr,rdata;
unsigned int i=0;
for( i = 0; i <= 31; i++)
{
//this loop execute only once not perform 32 times
ptr = (unsigned int*) (SPI_BASE_ADDRESS + 0x24u);
rdata = *ptr;
}