当前位置:网站首页>Sim Api User Guide(8)
Sim Api User Guide(8)
2022-04-23 10:05:00 【weixin_ thirty-eight million four hundred and ninety-eight thou】
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
name | type | describe |
---|---|---|
handle | Input | from RegisterCosim() or RegisterCosimArgs() Returned external bus model handle |
interval | Input | The interval in simulator time units ( Expressed as a double precision floating-point value ) |
i_typ | Input | Time unit type : HEX_MILLISEC - millisecond 、HEX_MICROSEC - Microsecond |
、HEX_NANOSEC - nanosecond 、HEX_PICOSEC - picosecond | ||
tc | Input | Pointer to the function to be called in each interval unit . See the first 3.2.2 section |
Return
name | describe |
---|---|
HEX_STAT_SUCCESS | Success |
HEX_STAT_DEVICE_NOT_FOUND | Failed to register callback |
Description
Used by external device models that need to be notified by the simulator that the interval simulator time unit has expired . This notification is sent only once ; For duplicate notifications , Please switch to AddTimedCallback( The first 2.10.5 section ).
The granularity of time increment is limited by the current core frequency setting . The finest granularity available corresponds to the time taken for a single processor cycle . All time values are scaled according to the current processor clock frequency , And rescale when the core frequency changes .
Be careful
RemoveTimedCallback( The first 2.10.8 section ) For a one-time scheduled callback, it is not necessary , Unless the notice is stopped before the notice occurs .
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
name | type | describe |
---|---|---|
handle | Input | from RegisterCosim() or RegisterCosimArgs() Returned external bus model handle |
Return
name | describe |
---|---|
HEX_STAT_SUCCESS | Success |
HEX_STAT_DEVICE_NOT_FOUND | Unable to delete device TimedCallback |
Description
Used by the external device model to remove itself from the list of devices registered to get callbacks during each interval .
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
name | type | describe |
---|---|---|
handle | Input | from RegisterCosim() or RegisterCosimArgs() Returned external bus model handle |
startAddr | Input | The lower limit of the address range registered for this device |
endAddr | Input | The upper limit of the address range registered for this device . endAddr Included in the scope |
mwc | Input | Point to whenever the kernel uses a specified range ( Include ) Pointer to the function to be called when the address in is written to memory . Please refer to No 3.2.3 section . |
Return
name | describe |
---|---|
HEX_STAT_SUCCESS | Success |
HEX_STAT_DEVICE_NOT_FOUND | Unable to add memory write monitor callback |
Description
Register an external device that monitors memory write events . When the address is detected in [startAddr, endAddr] Memory write in range , The simulator will call the function mwc.
Be careful This call accepts overlapping ranges .
mwc Is called on any memory write event , Even if access will result in cache hits .
2.10.10 RemoveMemWasWrittenCallback
Prototype
HEXAPI_Status RemoveMemWasWrittenCallback(void *handle)
Parameters
name | type | describe |
---|---|---|
handle | Input | from RegisterCosim() or RegisterCosimArgs() Returned external bus model handle |
Return
name | describe |
---|---|
HEX_STAT_SUCCESS | Success |
HEX_STAT_DEVICE_NOT_FOUND | Unable to delete memory write monitor |
Description
Delete notifications for external devices that track memory write events . Associated with the handle cosim All memory ranges intercepted will delete their callback notifications .
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
name | type | describe |
---|---|---|
handle | Input | from RegisterCosim() or RegisterCosimArgs() Returned external bus model handle |
startAddr | Input | The lower limit of the address range registered for this device |
endAddr | Input | The upper limit of the address range registered for this device . endAddr Included in the scope |
mrc | Input | Pointer to function , Whenever the kernel has a specified range ( Include ) When reading the address in memory , The function will be called . See also 3.2.4 section |
Return
name | describe |
---|---|
HEX_STAT_SUCCESS | Success |
HEX_STAT_DEVICE_NOT_FOUND | Unable to configure memory read monitor |
Description
Register an external device that monitors memory read Events . When the address is detected in [startAddr, endAddr] Memory read in range , The simulator will call the function mrc.
Be careful
This call accepts overlapping ranges .
mwc Called on any memory read event , Even if access will result in cache hits .
2.10.12 RemoveMemWasReadCallback
Prototype
HEXAPI_Status RemoveMemWasReadCallback(void *handle)
Parameters
name | type | describe |
---|---|---|
handle | Input | from RegisterCosim() or RegisterCosimArgs() Returned external bus model handle |
Return
name | describe |
---|---|
HEX_STAT_SUCCESS | Success |
HEX_STAT_DEVICE_NOT_FOUND | Unable to delete memory read monitor |
Description
Delete notifications for external devices that track memory read Events . Associated with the handle cosim All memory ranges intercepted will delete their callback notifications .
版权声明
本文为[weixin_ thirty-eight million four hundred and ninety-eight thou]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230955087244.html
边栏推荐
- SQL调优系列文章之—SQL调优简介
- 工业元宇宙平台规划与建设
- "Gu Yu series" airdrop
- 论文阅读《Integrity Monitoring Techniques for Vision Navigation Systems》
- 最长公共前串
- ARM调试(1):两种在keil中实现printf重定向到串口的方法
- 第一章 Oracle Database In-Memory 相关概念(续)(IM-1.2)
- LeetCode 1249. Minimum Remove to Make Valid Parentheses - FB高频题1
- Longest common front string
- Planning and construction of industrial meta universe platform
猜你喜欢
NEC红外遥控编码说明
《Redis设计与实现》
《谷雨系列》空投
Juc并发编程06——深入剖析队列同步器AQS源码
MapReduce计算流程详解
Cloud identity is too loose, opening the door for attackers
Epidemic prevention registration applet
Number theory blocking (integer division blocking)
面试官:说几个PHP常用函数,幸好我面试之前看到了这篇文章
Question bank and answers of Shanghai safety officer C certificate examination in 2022
随机推荐
[hdu6833] a very easy math problem
Interviewer: let's talk about some commonly used PHP functions. Fortunately, I saw this article before the interview
【无标题】
MapReduce核心和基础Demo
Sim Api User Guide(7)
Es aggregation aggregation analysis
Sim Api User Guide(5)
DBA common SQL statements (1) - overview information
Windows安装redis并将redis设置成服务开机自启
DBA常用SQL语句 (5) - Latch 相关
通过流式数据集成实现数据价值(1)
MapReduce压缩
Mobius inversion
Compile and debug mysql8 with clion under MacOS x
[lnoi2014] LCA - tree chain subdivision - multipoint LCA depth and problems
Classic routine: DP problem of a kind of string counting
计算机网络安全实验二|DNS协议漏洞利用实验
DBA常用SQL语句(6)- 日常管理
NEC infrared remote control coding description
Understand scope