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.

Access to memory in DSP

Hello everyone!

I'm using IPNC RDK ver3.5 for 8127 and I met a problem in dealing with memory.

I need to load a data file(named "model.bin") into the memory,for my dsp alg will use

these datas.

Firstly,I've tried function fread to read these datas in my alg,but it seems not work.

Then,I use the command "tftp 0x8fb00000 model.bin" to load the data into SDRAM ,the

address is calculated ahead of time which locates in DSP data.I think I can access this

memory directly using pointer or whatever,but this time I can't get data either.It really

confuses me.

Has  anyone done the similar thing ? I need some advice!

regards

yu

 

  • You can not access a Linux file from DSP, shared memory access is probably easiest way to do it.

    First reserve a memory segment not used by other functions, say physical addr=0xa0000000, size=1MB.

    Then in Linux part, you can use mmap() to get virtual addr of 0xa0000000, write your model.bin to that area.

    In your DSP program, you can read directly from 0xa0000000. You probably need to write some headers to indicate how big the file is, etc.

  • Thanks for your reply!

    I think I'm using the similar way to yours. When I'm flashing Ubifs file system to NAND,

    also load my data into a specfic physical address 0x8fb00000 by "tftp 0x8fb00000

    model.bin".

    This is the same as mmap(). I'm thinking if i get the data properly(I use a pointer pointing

    to the address and access the data ), or is there any way i can look up the address to

    make sure the data exists. 

    regards

    yu