Forum Discussion
Altera_Forum
Honored Contributor
19 years agoIDT SRAM
hello I am working with stratix II EP2S60. I cant find any documents about nios programming for sram (IDT SRAM). for example, how can i write a 32 bit data in known address in nios. thanks
Altera_Forum
Honored Contributor
19 years agoDear,
Writing a 32 bit value can be easily done with a NIOS core. For example: You make use of a SRAM which has a 32bit databus. You can access this 32b bus with your NIOS core for example by use of a 32 bit parallel IO bus (GPIO 32 bit), called SRAM_DATABUS. Writing to this bus, you can easily do with following pointer instruction. The address is defined in your system.h file. volatile unsigned int * data = (unsigned int *) (SRAM_DATABUS_BASE); *data = 0xFFAAFFAA; The same procedure you can use for writting the SRAM CSn, WRn, RDn, .... Of course, take into account timigs (setup time, hold time,...) of you SRAM device. Regards Karel