- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to run a really simple Nios-II application using the ISS. After starting execution, the application does not even reach main(), however. Instead it decides to crash within the system initialization routines, specifically, in a strcmp() call. The ISS reports: 'cpu::nios2ModelRun: ERROR: [439] instruction fetch access to address 0x1af8 returned uninitialized memory (valid mask=0x0)', ...and that is the end of the show. The C-statement causing the error is: strcmp("hoi","la"); /* yes, I lacked inspiration in coming up with better string names */ And the assembly statement within strcmp() causing the error when single stepping over it is: 0x00001af8 <strcmp>: ldb r6,0(r4) Now, the value of register r4 right before entering the offending assembly line is r4 = 0x402c. So the Nios-II is reading a byte from location 0x402c in memory. At this specific location is the value: format: (address) (hex contents) (ascii contents) 0x0000402c 68 6f 69 00 hoi. One would say that reading this memory location would be perfectly legal... I wonder if it has to do with the remark 'valid mask=0x0' in the error message. Anyone, any idea ? Bye, Roland Vossen. ------ info about my Nios-II system --- Altera Nios II ISS Software Simulation Environment Version 2.0 Copyright © 2003 Altera Corporation Info : Successfully read SOPC Builder PTF file 'D:\altera\roland_designs\first_nios\rollator.ptf' Info : The SOPC Builder system contains the following modules: Info : Bus module 'cpu_instruction_master_bus' - avalon.dll Info : Bus module 'cpu_data_master_bus' - avalon.dll Info : Master module 'cpu' - altera_nios2.dll Info : Slave module 'timer' - altera_avalon_timer.dll Info : Address span: 0x8800-0x881F (cpu_data_master_bus) Warning : SOPC Builder system component pio_led is not supported by the simulator. Simulation may be incorrect if your software attempts to access it Info : Slave module 'pio_led' - altera_avalon_pio.dll Info : Address span: 0x8840-0x884F (cpu_data_master_bus) Info : Slave module 'onchip_ram' - altera_memory.dll Info : Address span: 0x4000-0x7FFF (cpu_instruction_master_bus) Info : Address span: 0x4000-0x7FFF (cpu_data_master_bus) Info : Slave module 'onchip_rom' - altera_memory.dll Info : Address span: 0x0000-0x3FFF (cpu_instruction_master_bus) Info : Address span: 0x0000-0x3FFF (cpu_data_master_bus) Info : Slave module 'uart_0' - altera_avalon_uart.dll Info : Address span: 0x8820-0x883F (cpu_data_master_bus) Info : The debugger will be attached to processor cpu on port 2342 Info : Configuring 'rollator' model Info : PTF Setting uart_0/SYSTEM_BUILDER_INFO/Iss_Launch_Telnet="0" detected Info : 'uart_0' character stream will be displayed in this window Info : The host communication device for stdin is uart_0 Info : The host communication device for stdout is uart_0 Info : The host communication device for stderr is uart_0 Info : Running 'rollator' model Error! : Failed memory access in component cpu - Reading data 0x12f1d0 from uninitialised memory (addr = 0x1af8) Info : Component cpu's program has terminated Info : Instructions executed = 439 Info : cpu simulation return code 1 Info : Exiting rollator model with return code 1 (0 fatal errors, 1 error, 1 warning) cpu::nios2ModelRun: ERROR: [439] instruction fetch access to address 0x1af8 returned uninitialized memory (valid mask=0x0)Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Roland,
The error message is complaining about the instruction fetch. <div class='quotetop'>QUOTE </div> --- Quote Start --- ERROR: [439] instruction fetch access to address 0x1af8 returned uninitialized memory[/b] --- Quote End --- It sounds like the simulator's memory at 0x1af8 hasn't been initialized. The simulator realizes this when it fetches an instruction from that address. <div class='quotetop'>QUOTE </div> --- Quote Start --- I wonder if it has to do with the remark 'valid mask=0x0' in the error message.[/b] --- Quote End --- I think that the value mask records which bytes of the memory have been initialized. 0x0 means an entirely uninitialized word. Kerry- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Update: this problem was solved by upgrading from Nios-II V2.0 to Nios-II V2.1. Issue closed. Bye, Roland.
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