Commit eb03a4f8 authored by Khoi Lam's avatar Khoi Lam 💬
Browse files

Merge with remote

parent 34c2dd8c
from .csr_list import csrs
from pydigital.utils import sextend
from pydigital.utils import as_twos_comp
class BadInstruction(Exception):
pass
......@@ -99,7 +100,7 @@ def decode_i_instruction(func3, rd, rs1, immI, instr_name):
def decode_u_instruction(rd, immU, instr_name):
rd_name = regNumToName(int(rd,2))
#imm_value = str(int(immU,2))
return instr_name + " " + rd_name + " " + str(immU)
return instr_name + " " + rd_name + " " + str(as_twos_comp(immU))
class Instruction():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment