Add (generic) RV32I I-Type Instruction

This commit is contained in:
Donald Sebastian Leung 2020-08-10 13:32:04 +08:00
parent ff977c0e50
commit e97a86bfbe
1 changed files with 13 additions and 0 deletions

13
insns/InsnRV32IIType.py Normal file
View File

@ -0,0 +1,13 @@
from Insn import *
"""
RV32I I-Type Instruction
"""
class InsnRV32IIType(Insn):
def elaborate(self, platform):
m = super().elaborate(platform)
m.d.comb += self.insn_imm.eq(Value.as_signed(self.rvfi_insn[20:32]))
return m