From 423bee4496736d47d939b361fcd2035b7a66feac Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Tue, 25 May 2021 16:56:58 +0200 Subject: Fix typos in instructionset --- pysc-v/InstructionSets/RV32I.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pysc-v/InstructionSets/RV32I.py b/pysc-v/InstructionSets/RV32I.py index bbe88c3..8e1c1b8 100644 --- a/pysc-v/InstructionSets/RV32I.py +++ b/pysc-v/InstructionSets/RV32I.py @@ -100,7 +100,7 @@ class U(Instruction): def compile(self): # NOTE: U Type is for AUIPC and LUI that only use the high part of the # immediate - imm_12_32 = (imm & 0xFFFFF000)>>12 + imm_12_32 = (self.imm & 0xFFFFF000)>>12 return c_uint32( (imm_12_32 << 12) +\ (self.rd << 7) +\ @@ -221,11 +221,12 @@ class lbu(I): funct3 = 0b100 @RV32I.instruction -class lb(I): +class lhu(I): name = "lhu" opcode = 0b0000011 funct3 = 0b101 + @RV32I.instruction class sb(S): name = "sb" -- cgit v1.2.3