Beagleboard: How to send / receive data to / from DSP?

I have a beagleboard with TMS320C64x + DSP. I am working on beagleboard image processing. Here's how it will work:

  • ARM reads the image from the file and puts the image in a 2D array.
  • The player sends the matrix to the DSP. DSP receives the matrix.
  • DSP executes the image processing algorithm on the received matrix (the algorithm code uses about 5 MB of dynamically allocated memory).
  • DSP sends the processed image (matrix) to ARM. The shoulder receives the matrix.
  • The hand saves the processed image to a file.

I already wrote the code for steps 1,3,5. What is the easiest way to do steps 3 + 4 (sending data)? Code examples are welcome.

+6
arm image-processing signal-processing sendmessage beagleboard
source share
2 answers

The easiest way is to use shared memory:

Use the CMEM kernel module to allocate a piece of memory in ARM that can be accessed from ARM and DSP. Then pass the pointer down to the DSP using the DspBios NOTIFY component.

Once the DSP is done with processing, you can notify ARM via NOTIFY.

Thus, there is no need to copy data from ARM to DSP or vice versa. All you have to do is that the data comes from the CMEM component. This ensures that the memory is contiguous (DSP does not know about the ARM memory manager).

+3
source share

Shared memory is the right approach, but learning how to do it can be a pain. The C6Run tool can abstract ARM / DSP communications for simplicity. Although NOTIFY is indeed the right API to use, C6Run uses CMEM using the older API.

If you want to try C6Run on BeagleBoard, the easiest way is to follow the instructions on the eLinux wiki to configure C6Run for the ECE597 course by Mark Yoder at Rose-Hulman . These instructions depend on the launch of the Angstrom demo image (2). The stable version, which was used to demonstrate the functionality of the hardware (3), was also confirmed.

(2): www.angstrom-distribution.org/demo/beagleboard (3): code.google.com/p/beagleboard/wiki/BeagleBoardDiagnosticsNext

+2
source share

All Articles