- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I've been working with the nios/e , and I have a program now working and tested. It uses threads (eCos) and interrupts (three). the fact is that if ONLY change the Nios2/e to Nios/s, thus having instruction cache, it hangs. I've initialized the instruction cache, as it indicates in the SW development guide, and I think I don't have to do anything else, because my program is static, doesn't change. The only thing that I don't control is the fact that the program is kept in flash until it executes, and then it copies itself to RAM. It is done automatically by a self-copier, so I don't know if it's flushing the instruction cache (if it's needed) or what. any idea about what can be happening? I thought the iCACHE shouldn't give so many problems, isn't it? aLeXLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have now realized... the program that inits the iCACHE is the eCos initialization code, which executes AFTER the program has been copied to RAM. So the iCACHE initialization are not the 8 first instruction (as the software guide says).
Also I have remembered that the program that copies the code from ROM to RAM is the one added to my original code that generates automatically the altera_nios2 development kit: "boot_loader_cfi.srec". I use it with "elf2flash" in order to generate my flash file to write to flash. Any other way to do it and ensure that the iCACHE initalization is correct? In the niosI kit, I had the original code of the boot_loader, so I was able to modify it, but now I only have the srec, and can't do it.... Any help would be appreciated. aLeX- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When using a "ROMRAM" configuration, eCos uses the standard Altera bootloader to load code from flash to RAM. The source for this is in the Nios II kit in the directory:
components\altera_nios2\sdk\src\boot_loader_sources- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I've seen, it seems that the boot_loader initalizes the iCACHE, and does all the necessary steps to copy in a correct way the code from flash to RAM, so now I don't know what can be wrong with the iCACHE.
Is there any other SOFTWARE consideration when changing from a nios/e to a nios/s???? My program is now working, but the execution is 210% of the nios/s (in nios/s it works for a few time. Enough to see the speed difference) Any ideas? aLeX
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page