Forum Discussion
Altera_Forum
Honored Contributor
15 years agoIOWR and IORD with PIOs
I have a basic question concerning PIOs. Currently, I am sending 4 8-bit integers over 4 ouput PIOs from NIOS to hardware to do a calculation on them and return another 8-bit integer value. This is a...
Altera_Forum
Honored Contributor
15 years agoIt would be something like this:
IOWR_ALTERA_AVALON_PIO_DATA(DATA_OUT_32_BASE , (val_1<<24) | (val_2<<16) (val_3<<8) | val_4 ); But this is very inefficient! Still better the 4 byte writes. Regarding the hw side, every 8bit component will simply get the 8 bits it needs i.e. (Verilog) assign data_8_in1[7:0] = data_32_in[7:0]; assign data_8_in2[7:0] = data_32_in[15:8]; assign data_8_in3[7:0] = data_32_in[23:16]; assign data_8_in4[7:0] = data_32_in[31:24];