Documentation Center

  • Trials
  • Product Updates

Hardware Implementation Pane

Hardware Implementation Overview

Describe the hardware characteristics for the modelled system, including how to set up production and test hardware settings for both simulation and code generation.

    Note:   Hardware Implementation pane options do not control hardware or compiler behavior: their purpose is solely to describe hardware and compiler properties to MATLAB® software, which uses the information to generate code for the platform that runs as efficiently as possible, and gives bit-true agreement for the results of integer and fixed-point operations in simulation, production code, and test code.

Configuration

  1. Choose the Device type in the Production hardware subpane.

  2. Set the parameters displayed for the selected device type.

  3. Apply the changes.

  4. Repeat as required for Test hardware.

Tips

  • To open the Hardware Implementation pane, in the Simulink® Editor, select Simulation > Model Configuration Parameters > Hardware Implementation.

  • 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.

See Also

Device vendor

Select the manufacturer of the hardware you will use to implement the production version of the system represented by this model.

Settings

Default: Generic

  • AMD

  • ARM Compatible

  • ASIC/FPGA (Production hardware subpane only)

  • Analog Devices

  • Atmel

  • Freescale

  • Infineon

  • Intel

  • Microchip

  • Renesas

  • SGI

  • STMicroelectronics

  • Texas Instruments

  • Generic

Tips

  • Select the device vendor before you specify the hardware device used to define your system's constraints.

  • If your production 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'.

  • If you have a Simulink Coder™ license, to add Device vendor and Device type values to the default set that is displayed on the Hardware Implementation pane, see Register Additional Device Vendor and Device Type Values in the Simulink Coder documentation.

Dependencies

Selecting a value for this parameter allows you to view a list of supported devices from the selected vendor in the Device type drop-down menu.

Command-Line Information

Parameter: ProdHWDeviceType
Type: string
Value: any valid value (see tips)
Default: 'Generic->Unspecified (assume 32-bit Generic)'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Device type

Select the type of hardware you will use to implement the production version of the system represented by this model.

Settings

Default: Unspecified (assume 32–bit Generic)

Generic options:

  • 16-bit Embedded Processor

  • 32-bit Embedded Processor

  • 32-bit Real-Time Simulator

  • 32-bit x86 compatible

  • 64-bit Embedded Processor (LLP64)

  • 64-bit Embedded Processor (LP64)

  • 8-bit Embedded Processor

  • Custom

  • MATLAB Host Computer (available as a Test hardware device and, for MATLAB Coder configuration, as a Production hardware device)

  • Unspecified (assume 32-bit Generic)

AMD® options:

  • Athlon 64

  • K5/K6/Athlon

ARM® Compatible options:

  • ARM 10

  • ARM 11

  • ARM 7

  • ARM 8

  • ARM 9

  • ARM Cortex

ASIC/FPGA options: (Production hardware subpane only)

  • 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

  • MPC52xx

  • MPC5500

  • MPC55xx

  • MPC5xx

  • MPC7400

  • MPC7xxx

  • MPC82xx

  • MPC83xx

  • MPC85xx

  • MPC86xx

  • MPC8xx

  • S12x

Infineon® options:

  • C16x, XC16x

  • TriCore

Intel® options:

  • 8051 Compatible

  • x86–64

  • x86/Pentium

Microchip:

  • PIC18

  • dsPIC

Renesas® options:

  • M16C

  • M32C

  • R8C/Tiny

  • SH-2/3/4

  • V850

SGI:

  • UltraSPARC IIi

STMicroelectronics®:

  • ST10/Super10

Texas Instruments™ options:

  • C2000

  • C5000

  • C6000

  • MSP430

  • TMS470

Tips

  • 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 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:float and double (not listed) always equal 32 and 64, respectively
    pointer (not listed) equals 64 for 64-bit devices; otherwise, matches the setting for int
    Rounds to = Signed integer division rounds to
    Shift right = Shift right on a signed integer as arithmetic shift
    Device vendor / Device typeNumber of bitsLargest atomic sizeByte orderingRounds toShift rightEnable long long
    charshortintlonglong longnativeintfloat
    Generic
    Unspecified (assume 32-bit Generic) (default)81632326432xxUnspecifiedxSetClear
    Customxxxxxxxxxxxx
    16-bit Embedded Processor81616326416xxxxSetClear
    32-bit Embedded Processor81632326432xxxxSetClear
    32-bit Real Time Simulator81632326432xxxxSetClear
    32-bit x86 compatible81632326432xxLittle EndianZeroSetClear
    64-bit Embedded Processor (LLP64)81632326432xxxxSetx
    64-bit Embedded Processor (LP64)81632646464xxxxSetx
    8-bit Embedded Processor8161632648xxxxSetClear
    MATLAB Host Computer81632Host specific value (32 or 64)64Host specific value (32 or 64)xxLittle EndianxSetHost specific value (Set or Clear)
    AMD 
    Athlon 6481632646464xxLittle EndianxSetx
    K5/K6/Athlon81632326432xxLittle EndianxSetx
    ARM Compatible 
    ARM 7/8/9/1081632326432LongFloatxxxx
    ARM 1181632326432LongDoublexxxx
    ARM Cortex81632326432LongDoublexxxx
    ASIC/FPGA 
    ASIC/FPGANANANANANANANANANANANANA
    Analog Devices 
    Blackfin81632326432LongDoubleLittle EndianZeroSetx
    SHARC323232326432LongDoubleBig EndianZeroSetx
    TigerSHARC323232326432LongDoubleLittle EndianZeroSetx
    Atmel 
    AVR8161632648xxLittle EndianZeroSetx
    Freescale 
    32-bit PowerPC81632326432LongDoubleBig EndianZeroSetx
    6833281632326432xxBig EndianxSetx
    68HC088161632648xxBig EndianxSetx
    68HC118161632648xxBig EndianxSetx
    ColdFire81632326432xxBig EndianZeroSetx
    DSP563xx (16-bit mode)81616326416xxxxSetx
    HC(S)1281616326416xxBig EndianxSetx
    MPC52xx, MPC5500, MPC55xx, MPC5xx, , MPC7xxx, MPC82xx, MPC83xx, MPC86xx, MPC8xx81632326432LongDoublexZeroSetx
    MPC740081632326432LongDoublexZeroSetClear
    MPC85xx81632326432LongFloatxZeroSetx
    S12x81616326416xxBig EndianxSetx
    Infineon 
    C16x, XC16x81616326416xxLittle EndianZeroSetx
    TriCore81632326432xxLittle EndianxSetx
    Intel 
    8051 Compatible8161632648xxxxClearx
    x86/6481632646464xxLittle EndianxSetx
    x86/Pentium81632326432xxLittle EndianxSetx
    Microchip 
    PIC188161632648xxLittle EndianZeroSetx
    dsPIC81616326416xxLittle EndianZeroSetx
    Renesas 
    M16C81616326416xxLittle Endianxxx
    M32C816x3264xxxLittle Endianxxx
    R8C/Tiny81616326416xxLittle Endianxxx
    SH-2/3/481632326432xxxxxx
    V85081632326432xxxxxx
    SGI 
    UltraSPARC IIi81632326432xxBig EndianxSetx
    STMicroelectronics 
    ST10/Super1081616326416xxLittle EndianZeroSetx
    Texas Instruments 
    C2000161616326416IntNonexZeroSetx
    C5000161616326416IntNoneBig EndianZeroSetx
    C600081632406432IntNonexZeroSetx
    MSP43081616326416xxLittle EndianZeroSetx
    TMS470816323264xxxxxxx

  • 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: 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'.

  • If you have a Simulink Coder license, to add Device vendor and Device type values to the default set that is displayed on the Hardware Implementation pane, see Register Additional Device Vendor and Device Type Values in the Simulink Coder documentation.

Dependencies

The options available in the drop-down menu are determined by the Device vendor parameter.

Selecting ASIC/FPGA enables the Test hardware subpane.

Selecting any other device type sets the following device-specific parameters:

  • Number of bits: char

  • Number of bits: short

  • Number of bits: int

  • Number of bits: long

  • Number of bits: long long

  • Number of bits: float

  • Number of bits: double

  • Number of bits: native

  • Number of bits: pointer

  • Largest atomic size: integer

  • Largest atomic size: floating-point

  • Byte ordering

  • Signed integer division rounds to

  • Shift right on a signed integer as arithmetic shift

  • Enable long long

Whether you can modify a device-specific parameter varies according to device type. Parameters that cannot be modified for a device are greyed out in the GUI display.

Command-Line Information

Parameter: ProdHWDeviceType
Type: string
Value: any valid value (see tips)
Default: 'Generic->Unspecified (assume 32-bit Generic)'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Number of bits: char

Describe the character bit length for the production hardware.

Settings

Default: 8

Minimum: 8

Maximum: 32

Enter a value between 8 and 32.

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdBitPerChar
Type: integer
Value: any valid value
Default: 8

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: short

Describe the data bit length for the production hardware.

Settings

Default: 16

Minimum: 8

Maximum: 32

Enter a value between 8 and 32.

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdBitPerShort
Type: integer
Value: any valid value
Default: 16

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: int

Describe the data integer bit length for the production hardware.

Settings

Default: 32

Minimum: 8

Maximum: 32

Enter a number between 8 and 32.

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdBitPerInt
Type: integer
Value: any valid value
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: long

Describe the data bit lengths for the production hardware.

Settings

Default: 32

Minimum: 32

Maximum: 128

Enter a value between 32 and 128.

Tip

All values must be a multiple of 8 and between 32 and 128.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdBitPerLong
Type: integer
Value: any valid value
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: long long

Describe the length in bits of the C long long data type that the production hardware supports.

Settings

Default: 64

Minimum: 64

Maximum: 128

The number of bits used to represent the C long long data type.

Tips

  • Use the C long long data type only if your C compiler supports long long.

  • You can change the value of this parameter for custom targets only. For custom targets, all values must be a multiple of 8 and between 64 and 128.

Dependencies

  • Enable long long enables use of this parameter.

  • The value of this parameter must be greater than or equal to the value of Number of bits: long.

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdBitPerLongLong
Type: integer
Value: any valid value
Default: 64

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: float

Describe the bit length of floating-point data for the production hardware (read-only)

Settings

Default: 32

Always equals 32.

Command-Line Information

Parameter: ProdBitPerFloat
Type: integer
Value: 32 (read-only)
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Number of bits: double

Describe the bit-length of double data for the production hardware (read-only).

Settings

Default: 64

Always equals 64.

Command-Line Information

Parameter: ProdBitPerDouble
Type: integer
Value: 64 (read only)
Default: 64

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Number of bits: native

Describe the microprocessor native word size for the production hardware.

Settings

Default: 32

Minimum: 8

Maximum: 64

Enter a value between 8 and 64.

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdWordSize
Type: integer
Value: any valid value
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: pointer

Describe the bit-length of pointer data for the production hardware (read-only).

Settings

Default: 64 for 64-bit devices; otherwise, matches the setting for Number of bits: int

Minimum: 8

Maximum: 64

Command-Line Information

Parameter: ProdBitPerPointer
Type: integer
Value: any valid value (read-only)
Default: 64 for 64-bit devices; otherwise, matches the setting for ProdBitPerInt

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Largest atomic size: integer

Specify the largest integer data type that can be atomically loaded and stored on the production hardware.

Settings

Default: Char

Char

Specifies that char is the largest integer data type that can be atomically loaded and stored on the production hardware.

Short

Specifies that short is the largest integer data type that can be atomically loaded and stored on the production hardware.

Int

Specifies that int is the largest integer data type that can be atomically loaded and stored on the production hardware.

Long

Specifies that long is the largest integer data type that can be atomically loaded and stored on the production hardware.

LongLong

Specifies that long long is the largest integer data type that can be atomically loaded and stored on the production hardware.

Tip

This parameter is used, where possible, to optimize away unnecessary double-buffering or unnecessary semaphore protection, based on data size, in generated multirate code.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

  • You can set this parameter to LongLong only if the production hardware supports the C long long data type and you have selected Enable long long.

Command-Line Information

Parameter: ProdLargestAtomicInteger
Type: string
Value: 'Char' | 'Short' | 'Int' | 'Long' | 'LongLong'
Default: 'Char'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Largest atomic size: floating-point

Specify the largest floating-point data type that can be atomically loaded and stored on the production hardware.

Settings

Default: None

Float

Specifies that float is the largest floating-point data type that can be atomically loaded and stored on the production hardware.

Double

Specifies that double is the largest floating-point data type that can be atomically loaded and stored on the production hardware.

None

Specifies that there is no applicable setting or not to use this parameter in generating multirate code.

Tip

This parameter is used, where possible, to optimize away unnecessary double-buffering or unnecessary semaphore protection, based on data size, in generated multirate code.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdLargestAtomicFloat
Type: string
Value: 'Float' | 'Double' | 'None'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Byte ordering

Describe the byte ordering for the production hardware.

Settings

Default: Unspecified

Unspecified

Specifies that the code determines the endianness of the hardware. This is the least efficient choice.

Big Endian

The most significant byte appears first.

Little Endian

The least significant byte appears first.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdEndianess
Type: string
Value: 'Unspecified' | 'LittleEndian' | 'BigEndian'
Default: 'Unspecified'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Signed integer division rounds to

Describe how your compiler for the production hardware rounds the result of dividing two signed integers.

Settings

Default: Undefined

Undefined

Choose this option if neither Zero nor Floor describes the compiler's behavior, or if that behavior is unknown.

Zero

If the quotient is between two integers, the compiler chooses the integer that is closer to zero as the result.

Floor

If the quotient is between two integers, the compiler chooses the integer that is closer to negative infinity.

Tips

  • Use the Integer rounding mode parameter on your model's blocks to simulate the rounding behavior of the C compiler that you use to compile code generated from the model. This setting appears on the Signal Attributes pane of the parameter dialog boxes of blocks that can perform signed integer arithmetic, such as the Product block.

  • For most blocks, the value of Integer rounding mode 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.

  • See Hardware Implementation OptionsHardware Implementation Options in the Simulink Coder documentation for information on how this option affects code generation.

  • The following table illustrates the compiler behavior described by the options for this parameter.

    NDIdeal N/DZeroFloorUndefined

    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 or 9

Dependency

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdIntDivRoundTo
Type: string
Value: 'Floor' | 'Zero' | 'Undefined'
Default: 'Undefined'

Recommended settings

ApplicationSetting
DebuggingNo impact for simulation and during development.
Undefined for production code generation.
TraceabilityNo impact for simulation and during development.
Zero or Floor for production code generation.
EfficiencyNo impact for simulation and during development.
Zero for production code generation.
Safety precautionNo impact for simulation and during development.
Floor for production code generation.

See Also

Shift right on a signed integer as arithmetic shift

Describe how your compiler for the production hardware fills the sign bit in a right shift of a signed integer.

Settings

Default: On

On

Generates simple efficient code whenever the Simulink model performs arithmetic shifts on signed integers.

Off

Generates fully portable but less efficient code to implement right arithmetic shifts.

Tips

  • 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.

Dependency

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: ProdShiftRightIntArith
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn
Safety precautionNo impact

See Also

Enable long long

Specify that your C compiler supports the C long long data type. Most C99 compilers support long long.

Settings

Default: Off

On

Enables use of C long long data type for both simulation and code generation on the production hardware.

Off

Disables use of C long long data type for simulation or code generation on the production hardware.

Tips

  • This parameter is enabled only if the selected production hardware supports the C long long data type.

  • If your compiler does not support C long long, do not select this parameter.

Dependencies

This parameter enables Number of bits: long long.

Command-Line Information

Parameter: ProdLongLongMode
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Test hardware is the same as production hardware

Specify whether the test hardware differs from the production hardware.

Settings

Default: On

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.

Off

Specifies that the hardware used to test the code generated from the model has different characteristics than the production hardware.

Tips

  • 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 Production hardware subpane specifies the deployment hardware properties. The Test hardware subpane is used to specify the test hardware properties.

Dependency

Enables the Test hardware subpane.

Command-Line Information

Parameter: ProdEqTarget
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

More information

Device vendor

Select the manufacturer of the hardware that will be used to test the code generated from the model.

Settings

Default: Generic

  • AMD

  • ARM Compatible

  • ASIC/FPGA (Production hardware subpane only)

  • Analog Devices

  • Atmel

  • Freescale

  • Infineon

  • Intel

  • Microchip

  • Renesas

  • SGI

  • STMicroelectronics

  • Texas Instruments

  • Generic

Tips

  • 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'.

  • If you have a Simulink Coder license, to add Device vendor and Device type values to the default set that is displayed on the Hardware Implementation pane, see Register Additional Device Vendor and Device Type Values in the Simulink Coder documentation.

Dependencies

Selecting a value for this parameter allows you to view a list of supported devices from the selected vendor in the Device type drop-down menu.

Command-Line Information

Parameter: TargetHWDeviceType
Type: string
Value: any valid value (see tips)
Default: 'Generic->Unspecified (assume 32-bit Generic)'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Device type

Select the type of hardware that will be used to test the code generated from the model.

Settings

Default: Unspecified (assume 32–bit Generic)

Generic options:

  • 16-bit Embedded Processor

  • 32-bit Embedded Processor

  • 32-bit Real-Time Simulator

  • 32-bit x86 compatible

  • 64-bit Embedded Processor (LLP64)

  • 64-bit Embedded Processor (LP64)

  • 8-bit Embedded Processor

  • Custom

  • MATLAB Host Computer (available as a Test hardware device and, for MATLAB Coder configuration, as a Production hardware device)

  • Unspecified (assume 32-bit Generic)

AMD options:

  • Athlon 64

  • K5/K6/Athlon

ARM Compatible options:

  • ARM 10

  • ARM 11

  • ARM 7

  • ARM 8

  • ARM 9

  • ARM Cortex

ASIC/FPGA options: (Production hardware subpane only)

  • 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

  • MPC52xx

  • MPC5500

  • MPC55xx

  • MPC5xx

  • MPC7400

  • MPC7xxx

  • MPC82xx

  • MPC83xx

  • MPC85xx

  • MPC86xx

  • MPC8xx

  • S12x

Infineon options:

  • C16x, XC16x

  • TriCore

Intel options:

  • 8051 Compatible

  • x86–64

  • x86/Pentium

Microchip:

  • PIC18

  • dsPIC

Renesas options:

  • M16C

  • M32C

  • R8C/Tiny

  • SH-2/3/4

  • V850

SGI:

  • UltraSPARC IIi

STMicroelectronics:

  • ST10/Super10

Texas Instruments options:

  • C2000

  • C5000

  • C6000

  • MSP430

  • TMS470

Tips

  • 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 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:float and double (not listed) always equal 32 and 64, respectively
    pointer (not listed) equals 64 for 64-bit devices; otherwise, matches the setting for int
    Rounds to = Signed integer division rounds to
    Shift right = Shift right on a signed integer as arithmetic shift
    Device vendor / Device typeNumber of bitsLargest atomic sizeByte orderingRounds toShift rightEnable long long
    charshortintlonglong longnativeintfloat
    Generic
    Unspecified (assume 32-bit Generic) (default)81632326432xxUnspecifiedxSetClear
    Customxxxxxxxxxxxx
    16-bit Embedded Processor81616326416xxxxSetClear
    32-bit Embedded Processor81632326432xxxxSetClear
    32-bit Real Time Simulator81632326432xxxxSetClear
    32-bit x86 compatible81632326432xxLittle EndianZeroSetClear
    64-bit Embedded Processor (LLP64)81632326432xxxxSetx
    64-bit Embedded Processor (LP64)81632646464xxxxSetx
    8-bit Embedded Processor8161632648xxxxSetClear
    MATLAB Host Computer81632Host specific value (32 or 64)64Host specific value (32 or 64)xxLittle EndianxSetHost specific value (Set or Clear)
    AMD 
    Athlon 6481632646464xxLittle EndianxSetx
    K5/K6/Athlon81632326432xxLittle EndianxSetx
    ARM Compatible 
    ARM 7/8/9/1081632326432LongFloatxxxx
    ARM 1181632326432LongDoublexxxx
    ARM Cortex81632326432LongDoublexxxx
    ASIC/FPGA 
    ASIC/FPGANANANANANANANANANANANANA
    Analog Devices 
    Blackfin81632326432LongDoubleLittle EndianZeroSetx
    SHARC323232326432LongDoubleBig EndianZeroSetx
    TigerSHARC323232326432LongDoubleLittle EndianZeroSetx
    Atmel 
    AVR8161632648xxLittle EndianZeroSetx
    Freescale 
    32-bit PowerPC81632326432LongDoubleBig EndianZeroSetx
    6833281632326432xxBig EndianxSetx
    68HC088161632648xxBig EndianxSetx
    68HC118161632648xxBig EndianxSetx
    ColdFire81632326432xxBig EndianZeroSetx
    DSP563xx (16-bit mode)81616326416xxxxSetx
    HC(S)1281616326416xxBig EndianxSetx
    MPC52xx, MPC5500, MPC55xx, MPC5xx, , MPC7xxx, MPC82xx, MPC83xx, MPC86xx, MPC8xx81632326432LongDoublexZeroSetx
    MPC740081632326432LongDoublexZeroSetClear
    MPC85xx81632326432LongFloatxZeroSetx
    S12x81616326416xxBig EndianxSetx
    Infineon 
    C16x, XC16x81616326416xxLittle EndianZeroSetx
    TriCore81632326432xxLittle EndianxSetx
    Intel 
    8051 Compatible8161632648xxxxClearx
    x86/6481632646464xxLittle EndianxSetx
    x86/Pentium81632326432xxLittle EndianxSetx
    Microchip 
    PIC188161632648xxLittle EndianZeroSetx
    dsPIC81616326416xxLittle EndianZeroSetx
    Renesas 
    M16C81616326416xxLittle Endianxxx
    M32C816x3264xxxLittle Endianxxx
    R8C/Tiny81616326416xxLittle Endianxxx
    SH-2/3/481632326432xxxxxx
    V85081632326432xxxxxx
    SGI 
    UltraSPARC IIi81632326432xxBig EndianxSetx
    STMicroelectronics 
    ST10/Super1081616326416xxLittle EndianZeroSetx
    Texas Instruments 
    C2000161616326416IntNonexZeroSetx
    C5000161616326416IntNoneBig EndianZeroSetx
    C600081632406432IntNonexZeroSetx
    MSP43081616326416xxLittle EndianZeroSetx
    TMS470816323264xxxxxxx

  • If your test 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 Register Additional Device Vendor and Device Type Values in the Simulink Coder documentation.

Dependencies

The options available in the drop-down menu are determined by the Device vendor parameter.

Selecting a device type sets the following device-specific parameters:

  • Number of bits: char

  • Number of bits: short

  • Number of bits: int

  • Number of bits: long

  • Number of bits: long long

  • Number of bits: float

  • Number of bits: double

  • Number of bits: native

  • Number of bits: pointer

  • Largest atomic size: integer

  • Largest atomic size: floating-point

  • Byte ordering

  • Signed integer division rounds to

  • Shift right on a signed integer as arithmetic shift

  • Enable long long

Whether you can modify a device-specific parameter varies according to device type. Parameters that cannot be modified for a device are greyed out in the GUI display.

Command-Line Information

Parameter: TargetHWDeviceType
Type: string
Value: any valid value (see tips)
Default: 'Generic->Unspecified (assume 32-bit Generic)'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Number of bits: char

Describe the character bit length for the hardware used to test code.

Settings

Default: 8

Minimum: 8

Maximum: 32

Enter a value between 8 and 32.

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetBitPerChar
Type: integer
Value: any valid value
Default: 8

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: short

Describe the data bit length for the hardware used to test code.

Settings

Default: 16

Minimum: 8

Maximum: 32

Enter a value between 8 and 32.

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetBitPerShort
Type: integer
Value: any valid value
Default: 16

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: int

Describe the data integer bit length of the hardware used to test code.

Settings

Default: 32

Minimum: 8

Maximum: 32

Enter a number between 8 and 32.

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetBitPerInt
Type: integer
Value: any valid value
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: long

Describe the data bit lengths for the hardware used to test code.

Settings

Default: 32

Minimum: 32

Maximum: 64

Enter a value between 32 and 64. (The value 64 is selected by default if you run MATLAB software on a 64-bit host computer and select the MATLAB host as the test hardware — that is, TargetHWDeviceType equals 'Generic->MATLAB Host Computer'.)

Tip

All values must be a multiple of 8 and between 32 and 64.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetBitPerLong
Type: integer
Value: any valid value
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: long long

Describe the length in bits of the C long long data type that the test hardware supports.

Settings

Default: 64

Minimum: 64

Maximum: 128

The number of bits used to represent the C long long data type.

Tips

  • Use the long long data type only if your C compiler supports long long.

  • You can change the value for custom targets only. For custom targets, all values must be a multiple of 8 and between 64 and 128.

Dependencies

  • Enable long long enables use of this parameter.

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • The value of this parameter must be greater than or equal to the value of Number of bits: long.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetBitPerLongLong
Type: integer
Value: any valid value
Default: 64

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: float

Describe the bit length of floating-point data for the hardware used to test code (read-only).

Settings

Default: 32

Always equals 32.

Command-Line Information

Parameter: TargetBitPerFloat
Type: integer
Value: 32 (read-only)
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Number of bits: double

Describe the bit-length of double data for the hardware used to test code (read-only).

Settings

Default: 64

Always equals 64.

Command-Line Information

Parameter: TargetBitPerDouble
Type: integer
Value: 64 (read only)
Default: 64

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Number of bits: native

Describe the microprocessor native word size for the hardware used to test code.

Settings

Default: 32

Minimum: 8

Maximum: 64

Enter a value between 8 and 64. (The value 64 is selected by default if you run MATLAB software on a 64-bit host computer and select the MATLAB host as the test hardware — that is, TargetHWDeviceType equals 'Generic->MATLAB Host Computer'.)

Tip

All values must be a multiple of 8.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetWordSize
Type: integer
Value: any valid value
Default: 32

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Number of bits: pointer

Describe the bit-length of pointer data for the hardware used to test code (read-only).

Settings

Default: 64 for 64-bit devices; otherwise, matches the setting for Number of bits: int

Minimum: 8

Maximum: 64

Command-Line Information

Parameter: TargetBitPerPointer
Type: integer
Value: any valid value (read only)
Default: 64 for 64-bit devices; otherwise, matches the setting for TargetBitPerInt

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Largest atomic size: integer

Specify the largest integer data type that can be atomically loaded and stored on the hardware used to test code.

Settings

Default: Char

Char

Specifies that char is the largest integer data type that can be atomically loaded and stored on the hardware used to test code.

Short

Specifies that short is the largest integer data type that can be atomically loaded and stored on the hardware used to test code.

Int

Specifies that int is the largest integer data type that can be atomically loaded and stored on the hardware used to test code.

Long

Specifies that long is the largest integer data type that can be atomically loaded and stored on the hardware used to test code.

LongLong

Specifies that long long is the largest integer data type that can be atomically loaded and stored on the hardware used to test code.

Tip

This parameter is used, where possible, to optimize away unnecessary double-buffering or unnecessary semaphore protection, based on data size, in generated multirate code.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

  • You can set this parameter to LongLong only if the hardware used to test the code supports the C long long data type and you have selected Enable long long.

Command-Line Information

Parameter: TargetLargestAtomicInteger
Type: string
Value: 'Char' | 'Short' | 'Int' | 'Long' | 'LongLong'
Default: 'Char'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Largest atomic size: floating-point

Specify the largest floating-point data type that can be atomically loaded and stored on the hardware used to test code.

Settings

Default: None

Float

Specifies that float is the largest floating-point data type that can be atomically loaded and stored on the hardware used to test code.

Double

Specifies that double is the largest floating-point data type that can be atomically loaded and stored on the hardware used to test code.

None

Specifies that there is no applicable setting or not to use this parameter in generating multirate code.

Tip

This parameter is used, where possible, to optimize away unnecessary double-buffering or unnecessary semaphore protection, based on data size, in generated multirate code.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetLargestAtomicFloat
Type: string
Value: 'Float' | 'Double' | 'None'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Byte ordering

Describe the byte ordering for the hardware used to test code.

Settings

Default: Unspecified

Unspecified

Specifies that the code determines the endianness of the hardware. This is the least efficient choice.

Big Endian

The most significant byte comes first.

Little Endian

The least significant byte comes first.

Dependencies

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetEndianess
Type: string
Value: 'Unspecified' | 'LittleEndian' | 'BigEndian'
Default: 'Unspecified'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Signed integer division rounds to

Describe how your compiler for the test hardware rounds the result of dividing two signed integers.

Settings

Default: Undefined

Undefined

Choose this option if neither Zero nor Floor describes the compiler's behavior, or if that behavior is unknown.

Zero

If the quotient is between two integers, the compiler chooses the integer that is closer to zero as the result.

Floor

If the quotient is between two integers, the compiler chooses the integer that is closer to negative infinity.

Tips

  • Use the Integer rounding mode parameter on your model's blocks to simulate the rounding behavior of the C compiler that you use to compile code generated from the model. This setting appears on the Signal Attributes pane of the parameter dialog boxes of blocks that can perform signed integer arithmetic, such as the Product block.

  • For most blocks, the value of Integer rounding mode 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.

  • See Hardware Implementation OptionsHardware Implementation Options in the Simulink Coder documentation for information on how this option affects code generation.

  • The following table illustrates the compiler behavior described by the options for this parameter.

    NDIdeal N/DZeroFloorUndefined

    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 or 9

Dependency

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetIntDivRoundTo
Type: string
Value: 'Floor' | 'Zero' | 'Undefined'
Default: 'Undefined'

Recommended settings

ApplicationSetting
DebuggingNo impact for simulation and during development.
Undefined for production code generation.
TraceabilityNo impact for simulation and during development.
Zero or Floor for production code generation.
EfficiencyNo impact for simulation and during development.
Zero for production code generation.
Safety precautionNo impact for simulation and during development.
Floor for production code generation.

See Also

Shift right on a signed integer as arithmetic shift

Describe how your compiler for the test hardware fills the sign bit in a right shift of a signed integer.

Settings

Default: On

On

Generates simple efficient code whenever the Simulink model performs arithmetic shifts on signed integers.

Off

Generates fully portable but less efficient code to implement right arithmetic shifts.

Tips

  • 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

Dependency

  • Selecting a device using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if it can be modified for the currently selected device.

Command-Line Information

Parameter: TargetShiftRightIntArith
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn
Safety precautionNo impact

See Also

Enable long long

Specify that your C compiler supports the C long long data type. Most C99 compilers support long long.

Settings

Default: Off

On

Enables use of C long long data type on the test hardware.

Off

Disables use of C long long data type on the test hardware.

Tips

  • This parameter is enabled only if the selected test hardware supports the C long long data type.

  • If your compiler does not support C long long, do not select this parameter.

Dependencies

This parameter enables Number of bits: long long.

Command-Line Information

Parameter: TargetLongLongMode
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precautionNo impact for simulation and during development.
Match operation of compiler and hardware for code generation.

See Also

Was this topic helpful?