A Tutorial: Linux Cell SPU

A Tutorial: Linux Cell SPU thumbnail
The Cell SPU combines a general purpose CPU with a digital signal processor.

The Cell Broadband Processor is composed of multiple Synergistic Processing Units, or SPU’s. Each SPU has a dedicated memory and processor. The Linux kernel can run on the Cell Broadband Processor’s Power PC Processing Element, or PPE, and each SPU can be accessed through a virtual file system called spufs. Every directory under this file system can be treated like a physical SPU, and each file inside these directories represent a different hardware resource. There are several key files, or hardware resources, that you must know about to begin working with the spufs file system.

Things You'll Need

  • Linux installed on either a computer with Cell Broadband Processor or a PlayStation 3
Show More

Instructions

    • 1

      Create a new SPU context using the “mkdir” command. An SPU context is a directory that represents a physical SPU. To create a new context, you must use the “mkdir” command and choose an unused name for the context. Once the “mkdir” command is processed, a directory is created and populated with files, each of which represents a different hardware resource. The following is an example of how to use the “mkdir” command to create an SPU context:

      mkdir /spu/myspu-00000

    • 2

      List the files inside the context by using the “ls” command. Type in “ls” to list all of these files. To list all of the file resources for all SPU contexts, you can enter the following command:

      ls –lR /spu/

    • 3

      Examine the output from the “ls” command. The output lists several different files and specific data, such as their creation date and size. Each file represents a specific hardware resource. The file “mem” is the local memory for the context. This file can be opened by processes and loaded into its address space, giving it access to the memory of the SPU. The “run” file can be used to launch the instructions inside the SPU. The two files, “ibox” and “mbox," are used to read data written to the SPU mailbox, which is a feature that allows the PPE to communicate with an SPU. The “wbox” file allows data to be read from the mailbox.

Related Searches:

References

Resources

  • Photo Credit Thinkstock Images/Comstock/Getty Images

Comments

Related Ads

Featured