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.

c66x PCIe Communication - Running through emulator?

Other Parts Discussed in Thread: TMDXEVMPCI

I wanted to start out by saying that this forum is incredibly helpful and I've been a consumer for a while just trying to feed on the wealth of information and learn from everyone's great work.I hadn't had a need to comment before now because it looks like others have treaded the path for me.

Similar to many others on this forum, my application requires booting up the TMDXEVM6678LE through the TMDXEVMPCI card. The card is used for some data processing and we are using the PCIe interface to transfer data to and from the card using a Linux PC.

Just to summarize the steps I've taken to get where I am now:

1) I compiled, configured and loaded the latest IBL (mcsdk 2_00_08_20) using the information in the ibl doc directory. (I have the v1.0 Silicon so I believe this is a requirement for my application.)

2) I compiled the pciedemo kernel driver on my linux system and installed the kernel. I now load the driver at boot time using modprobe in a pciedemo.modules script.

3) I am able to run the out-of-the box demo applications by changing the appropriate flags and I see the appropriate output at my serial terminal for the hello world demo, etc.

4) I've created a simple test program on my linux system to write a text string to LL2 memory along with a trigger word. I created a new DSP program to look for the trigger and print the text string to the UART to ensure communication. I modified the elf2HBin example *.bat file to transform my compiled program to a header. I then transferred this header to my Linux system, modified the pciedemo.c to use my header instead and was able to compile and run my code as intended.

This is great, since I now know I can fulfill my comm goals with the DSP for my specific application. My concern, is that I don't fully understand how I can test/debug and develop my program with this setup.

It seems that I can only enumerate the PCIe bus when running with the ROM PCIe Boot mode and loading my program through my Linux driver. Any attempts to connect and load a program (even to a specific memory location as the Linux driver does) are met with requests to reset the board or other errors related to initialization. If I actually go through with a reset, I lose communcation ability between the Linux PC and the DSP. (As I would expect.)

Is it possible to load my program via the emulator and still have PCIe communication to my Linux PC? This would be much better for debugging during our development. Additionally, it avoids having to run the painful conversion step and driver recompile just to change our program for testing.

Thank you very much for the support.

  • Keith,

    We tried the following steps to load the program via JTAG/emulator while keep the PCIe link up with the Llinux host.

    1. Put 6678 card switch pins in PCIE boot mode and assembled in the adaptor card
    2. Insert card in a Linux PC and turn the power on, make sure card is enumerated (e.g., check with “lspci” from Linux machine)
    3. Connect the core 0 of DSP via an emulator (the one we used is Blackhawk USB560-M JTAG), so core 0 halted. The PC (program counter) register is at 0x00800758 (local L2, polling MAGIC_ADDRESS) and PCIE link is still up (register 0x21801728, bit 0-4 is 0x11)
    4. In memory window, we try to change DDR3 0x80000000 but it failed since DDR is not initialized yet.
    5. Then use JTAG, we load tools\boot_loader\examples\pcie\pcieboot_ddrinit\evmc6678l\bin\pcieboot_ddrinit_evm6678l.out. we didn’t have any error or requests to reset the board.
    6. Run.
    7. Halt DSP, Now we can change DDR3 0x80000000 contents.
    8. PCIe link is still up (0x21801728).

    It seems no restricts (request of reset or error) of loading program via JTAG in our testing.

    May I ask what exact errors have you seen when load the program please?

    Can you following the steps above and try to load your program successfully please?

  • Thanks Steven!

    Apparently the messages output when I connected confused me into thinking I needed to reset in order to load my program. I'll explain below in case anyone else is having similar confusion.

    1) I launch with my Blackhawk USB560-M JTAG emulator as you stated and I have my GEL file loaded automatically.

    2) I connect to Core 0 and receive the following message:

    DSP core #0

    No initialization performed since bootmode = 0x00000004

    You can manually initialize with GlobalDefaultSetup

    At this point, I thought this was an error telling me that I wouldn't be able to load my program without calling GlobalDefaultSetup or doing some other reset. Any of these options would reset the PCIe configuration and cause me to fail in communication. After your post I realized that this is really just a warning that the board isn't fully initialized. (Which is what I would want.) If I load my code following the steps you specify, I am able to step through and debug just as you indicate.

    (It's semi-unrelated, but I also had the same issue as the following forum post when running with the debugger: http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/182373.aspx After following Rob G.'s resolution, my program stopped hanging on the first UART write. To note again, this only was a problem, seemingly, when I loaded the code and ran through the debugger.)

    Thanks again for the support. I'll mark the answer as verified, but if there's anything else I should do to wrap up this post, please let me know.

    Keith