您的位置 首页 知识

ARM MPCore — (2)

1.NOPNOP不一定会占用CPU执行时间,可能在执行该指令前,CPU已将其从管道中移除。可以用NOP进行填充,使后续指令处于64bit边界上。2….

1. NOP

NOP纷歧定会占用CPU履行时间,可能在履行该指令前,CPU已将其从管道中移除。

可以用NOP进行填充,使后续指令处于64bit鸿沟上。

2. SEV

向一切CPU Core发送事情信息。

3. WFE (Wait For Event)

假如未设置事情寄存器,则 WFE 会暂时间断挂起履行,直至产生任一以下事情后再康复履行:
(1)产生 IRQ 间断,除非被 CPSR I 位屏蔽
(2)产生 FIQ 间断,除非被 CPSR F 位屏蔽
(3)产生不精确的数据间断,除非被 CPSR A 位屏蔽
(4)呈现调试进入恳求(需启用调试)
(5)另一个处理器使用 SEV 指令向事情发送信号
—————————-
假如设置了事情寄存器,则 WFE 会铲除该设置,然后当即回来。
假如完成了 WFE,则还有必要完成 SEV。

4. WFI (Wait For Interrupt)

WFI 会暂时将履行间断挂起,直至产生以下事情后再康复履行:
(1)产生 IRQ 间断,不考虑 CPSR I 位
(2)产生 FIQ 间断,不考虑 CPSR F 位
(3)产生不精确的数据间断,除非被 CPSR A 位屏蔽
(4)呈现调试进入恳求,不管是否启用调试

5. SEV/WFE用途

SEV/WFE are not intended for synchronisation- but for power management. Because of the way WFE is defined, there is no guarantee that the CPU1 will only awake when CPU0 executes SEV. It could wake at time for any number of reasons. Usually examples show SEV/WFE as a form of simple power management in a spin-lock. Something like:

lock_spin_lock (assume addr in r0)
LDREX r1, [r0]
CMP r1, #UNLOCKED
WFENE ; If not unlocked go to sleep
BNE lock_spin_lock ; on waking, re-check the spin-lock

Its the spin-lcok that provides the synchronisation, not the WFE. The WFE just is a way of saving power while you wait for the resource to become free

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/zhishi/275634.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部