Forum Discussion
Altera_Forum
Honored Contributor
7 years agoALTACCUMULATE is working fine. Actually it was some timing issue writing to a TRI_STATE_BUS which feeds internal logic. Strangely this behavior occurs for loop lengths of greater than 10.
When I added the nop below everything became alright! psrc = (PUSHORT)(DPR_BASE); pdest = (PUSHORT)(AHDL_IFACE_BASE); for (i=0; i<15; i++) { *pdest++ = *psrc++; asm("nop"); } These pointers are always more elegant than the macros: IOWR_16DIRECT(DPR_BASE, offset, val) IORD_16DIRECT(DPR_BASE, offset) Regards, Ravi