Altera_Forum
Honored Contributor
13 years agoAvalon MM Slave Query
Hey Everyone,
For a university project I'm trying to implement a custom hardware block to help accelerate the calculation of the determinant of a matrix. We're using Quartus V12, and a TerASIC DE0 board We've implemented this Avalon Memory Mapped Slave (google "avalon slave interface block" I'm not allowed to post links yet") into our NIOS block in Qsys with only 10 registers, due to 16 giving us naming convention errors, but have solved by editing the tcl file. We have the 10 registers enabled for write/read and have connected register 0-in to register 0 out just to test writing and reading to the registers. We are testing it by writing to the register 0 and then reading it again. We can get it to work if we offset the base address to the memory map by 52? but read from the base address. for(i=0; i<3; i++){ IOWR_32DIRECT(SLAVE_MM_BASE+52, 0, number[i]); wait_time = IORD_32DIRECT(SLAVE_MM_BASE, 0); printf("%x \n",wait_time); } Does anyone know of a reason for this, its not a huge problem if not as we can get by just offseting by 52, but it would be nice to know the reason why, the number doesn't seem very logical IMO. if its to do with the registers from the custom logic being at the base address why isn't the offset 40? (4 bytes per word x 10 words) If anyone also has a suggestion for using a different method for memory mapping to custom logic I would appreciate any input. Many Regards Tom