- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I am doing Nios II simulation on ModselSim. I found strange behavior of simulator. Some time, Instruction master address only up count from 0 after reset release. Addres does not run on program area. However, once simulate original hello_world program (original template), behavior of address become normal. After simulation of original hello_world program, my own program can run with propriety. Does somebody know what's happening? My environment are following. Quartus II v11.0 ModelSim v6,6b Thank you.Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is your CPU reset vector set to an address in program area? In theory, after reset the CPU should jump to the defined reset vector and execute code from there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daixiwen,
I appreciate your reply and pointing out. I understand that reset vector must be adjusted by relationship between SOPC builder and Nios EDS automatically. I s there any potential to break this coordination? After my post I found some deference in .objdump file between good case and bad case. In good case, there is following part in the .objdump file. 00002000 is the my reset vector address. ========= 00002000 <__reset>: * Jump to the _start entry point in the .text section if reset code * is allowed or if optimizing for RTL simulation. */ # if defined(ALT_ALLOW_CODE_AT_RESET) || defined(ALT_SIM_OPTIMIZE) /* Jump to the _start entry point in the .text section. */ movhi r1, %hi(_start) 2000: 00400034 movhi at,0 ori r1, r1, %lo(_start) 2004: 08480814 ori at,at,8224 jmp r1 2008: 0800683a jmp at 0000200c <_exit>: ... =============== In bad case, there is not above part. Is it any hint? Tank you.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes it is automatic. When you generate your system in SOPC builder, it creates or updates the .sopcinfo file that describes the vectors. Then Nios EDS uses that file to make the link script with all the memory sections.
You should try and find out why you don't have the code at the reset address. It could be an option somewhere in the bsp settings.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Daixiwen,
Thank you very much for your suggestion for BSP setting. Now I am using BSP setting as default. In BSP setting, items in Linker Script tab seems relate my problem. Actually, Now my problem has disappeared since I built original "Hello_world.c". (I don't understand what affect my problem) So I captured screenshot of Linker Script tab, Memory Usage and memory map as evidence of good condition. Later, when I will meet same problem, I will compare the condition with good condition I captured. Highly appreciate your comment. Toshihito Habuka- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's possible that at one point you compiled the BSP with a wrong .sopcinfo file that indicated another address for the reset exception. But I'm glad your problem disappeared!
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