Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- Is your problem that it won't allow you to have one slave at address xxx0 and another at xxx4 ? --- Quote End --- Indeed. --- Quote Start --- FWIW memcpy() isn't defined (or required) to use 32bit accesses, nor to copy the data is any particular order. So you are better coding any transfer loop directly in C. Given the Nios instruction set having different 'strides' for the source and destination will have to effect on the code size. --- Quote End --- You are entirely correct wrt POSIX memcpy(). I have gotten too much used to the default (linear) copy implementation :). --- Quote Start --- Your slave must also look at the byte enable for the low 8 bits, you shouldn't assume it is set. --- Quote End --- I do require that the register is always accessed as a 32-bit DWORD (alt_u32). Doesn't that guarantee correctness ? --- Quote Start --- I'd also consider using a single Avalon slave and muxing your 32 devices below it. It might save logic (since the optimiser might effect that anyway). --- Quote End --- That's a good idea, but it somewhat defeats the purpose of the automatic fabric generation by SOPC Builder / Qsys, does it not ? Still, thanks for the useful comments and suggestions.