Andes Workshop

It is currently Tue Sep 26, 2017 7:59 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: isb與dsb
PostPosted: Tue Dec 06, 2011 12:33 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
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:
untitled.gif
untitled.gif [ 136.46 KiB | Viewed 4683 times ]


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group