1(test-group "decode R-type"2 (test "parse add instruction opcode"3 (get-opcode 'ADD)4 (instr-opcode add-instr))56 (test "parse add instruction rd"7 118 (instr-rd add-instr))910 (test "parse add instruction rs1"11 1212 (instr-rs1 add-instr))1314 (test "parse add instruction rs2"15 1016 (instr-rs2 add-instr))1718 (test "parse add instruction func3"19 (get-funct3 'ADD)20 (instr-funct3 add-instr))2122 (test "parse add instruction func7"23 (get-funct7 'ADD)24 (instr-funct7 add-instr)))2526(test-group "decode I-type"27 (test "parse addi instruction opcode"28 (get-opcode 'ADDI)29 (instr-opcode addi-instr))3031 (test "parse addi instruction rd"32 533 (instr-rd addi-instr))3435 (test "parse addi instruction rs1"36 637 (instr-rs1 addi-instr))3839 (test "parse addi instruction imm"40 4241 (instr-i-imm addi-instr))4243 (test "parse addi instruction funct3"44 (get-funct3 'ADDI)45 (instr-funct3 addi-instr)))4647(test-group "decode S-type"48 (test "parse sw instruction opcode"49 (get-opcode 'SW)50 (instr-opcode sw-instr))5152 (test "parse sw instruction rs1"53 954 (instr-rs1 sw-instr))5556 (test "parse sw instruction rs2"57 158 (instr-rs2 sw-instr))5960 (test "parse sw instruction imm"61 2362 (instr-s-imm sw-instr))6364 (test "parse sw instruction funct3"65 (get-funct3 'SW)66 (instr-funct3 sw-instr)))6768(test-group "decode U-type"69 (test "parse lui instruction opcode"70 (get-opcode 'LUI)71 (instr-opcode lui-instr))7273 (test "parse lui instruction rd"74 2875 (instr-rd lui-instr))7677 (test "parse lui imm"78 #xfffff79 (instr-u-imm lui-instr)))8081(test-group "decode B-type"82 (test "parse beq instruction opcode"83 (get-opcode 'BEQ)84 (instr-opcode beq-instr))8586 (test "parse beq instruction rs1"87 1088 (instr-rs1 beq-instr))8990 (test "parse beq instruction rs2"91 1192 (instr-rs2 beq-instr))9394 (test "parse beq instruction imm"95 3296 (instr-b-imm beq-instr))9798 (test "parse beq instruction funct3"99 (get-funct3 'BEQ)100 (instr-funct3 beq-instr)))101102(test-group "decode J-type"103 (test "parse jal instruction opcode"104 (get-opcode 'JAL)105 (instr-opcode jal-instr))106107 (test "parse jal instruction rd"108 1109 (instr-rd jal-instr))110111 (test "parse jal instruction imm"112 32113 (instr-j-imm jal-instr)))