[理工] [計組]-中山97-資工所

看板Grad-ProbAsk作者 (心安即自在)時間14年前 (2010/02/25 00:08), 編輯推噓3(305)
留言8則, 3人參與, 最新討論串1/1
想請問計組的1.3小題 題目: How many memory accesses are required to execute a "store" instruction with memory indirect addressing? 手邊的答案是3次 1(instruction fetch)+2(indirect addressing) 但我覺得是2次 即1(instruction fetch)+1(indirect addressing) 不是就IF STAGE 及MEM STAGE各一次嗎?? 可以告訴我是哪裡出問題嗎?? 感謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.134.213.201

02/25 00:11, , 1F
第一次找到的是要存的位置 第二次才是存進去?
02/25 00:11, 1F

02/25 00:26, , 2F
??
02/25 00:26, 2F

02/25 01:11, , 3F
問題出在 indirect
02/25 01:11, 3F

02/25 01:12, , 4F
indirect 要兩次才能找到你要的operand
02/25 01:12, 4F

02/25 01:21, , 5F
addressing就是去抓operand的方法兒sw指令後面16 bit加上
02/25 01:21, 5F

02/25 01:22, , 6F
constant 會指到mem的一個位址但裡面卻是operand的真正
02/25 01:22, 6F

02/25 01:22, , 7F
位址, 所以第二次才會找到正確operand的address
02/25 01:22, 7F

02/25 01:34, , 8F
恩 我瞭解了 感謝!!
02/25 01:34, 8F
文章代碼(AID): #1BXKyHRT (Grad-ProbAsk)