包:目标
提供目标处理器信息
此示例显示如何为开发计算机创建计时器对象。
创建定时器的功能签名。在这个例子中,函数返回auint64
数据类型和函数名timestamp_x86
.
timersignature = target.create(“函数”);timersignature.name =.“timestamp_x86”;timerSignature。ReturnType =“uint64”;
在API对象中捕获函数。
timerapi = target.create(“API”);timerapi.functions = timersignature;timerapi.language = target.language.c;timerapi.name =.'linux timer api';
捕获函数的依赖项,即运行函数所需的源文件和头文件。
timerDependencies = target.create (“BuildDependencies”);timerDependencies。IncludeFiles = {“host_timer_x86.h”};timerDependencies。IncludePaths =...{“美元(MATLAB_ROOT) /工具箱/编码器/资料/ src”};timerdependencies.sourcefiles = {'host_timer_x86.c'};
创建一个结合API和依赖项的对象。
timerimplentation = target.create(“APIImplementation”);timerImplementation。API = timerApi;timerImplementation。BuildDependencies = timerDependencies;timerImplementation。Name =“Linux计时器实现”;
创建计时器对象并将其与定时器信息相关联。
计时器= target.create (“定时器”);计时器。APIImplementation = timerImplementation;计时器。Name =“Linux计时器”;
请注意
通过使用名称-值参数,可以使用此命令创建计时器对象。
计时器= target.create (“定时器”,“名字”,“Linux计时器”,...“FunctionName”,“timestamp_x86”,...“FunctionReturnType”,“uint64”,...“FunctionLanguage”target.Language.C,...“源文件”,{'host_timer_x86.c'},...“IncludeFiles”,{“host_timer_x86.h”},...“IncludePaths”,{“美元(MATLAB_ROOT) /工具箱/编码器/资料/ src”})
将计时器和附加组件分配给处理器对象。
处理器= target.get ('处理器',“英特尔- x86 - 64(64年Linux)”);processor.timers =计时器;
的描述英特尔®核心™i7-8550U处理器,支持超线程的处理器。金宝app
i7 = target.create ('处理器',...“名字”,'i7-8550u',...“制造商”,“英特尔”,...“NumberOfCores”4...“NumberOfThreadsPerCore”,2);target.add(i7);