Andes Workshop http://forum.andestech.com/ |
|
isb與dsb http://forum.andestech.com/viewtopic.php?f=14&t=208 |
Page 1 of 1 |
Author: | cindy [ Tue Dec 06, 2011 12:33 pm ] |
Post subject: | isb與dsb |
Q: 如果同時需要加 isb 與 dsb 時,加一個就可以了嗎?為什麼example 的 assembly code 一堆 system register 後面並沒有加 dsb? A:有關下 ISB and DSB 的時機, 你可以參考 AndeStar_ISA_UM025_V1.x.pdf. 在這兩個指令的 Note 裡有附一個 table (如下圖, cut form DSB note) 說明 ISB 與 DSB 指令下的時機, 當程式Writer 寫了一個 State 中列的 register (or bits in the register), 之後 reader 需要馬上讀取這個 register, 則在 Writer and Reader 之中需要下一個 ISB or DSB. 以下圖 system register 來說, 如果 writer 用 MTSR 寫到 System register, 之後用 MFSR 讀取 System register, 為了保證讀到正確的 System register, 必須在 MTSR and MFSR 之中加一個 DSB 的指令, 如果不是表列的這些狀況, 擇不需要下 ISB or DSB 指令. Attachment:
|
Page 1 of 1 | All times are UTC + 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |