Altera_Forum
Honored Contributor
11 years agoIORD and IOWR issues
Hello there,
I am struggling to understand a simple write and read with the nios processor. With qsys, I have setup a simple testcase where a nios (e) with no cache and a PIO are connected. PIO is connected to the external LEDs. With the DE0NAN0 board, I can easily see the LEDs to change to what value I have put on the eclipse program. e.g IOWR(PIO_BASE,0,0xA); Then, I manually changed the qsys generated pio.led such that data_out <= {writedata[5:0],1'b1}; instead of the original data_out <= writedata[5:0]; and ensured that the qsys does not generate the nios and pio again during the compilation. Afterwards, with eclipse program, I do a IOWR(PIO_BASE,0,0xA); printf("%X ",IORD(PIO_BASE,0)); I was expecting that "10101" in binary from a IOWR of 0xA. However, it reads "0xA". Can anyone please shed some light what I am doing wrong here ?