Forum Discussion
Altera_Forum
Honored Contributor
13 years agoCustom instruction to access SDRAM
Hi,
I'm inexperienced with FPGA's. I want to implement a custom instruction, which calculates an SDRAM address and writes something into. I use NIOS II e and SDRAM controller IP. My questions are: 1. Is that possible? (I guess it is, but would be nice to hear a confirm from someone else ;)) 2. Whereto do I provide my result? To the SDRAM controller or the SDRAM itself? 3. Not sure it is conflict-free with data master Maybe someone have literature, i already read the altera custom instruction user guide and found nothing similar in this forum yet. Sorry, this questions may be stupid, but as i sad, I'm totaly beginner. Regards.4 Replies
- Altera_Forum
Honored Contributor
I believe what you would like to do can be accomplished with a single new IP component which has two interfaces:
- A custom instruction slave connected to the NIOS
- An Avalon-MM Master connected to the SDRAM controller (or, any bridge you have in front of the SDRAM controller)
- Altera_Forum
Honored Contributor
It may sound like a stupid question but why don't you want to use regular instructions to write to the memory? The CPU already has instructions to load and store values to/from the data memory.
- Altera_Forum
Honored Contributor
I just trying out some things to get started. It maybe has totaly no sense but i want to figure out how things work.
Thanks for replys. - Altera_Forum
Honored Contributor
I would start with a single cycle combinatorial custom instruction, maybe just add or byte reverse.
If you find your instruction on the RTL viewer you'll get a good idea of how it all works.