Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Nios II IDE memory access error

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,

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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,
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

    what's my option to solve?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.