- Control Law Accelerator (CLA)
- CLA Memory and Register Access
- CLA Tasks
- CLA Registers
- CLA Initialization
- CLA Task Programming
- CLA C Language Implementation and Restrictions
- CLA Assembly Language Implementation
- CLA Code Debugging
The CLA is an independent, fully programmable, 32-bit floating-point math processor. It executes algorithms independently and in parallel with the CPU. This extends the capabilities of the C28x CPU by adding parallel processing. The CLA has direct access to the ADC result registers. Additionally, the CLA has access to all ePWM, high-resolution PWM, eCAP, eQEP, CMPSS, DAC, SDFM, SPI, McBSP, uPP and GPIO data registers. This allows the CLA to read ADC samples just-intime and significantly reduces the ADC sample to output delay enabling faster system response and higher frequency operation. The CLA responds to peripheral interrupts independently of the CPU. Utilizing the CLA for time-critical tasks frees up the CPU to perform other system, diagnostics, and communication functions concurrently.


The CLA has access to the LSx RAM blocks and each memory block can be configured to be either dedicated to the CPU or shared between the CPU and CLA. After reset the memory block is mapped to the CPU, where it can be initialized by the CPU before being shared with the CLA. Once it is shared between the CPU and CLA it then can be configured to be either program memory or data memory. When configured as program memory it contains the CLA program code, and when configured as data memory it contains the variable and coefficients that are used by the CLA program code. Additionally, dedicated message RAMs are used to pass data between the CPU and CLA, and CLA and CPU.

Programming the CLA consists of initialization code, which is performed by the CPU, and tasks. A task is similar to an interrupt service routine, and once started it runs to completion. Tasks can be written in C or assembly code, where typically the user will use assembly code for high performance time-critical tasks, and C for non-critical tasks. Each task is capable of being triggered by a variety of peripherals without CPU intervention, which makes the CLA very efficient since it does not use interrupts for hardware synchronization, nor must the CLA do any context switching. Unlike the traditional interrupt-based scheme, the CLA approach becomes deterministic. The CLA supports eight independent tasks and each is mapped back to an event trigger. Since the CLA is a software programmable accelerator, it is very flexible and can be modified for different applications.









Set the Specify CLA support project option to cla1

- Can be written in C or assembly code
- Assembly code will give best performance for time-critical tasks
- Writing in assembly may not be so bad
- CLA programs in floating point
- Often not that much code in a task
- The user will use assembly for critical tasks, and C for non-critical tasks



| acos | asin | atan | atan2 |
| atan2PU | cos | cosPU | div |
| exp | exp10 | exp2 | expN |
| isqrt | In | log10 | logN |
| sin | sinPU | sincos | sqrt |









Back to top of the page