Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21615 Discussions

Custom instruction to access SDRAM

Altera_Forum
Honored Contributor II
1,247 Views

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.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
509 Views

I believe what you would like to do can be accomplished with a single new IP component which has two interfaces: 

 

  1. A custom instruction slave connected to the NIOS 

  2. An Avalon-MM Master connected to the SDRAM controller (or, any bridge you have in front of the SDRAM controller) 

 

 

It is not commonly done, but I expect there is nothing preventing you from doing this.
0 Kudos
Altera_Forum
Honored Contributor II
509 Views

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.

0 Kudos
Altera_Forum
Honored Contributor II
509 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
509 Views

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.
0 Kudos
Reply