新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > ARM MPCore -- (2)

        ARM MPCore -- (2)

        作者: 時間:2016-11-10 來源:網絡 收藏
        1. NOP

        NOP不一定會占用CPU執行時間,可能在執行該指令前,CPU已將其從管道中移除。

        本文引用地址:http://www.104case.com/article/201611/317204.htm

        可以用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



        關鍵詞: ARMMPCor

        評論


        技術專區

        關閉
        主站蜘蛛池模板: 武乡县| 临江市| 凤山市| 阿鲁科尔沁旗| 铜山县| 五峰| 普宁市| 徐水县| 增城市| 丰顺县| 白水县| 沙湾县| 库尔勒市| 洮南市| 沂南县| 莱芜市| 龙游县| 北宁市| 台湾省| 邛崃市| 许昌县| 怀化市| 丽水市| 佛学| 中方县| 同江市| 淳安县| 桦甸市| 澄城县| 建阳市| 小金县| 宁蒗| 陆川县| 夏河县| 满城县| 奈曼旗| 寻乌县| 陆河县| 大英县| 永善县| 九寨沟县|