Altera_Forum
Honored Contributor
16 years agostrange results with IORD IOWR
Hi there,
I've made my custom component with 64bit input vector and 8bit output, successfuly connected to system interconnection fabric. In nios2-ide when I try to send vector to my component using IOWR i get warning:alt_u64 uwektor1=0x17463f8c62ae;
IOWR(SSN_COMPONENT_WE_BASE, 0, uwektor1);I get: --- Quote Start --- warning: integer constant is too large for "long" type --- Quote End --- And then the results read using: result=IORD_8DIRECT( SSN_COMPONENT_WY_BASE, 0 );are strage. Moreover, such a code: IOWR(SSN_COMPONENT_WE_BASE, 0, uwektor1);
result=IORD_8DIRECT( SSN_COMPONENT_WY_BASE, 0 );
printf("0x%X \n",result);
result=IORD_8DIRECT( SSN_COMPONENT_WY_BASE, 0 );
printf("0x%X \n",result);gives me two different results?! --- Quote Start --- 0xFD 0xDD --- Quote End --- (the DD should be correct output) What could cause such a problem? Previously I've made and programmed verion with 16bit input and 8bit output and everything was in order. How should I fix the problem? Thanks in advance for any tips.