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.

C6474 SRIO to FPGA under DSP BIOS v6

I've programed the DSP SRIO to be the host and the FPGA to send it's packets to the DSP via MAINT_WR.

I have a "standalone" program that performs MAINT_RD/MAINT_WR/NREAD/NWRITE all successfully.

When I take the identical program and make it a task (the only task running) under DSP BIOS v6 the MAINT_RD fails (the contents of destination address on the DSP are unmodified after a "sucessfull" MAINT_RD with no errors.)

MAINT_WR and NREAD (not sure about NWRITE) work. (so I can program the FPGA, but then can't read the packet size from the FPGA to know how much to read with the NREAD.

My MAINT_WR are 8 bytes, but 4 bytes work too, MAINT_RD produces no data for either 4 or 8 byte reads.

Do I need to disable interrupts around either/both of the CSL_srioLsuSetup() or CSL_srioGetHwStatus() calls?

  • I found one more difference, the stand-alone version ran (completely) in L2 cache (0x10880000) and the DSP BIOS vesion ran out of RAM (0x80000000)

    when I forced the src/dst of the SRIO data xfer into L2 cache it (MAINT_RD) works under DSP BIOS too. Can anyone shed light on that? Is SRIO DMA limited to L2 cache (although the MAINT_WR were successful from RAM)

     

    So now I have a ccsv4/ DSP BIOS v6 question... How do I specify a section into L2 cache? ...

    #pragma DATA_SECTION(mybuf, ".l2ram"); // puts mybuf into a section called ".l2ram"

    but the only way I know to put the section ".l2ram" into the L2RAM address space is via the linker.cmd which is genarated dynamically for DSP BIOS projects

     

  • When you say L2 cache, I assume you actually mean L2 SRAM (i.e part of L2 used as SRAM). As far as I know, SRIO DMA should be able to move data to/from any memory that DSP can address. When you look through CCS memory window and uncheck the L2 and L1 boxes (so that you don't see cached data, you see external memory), do you see the external memory updated after when you think transfer is complete? Also, you can modify the stand-alone version to use external memory and see if it works, to make sure your base is o.k. Note that L1D cache is not coherent with external memory, so you may need write back and invalidate operations in your code if you want to use external memory.

    In CCSv4, you will need to create a platform file through RTSC project to customize memory map. Type "how to create memory map" in CCS help and look at two flash videos, one on RTSC platform wizard and related one of customizing memory sections. Reading up the BIOS 5 to 6 migration guide in the BIOS docs folder would be useful. You will need to spend some time to learn/practice this if you haven't done it before.

     

  • yes I meant L2 SRAM.

    I followed the flash video example to create a memory map, since then my app corrupts itself and crashes. I created a new project and the new one crashes the same way. obviously, I messed something up very badly. I get : "Exception abort! Check Exception Log for details" ... no log to be found, but I have to re-load the app to retry. (.text is trashed)

    the video had me create a new repository, which I created outside the workspace. I've since renamed the directory of the new repository, but still all my (previously working) bios projects trash themselves.

    At a loss...

  • I had a host of problems, and I'm finally mostly working, but I still haven't solved my custom memory map issue...

    for a non-DSP/BIOS project, I can create a link.cmd file that looks like this:

    MEMORY

    {

    L2SPECIAL: o=0x10880000 l=0x001effff

    SDRAM: o=0x80000000 l=0x00800000

    }

    SECTIONS:

    {

     .text > SDRAM

    .data > SDRAM

    .bss > SDRAM

    .myspecial > L2SPECIAL

    }

    and C code that does a:

    #pragma DATA_SECTION(mybuf, ".myspecial");

    struct tag mybuf[NUMBUF];

    but for a RTSC project, I do not know how to accomplish this. Following the flash demo you told me about I can now add the "L2SPECIAL: o=0x10880000 l=0x001effff" line into the MEMORY area, and, via the "#pragma..." I can make my C symbol "mybuf" go into the ".myspecial" section, but I'm still missing how to add the line ".myspecial > L2SPECIAL" into the SECTIONS block.

    TIA

  • It is similar to how it used to be in BIOS 5 with CCS 3.3. Basically in your main project (the one that has your actual code etc i.e the one that refers to the rtsc config project), add a linker command file (Add files to project) which can have the desired placement into the sections that are defined through rtsc config project (xs). Note that you will not redefine the memory sections that you have in the RTSC config project, you would simply use them. You can still define memory (MEMORY {}) in this cmd file as long as it is mutually non-overlapping to the one in config project (in the xs), although generally this is rare practice. It may help to look at what the final link step is on the console (when you build) to see how these things come together to form the final executable and then verify by looking at .map if the placement did occur as desired.

  • dkerns,

    Just out of curiosity, what FPGA are you using and how are you handling the packets inside of it? Is this with the Xilinx provided SRIO IP core or something you developed yourself?