精華區beta b98902HW 關於我們 聯絡資訊
題目是這樣: 5.(10%) The "jump register " instruction in the original TOY machine uses Rd as the register to hold the address to jump to. Explain why it is wrong and how to fix this 呃 其實我一開始題目看不懂 不過後來有問到了 目前理解以及問到的答案是: type 1 : opcode d s t jump register 的指令是type 1 pc<- R[t] 意思是假如要跳到RF這個register 要打 E00F 而之所以不是 pc<-R[d] (也就是打EF00) 的原因是 投影片裡面 TOY machine 中的 datapath IR 裡面的d並沒有連到 register B Address的部分 (B Data會連到ALU的 input2) 只有連到register W address & A Address 而 A Data 是連到 ALU 的 input 1 所以沒辦法做copy input2的動作 也就沒辦法給pc (我不確定對不對) 是說我覺得很奇怪的是 我剛剛打開之前寫的.asm檔用toyasm 轉成.toy檔案 我看到jump register 被翻譯成 EF00 阿不是就不能用?? 怎麼還是EF00?? 請強者幫忙解答 感激不盡!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.243.226
jcaosola:96年第五題問一樣的事 11/08 01:40
barry800414:這個送大家 11/08 02:38
barry800414:從講義裡面擷取的 toy asm reference card 是阿蹦的 11/08 02:40
k1923456:推 11/08 08:36
seanwu:因為toyvm不管datapath... 它要怎麼做都ok 11/08 09:58
seanwu:當然EF00要硬做還是ok啦,把MUX_READ_REG=1,ALUop=000 11/08 10:00