Documentation

Hardware Implementation Pane

Hardware Implementation Overview

Specify hardware options to simulate and generate code for models of computer-based systems, such as embedded controllers.

Hardware Implementation pane parameters do not control hardware or compiler behavior. The parameters describe hardware and compiler properties for the MATLAB® software.

  • Specifying hardware characteristics enables simulation of the model to detect error conditions that can arise when executing code, such as hardware overflow.

  • MATLAB uses the information to generate code for the platform that runs as efficiently as possible. MATLAB software also uses the information to give bit-true agreement for the results of integer and fixed-point operations in simulation and generated code.

See Also

Hardware board

Select the hardware board upon which to run your model.

Changing this parameter updates the dialog box display so that it displays parameters that are relevant to your hardware board.

To install support for a hardware board, start the Support Package Installer by selecting Get Hardware Support Packages. Alternatively, in the MATLAB Command Window, enter supportPackageInstaller.

After installing support for a hardware board, reopen the Configuration Parameters dialog box and select the hardware board.

Settings

Default: None if the specified system target file is ert.tlc, realtime.tlc, or autosar.tlc. Otherwise, the default is Determine by Code Generation system target file.

None

No hardware board is specified. The system target file specified for the model is ert.tlc, realtime.tlc, or autosar.tlc.

Determine by Code Generation system target file

Specifies that the system target file setting determines the hardware board.

Get Hardware Support Packages

Invokes the Support Package Installer. After you install a hardware support package, the list includes relevant hardware board names.

Hardware board name

Specifies the hardware board to use to implement the system this model represents.

Tips

  • When you select a hardware board, parameters for board settings appear in the dialog box display.

  • After you select a hardware board, you can select a device vendor and type.

Dependencies

The Device vendor and Device type parameter values reflect available device support for the selected hardware board.

When you select a hardware board, the selection potentially changes the Toolchain parameter value and other configuration parameter values. For example, if you change the hardware board selection to ARM Cortex-A9 (QEMU), the Toolchain parameter value changes to a supported toolchain, such as Linaro Toolchain v4.8.

Command-Line Information

Not available

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Code Generation system target file

System target file that you select on the Code Generation pane.

Device vendor

Select the manufacturer of the hardware board to use to implement the system that this model represents.

Settings

Default: Intel

If you have installed target support packages, the list of settings can include additional manufacturers.

  • AMD

  • ARM Compatible

  • Altera

  • Analog Devices

  • Atmel

  • Freescale

  • Infineon

  • Intel

  • Microchip

  • NXP

  • Renesas

  • STMicroelectronics

  • Texas Instruments

  • ASIC/FPGA

  • Custom Processor

Tips

  • The Device vendor and Device type fields share the command-line parameter ProdHWDeviceType. When specifying this parameter at the command line, separate the device vendor and device type values by using the characters ->. For example: 'Intel->x86-64 (Linux 64)'.

  • If you have a Simulink® Coder™ license and you want to add Device vendor and Device type values to the default set, see Register Additional Device Vendor and Device Type Values.

Dependencies

The Device vendor and Device type parameter values reflect available device support for the selected hardware board.

Command-Line Information

Parameter: ProdHWDeviceType
Type: string
Value: any valid value (see tips)
Default: 'Intel'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

Select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Device type

Select the type of hardware to use to implement the system that this model represents.

Settings

Default: x86–64 (Windows64)

If you have installed target support packages, the list of settings includes additional types of hardware.

AMD® options:

  • Athlon 64

  • K5/K6/Athlon

  • x86–32 (Windows 32)

  • x86–64 (Linux 64)

  • x86–64 (Mac OS X)

  • x86–64 (Windows64)

ARM® options:

  • ARM 10

  • ARM 11

  • ARM 7

  • ARM 8

  • ARM 9

  • ARM Cortex

Altera® options:

  • SoC (ARM CortexA)

Analog Devices® options:

  • ADSP–CM40x (ARM Cortex-M)

  • Blackfin

  • SHARC

  • TigerSHARC

Atmel® options:

  • AVR

  • AVR (32-bit)

  • AVR (8-bit)

Freescale™ options:

  • 32-bit PowerPC

  • 68332

  • 68HC08

  • 68HC11

  • ColdFire

  • DSP563xx (16-bit mode)

  • HC(S)12

  • MPC52xx

  • MPC5500

  • MPC55xx

  • MPC5xx

  • MPC7xxx

  • MPC82xx

  • MPC83xx

  • MPC85xx

  • MPC86xx

  • MPC8xx

  • S08

  • S12x

  • StarCore

Infineon® options:

  • C16x, XC16x

  • TriCore

Intel® options:

  • x86–32 (Windows32)

  • x86–64 (Linux 64)

  • x86–64 (Mac OS X)

  • x86–64 (Windows64)

Microchip options:

  • PIC18

  • dsPIC

NXP options:

  • Cortex—M0/M0+

  • Cortex—M3

  • Cortex—M4

Renesas® options:

  • M16C

  • M32C

  • R8C/Tiny

  • RH850

  • RL78

  • SH-2/3/4

  • V850

STMicroelectronics®:

  • ST10/Super10

Texas Instruments™ options:

  • C2000

  • C5000

  • C6000

  • MSP430

  • Stellaris Cortex—M3

  • TMS470

  • TMS570 Cortex—R4

ASIC/FPGA options:

  • ASIC/FPGA

Tips

  • Before you specify the device type, select the device vendor.

  • To view parameters for a device type, click the arrow button to the left of Device details.

  • Selecting a device type specifies the hardware device to define system constraints:

    • Default hardware properties appear as the initial values.

    • You cannot change parameters with only one possible value.

    • Parameters with more than one possible value provide a list of valid values.

    The following table lists values for each device type.

    Key:float and double (not listed) always equal 32 and 64, respectively
    Round to = Signed integer division rounds to
    Shift right = Shift right on a signed integer as arithmetic shift
    Long long = Support long long
    Device vendor / Device typeNumber of bitsLargest atomic sizeByte orderingRound toShift right Long long
    charshortintlonglong longnativepointersize_tptrdiff_tintfloat
    AMD
    Athlon 6481632646464646464CharNoneLittle EndianZero
    K5/K6/Athlon81632326432323232CharNoneLittle EndianZero
    x86–32 (Windows32)81632326432323232CharFloatLittle EndianZero
    x86–64 (Linux 64)81632646464646464CharFloatLittle EndianZero
    x86–64 (Mac OS X)81632646464646464CharFloatLittle EndianZero
    x86–64 (Windows64)81632326464646464CharFloatLittle EndianZero
    ARM Compatible
    ARM 7/8/9/1081632326432323232LongFloatLittle EndianZero
    ARM 1181632326432323232LongDoubleLittle EndianZero
    ARM Cortex81632326432323232LongDoubleLittle EndianZero
    Altera
    SoC (ARM Cortex A)81632326432323232CharNoneLittle EndianZero
    Analog Devices
    ADSP-CM40x(ARM Cortex-M)81632326432323232LongDoubleLittle EndianZero
    Blackfin81632326432323232LongDoubleLittle EndianZero
    SHARC323232326432323232LongDoubleBig EndianZero
    TigerSHARC323232326432323232LongDoubleLittle EndianZero
    Atmel
    AVR8161632648161616CharNoneLittle EndianZero
    AVR (32-bit)81632326432323232CharNoneLittle EndianZero
    AVR (8-bit)81616326416161616CharNoneLittle EndianZero
    Freescale
    32-bit PowerPC81632326432323232LongDoubleBig EndianZero
    6833281632326432323232CharNoneBig EndianZero
    68HC0881616326488168CharNoneBig EndianZero
    68HC11816163264881616CharNoneBig EndianZero
    ColdFire81632326432323232CharNoneBig EndianZero
    DSP563xx (16-bit mode)81616326416161616CharNoneLittle EndianZero
    DSP5685x81616326416161616CharFloatLittle EndianZero
    HC(S)1281616326416161616CharNoneBig EndianZero
    MPC52xx, MPC5500, MPC55xx, MPC5xx, PC5xx, MPC7xxx, MPC82xx, MPC83xx, MPC86xx, MPC8xx81632326432323232LongNoneBig EndianZero
    MPC85xx81632326432323232LongDoubleBig EndianZero
    S0881616326416161616CharNoneBig EndianZero
    S12x81616326416161616CharNoneBig EndianZero
    StarCore81632326432323232CharNoneLittle EndianZero
    Infineon
    C16x, XC16x81616326416161616CharNoneLittle EndianZero
    TriCore81632326432323232CharNoneLittle EndianZero
    Intel
    x86–32 (Windows32)81632326432323232CharFloatLittle EndianZero
    x86–64 (Linux 64)81632646464646464CharFloatLittle EndianZero
    x86–64 (Mac OS X)81632646464646464CharFloatLittle EndianZero
    x86–64 (Windows64)81632326464646464CharFloatLittle EndianZero
    Microchip
    PIC18816163264882424CharNoneLittle EndianZero
    dsPIC81616326416161616CharNoneLittle EndianZero
    NXP
    Cortex—M0/M0+81632326432323232LongDoubleLittle EndianZero
    Cortex—M381632326432323232LongDoubleLittle EndianZero
    Cortex—M481632326432323232LongDoubleLittle EndianZero
    Renesas
    M16C81616326416161616CharNoneLittle EndianZero
    M32C81616326416161616CharNoneLittle EndianZero
    R8C/Tiny81616326416161616CharNoneLittle EndianZero
    RH85081632326432323232CharNoneLittle EndianZero
    RL7881616326416161616CharNoneLittle EndianZero
    SH-2/3/481632326432323232CharNoneBig EndianZero
    V85081632326432323232CharNoneLittle EndianZero
    STMicroelectronics
    ST10/Super1081616326416161616CharNoneLittle EndianZero
    Texas Instruments
    C2000161616326416321616IntNoneLittle EndianZero
    C5000161616326416161616IntNoneBig EndianZero
    C600081632406432323232IntNoneLittle EndianZero
    MSP43081616326416161616CharNoneLittle EndianZero
    Stellaris Cortex—M38163232632323232LongDoubleLittle EndianZero
    TMS47081632326432323232LongDoubleLittle EndianZero
    TMS570 Cortex—R481632326432323232LongDoubleLittle EndianZero
    ASIC/FPGA
    ASIC/FPGANANANANANANANANANANANANANANANA

  • The Device vendor and Device type fields share the command-line parameter ProdHWDeviceType. When specifying this parameter at the command line, separate the device vendor and device type values by using the characters ->. For example: 'Intel->x86-64 (Linux 64)'.

  • If you have a Simulink Coder license and you want to add Device vendor and Device type values to the default set, see Register Additional Device Vendor and Device Type Values.

Dependencies

The Device vendor and Device type parameter values reflect available device support for the selected hardware board.

Menu options that are available in the menu depend on the Device vendor parameter setting.

With the exception of device vendor ASIC/FPGA, selecting a device type sets the following 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

  • Support long long

Whether you can modify the setting of a device-specific parameter varies according to device type.

Command-Line Information

Parameter: ProdHWDeviceType
Type: string
Value: any valid value (see tips)
Default: 'Intel->x86–64 (Windows64)'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Device details

Click the arrow to list parameters for:

  • Data type bit specifications

  • Largest atomic sizes for integer and floating-point values

  • Byte ordering

  • What signed integer division rounds to

  • Whether signed integer as an arithmetic shift shifts right

  • Whether there is support for the long long data type

Number of bits: char

Describe the character bit length for the hardware.

Settings

Default: 8

Minimum: 8

Maximum: 32

Enter a value from 8 through 32.

Tip

All values must be a multiple of 8.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: short

Describe the data bit length for the hardware.

Settings

Default: 16

Minimum: 8

Maximum: 32

Enter a value from 8 through 32.

Tip

All values must be a multiple of 8.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: int

Describe the data integer bit length for the hardware.

Settings

Default: 32

Minimum: 8

Maximum: 32

Enter a number from 8 through 32.

Tip

All values must be a multiple of 8.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: long

Describe the data bit lengths for the hardware.

Settings

Default: 32

Minimum: 32

Maximum: 128

Enter a value from 32 through 128.

Tip

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

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: long long

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

Settings

Default: 64

Minimum: 64

Maximum: 128

The number of bits that 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 be 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 by using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: float

Describe the bit length of floating-point data for the 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 precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: double

Describe the bit-length of double data for the 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 precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: native

Describe the microprocessor native word size for the hardware.

Settings

Default: 64

Minimum: 8

Maximum: 64

Enter a value from 8 through 64.

Tip

All values must be a multiple of 8.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: pointer

Describe the bit-length of pointer data for the hardware.

Settings

Default: 64

Minimum: 8

Maximum: 64

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: size_t

Describe the bit-length of size_t data for the hardware.

If ProdEqTarget is on, an Embedded Coder® processor-in-the-loop (PIL) simulation checks this setting with reference to the target hardware. If ProdEqTarget is off, the PIL simulation checks the TargetBitPerSizeT setting.

Settings

Default: 64

Value must be 8, 16, 24, 32, 40, 64, or 128 and greater or equal to the value of int.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Number of bits: ptrdiff_t

Describe the bit-length of ptrdiff_t data for the hardware.

If ProdEqTarget is on, an Embedded Coder processor-in-the-loop (PIL) simulation checks this setting with reference to the target hardware. If ProdEqTarget is off, the PIL simulation checks the TargetBitPerPtrDiffT setting.

Settings

Default: 64

Value must be 8, 16, 24, 32, 40, 64, or 128 and greater or equal to the value of int.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Largest atomic size: integer

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

Settings

Default: Char

Char

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

Short

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

Int

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

Long

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

LongLong

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

Tip

Use this parameter, where possible, to remove unnecessary double-buffering or unnecessary semaphore protection, based on data size, in generated multirate code.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

  • You can set this parameter to LongLong only if the 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 precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Largest atomic size: floating-point

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

Settings

Default: Float

Float

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

Double

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

None

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

Tip

Use this parameter, where possible, to remove unnecessary double-buffering or unnecessary semaphore protection, based on data size, in generated multirate code.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyTarget specific
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Byte ordering

Describe the byte ordering for the hardware board.

Settings

Default: Little Endian

Unspecified

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

Big Endian

The most significant byte appears first in the byte ordering.

Little Endian

The least significant byte appears first in the byte ordering.

Dependencies

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Signed integer division rounds to

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

Settings

Default: Zero

Undefined

Choose this option if neither Zero nor Floor describes the compiler 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

  • To simulate rounding behavior of the C compiler that you use to compile generated code, use the Integer rounding mode parameter for blocks. 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.

  • For more information on how this parameter affects code generation, see Hardware Implementation Options.

  • This table lists 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 by using the Device vendor and Device type parameters sets a device-specific value for this parameter.

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended settings

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

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Shift right on a signed integer as arithmetic shift

Describe how your compiler for the 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. The most significant bit indicates the sign of the number in twos complement notation.

Dependency

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

  • This parameter is enabled only if you can modify it for the selected hardware.

Command-Line Information

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

Recommended settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn
Safety precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Support 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 simulation and code generation on the hardware.

Off

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

Tips

  • This parameter is enabled only if the selected 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 precaution

No recommendation for simulation without code generation.
For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list.  If your Device vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also

Device vendor

Select the manufacturer of the hardware board to use to implement the test system that this model represents.

Settings

Default: Intel

  • AMD

  • ARM Compatible

  • Altera

  • Analog Devices

  • Atmel

  • Freescale

  • Infineon

  • Intel

  • Microchip

  • NXP

  • Renesas

  • STMicroelectronics

  • Texas Instruments

  • ASIC/FPGA

  • Custom Processor

Tips

  • The Device vendor and Device type fields share the command-line parameter TargetHWDeviceType. When specifying this parameter from the command line, separate the device vendor and device type values by using the characters ->. For example: 'Intel->x86-64 (Linux 64)'.

  • If you have a Simulink Coder license and you want to add Device vendor and Device type values to the default set, see Register Additional Device Vendor and Device Type Values.

Dependencies

The Device vendor and Device type parameter values reflect available device support for the selected hardware board.

Command-Line Information

Parameter: TargetHWDeviceType_Vendor
Type: string
Value: any valid value (see tips)
Default: 'Intel'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precaution

No impact when Test hardware is the same as production hardware is selected. If it is not selected, no recommendation.

See Also

Device type

Select the type of hardware to use to implement the test system.

Settings

Default: x86–64 (Windows64)

AMD options:

  • Athlon 64

  • K5/K6/Athlon

  • x86–32 (Windows 32)

  • x86–64 (Linux 64)

  • x86–64 (Mac OS X)

  • x86–64 (Windows64)

ARM options:

  • ARM 10

  • ARM 11

  • ARM 7

  • ARM 8

  • ARM 9

  • ARM Cortex

Altera options:

  • SoC (ARM CortexA)

Analog Devices options:

  • ADSP–CM40x (ARM Cortex-M)

  • Blackfin

  • SHARC

  • TigerSHARC

Atmel options:

  • AVR

  • AVR (32-bit)

  • AVR (8-bit)

Freescale options:

  • 32-bit PowerPC

  • 68332

  • 68HC08

  • 68HC11

  • ColdFire

  • DSP563xx (16-bit mode)

  • HC(S)12

  • MPC52xx

  • MPC5500

  • MPC55xx

  • MPC5xx

  • MPC7xxx

  • MPC82xx

  • MPC83xx

  • MPC85xx

  • MPC86xx

  • MPC8xx

  • S08

  • S12x

  • StarCore

Infineon options:

  • C16x, XC16x

  • TriCore

Intel options:

  • x86–32 (Windows32)

  • x86–64 (Linux 64)

  • x86–64 (Mac OS X)

  • x86–64 (Windows64)

Microchip options:

  • PIC18

  • dsPIC

NXP options:

  • Cortex—M0/M0+

  • Cortex—M3

  • Cortex—M4

Renesas options:

  • M16C

  • M32C

  • R8C/Tiny

  • RH850

  • RL78

  • SH-2/3/4

  • V850

STMicroelectronics:

  • ST10/Super10

Texas Instruments options:

  • C2000

  • C5000

  • C6000

  • MSP430

  • Stellaris Cortex—M3

  • TMS470

  • TMS570 Cortex—R4

ASIC/FPGA options:

  • ASIC/FPGA

Tips

  • Before you specify the device type, select the device vendor.

  • Selecting a device type specifies the hardware device to define system constraints:

    • Default hardware properties appear in the dialog box display as the initial values.

    • You cannot change parameters with only one possible value.

    • Parameters with more than one possible value provide a list of valid values.

    This table lists values for each device type.

    Key:float and double (not listed) always equal 32 and 64, respectively
    Round to = Signed integer division rounds to
    Shift right = Shift right on a signed integer as arithmetic shift
    Long long = Support long long
    Device vendor / Device typeNumber of bitsLargest atomic sizeByte orderingRound toShift right Long long
    charshortintlonglong longnativepointersize_tptrdiff_tintfloat
    AMD
    Athlon 6481632646464646464CharNoneLittle EndianZero
    K5/K6/Athlon81632326432323232CharNoneLittle EndianZero
    x86–32 (Windows32)81632326432323232CharFloatLittle EndianZero
    x86–64 (Linux 64)81632646464646464CharFloatLittle EndianZero
    x86–64 (Mac OS X)81632646464646464CharFloatLittle EndianZero
    x86–64 (Windows64)81632326464646464CharFloatLittle EndianZero
    ARM Compatible
    ARM 7/8/9/1081632326432323232LongFloatLittle EndianZero
    ARM 1181632326432323232LongDoubleLittle EndianZero
    ARM Cortex81632326432323232LongDoubleLittle EndianZero
    Altera
    SoC (ARM Cortex A)81632326432323232CharNoneLittle EndianZero
    Analog Devices
    ADSP-CM40x(ARM Cortex-M)81632326432323232LongDoubleLittle EndianZero
    Blackfin81632326432323232LongDoubleLittle EndianZero
    SHARC323232326432323232LongDoubleBig EndianZero
    TigerSHARC323232326432323232LongDoubleLittle EndianZero
    Atmel
    AVR8161632648161616CharNoneLittle EndianZero
    AVR (32-bit)81632326432323232CharNoneLittle EndianZero
    AVR (8-bit)81616326416161616CharNoneLittle EndianZero
    Freescale
    32-bit PowerPC81632326432323232LongDoubleBig EndianZero
    6833281632326432323232CharNoneBig EndianZero
    68HC0881616326488168CharNoneBig EndianZero
    68HC11816163264881616CharNoneBig EndianZero
    ColdFire81632326432323232CharNoneBig EndianZero
    DSP563xx (16-bit mode)81616326416161616CharNoneLittle EndianZero
    DSP5685x81616326416161616CharFloatLittle EndianZero
    HC(S)1281616326416161616CharNoneBig EndianZero
    MPC52xx, MPC5500, MPC55xx, MPC5xx, PC5xx, MPC7xxx, MPC82xx, MPC83xx, MPC86xx, MPC8xx81632326432323232LongNoneBig EndianZero
    MPC85xx81632326432323232LongDoubleBig EndianZero
    S0881616326416161616CharNoneBig EndianZero
    S12x81616326416161616CharNoneBig EndianZero
    StarCore81632326432323232CharNoneLittle EndianZero
    Infineon
    C16x, XC16x81616326416161616CharNoneLittle EndianZero
    TriCore81632326432323232CharNoneLittle EndianZero
    Intel
    x86–32 (Windows32)81632326432323232CharFloatLittle EndianZero
    x86–64 (Linux 64)81632646464646464CharFloatLittle EndianZero
    x86–64 (Mac OS X)81632646464646464CharFloatLittle EndianZero
    x86–64 (Windows64)81632326464646464CharFloatLittle EndianZero
    Microchip
    PIC18816163264882424CharNoneLittle EndianZero
    dsPIC81616326416161616CharNoneLittle EndianZero
    NXP
    Cortex—M0/M0+81632326432323232LongDoubleLittle EndianZero
    Cortex—M381632326432323232LongDoubleLittle EndianZero
    Cortex—M481632326432323232LongDoubleLittle EndianZero
    Renesas
    M16C81616326416161616CharNoneLittle EndianZero
    M32C81616326416161616CharNoneLittle EndianZero
    R8C/Tiny81616326416161616CharNoneLittle EndianZero
    RH85081632326432323232CharNoneLittle EndianZero
    RL7881616326416161616CharNoneLittle EndianZero
    SH-2/3/481632326432323232CharNoneBig EndianZero
    V85081632326432323232CharNoneLittle EndianZero
    STMicroelectronics
    ST10/Super1081616326416161616CharNoneLittle EndianZero
    Texas Instruments
    C2000161616326416321616IntNoneLittle EndianZero
    C5000161616326416161616IntNoneBig EndianZero
    C600081632406432323232IntNoneLittle EndianZero
    MSP43081616326416161616CharNoneLittle EndianZero
    Stellaris Cortex—M38163232632323232LongDoubleLittle EndianZero
    TMS47081632326432323232LongDoubleLittle EndianZero
    TMS570 Cortex—R481632326432323232LongDoubleLittle EndianZero
    ASIC/FPGA
    ASIC/FPGANANANANANANANANANANANANANANANA

  • The Device vendor and Device type fields share the command-line parameter ProdHWDeviceType. When specifying this parameter atth e command line, separate the device vendor and device type values by using the characters ->. For example: 'Intel->x86-64 (Linux 64)'.

  • If you have a Simulink Coder license and you want to add Device vendor and Device type values to the default set, see Register Additional Device Vendor and Device Type Values.

Dependencies

The Device vendor and Device type parameter values reflect available device support for the selected hardware board.

Options that are available depend on the Device vendor parameter setting.

With the exception of device vendor ASIC/FPGA, selecting a device type sets the following 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

  • Number of bits: size_t

  • Number of bits: ptrdiff_t

  • 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

  • Support long long

Whether you can modify the value of a device-specific parameter varies according to the device type.

Command-Line Information

Parameter: TargetHWDeviceType_Type
Type: string
Value: any valid value (see tips)
Default: 'Intel->x86–64 (Windows64)'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Base Rate Task Priority

This parameter sets the static priority of the base rate task. However, the changes that you make in this parameter do not result in any functionality differences on the LEGO® MINDSTORMS® EV3 brick.

Settings

Default: 40

Detect task overruns

Detect when a task overrun occurs in a Simulink model running on the target hardware. Indicate when an overrun has occurred.

A task overrun occurs if the target hardware is still performing one instance of a task when the next instance of that task is scheduled to begin.

You can fix overruns by decreasing the frequency with which tasks are scheduled to run, and by reducing the number or complexity of the tasks defined by your model.

If those solutions do not fix the task overrun condition, and you are using External mode, consider disabling External mode.

Settings

Default: None

Device Address

Enter the IP address or host name of the hardware board.

When you use the Support Package Installer to update the firmware on the board, the Support Package Installer automatically gets the value of the IP address from the board and applies it to this parameter.

If you swap boards, or change the IP address of the board, get the value of the new IP address and enter it here.

Settings

Default: 192.168.0.101

Username

Enter the root user name for Linux® running on the hardware board.

When you use the Support Package Installer to update the hardware board firmware, the Support Package Installer automatically applies the value you entered there to this parameter.

Settings

Default: pi

Password

Enter the root password for Linux running on the hardware board.

When you use the Support Package Installer to update the hardware board firmware, the Support Package Installer automatically applies the value you entered there to this parameter.

Settings

Default: raspberry

Build action

Specify whether you want only build or build, load, and run actions during code generation.

Settings

Default: Build, load and run

Build

Build the code during the build process.

Build, load and run

Build, load, and to run the generated code during the build process.

Build directory

Enter the build directory for Linux running on the hardware board.

When you use the Support Package Installer to update the hardware board firmware, the Support Package Installer automatically applies the value you entered there to this parameter.

Settings

Default: /home/pi

Set host COM port

Automatically detect or manually set the COM port your host computer uses to communicate with the hardware board.

This parameter appears when the Hardware board parameter is set to LEGO MINDSTORMS NXT, Arduino Mega 2560, or Arduino Uno.

    Warning   Do not connect Arduino® Uno and Arduino Mega 2560 to a RS-232 serial interface, commonly found on computers and equipment. RS-232 interfaces can use voltages greater than 5 Volts, which can damage your Arduino hardware.

Settings

Default: Automatically

Automatically

Let the software determine which COM Port your host computer uses.

Manually

Select this option to display the COM port number parameter.

Analog input reference voltage

Set the reference voltage used to measure inputs to the ANALOG IN pins.

This parameter appears when the Target hardware parameter is set to Arduino Mega 2560 or Arduino Uno.

    Warning   Only connect an external power source to AREF while this parameter is set to External. Connecting an external power source to AREF while this parameter is set to any other option exposes the internal voltage references to the external voltage. This voltage difference can damage your hardware.

    Do not connect Arduino Uno and Arduino Mega 2560 to voltages greater than 5 Volts.

    Do not connect Arduino Due to voltages greater than 3.3 Volts.

    Voltages greater than the specified limits can damage your Arduino hardware.

Settings

Default: Default

Default

Use the default operating voltage of the board. For Arduino Uno and Arduino Mega 2560 the operating voltage is 5 Volts.

Internal (1.1 V)

Valid for Arduino Mega 2560 only: Use the internal 1.1 Volt reference.

Internal (2.56 V)

Valid for Arduino Mega 2560 only: Use the internal 2.56 Volt reference.

External

On the Arduino Uno, Arduino Nano and Arduino Mega 2560, use an external 0-5 volt power supply connected to the AREF pin. This voltage should match the voltage of the power supply connected to the Arduino hardware. If your application requires low-noise measurements, use this option with a filtered power supply.

Serial 0 baud rate, Serial 1 baud rate, Serial 2 baud rate, Serial 3 baud rate

Set the baud rate of the serial port on the Arduino hardware.

If you set Set host COM port to Manually, then set Serial 0 baud rate as described in the "Set the COM Port and Baud Rate Manually" topic.

For information on serial ports for different Arduino boards, see Pin Mapping on Arduino Blocks.

Settings

Default: 9600

300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 76800, 115200, 128000, 500000, 1000000

SPI clock out frequency (in MHz)

Select a value from the list of master clock frequency to obtain an SPI clock frequency.

Settings

Default: 4000

8000, 4000, 2000, 1000, 500, 250, 125

Select an SPI mode for data transmission.

Settings

Default: Mode 0 - Clock Polarity 0, Clock Phase 0

  • Mode 0 - Clock Polarity 0, Clock Phase 0

  • Mode 1 - Clock Polarity 0, Clock Phase 1

  • Mode 2 - Clock Polarity 1, Clock Phase 0

  • Mode 3- Clock Polarity 1, Clock Phase 1

Bit order

Select the bit order for transmissions.

MSB first to send the most significant bit first for transmission or select LSB first to send the least significant bit first for transmission.

Settings

Default: MSB first

  • MSB first – Send the most significant bit first for transmission.

  • LSB first – Send the least significant bit first for transmission.

Use static IP address and disable DHCP

Select this check box to disable the DHCP. The static IP address provided is used for setting up the ethernet connection

IP address (Ethernet shield)

Enter the IP address of the Arduino Ethernet shield.

MAC address

Enter the machine address of the Arduino Ethernet shield.

Use static IP address and disable DHCP

Select this check box to disable the DHCP. The static IP address provided is used for setting up the WiFi connection.

Connection type

Enter the type of connection that should be used to download the executable from the host machine to the LEGO MINDSTORMS EV3 brick.

Device ID

Enter the ID of the LEGO MINDSTORMS EV3 brick. You can find this information in the ‘Brick Info' pane of the LEGO MINDSTORMS EV3 brick.

IP address

Enter the IP address of the LEGO MINDSTORMS EV3 brick..

IP address (WiFi shield)

Enter the IP address of the Arduino WiFi shield.

Service set identifier (SSID)

Enter the SSID of your network. An SSID is a unique ID consisting of 32 characters and is used for naming wireless networks. An SSID ensures that the data you send over the network reaches the correct destination.

WiFi encryption

The WiFi encryption of the network you connect to.

Settings

Default: None

None

Network is not WiFi encrypted.

WPA

Network uses WPA WiFi encryption.

WEP

Network uses WEP WiFi encryption.

WEP key

Enter the WEP key of the network.

This parameter appears only when you select WEP for the WiFi encryption parameter.

WEP key index

Enter the WEP key index of the WEP key.

This parameter appears only when you select WEP for the WiFi encryption parameter.

WPA password

Enter the WPA password of the network.

This parameter appears only when you select WPA for the WiFi encryption parameter.

Connect to custom ThingSpeak server

Select this check box to connect to the custom ThingSpeak server. Otherwise, the ThingSpeak block connects to the default address of 184.106.153.149 through port 80.

Server IP address

Specify the IP address of the custom ThingSpeak server.

Port

Specify the port number through which the ThingSpeak block connects to the ThingSpeak server.

Communication interface

Use the ‘serial' option to run your model in the External mode with serial communication.

Settings

Default: Serial

  • Serial

  • TCP/IP

  • WiFi

Device

Select the device you are using. The list includes any devices that are connected to your computer and turned on.

To see a device that was recently connected and turned on, click Refresh.

Settings

Default: No devices detected

Package name

All Android applications have a full Java-language-style package name. The package name should be unique. To avoid conflicts with other developers, use Internet domain ownership, in the reverse order, as the basis for your package name. For example com.mydomain.myappname.

Settings

Default: com.example

Port

Set the value of the TCP/IP or WiFi port number, from 1024 to 65535. External mode uses this port for communications between the hardware board and host computer.

Settings

Default: 17725

Verbose

Select this check box to view the External Mode execution progress and updates in the Diagnostic Viewer or in the MATLAB Command Window. This parameter appears when you select TCP/IP or WiFi for Communication interface.

IP Address

Enter the IP address of the LEGO MINDSTORMS EV3 brick.

Was this topic helpful?