SPRACN0F October 2021 – March 2023 F29H850TU , F29H859TU-Q1 , TMS320F280021 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280033 , TMS320F280034 , TMS320F280034-Q1 , TMS320F280036-Q1 , TMS320F280036C-Q1 , TMS320F280037 , TMS320F280037-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280038-Q1 , TMS320F280038C-Q1 , TMS320F280039 , TMS320F280039-Q1 , TMS320F280039C , TMS320F280039C-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28374D , TMS320F28374S , TMS320F28375D , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376D , TMS320F28376S , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378D , TMS320F28378S , TMS320F28379D , TMS320F28379D-Q1 , TMS320F28379S , TMS320F28384D , TMS320F28384S , TMS320F28386D , TMS320F28386S , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
There are multiple definitions for division and modulo operations according to the programming language and computer science literature, each of these definitions provide different mathematical properties that can be beneficially employed in the application context. Truncated division is the standard division definition widely used in many programming languages like C. In this definition, the remainder will always have the sign of numerator. The transfer function of truncated division is shown in #GUID-1C361B93-A3E6-4271-9755-F10089434F72 , as can be observed that the function is non-periodic since there is a “platform” around zero point.
Due to the non-linearity around zero point, the function is not preferred in control applications. Thus non-conventional definitions of division and modulo operations are sometimes preferred for better linearity and periodicity. The transfer function of Floored/Modulo (#GUID-3711F51E-11D5-4BC5-B54C-C55B9B164B17) and Euclidean division (#GUID-21BD91CD-CBC6-4964-8DC5-5E15CA8010EE) functions are shown below. In the modulo division function the remainder will always have the sign of denominator, thus the function is linear around the zero point. In the Euclidean division, the remainder is always positive so the division function is linear around zero point and also the modulo function is periodic.
The C28x CPU has added specialized instructions to enable applications to implement the above division and modulo definitions efficiently in hardware. These new instructions used to enable integer division are interruptible, have very low latency and support different types of operations (ui32/ui32, i32/ui32, i64/i32, ui64/ui32, ui64/ui64, i64/i64, and so forth). The cycles count for the different types of division operations and sizes of the operands achieved using Fast Integer Division unit are listed in and are also compared with the cycles without FID module in Table 3-2. As evident from the table, the FID unit provides several folds improvement in performance for different types of division operations which helps in minimizing the latency of control loop calculations.
Division Operation | Using C Operator '/' Without FASTINTDIV Hardware on C28x | Using Intrinsics With FASTINTDIV Hardware + C28x | Improvement Factor |
---|---|---|---|
i16/i16 traditional | 52 | 16 | 3.3 |
i16/i16 Euclidean | 56 | 14 | 4.0 |
i16/i16 Modulo | 56 | 14 | 4.0 |
u16/u16 | 56 | 14 | 4.0 |
i32/i32 traditional | 59 | 13 | 4.5 |
i32/i32 Euclidean | 63 | 14 | 4.5 |
i32/i32 Modulo | 63 | 14 | 4.5 |
i32/u32 traditional | 37 | 14 | 2.6 |
i32/u32 Modulo | 41 | 14 | 2.9 |
u32/u32 | 37 | 12 | 3.1 |
i32/i16 traditional | 60 | 18 | 3.3 |
i32/i16 Euclidean | 64 | 16 | 4.0 |
i32/i16 Modulo | 64 | 16 | 4.0 |
u32/u16 | 38 | 13 | 2.9 |
i64/i64 traditional #GUID-30F344F4-FCE7-48E2-B3FC-9759AA6E0206 | 78-2631 | 42 | 1.9-62.6 |
i64/i64 Euclidean #GUID-30F344F4-FCE7-48E2-B3FC-9759AA6E0206 | 82-2635 | 42 | 2.0-62.7 |
i64/i64 Modulo #GUID-30F344F4-FCE7-48E2-B3FC-9759AA6E0206 | 82-2635 | 42 | 2.0-62.7 |
i64/u64 traditional #GUID-30F344F4-FCE7-48E2-B3FC-9759AA6E0206 | 54-2605 | 42 | 1.3-62.0 |
i64/u64 Euclidean #GUID-30F344F4-FCE7-48E2-B3FC-9759AA6E0206 | 58-2609 | 42 | 1.4-62.1 |
i64/u6 Modulo#GUID-30F344F4-FCE7-48E2-B3FC-9759AA6E0206 | 58-2609 | 42 | 1.4-62.1 |
u64/u64/ #GUID-30F344F4-FCE7-48E2-B3FC-9759AA6E0206 | 53-2548 | 42 | 1.3-60.7 |