This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Need help! getting Memory map error

Hi,

    I am working on a edge detection simulation project using C64x device simulator in CCS V3.1. I first wrote the program in C , then in linear assembly and finally for a more hand optimized code I wrote it in assembly language. The program worked fine in both C and linear assembly but in assembly I keep on getting this error, someone help please!!!!

This is the error that occurs every time I run the assembly program:  

Trouble running Target CPU:   Memory Map Error: WRITE access by Default to address 0xff0000, which is RESERVED in Hardware.  

Sometimes when I change  the code by removing certain steps that can be skipped I get the following error,
Trouble running Target CPU:  Memory Map Error: READ access by CPU to address 0x400040, which is RESERVED in Hardware.  

Trouble running Target CPU:   Memory Map Error: READ access by CPU to address 0x400000, which is RESERVED in Hardware.  

I know that that it can be rectified by altering the GEL file by adding a GEL_MapAdd()  function, but I don't know how to do it... can anyone please guide me, I am really struck in that part. 

  • Are you intentionally trying to write to those memory addresses? Check the datasheet and you will see that those addresses are not part of the memory map of the device, so you would not want to read/write to them.

    Jeff

  • First Question, why are you writing in C6000 Assembly?  I understand that you are trying to get more optimized code, but is there a specific benchmark that you are trying to meet that you just can't with the Linear Assembler?  I don't recommend writing C6000 assembly unless you are _very_ familiar with the device architecture.  The device that you are using has an unprotected pipeline, and you need to be cognizant of where in the pipeline each instruction is accessing memory.  I suspect what's happening is that you are writing to a variable in one location (perhaps a pointer) and then reading that value a few instructions later.  What's likely happening is that the read from the 2nd instruction is occurring before the write from the first instruction actually makes it to memory.

    When you use the C compiler or Linear Assembly, you are letting a tool take care of this instruction scheduling for you.  When you used the C compiler, did you turn the optimizer on?  To what level? 

    TI supplies an Image Library that has a Sobel Edge Detection function already implemented in hand coded assembly.  Depending on your application, you might want to use that.  I know we ship one for the 64x+, but I don't think we have one specifically for the 64x.  At the very least, you are aware of these in the future.

    As far as the question about the memory map, you don't need to do it with GEL_MapAdd.   You can change the memory map within CCS by doing (I think, it's been a long time since I used CCS 3.1) Tools->MemoryMap and then adding a section   Note that I don't think this will solve your problem.  The real question is, why, all of a sudden does your application try to access this memory when you write the assembly code yourself?  I would concentrate on figuring that out.  Keep in mind that reordering the instructions will just compound the problem, because you're now changing the experiment by changing the pipeline accesses.

     

    Regards,
    Dan

  • HI jc,

    Thanks for your reply. No I am not trying to write to that address intentionally, I have declared an array of fixed size in my program and at the end of execution I wanted the program to store the calculated results in that array and thats where the error pops up. I understand that the address specified is restricted to hardware usage and I have no idea why the program tries to write the data in that address whereas the starting address of the array is in 0x00000200h and the size of the array specified is around 101376 holding data of type CHAR.

    Narein

  • Hi danr,

    Thanks for your reply. The main reason for me using assembly language is because my task for the project is to make the program as optimized as possible (i.e the one with minimum number of cycles). Right now my program with linear assembly optimization runs for about 1,09,477 cycles and since it is possible for further optimization using assembly language, I wanted to achieve even more reduced cycles. Regarding the software optimization, yes I am using -O3 configuration in build options. Linear assembly does enormous optimization since it reduced the cycles from 400 million to  1,09,477 cycles.  I thought It would be more efficient if I am able to write it hand optimized in assembly. 

    With regards,

    Narein