Altera_Forum
Honored Contributor
14 years agoStrange problem with IORD_16DIRECT
Hi,
I have a 16-bit pio (input) in my sopc and I want to access the data through IORD_16DIRECT. The data shown on the port is 0x00, 0x01, 0x02....0xff (verified through signaltap). However, the received data after IORD_16DIRECT is 0x01, 0x03, 0x05.... Please give me some help on that!! Below is my code: alt_u16 data_temp; for(j=0;j<1400;j++){ data_temp = IORD_16DIRECT(PIO_DATA_BASE, 0); if(data_temp&0x100==0x100){ data_t[j] = data_temp; } else j--; }