| Simulink® | ![]() |

| On this page… |
|---|
Hardware Implementation Overview Number of bits: native word size Signed integer division rounds to Shift right on a signed integer as arithmetic shift Number of bits: native word size |
Describe the hardware characteristics for the modelled system, including how to set up embedded and emulation hardware settings for both simulation and code generation.
Note Hardware Implementation pane options do not control hardware or compiler behavior: their purpose is to solely describe hardware and compiler properties to MATLAB® software, which uses the information to generate code that is correct for the platform, runs as efficiently as possible, and gives bit-true agreement among simulation results, production code, and test code. |
Choose the Device type in the Embedded hardware subpane.
Set the parameters displayed for the selected device type.
Apply the changes.
Repeat as needed for Emulation hardware.
This pane applies to models of computer-based systems, such as embedded controllers.
Specifying hardware characteristics enables simulation of the model to detect error conditions that could arise when executing code, such as hardware overflow.
Select the manufacturer of the hardware you will use to implement the production version of the system represented by this model.
Default: Generic
AMD
ARM Compatible
ASIC/FPGA
Analog Devices
Atmel
Freescale
Infineon
Intel
Microchip
NEC
Renesas
SGI
STMicroelectronics
Texas Instruments
Generic
Select the device vendor before you specify the hardware device used to define your system's constraints.
If your test hardware does not match any of the listed vendors, select Generic.
The Device vendor and Device type fields both share the same command line parameter: ProdHWDeviceType. When specifying this parameter from the command line, separate the device vendor and device type values using the characters —>. For example: 'Intel->8051 Compatible'.
To add Device vendor and Device type values to the default set that is displayed on the Hardware Implementation pane, see Registering Additional Device Vendor and Device Type Values in the Real-Time Workshop® documentation.
This parameter determines the options available in the Device type drop-down menu.
| Parameter: ProdHWDeviceType |
| Type: string |
| Value: any valid value (see tips) |
| Default: 'Generic->Unspecified (assume 32-bit Generic)' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Device type (production hardware)
Device vendor (test hardware)
Select the type of hardware you will use to implement the production version of the system represented by this model.
Default: Unspecified (assume 32–bit Generic)
Generic options:
16-bit Embedded Processor
32-bit Embedded Processor
32-bit Real-Time Simulator
32-bit x-86 compatible
8-bit Embedded Processor
Custom
Unspecified (assume 32-bit Generic)
AMD® options:
K5/K6/Athlon
ARM® Compatible options:
ARM 7
ARM 8
ARM 9
ASIC/FPGA options:
ASIC/FPGA
Analog Devices™ options:
Blackfin
SHARC
TigerSHARC
Atmel® options:
AVR
Freescale™ options:
32-bit PowerPC
68332
68HC08
68HC11
ColdFire
DSP563xx (16-bit mode)
HC(S)12
MPC5500
Infineon® options:
C16x, XC16x
TriCore
Intel® options:
8051 Compatible
x86/Pentium
Microchip:
PIC18
dsPIC
NEC® options:
V850
Renesas® options:
M16C
M32C
R8C/Tiny
SH-2/3/4
SGI:
UltraSPARC IIi
STMicroelectronics:
ST10/Super10
Texas Instruments™ options:
C2000
C5000
C6000
MSP430
Select the device vendor before you specify the hardware device type.
Selecting a device type specifies the hardware device to define your system's constraints:
Default hardware properties appear as the initial values.
Parameters with only one possible value cannot be changed.
Parameters with more than one possible value provide a pulldown list of legal values.
Static values for each device type are displayed in the following table.
Parameters that you can modify are identified with an x.
| Key: | Word size = native word size | |||||||
|---|---|---|---|---|---|---|---|---|
| Rounds to = Signed integer division rounds to | ||||||||
| Shift right = Shift right on a signed integer as arithmetic shift | ||||||||
| Device vendor / Device type | Number of bits | Byte ordering | Rounds to | Shift right | ||||
| char | short | int | long | Word size | ||||
| Generic | ||||||||
| Unspecified (assume 32-bit Generic) (default) | 8 | 16 | 32 | 32 | 32 | Un- specified | x | Set |
| Custom | x | x | x | x | x | x | x | x |
| 16-bit Embedded Processor | 8 | 16 | 16 | 32 | 16 | x | x | Set |
| 32-bit Embedded Processor | 8 | 16 | 32 | 32 | 32 | x | x | Set |
| 32-bit Real Time Simulator | 8 | 16 | 32 | 32 | 32 | x | x | Set |
| 32-bit x86 compatible | 8 | 16 | 32 | 32 | 32 | Little Endian | Zero | Set |
| 8-bit Embedded Processor | 8 | 16 | 16 | 32 | 8 | x | x | Set |
| AMD | ||||||||
| K5/K6/Athlon | 8 | 16 | 32 | 32 | 32 | Little Endian | x | Set |
| ARM Compatible | ||||||||
| ARM 7/8/9 | 8 | 16 | 32 | 32 | x | x | x | x |
| ASIC/FPGA | ||||||||
| ASIC/FPGA | NA | NA | NA | NA | NA | NA | NA | NA |
| Analog Devices | ||||||||
| Blackfin | 8 | 16 | 32 | 32 | 32 | Little Endian | Zero | Set |
| SHARC | 32 | 32 | 32 | 32 | 32 | Big Endian | Zero | Set |
| TigerSHARC | 32 | 32 | 32 | 32 | 32 | Little Endian | Zero | Set |
| Atmel | ||||||||
| AVR | 8 | 16 | 16 | 32 | 8 | Little Endian | Zero | Set |
| Freescale | ||||||||
| 32-bit PowerPC | 8 | 16 | 32 | 32 | 32 | Big Endian | Zero | Set |
| 68332 | 8 | 16 | 32 | 32 | 32 | Big Endian | x | Set |
| 68HC08 | 8 | 16 | 16 | 32 | 8 | Big Endian | x | Set |
| 68HC11 | 8 | 16 | 16 | 32 | 8 | Big Endian | x | Set |
| ColdFire | 8 | 16 | 32 | 32 | 32 | Big Endian | Zero | Set |
| DSP563xx (16-bit mode) | 8 | 16 | 16 | 32 | 16 | x | x | Set |
| HC(S)12 | 8 | 16 | 16 | 32 | 16 | Big Endian | x | Set |
| MPC5500 | 8 | 16 | 32 | 32 | 32 | x | Zero | Set |
| Infineon | ||||||||
| C16x, XC16x | 8 | 16 | 16 | 32 | 16 | Little Endian | Zero | Set |
| TriCore | 8 | 16 | 32 | 32 | 32 | Little Endian | x | Set |
| Intel | ||||||||
| 8051 Compatible | 8 | 16 | 16 | 32 | 8 | x | x | Clear |
| xPC/Pentium | 8 | 16 | 32 | 32 | 32 | Little Endian | x | Set |
| Microchip | ||||||||
| PIC18 | 8 | 16 | 16 | 32 | 8 | Little Endian | Zero | Set |
| dsPIC | 8 | 16 | 16 | 32 | 16 | Little Endian | Zero | Set |
| NEC | ||||||||
| V850 | 8 | 16 | 32 | 32 | 32 | x | x | x |
| Renesas | ||||||||
| M16C | 8 | 16 | 16 | 32 | 16 | Little Endian | x | x |
| M32C | 8 | 16 | x | 32 | x | Little Endian | x | x |
| R8C/Tiny | 8 | 16 | 16 | 32 | 16 | Little Endian | x | x |
| SH-2/3/4 | 8 | 16 | 32 | 32 | 32 | x | x | x |
| SGI | ||||||||
| UltraSPARC IIi | 8 | 16 | 32 | 32 | 32 | Big Endian | x | Set |
| STMicroelectronics | ||||||||
| ST10/Super10 | 8 | 16 | 16 | 32 | 16 | Little Endian | Zero | Set |
| Texas Instruments | ||||||||
| C2000 | 16 | 16 | 16 | 32 | 16 | x | Zero | Set |
| C5000 | 16 | 16 | 16 | 32 | 16 | Big Endian | Zero | Set |
| C6000 | 8 | 16 | 32 | 40 | 32 | x | Zero | Set |
If your production hardware does not match any of the listed types, select Unspecified (assume 32-bit Generic) if it has the characteristics of a generic 32-bit microprocessor; otherwise select Custom.
The Device vendor and Device type fields both share the same command line parameter: TargetHWDeviceType. When specifying this parameter from the command line, separate the device vendor and device type values using the characters —>. For example: 'Intel->8051 Compatible'.
To add Device vendor and Device type values to the default set that is displayed on the Hardware Implementation pane, see Registering Additional Device Vendor and Device Type Values in the Real-Time Workshop documentation.
The options available in the drop-down menu are determined by the Device vendor parameter.
Selecting ASIC/FPGA enables the Emulation hardware (code generation only) subpane.
For all other device types, this parameter sets:
char
short
int
long
native word size
Byte ordering
Signed integer division rounds to
Shift right on a signed integer as arithmetic shift
| Parameter: ProdHWDeviceType |
| Type: string |
| Value: any valid value (see tips) |
| Default: 'Generic->Unspecified (assume 32-bit Generic)' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Device vendor (production hardware)
Device type (test hardware)
Describe the character bit length for the production hardware.
Default: 8
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink® software disables this control if it knows the data type lengths for the selected device type.
| Parameter: ProdBitPerChar |
| Type: integer |
| Value: any valid value |
| Default: 8 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the data bit length for the production hardware.
Default: 16
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: ProdBitPerShort |
| Type: integer |
| Value: any valid value |
| Default: 16 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the data integer bit length for the production hardware.
Default: 32
Minimum: 8
Maximum: 32
Enter a number between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: ProdBitPerInt |
| Type: integer |
| Value: any valid value |
| Default: 32 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the data bit lengths for the production hardware.
Default: 32
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: ProdBitPerLong |
| Type: integer |
| Value: any valid value |
| Default: 32 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the microprocessor native word size for the production hardware.
Default: 32
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: ProdWordSize |
| Type: integer |
| Value: any valid value |
| Default: 32 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the byte ordering for the production hardware.
Default: Unspecified
Specifies that the code determines the endianness of the hardware. This is the least efficient choice.
The most significant byte appears first.
The least significant byte appears first.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: ProdEndianess |
| Type: string |
| Value: 'Unspecified' | 'LittleEndian' | 'BigEndian' |
| Default: 'Unspecified' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Describe how to produce a signed integer quotient for the production hardware.
Default: Undefined
Choose this option if neither Zero nor Floor describes the compiler's behavior, or if that behavior is unknown.
If the quotient is between two integers, the compiler chooses the integer that is closer to zero as the result.
If the quotient is between two integers, the compiler chooses the integer that is closer to negative infinity.
Use the Round integer calculations toward parameter on your model's blocks to simulate the rounding behavior of the C compiler that you intend to use to compile code generated from the model. This setting appears on the Signal Data Type pane of the parameter dialog boxes of blocks that can perform signed integer arithmetic.
For most blocks, the value of Round integer calculations toward completely defines rounding behavior. For blocks that support fixed-point data and the Simplest rounding mode, the value of Signed integer division rounds to also affects rounding. For details, see Rounding in the Simulink® Fixed Point™ User's Guide.
See Hardware Implementation Options in the Real-Time Workshop documentation for information on how this option affects code generation.
The following table illustrates the compiler behavior described by the options for this parameter.
| N | D | Ideal N/D | Zero | Floor | Undefined |
|---|---|---|---|---|---|
33 | 4 | 8.25 | 8 | 8 | 8 |
-33 | 4 | -8.25 | -8 | -9 | -8 or -9 |
33 | -4 | -8.25 | -8 | -9 | -8 or -9 |
-33 | -4 | 8.25 | 8 | 8 | 8 |
This parameter is enabled by Device type.
| Parameter: ProdIntDivRoundTo |
| Type: string |
| Value: 'Floor' | 'Zero' | 'Undefined' |
| Default: 'Undefined' |
| Application | Setting |
|---|---|
| Debugging | No impact for simulation and during development. Undefined for production code generation. |
| Traceability | No impact for simulation and during development. Zero or Floor for production code generation. |
| Efficiency | No impact for simulation and during development. Zero for production code generation. |
| Safety precaution | No impact for simulation and during development. Floor for production code generation. |
Describe how your compiler rounds the result of two signed integers for the production hardware.
Default: On
Generates simple efficient code whenever the Simulink model performs arithmetic shifts on signed integers.
Generates fully portable but less efficient code to implement right arithmetic shifts.
Select this parameter if the C compiler implements a signed integer right shift as an arithmetic right shift.
An arithmetic right shift fills bits vacated by the right shift with the value of the most significant bit, which indicates the sign of the number in twos complement notation.
This parameter is enabled by Device type.
| Parameter: ProdShiftRightIntArith |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'on' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | On |
| Safety precaution | No impact |
Specify whether the test hardware differs from the deployment hardware.
Default: On
Specifies that the hardware used to test the code generated from the model is the same as the production hardware, or has the same characteristics.
Specifies that the hardware used to test the code generated from the model has different characteristics than the production hardware.
You can generate code that runs on the test hardware but behaves as if it had been generated for and executed on the deployment hardware.
The Embedded hardware (simulation and code generation) subpane specifies the deployment hardware properties. The Emulation hardware (code generation only) subpane is used to specify the test hardware properties.
Enables the Emulation hardware subpane.
| Parameter: ProdEqTarget |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'on' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Select the manufacturer of the hardware that will be used to test the code generated from the model.
Default: Generic
AMD
ARM Compatible
ASIC/FPGA
Analog Devices
Atmel
Freescale
Infineon
Intel
Microchip
NEC
Renesas
SGI
STMicroelectronics
Texas Instruments
Generic
Select the device vendor before you specify the hardware device used to define your system's constraints.
If your test hardware does not match any of the listed vendors, select Generic.
The Device vendor and Device type fields both share the same command line parameter: TargetHWDeviceType. When specifying this parameter from the command line, separate the device vendor and device type values using the characters —>. For example: 'Intel->8051 Compatible'.
This parameter determines the options available in the Device type drop-down menu.
| Parameter: TargetHWDeviceType |
| Type: string |
| Value: any valid value (see tips) |
| Default: 'Generic->Unspecified (assume 32-bit Generic)' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Device type (test hardware)
Select the type of hardware that will be used to test the code generated from the model.
Default: Unspecified (assume 32–bit Generic)
Generic options:
16-bit Embedded Processor
32-bit Embedded Processor
32-bit Real-Time Simulator
32-bit x-86 compatible
8-bit Embedded Processor
Custom
MATLAB Host Computer
Unspecified (assume 32-bit Generic)
AMD options:
K5/K6/Athlon
ARM Compatible options:
ARM 7
ARM 8
ARM 9
Analog Devices options:
Blackfin
SHARC
TigerSHARC
Atmel options:
AVR
Freescale options:
32-bit PowerPC
68332
68HC08
68HC11
ColdFire
DSP563xx (16-bit mode)
HC(S)12
MPC5500
Infineon options:
C16x, XC16x
TriCore
Intel options:
8051 Compatible
x86/Pentium
Microchip:
PIC18
dsPIC
NEC options:
V850
Renesas options:
M16C
R8C/Tiny
SH-2/3/4
SGI:
UltraSPARC IIi
STMicroelectronics:
ST10/Super10
Texas Instruments options:
C2000
C5000
C6000
MSP430
Select the device vendor before you specify the hardware device type.
Selecting a device type specifies the hardware device to define your system's constraints:
Default hardware properties appear as the initial values.
Parameters with only one possible value cannot be changed.
Parameters with more than one possible value provide a pulldown list of legal values.
Static values for each device type are displayed in the following table. Parameters that you can modify are identified with an x.
| Key: | Word size = native word size | |||||||
|---|---|---|---|---|---|---|---|---|
| Rounds to = Signed integer division rounds to | ||||||||
| Shift right = Shift right on a signed integer as arithmetic shift | ||||||||
| Device vendor / Device type | Number of bits | Byte ordering | Rounds to | Shift right | ||||
| char | short | int | long | Word size | ||||
| Generic | ||||||||
| Unspecified (assume 32-bit Generic) (default) | 8 | 16 | 32 | 32 | 32 | Un- specified | x | Set |
| Custom | x | x | x | x | x | x | x | x |
| 16-bit Embedded Processor | 8 | 16 | 16 | 32 | 16 | x | x | Set |
| 32-bit Embedded Processor | 8 | 16 | 32 | 32 | 32 | x | x | Set |
| 32-bit Real Time Simulator | 8 | 16 | 32 | 32 | 32 | x | x | Set |
| 32-bit x86 compatible | 8 | 16 | 32 | 32 | 32 | Little Endian | Zero | Set |
| 8-bit Embedded Processor | 8 | 16 | 16 | 32 | 8 | x | x | Set |
| MATLAB Host Computer | 8 | 16 | 32 | 32 | 32 | Little Endian | x | Set |
| AMD | ||||||||
| K5/K6/Athlon | 8 | 16 | 32 | 32 | 32 | Little Endian | x | Set |
| ARM Compatible | ||||||||
| ARM 7/8/9 | 8 | 16 | 32 | 32 | x | x | x | x |
| ASIC/FPGA | ||||||||
| ASIC/FPGA | NA | NA | NA | NA | NA | NA | NA | NA |
| Analog Devices | ||||||||
| Blackfin | 8 | 16 | 32 | 32 | 32 | Little Endian | Zero | Set |
| SHARC | 32 | 32 | 32 | 32 | 32 | Big Endian | Zero | Set |
| TigerSHARC | 32 | 32 | 32 | 32 | 32 | Little Endian | Zero | Set |
| Atmel | ||||||||
| AVR | 8 | 16 | 16 | 32 | 8 | Little Endian | Zero | Set |
| Freescale | ||||||||
| 32-bit PowerPC | 8 | 16 | 32 | 32 | 32 | Big Endian | Zero | Set |
| 68332 | 8 | 16 | 32 | 32 | 32 | Big Endian | x | Set |
| 68HC08 | 8 | 16 | 16 | 32 | 8 | Big Endian | x | Set |
| 68HC11 | 8 | 16 | 16 | 32 | 8 | Big Endian | x | Set |
| ColdFire | 8 | 16 | 32 | 32 | 32 | Big Endian | Zero | Set |
| DSP563xx (16-bit mode) | 8 | 16 | 16 | 32 | 16 | x | x | Set |
| HC(S)12 | 8 | 16 | 16 | 32 | 16 | Big Endian | x | Set |
| MPC5500 | 8 | 16 | 32 | 32 | 32 | x | Zero | Set |
| Infineon | ||||||||
| C16x, XC16x | 8 | 16 | 16 | 32 | 16 | Little Endian | Zero | Set |
| TriCore | 8 | 16 | 32 | 32 | 32 | Little Endian | x | Set |
| Intel | ||||||||
| 8051 Compatible | 8 | 16 | 16 | 32 | 8 | x | x | Clear |
| xPC/Pentium | 8 | 16 | 32 | 32 | 32 | Little Endian | x | Set |
| Microchip | ||||||||
| PIC18 | 8 | 16 | 16 | 32 | 8 | Little Endian | Zero | Set |
| dsPIC | 8 | 16 | 16 | 32 | 16 | Little Endian | Zero | Set |
| NEC | ||||||||
| V850 | 8 | 16 | 32 | 32 | 32 | x | x | x |
| Renesas | ||||||||
| M16C | 8 | 16 | 16 | 32 | 16 | Little Endian | x | x |
| M32C | 8 | 16 | x | 32 | x | Little Endian | x | x |
| R8C/Tiny | 8 | 16 | 16 | 32 | 16 | Little Endian | x | x |
| SH-2/3/4 | 8 | 16 | 32 | 32 | 32 | x | x | x |
| SGI | ||||||||
| UltraSPARC IIi | 8 | 16 | 32 | 32 | 32 | Big Endian | x | Set |
| STMicroelectronics | ||||||||
| ST10/Super10 | 8 | 16 | 16 | 32 | 16 | Little Endian | Zero | Set |
| Texas Instruments | ||||||||
| C2000 | 16 | 16 | 16 | 32 | 16 | x | Zero | Set |
| C5000 | 16 | 16 | 16 | 32 | 16 | Big Endian | Zero | Set |
| C6000 | 8 | 16 | 32 | 40 | 32 | x | Zero | Set |
If your production hardware does not match any of the listed types, select Unspecified (assume 32-bit Generic) if it has the characteristics of a generic 32-bit microprocessor; otherwise select Custom.
The Device vendor and Device type fields both share the same command line parameter: TargetHWDeviceType. When specifying this parameter from the command line, separate the device vendor and device type values using the characters —>. For example: 'Intel->8051 Compatible'.
The options available in the drop-down menu are determined by the Device vendor parameter.
This parameter sets:
char
short
int
long
native word size
Byte ordering
Signed integer division rounds to
Shift right on a signed integer as arithmetic shift
| Parameter: TargetHWDeviceType |
| Type: string |
| Value: any valid value (see tips) |
| Default: 'Generic->Unspecified (assume 32-bit Generic)' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Device vendor (test hardware)
Describe the character bit length for the hardware used to test code.
Default: 8
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: TargetBitPerChar |
| Type: integer |
| Value: any valid value |
| Default: 8 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the data bit length for the hardware used to test code.
Default: 16
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: TargetBitPerShort |
| Type: integer |
| Value: any valid value |
| Default: 16 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the data integer bit length of the hardware used to test code.
Default: 32
Minimum: 8
Maximum: 32
Enter a number between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: TargetBitPerInt |
| Type: integer |
| Value: any valid value |
| Default: 32 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the data bit lengths for the hardware used to test code.
Default: 32
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: TargetBitPerLong |
| Type: integer |
| Value: any valid value |
| Default: 32 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the microprocessor native word size for the hardware used to test code.
Default: 32
Minimum: 8
Maximum: 32
Enter a value between 8 and 32.
All values must be a multiple of 8.
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: TargetWordSize |
| Type: integer |
| Value: any valid value |
| Default: 32 |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | Target specific |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe the byte ordering for the hardware used to test code.
Default: Unspecified
Specifies that the code determines the endianness of the hardware. This is the least efficient choice.
The most significant byte comes first.
The least significant byte comes first.
Note For guidelines to observe when configuring Embedded hardware controls for code generation, see Hardware Implementation Options in the Real-Time Workshop documentation. |
This parameter is enabled by Device type.
Simulink software disables this control if it knows the data type lengths for the selected device type.
| Parameter: TargetEndianess |
| Type: string |
| Value: 'Unspecified' | 'LittleEndian' | 'BigEndian' |
| Default: 'Unspecified' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact for simulation and during development. Match operation of compiler and hardware for code generation. |
Describe how to produce a signed integer quotient for the hardware used to test code.
Default: Undefined
Choose this option if neither Zero nor Floor describes the compiler's behavior, or if that behavior is unknown.
If the quotient is between two integers, the compiler chooses the integer that is closer to zero as the result.
If the quotient is between two integers, the compiler chooses the integer that is closer to negative infinity.
Use the Round integer calculations toward parameter on your model's blocks to simulate the rounding behavior of the C compiler that you intend to use to compile code generated from the model. This setting appears on the Signal Data Type pane of the parameter dialog boxes of blocks that can perform signed integer arithmetic.
For most blocks, the value of Round integer calculations toward completely defines rounding behavior. For blocks that support fixed-point data and the Simplest rounding mode, the value of Signed integer division rounds to also affects rounding. For details, see Rounding in the Simulink® Fixed Point™ User's Guide.
See Hardware Implementation Options in the Real-Time Workshop documentation for information on how this option affects code generation.
The following table illustrates the compiler behavior described by the options for this parameter.
| N | D | Ideal N/D | Zero | Floor | Undefined |
|---|---|---|---|---|---|
33 | 4 | 8.25 | 8 | 8 | 8 |
-33 | 4 | -8.25 | -8 | -9 | -8 or -9 |
33 | -4 | -8.25 | -8 | -9 | -8 or -9 |
-33 | -4 | 8.25 | 8 | 8 | 8 |
This parameter is enabled by Device type.
| Parameter: TargetIntDivRoundTo |
| Type: string |
| Value: 'Floor' | 'Zero' | 'Undefined' |
| Default: 'Undefined' |
| Application | Setting |
|---|---|
| Debugging | No impact for simulation and during development. Undefined for production code generation. |
| Traceability | No impact for simulation and during development. Zero or Floor for production code generation. |
| Efficiency | No impact for simulation and during development. Zero for production code generation. |
| Safety precaution | No impact for simulation and during development. Floor for production code generation. |
Describe how your compiler rounds the result of two signed integers for the hardware used to test code.
Default: On
Generates simple efficient code whenever the Simulink model performs arithmetic shifts on signed integers.
Generates fully portable but less efficient code to implement right arithmetic shifts.
Select this parameter if your C compiler implements a signed integer right shift as an arithmetic right shift.
An arithmetic right shift fills bits vacated by the right shift with the value of the most significant bit, which indicates the sign of the number in twos complement notation. It is equivalent to dividing the number by 2.
This setting affects only code generation
This parameter is enabled by Device type.
| Parameter: TargetShiftRightIntArith |
| Type: string |
| Value: 'on' | 'off' |
| Default: 'on' |
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | On |
| Safety precaution | No impact |
![]() | Diagnostics Pane: Saving | Model Referencing Pane | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |