target.LanguageImplementation Class
Namespace: target
Provide C and C++ compiler implementation details
Description
Use the target.LanguageImplementation
class to provide implementation
details about the C and C++ compiler for your target hardware. For example, byte
ordering.
To create a target.LanguageImplementation
object, use the target.create
function.
Properties
Size in bits of the largest floating-point data type that you can atomically load and store on the hardware
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: int32
Size in bits of the largest integer that you can atomically load and store on the hardware
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: int32
Byte ordering implemented by target hardware.
Attributes:
GetAccess | public |
SetAccess | public |
Provides C and C++ data type definitions through properties described in this table.
Property Name | Purpose |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes:
GetAccess | public |
SetAccess | private |
Value of Name
property.
Attributes:
GetAccess | public |
SetAccess | private |
Name of the target language implementation
Attributes:
GetAccess | public |
SetAccess | public |
Native word size for the target hardware.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: int32
Examples
This example shows how to register a new hardware device.
Create a target.Processor
object for the new hardware device.
myProc = target.create("Processor",Name="MyProcessor", ... Manufacturer="MyManufacturer");
Create a target.LanguageImplementation
object for language implementation details.
myLanguageImplementation = target.create("LanguageImplementation", ... Name="MyProcessorImplementation");
Specify language implementation details.
myLanguageImplementation.Endianess = target.Endianess.Little; myLanguageImplementation.AtomicIntegerSize = 64; myLanguageImplementation.AtomicFloatSize = 64; myLanguageImplementation.WordSize = 64; myLanguageImplementation.DataTypes.Char.Size = 8; myLanguageImplementation.DataTypes.Short.Size = 16; myLanguageImplementation.DataTypes.Int.Size = 32; myLanguageImplementation.DataTypes.Long.Size = 64; myLanguageImplementation.DataTypes.LongLong.IsSupported = true; myLanguageImplementation.DataTypes.LongLong.Size = 64; myLanguageImplementation.DataTypes.Float.Size = 32; myLanguageImplementation.DataTypes.Double.Size = 64; myLanguageImplementation.DataTypes.Pointer.Size = 32; myLanguageImplementation.DataTypes.SizeT.Size = 64; myLanguageImplementation.DataTypes.PtrDiffT.Size = 64;
Associate the language implementation with the hardware device.
myProc.LanguageImplementations = myLanguageImplementation;
Add the target.Processor
object to an internal database.
objectsAdded = target.add(myProc);
target.add summary: Objects added to internal database for current MATLAB session: target.LanguageImplementation "MyProcessorImplementation" target.Processor "MyManufacturer-MyProcessor"
If you are using the MATLAB® Coder™: On the Hardware tab, you see the new device. Alternatively, you can now create a
coder.Hardware
object for this device by using thecoder.hardware
function.If you are using the Simulink® Coder™: On the Hardware Implementation pane, you can now set Device vendor and Device type to
MyManufacturer
andMyProcessor
respectively.
To remove the objects from the internal database, enter:
target.remove(objectsAdded)
target.remove summary: Objects removed from internal database: target.LanguageImplementation "MyProcessorImplementation" target.Processor "MyManufacturer-MyProcessor"
If an existing hardware implementation contains most of the values that you want in a new hardware implementation, you can quickly create the new implementation by creating and modifying a copy of the existing implementation.
Create a target.Processor
object for the new hardware device.
myProc = target.create("Processor",Name="MyProcessor", ... Manufacturer="MyManufacturer");
Create a target.LanguageImplementation
object that copies an existing language implementation.
myCopiedImplementation = target.create("LanguageImplementation", ... Name="MyCopiedImplementation", ... Copy="Atmel-AVR");
Specify the required language implementation details. For example, byte ordering.
myCopiedImplementation.Endianess = target.Endianess.Big;
Associate the language implementation with the hardware device.
myProc.LanguageImplementations = myCopiedImplementation;
Add the target.Processor
object to an internal database.
objectsAdded = target.add(myProc);
target.add summary: Objects added to internal database for current MATLAB session: target.LanguageImplementation "MyCopiedImplementation" target.Processor "MyManufacturer-MyProcessor"
To remove the objects from the internal database, enter:
target.remove(objectsAdded)
target.remove summary: Objects removed from internal database: target.LanguageImplementation "MyCopiedImplementation" target.Processor "MyManufacturer-MyProcessor"
If your hardware device requires the same hardware implementation as an existing implementation, you can reuse the existing implementation.
Create a target.Processor
object for the new hardware device.
myProc = target.create( "Processor",Name="MyProcessor", ... Manufacturer="MyManufacturer");
Retrieve the existing implementation by using the identifier for the device vendor and type.
existingImplementation = target.get("LanguageImplementation", ... "ARM Compatible-ARM Cortex");
Associate the language implementation with the hardware device.
myProc.LanguageImplementations = existingImplementation;
Add the target.Processor
object to an internal database.
objectsAdded = target.add(myProc);
target.add summary: Objects added to internal database for current MATLAB session: target.Processor "MyManufacturer-MyProcessor" 1 object not added because they already exist.
To remove the objects from the internal database, enter:
target.remove(objectsAdded);
target.remove summary: Objects removed from internal database: target.Processor "MyManufacturer-MyProcessor"
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)