Forum Discussion
Altera_Forum
Honored Contributor
15 years agoFull On-Chip Memory
Hi, I'd like to know how to determine if the memory space of an on-chip memory is full. In my nios II system, I generated an on-chip M4K memory. It's size is 4096 bytes with a 32 bits data...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- 4096 bytes is 1024 words of 32 bits. The IORD/IOWR macros read and write 32 bit words only, and it isn't an address that you give them, but a register number. When you do IORD(ONCHIP_MEMORY2_1_BASE, 0x3fe), the actual addresses accessed are the 4 bytes at ONCHIP_MEMORY2_1_BASE+4*0x3fe to ONCHIP_MEMORY2_1_BASE+4*0x3fe+3 (0x00011ff8 - 0x00011ffb). When you do IOWR(ONCHIP_MEMORY2_1_BASE, 0x3fe, "THIS IS TO TEST HOW MUCH DATA CAN A MEMORY SPACE CONTAIN") you don't write the string to the onchip memory, you just write its address, which is a 32-bit word. The size of the string doesn't matter. --- Quote End --- Hi I also have a problem with the on-chip memory in my project. I'm using a Cyclone 3c25 fpga and I once set my on-chip RAM to 60kb and the project did compile without any problem. But now it doesnt and I get error messages such as "error:can't fit RAM cells in design". If I'm correct the limit capacity of the on-chip RAM on this cyclone board is 66kb and it did work once. What could be the issue now? Please help.