Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- Hi, I added on chip memory and intialized with hex file.In hex file I have intialized some 250 values. I want to read these 250 values through niosII. I am attaching my main entity vhdl file . I kindly request you to check and correct it. I am not getting where is the problem...pls help me.. --- Quote End --- Hi Soloni, Adding on-chip memory in SOPC doesn't have to be this complicated. Just follow the procedure that I posted earlier and it will work. After you instantiate the on-chip memory in SOPC Builder you can select it as the memory for the Reset Vector and Exception Vector in the Nios II Processor configuration dialog box. Nios II needs to have some memory for this and on-chip works well. If you have already instantiated a Nios II processor in your SOPC design, double-click on the Nios II entry to call up the configuration dialog box. Also, I noticed in your VHDL code for the memory component that you increment the address each time the memory is written to. This is fine for a FIFO-style memory, but it is not really RAM (Random Access Memory). For true RAM the processor needs to be able to access any address in any order and it will handle the address increment. If the memory component increments the address itself there may be a conflict with the Nios II address lines. Anyway, I think I would discard the VHDL approach and just use the on-chip memory component within SOPC Builder. Much simpler, but I'm not sure about pre-loading it with data. For that you may need a simple software solution. Perhaps Daixiwen can comment on this.