Skip to Main Content Skip to Search
Product Documentation

C6000 EDMA - Configure EDMA Controller on C6000 processor

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C6000/ Scheduling

Description

Use this block to configure the Enhanced Direct Memory Access (EDMA) Controller on C6000 processors. The controller manages data transfers between the device peripherals on the C6000 processors and the level two (L2) cache/memory controller. Data transfers handled by the controller include:

EDMA controller handles transfers without involving the processor and can process transfers between any addressable memory spaces, including internal and external memory.

For details about the EDMA controller, refer to TMS320C6000 DSP Enhanced Direct Memory Access (EDMA) Controller Reference Guide, SPRU234, from the Texas Instruments Web site.

EDMA blocks provide two operating modes—open an EDMA channel and allocate a table in EDMA parameter RAM (PaRAM).

The open channel mode opens an EDMA channel for the controller. When you open a channel, EDMA sets the transfer parameters for the channel and writes those to a table as PaRAM entries.

In allocate table mode, the block sets the EDMA transfer parameters and places them in a table in EDMA PaRAM without opening a channel. With this mode, you can use EDMA channels and transfers to develop complex memory structures like sorting, or circular buffers. The allocate table operating mode lets you link multiple EDMA blocks on one EDMA channel. One EDMA block opens an EDMA channel and succeeding blocks link to the open channel and originating EDMA block by the device handle setting.

Use the following procedure to link EDMA blocks in a model:

  1. Add an EDMA block to your model, open the block dialog box, and set Setup type to Open channel.

  2. Assign an EDMA channel to use in EDMA channel (-1 for auto-allocate) by entering a channel number or entering -1 to let the block choose the channel.

  3. In Device handle, provide a name for this EDMA block. The name you enter becomes the block identifier for other blocks to link to this block. Use any valid C variable string.

  4. Close the block dialog box.

  5. Add a second EDMA block to your model, and open the block dialog box to set the block parameters.

  6. Select Allocate table from the Setup type list.

  7. Select the Link to event check box.

  8. Enter the device handle from the earlier block to link to in Linked event handle in this block. The two blocks are linked together through the device handle and they use the same channel.

  9. Close the block dialog box.

  10. To link more EDMA blocks to this channel, repeat steps 5 through 9 for each new block, entering the same device handle.

For a demonstration of using and linking EDMA blocks, refer to the demo Custom Device Driver via Legacy Code Integration in the Embedded Coder demos in the online help system.

Dialog Box

The preceding dialog box shown presents all of the parameters available. In some cases, parameters are available only when you select other parameters. The following list of block parameters describes all of the available parameters for the block and when one parameter enables another.

Setup type

Choose either Open channel or Allocate table from the list. If this is the only EDMA block in your model, choose Open channel. If your model includes multiple EDMA blocks, choose Open channel when each block should use a different channel. Select Allocate table for any block that you plan to link to another EDMA block.

EDMA channel (-1 for auto-allocate)

Enter an integer from 0 to 63 to specify the EDMA channel to use. If you enter -1, the block assigns the channel automatically from the available channels.

Device handle

Provide a name for this block. The name you enter must be a valid C variable. The EDMA controller uses the name as the identifier for this block and open channel. Other EDMA blocks in your model can link to this block and channel by using the device handle you enter.

Element count

Specifies the number of elements in a frame. The value 65355 is the maximum number of elements allowed in one frame. The value defaults to 64 elements.

Element size

EDMA supports 32-bit words, 16-bit half words, and 8-bit bytes. Select one of the list entries according to your needs.

Transfer source

Enter the address of the elements to transfer. Specify the address as a hexadecimal value as shown by the default address 0x.00000000

Transfer source address update

Select whether to enable transfer source update on the EDMA controller. When you select an option from the list, the controller updates the transfer source address according to your choice. Choose one of the list entries shown in the following table.

OptionEffect on Transfer Source AddressCondition Indicated
NoneDoes not change address after submitting the transfer request.Indicates that all of the elements to transfer are located at the same address in memory.
IncrementIncreases the transfer address by the value in Element count after submitting the transfer request.Indicates that the elements are contiguous, with each subsequent element located at a higher address than the previous element.
DecrementDecreases the transfer address by the value in Element count after submitting the transfer request.Indicates that the elements are contiguous, with each subsequent element located at a lower address than the previous element.

Transfer destination

Enter the destination memory address for the data transfer. Specify the address as a hexadecimal value as shown by the default address 0x.00000000

Transfer destination address update

Select whether to enable transfer destination update on the EDMA controller. When you select an option from the list, the controller updates the transfer destination address according to your choice. Choose one of the list entries shown in the following table.

OptionEffect on Transfer Destination AddressCondition Indicated
NoneDoes not change address after submitting the transfer request.Indicates that all of the elements to transfer are located at the same address in memory.
IncrementIncreases the transfer address by the value in Element count after submitting the transfer request.Indicates that the elements are contiguous, with each subsequent element located at a higher address than the previous element.
DecrementDecreases the transfer address by the value in Element count after submitting the transfer request.Indicates that the elements are contiguous, with each subsequent element located at a lower address than the previous element.

Link to event

You can link EDMA transfers together to create more complicated memory applications such as buffers and sorting routines. When you select Link to event to enable linking, the EDMA controller link feature reloads the current transfer parameters from PaRAM when the previous transfer is complete.

Linked event handle

To link to another EDMA block to create more complex memory applications, enter the device handle from the EDMA block to link to in Linked event handle. This entry is an alphanumeric string and the EDMA controller interprets your entry as a string.

Raise interrupt

Select this check box to direct the EDMA controller to raise an interrupt when the transfer request completes. When you select this parameter, you enable the Transfer complete code (-1 for auto-allocate) option. Clearing Raise interrupt stops the controller from raising the interrupt on TR completion.

Transfer complete code (-1 for auto-allocate)

The transfer code Indicates when the controller has submitted a required number of transfer requests (TR). Provide an integer from 0 and 62. On C67x processors, the code must be from 0 to 15. The default value of -1 lets the controller assign the transfer code for this channel.

When you enable this option, the EDMA controller submits the transfer request with a request that the controller signal completion of the transfer with this code. When the transfer is completed, the transfer controller returns the specified code to the EDMA controller.

After the EDMA controller receives the transfer complete code in response to the TR, the controller uses the code to trigger another TR or to raise an interrupt to the processor when you select Raise interrupt.

References

For details about the EDMA controller, refer to TMS320C6000 DSP Enhanced Direct Memory Access (EDMA) Controller Reference Guide, SPRU234, available from the Texas Instruments Web site.

For an introduction to the EDMA controller, refer to TMS320C6000 Peripherals Reference Guide, SPRU190, which provides an overview of the controller, available from the Texas Instruments Web site.

See Also

Memory Allocate, Memory Copy

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS