Skip to content

Commit

Permalink
Cleaning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekcyjna committed Mar 24, 2024
1 parent b75479f commit b4e5e7d
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ def elaborate(self, platform):

return m

from riscvmodel.insn import (
InstructionADDI,
InstructionLUI,
)
import logging

class TestCoreBase(TestCaseWithSimulator):
gen_params: GenParams
Expand All @@ -84,22 +79,6 @@ def push_register_load_imm(self, reg_id, val):
if val & 0x800:
lui_imm = (lui_imm + 1) & (0xFFFFF)


lui_org = InstructionLUI(reg_id, lui_imm).encode()
lui_my = UTypeInstr.encode(Opcode.LUI, reg_id, lui_imm)
#logging.debug(lui_my)
if (lui_org != lui_my):
logging.error("LUI")
assert False
addi_org = InstructionADDI(reg_id, reg_id, addi_imm).encode()
addi_my = ITypeInstr.encode(Opcode.OP_IMM, reg_id, Funct3.ADD, reg_id, addi_imm)
if (addi_org != addi_my):
logging.error("MY")
logging.error(addi_imm)
logging.error(f"{addi_my:032b}")
logging.error(f"{addi_org:032b}")
assert False

yield from self.push_instr(UTypeInstr.encode(Opcode.LUI, reg_id, lui_imm))
yield from self.push_instr(ITypeInstr.encode(Opcode.OP_IMM, reg_id, Funct3.ADD, reg_id, addi_imm))

Expand Down

0 comments on commit b4e5e7d

Please sign in to comment.