wtf

WTF is white tight feet.

  1. 1. overview
    1. 1.1. Instruction
    2. 1.2. syntax
    3. 1.3. binary expression
    4. 1.4. procedure
  2. 2. source netdoor

overview

Instruction

The Jump Register instruction causes the PC to jump to the contents of the first source register.

syntax

1
JR $first source register's address

take a sample: JR $13

binary expression

1
2
|000000|01101|00000|00000|00000|001000|
(Opcode) (rs) (rt) (rd) (shamt)(funct)

length

  • Opcode: 6
  • rs: 5
  • rt: 5
  • rd: 5
  • shamt: 5
  • funct: 6

length_all = 6+5+5+5+5+6 = 32

if we make $13 register’s value equals to 789 in decmical, so we can find some information on $13

Register’s Address Register’s Address (Binary) Register’s Value Register’s Value (Hexadecimal)
$13 01101 789 00000315

procedure

  • This simple datapath is of a single-cycle nature. The instruction begins with the PC. PC value set to 00000114H
  • The PC’s value, as well as a fixed value necessary to increase the PC by one cycle are passed into the ALU. The address of the instruction to be executed is passed to the IM.
  • The Adder performs an arithmetic add operation to determine the next PC value. On the other hand, the instruction is decoded by the IM.
  • IM: Fetching instruction from 00000114H: 000000 01101 00000 00000 00000 001000B
  • Adder: Add 00000004H to 00000114H.
  • The decoded instruction is split into different corresponding segments and sent to the RF. The function bits are sent to the ALU Control, and the opcode is sent to the Control Unit.
  • The RF retrieves the data from the register required by the instruction. The CU identifies the type of instruction it is via the opcode.
  • Control Unit: Opcode 000000B, Instruction: R type
  • Read $13(01101B)’s value of 000001CDH
  • The Adder sends the new PC value to the MUX. The RF sends the read data to the ALU and the MUX.
  • new PC: 00000118H=00000004H+00000114H
  • JRsel = 1B
  • From the JRsel signal sent by the CU, the MUX selects the input from the RF to be the next PC value.
  • The MUX sends the new PC value to the PC.

source netdoor

https://www3.ntu.edu.sg/home/smitha/fyp_gerald/jrInstruction.html

This source is very nice and interest. It make the abstract knowledge animated.

本文作者 : wtfff
本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议(CC BY-NC-SA 4.0)进行许可。This blog is under a CC BY-NC-SA 4.0 Unported License
本文链接 : http://im0use.github.io/2022/06/18/mips_jr/

本文最后更新于 天前,文中所描述的信息可能已发生改变