Fixed-Point Blockset | ![]() ![]() |
Overview
You can generate C code with the Fixed-Point Blockset using Real-Time Workshop. The code generated from fixed-point blocks uses only integer types and automatically includes all operations, such as shifts, needed to account for differences in fixed-point locations. You can use the generated code on embedded fixed-point processors or rapid prototyping systems even if they contain a floating-point processor. The code is structured so that key operations can be readily replaced by optimized target-specific libraries that you supply. You can also use Target Language Compiler to customize the generated code. For more information about code generation, refer to the Real-Time Workshop and the Target Language Compiler documentation.
You can also generate code for testing on a rapid prototyping system such as xPC, the Real-Time Windows Target, or dSPACE. The target compiler and processor may support floating-point operations in software or in hardware. In any case, the fixed-point blocks generate pure integer code and do not use floating-point operations. This allows valid bit-true testing even on a floating-point processor.
You can also generate code for nonreal-time testing. For example, you can generate code to run in nonreal-time on computers running any supported operating system. Even though the processors have floating-point hardware, the code generated by fixed-point blocks is pure integer code. The Generic Real-Time Target (GRT) and the Simulink Accelerator are examples of where nonreal-time code is generated and run.
![]() | Code Generation | Code Generation Support | ![]() |