Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21609 Discussions

Nios II IDE memory access error

Altera_Forum
Honored Contributor II
2,359 Views

What would be the first step to debug with this error message? 

/////////////////////////////////////////////////////////////////////////////////// 

Error! : Failed memory access in component cpu - Unable to read data from invali 

d memory address 0x0 

//////////////////////////////////////////////////////////////////////////////////// 

following is all my base address; # define ONCHIP_MEMORY_RAM_BASE 0x00010000# define PIO_OUTPUT_BASE 0x00021010# define PIO_INPUT_BASE 0x00021000# define JTAG_UART_BASE 0x00021020 

 

What would be the first step to start debugging? 

thanks,
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
859 Views

The failed memory access is at address 0x0 

 

According to your architecture, there is no memory, nor device on this address. 

 

Did you point the "Reset Vector" and "Exception Vector" correctly to an address where your code resides?
0 Kudos
Altera_Forum
Honored Contributor II
859 Views

I'm sorry but what do you mean by no memory nor device? 

Isn't onchip memory a memory that can be used to store data? 

I'm a beginner..so please can you give detailed explaination? 

thanks,
0 Kudos
Altera_Forum
Honored Contributor II
859 Views

yes, on chip memory is such a device but it has its base adr at 0x00010000 

it ssems that you have no memory at 0x0 as the first memory starts at 0x00010000
0 Kudos
Altera_Forum
Honored Contributor II
859 Views

meaning, i have no input coming in to store at address 0x00010000? 

what's my option to solve?
0 Kudos
Altera_Forum
Honored Contributor II
859 Views

Hi nowsolo, 

 

 

--- Quote Start ---  

meaning, i have no input coming in to store at address 0x00010000? 

what's my option to solve? 

--- Quote End ---  

 

 

did you specify the "Reset Vector" and "Exception Vector" in SOPC in the on_chip_memory_ram address space? Please check this!
0 Kudos
Altera_Forum
Honored Contributor II
859 Views

as you wrote 

 

# define ONCHIP_MEMORY_RAM_BASE 0x00010000 

your on chip memory starts at 0x00010000 up to ? depending on the size you have entered in sopc builder 

 

# define PIO_OUTPUT_BASE 0x00021010 

# define PIO_INPUT_BASE 0x00021000 

# define JTAG_UART_BASE 0x00021020 

 

just have a look at all these addresses, there is none of them starting at 0x0, so there is no memory you could store data at 0x0 nor there is any input at 0x0 where you can get data from.
0 Kudos
Reply