当前位置:网站首页>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
边栏推荐
- Turn: Maugham: reading is a portable refuge
- SQL tuning series - Introduction to SQL tuning
- Realize data value through streaming data integration (1)
- [COCI] lattice (dichotomy + tree divide and conquer + string hash)
- Juc并发编程07——公平锁真的公平吗(源码剖析)
- Exercise questions and simulation test of refrigeration and air conditioning equipment operation test in 2022
- 《Redis设计与实现》
- 论文阅读《Integrity Monitoring Techniques for Vision Navigation Systems》
- Chapter I Oracle database in memory related concepts (Continued) (im-1.2)
- Chapter 1 Oracle database in memory related concepts (im-1.1)
猜你喜欢
MapReduce计算流程详解

0704、ansible----01

Operation of 2022 tea artist (primary) test question simulation test platform

Juc并发编程07——公平锁真的公平吗(源码剖析)

The central control learning infrared remote control module supports network and serial port control

101. Symmetric Tree

Nine abilities of agile manufacturing in the era of meta universe

构建元宇宙时代敏捷制造的九种能力

2022年流动式起重机司机考试题库模拟考试平台操作

Depth selector
随机推荐
Juc并发编程07——公平锁真的公平吗(源码剖析)
Common SQL statements of DBA (6) - daily management
DBA common SQL statements (3) - cache, undo, index and wait events
DBA常用SQL语句(6)- 日常管理
failureForwardUrl与failureUrl
Epidemic prevention registration applet
ansible playbook语法和格式 自动化云计算
DBA common SQL statements (1) - overview information
Sim Api User Guide(4)
杰理之用户如何最简单的处理事件【篇】
防疫登记小程序
理解作用域
[hdu6868] absolute math (pusher + Mobius inversion)
Sim Api User Guide(8)
Odoo server setup notes
转:毛姆:阅读是一座随身携带的避难所
雨生百谷,万物生长
PHP two-dimensional array specifies that the elements are added after they are equal, otherwise new
第一章 Oracle Database In-Memory 相关概念(IM-1.1)
[lnoi2014] LCA - tree chain subdivision - multipoint LCA depth and problems