| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
| On this page… |
|---|
Specifies parameters of the target hardware implementation.
The Hardware Implementation parameters dialog box appears as follows by default. (The long and native word size values shown are for a 32-bit MATLAB host computer.) In this case, the test hardware and the deployment hardware are the same and you use the Embedded hardware pane to set the hardware properties for both.

To display the Hardware Implementation dialog box for Embedded MATLAB Coder, follow these steps at the MATLAB command prompt:
Define a configuration object variable for hardware implementation in the MATLAB workspace by issuing a constructor command like this:
hwi_cfg=emlcoder.HardwareImplementation;
Open the property dialog box using one of these methods:
Double-click the configuration object variable in the MATLAB workspace
Issue the open command from the MATLAB prompt, passing it the configuration object variable, as in this example:
open hwi_cfg;
The dialog box displays on your desktop.
Configuring Your Environment for Code Generation
The following table describes the hardware implementation parameters for Embedded MATLAB Coder:
| Parameter | Equivalent
Command-Line Property and Values (default in bold) | Description |
|---|---|---|
| Device vendor | ProdHWDeviceType string, 'Generic->MATLAB Host Computer' | Specify manufacturer of hardware you will use to implement the production version of the system. |
| Device type | ProdHWDeviceType string, 'Generic->MATLAB Host Computer' | Specify type of hardware you will use to implement the production version of the system. |
| Number of bits: char | ProdBitPerChar integer, 8 | Describe length in bits of the C char data type supported by the deployment hardware. |
| Number of bits: short | ProdBitPerShort integer, 16 | Describe length in bits of the C short data type supported by the deployment hardware. |
| Number of bits: int | ProdBitPerInt integer, 32 | Describe length in bits of the C int data type supported by the deployment hardware. |
| Number of bits: long | ProdBitPerLong integer, host-specific value (32 or 64) | Describe length in bits of the C long data type supported by the deployment hardware. |
| Number of bits: native word size | ProdWordSize integer, host-specific value (32 or 64) | Describe microprocessor native word size for the deployment hardware. |
| Byte ordering | ProdEndianess 'Unspecified', 'LittleEndian', 'BigEndian' | Describe significance of the first byte of a data word for the deployment hardware. |
| Signed integer division rounds to | ProdIntDivRoundTo 'Undefined', 'Zero', 'Floor' | Describe how your compiler rounds the result of dividing one signed integer by another to produce a signed integer quotient. |
| Shift right on a signed integer as arithmetic shift | ProdShiftRightIntArith true, false | Describe whether your compiler implements a signed integer right shift as an arithmetic right shift. |
| None | ProdEqTarget true, false | Specify whether the test hardware differs from the deployment hardware. Dependencies:
|
The Hardware Implementation parameters dialog box displays the Emulation hardware (code generation only) subpane when the test hardware and the deployment hardware differ. In this case, you use the Embedded hardware (simulation and code generation) subpane to specify the deployment hardware properties and the Emulation hardware (code generation only) pane to specify the test hardware properties.

The following table describes the emulation hardware implementation parameters for Embedded MATLAB Coder:
| Parameter | Equivalent
Command-Line Property and Values (default in bold) | Description |
|---|---|---|
| Device vendor | TargetHWDeviceType string, 'Generic->MATLAB Host Computer' | Select the manufacturer of the hardware that will be used to test the generated code. Dependency:
|
| Device type | TargetHWDeviceType string, 'Generic->MATLAB Host Computer' | Select the type of hardware that will be used to test the generated code. Dependency:
|
| Number of bits: char | TargetBitPerChar integer, 8 | Describe length in bits of the C char data type supported by the test hardware. Dependency:
|
| Number of bits: short | TargetBitPerShort integer, 16 | Describe length in bits of the C short data type supported by the test hardware. Dependency:
|
| Number of bits: int | TargetBitPerInt integer, 32 | Describe length in bits of the C int data type supported by the test hardware. Dependency:
|
| Number of bits: long | TargetBitPerLong integer, host-specific value (32 or 64) | Describe length in bits of the C long data type supported by the test hardware. Dependency:
|
| Number of bits: native word size | TargetWordSize integer, host-specific value (32 or 64) | Describe the microprocessor native word size for the test hardware. Dependency:
|
| Byte ordering | TargetEndianess 'Unspecified', 'LittleEndian', 'BigEndian' | Describe significance of the first byte of a data word for the test hardware. Dependency:
|
| Signed integer division rounds to | TargetIntDivRoundTo 'Undefined', 'Zero', 'Floor' | Describe how to produce a signed integer quotient for the test hardware. Dependency:
|
| Shift right on a signed integer as arithmetic shift | TargetShiftRightIntArith true, false | Describe how your compiler rounds the result of two signed integers for the test hardware. Dependency:
|
![]() | Automatic C MEX Generation Dialog Box for Embedded MATLAB Coder | Compiler Options Dialog Box | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |