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 agoI assumed your ALT_CI_MYMACRO parameters were pointers and this was wrong.
From your last post I understand it needs 32bit values. Then change the code this way:
alt_u8 small_1= {1,2,3,4};
alt_u8 small_2= {5,6,7,8};
alt_u32 custom_int_res = 0;
custom_int_res = ALT_CI_MYMACRO( *((alt_u32 *)small_1), *((alt_u32 *)small_2) ); The (alt_u32*) forces compiler to interpret small_1 as a pointer to a alt_u32 value instead of the alt_u8 you defined. Then the * references to the pointed value (which is now seen as u32) Regards Cris