You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
393 B

def Imm_gen(inst_code):
test = inst_code[25:32]
if test == '0010011':
imm_out = 20*inst_code[0]+inst_code[0:12]
elif test == '0000011':
pass
elif test == '0100011':
pass
elif test == '1100011':
pass
elif test == '1101111':
pass
elif test == '1100111':
pass
elif test == '0110111':
pass
return imm_out