当前位置:网站首页>Sim Api User Guide(8)
Sim Api User Guide(8)
2022-04-23 09:55:00 【weixin_38498942】
Sim Api User Guide(8)
2.10.7 AddOneShotTimedCallback
Prototype
typedef void (*timed_callback) (void *handle);
HEXAPI_Status AddOneShotTimedCallback(void *handle,
HEX_8u_t interval, HEXAPI_Interval i_typ, timed_callback tc)
Parameters
| 名字 | 类型 | 描述 |
|---|---|---|
| handle | Input | 从 RegisterCosim() 或 RegisterCosimArgs() 返回的外部总线模型句柄 |
| interval | Input | 以模拟器时间单位表示的间隔 (表示为双精度浮点值) |
| i_typ | Input | 时间单位类型: HEX_MILLISEC - 毫秒、HEX_MICROSEC - 微秒 |
| 、HEX_NANOSEC - 纳秒、HEX_PICOSEC - 皮秒 | ||
| tc | Input | 指向要在每个间隔时间单位调用的函数的指针。 见第 3.2.2 节 |
Return
| 名字 | 描述 |
|---|---|
| HEX_STAT_SUCCESS | Success |
| HEX_STAT_DEVICE_NOT_FOUND | 无法注册回调 |
Description
由需要模拟器通知间隔模拟器时间单位已过期的外部设备模型使用。 该通知仅发送一次; 对于重复通知,请改用 AddTimedCallback(第 2.10.5 节)。
时间增量的粒度受当前核心频率设置的限制。 可用的最细粒度对应于单个处理器周期所用的时间。 所有时间值都根据当前处理器时钟频率进行缩放,并在核心频率发生变化时重新缩放。
注意
RemoveTimedCallback(第 2.10.8 节)对于一次性定时回调不是必需的,除非在通知发生之前停止通知。
2.10.8 RemoveTimedCallback
Prototype
typedef void (*timed_callback) (void *handle);
HEXAPI_Status AddOneShotTimedCallback(void *handle,
HEX_8u_t interval, HEXAPI_Interval i_typ, timed_callback tc)
Parameters
| 名字 | 类型 | 描述 |
|---|---|---|
| handle | Input | 从 RegisterCosim() 或 RegisterCosimArgs() 返回的外部总线模型句柄 |
Return
| 名字 | 描述 |
|---|---|
| HEX_STAT_SUCCESS | Success |
| HEX_STAT_DEVICE_NOT_FOUND | 无法删除设备的 TimedCallback |
Description
由外部设备模型用于从已注册以在每个间隔期间获取回调的设备列表中删除自身。
2.10.9 AddMemWasWrittenCallback
Prototype
typedef void (*memory_written_callback)
(void *handle, HEX_PA_t address,
HEX_8u_t value, HEX_4u_t sizeInBytes);
HEXAPI_Status AddMemWasWrittenCallback(void *handle,
HEX_PA_t startAddr, HEX_PA_t endAddr,
memory_written_callback mwc)
Parameters
| 名字 | 类型 | 描述 |
|---|---|---|
| handle | Input | 从 RegisterCosim() 或 RegisterCosimArgs() 返回的外部总线模型句柄 |
| startAddr | Input | 为此设备注册的地址范围的下限 |
| endAddr | Input | 为此设备注册的地址范围的上限。 endAddr 包含在范围内 |
| mwc | Input | 指向每当内核使用指定范围(包括)内的地址写入内存时要调用的函数的指针。 请参见第 3.2.3 节。 |
Return
| 名字 | 描述 |
|---|---|
| HEX_STAT_SUCCESS | Success |
| HEX_STAT_DEVICE_NOT_FOUND | 无法添加内存写入监视器回调 |
Description
注册一个监视内存写事件的外部设备。 当检测到地址在 [startAddr, endAddr] 范围内的内存写入时,模拟器会调用函数 mwc。
注意 此调用接受重叠范围。
mwc 在任何内存写入事件上都会被调用,即使访问会导致缓存命中。
2.10.10 RemoveMemWasWrittenCallback
Prototype
HEXAPI_Status RemoveMemWasWrittenCallback(void *handle)
Parameters
| 名字 | 类型 | 描述 |
|---|---|---|
| handle | Input | 从 RegisterCosim() 或 RegisterCosimArgs() 返回的外部总线模型句柄 |
Return
| 名字 | 描述 |
|---|---|
| HEX_STAT_SUCCESS | Success |
| HEX_STAT_DEVICE_NOT_FOUND | 无法删除内存写监视器 |
Description
删除跟踪内存写入事件的外部设备的通知。 与句柄关联的 cosim 截获的所有内存范围都将删除其回调通知。
2.10.11 AddMemWasReadCallback
Prototype
typedef void (*memory_read_callback)
(void *handle, HEX_PA_t address,
HEX_8u_t value, HEX_4u_t sizeInBytes);
HEXAPI_Status AddMemWasReadCallback(void *handle,
HEX_PA_t startAddr, HEX_PA_t endAddr,
memory_read_callback mrc);
Parameters
| 名字 | 类型 | 描述 |
|---|---|---|
| handle | Input | 从 RegisterCosim() 或 RegisterCosimArgs() 返回的外部总线模型句柄 |
| startAddr | Input | 为此设备注册的地址范围的下限 |
| endAddr | Input | 为此设备注册的地址范围的上限。 endAddr 包含在范围内 |
| mrc | Input | 指向函数的指针,每当内核从具有指定范围(包括)内的地址的内存中读取时,该函数就会被调用。 参见第 3.2.4 节 |
Return
| 名字 | 描述 |
|---|---|
| HEX_STAT_SUCCESS | Success |
| HEX_STAT_DEVICE_NOT_FOUND | 无法配置内存读取监视器 |
Description
注册一个监视内存读取事件的外部设备。 当检测到地址在 [startAddr, endAddr] 范围内的内存读取时,模拟器会调用函数 mrc。
注意
此调用接受重叠范围。
mwc 在任何内存读取事件上都会被调用,即使访问会导致缓存命中。
2.10.12 RemoveMemWasReadCallback
Prototype
HEXAPI_Status RemoveMemWasReadCallback(void *handle)
Parameters
| 名字 | 类型 | 描述 |
|---|---|---|
| handle | Input | 从 RegisterCosim() 或 RegisterCosimArgs() 返回的外部总线模型句柄 |
Return
| 名字 | 描述 |
|---|---|
| HEX_STAT_SUCCESS | Success |
| HEX_STAT_DEVICE_NOT_FOUND | 无法删除内存读取监视器 |
Description
删除跟踪内存读取事件的外部设备的通知。 与句柄关联的 cosim 截获的所有内存范围都将删除其回调通知。
版权声明
本文为[weixin_38498942]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_38498942/article/details/124318045
边栏推荐
- formatTime时间戳格式转换
- Yarn资源调度器
- Introduction to sap pi / PO login and basic functions
- 構建元宇宙時代敏捷制造的九種能力
- 通过流式数据集成实现数据价值(1)
- Easy to understand subset DP
- 《Redis设计与实现》
- JS DOM learn three ways to create elements
- 杰理之通常影响CPU性能测试结果的因素有:【篇】
- SAP RFC_ CVI_ EI_ INBOUND_ Main BP master data creation example (Demo customer only)
猜你喜欢

Nine abilities of agile manufacturing in the era of meta universe

Kernel PWN learning (3) -- ret2user & kernel ROP & qwb2018 core

PHP笔记(一):开发环境配置

ABAP publishes OData service samples from CDs view

Amazon cloud technology entry Resource Center, easy access to the cloud from 0 to 1

Planning and construction of industrial meta universe platform

论文阅读《Integrity Monitoring Techniques for Vision Navigation Systems》——5结果

《谷雨系列》空投

自定义登录失败处理

元宇宙时代的职业规划与执行
随机推荐
DBA常用SQL语句(6)- 日常管理
杰理之通常程序异常情况有哪些?【篇】
Go语言实践模式 - 函数选项模式(Functional Options Pattern)
Planning and construction of industrial meta universe platform
Less than 100 secrets about prime numbers
Nine abilities of agile manufacturing in the era of meta universe
论文阅读《Integrity Monitoring Techniques for Vision Navigation Systems》——3背景
2022年广东省安全员A证第三批(主要负责人)考试试题及答案
Career planning and implementation in the era of meta universe
DBA常用SQL语句(1)— 概况信息
SAP pi / PO function operation status monitoring and inspection
第一章 Oracle Database In-Memory 相关概念(IM-1.1)
[2020wc Day2] F. Clarice picking mushrooms (subtree and query, light and heavy son thought)
Number theory blocking (integer division blocking)
Function realization of printing page
通过流式数据集成实现数据价值(5)- 流处理
[CF 1425d] danger of mad snakes
MapReduce计算流程详解
计算机网络安全实验二|DNS协议漏洞利用实验
SAP debug debug for in, reduce and other complex statements