From a92cd7fdc76dd1e7bb8f55e98264971633f38b17 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 24 Nov 2018 01:20:35 +0000 Subject: [PATCH] big reorg, class-ify constants --- cpu_decoder.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cpu_decoder.py b/cpu_decoder.py index 948e10d..3239a0d 100644 --- a/cpu_decoder.py +++ b/cpu_decoder.py @@ -232,17 +232,17 @@ class CPUDecoder(Module): (funct7 in the case of arith ops). """ c = {} - c[OP.load] = self.calculate_load_action() + c[OP.load ] = self.calculate_load_action() c[OP.misc_mem] = self.calculate_misc_action() - c[OP.op_imm] = self.calculate_op_action() - c[OP.op] = self.calculate_op_action() - c[OP.lui] = self.decode_action.eq(DA.lui_auipc) - c[OP.auipc] = self.decode_action.eq(DA.lui_auipc) - c[OP.store] = self.calculate_store_action() - c[OP.branch] = self.calculate_branch_action() - c[OP.jalr] = self.calculate_jalr_action() - c[OP.jal] = self.decode_action.eq(DA.jal) - c[OP.system] = self.calculate_system_action() + c[OP.op_imm ] = self.calculate_op_action() + c[OP.op ] = self.calculate_op_action() + c[OP.lui ] = self.decode_action.eq(DA.lui_auipc) + c[OP.auipc ] = self.decode_action.eq(DA.lui_auipc) + c[OP.store ] = self.calculate_store_action() + c[OP.branch ] = self.calculate_branch_action() + c[OP.jalr ] = self.calculate_jalr_action() + c[OP.jal ] = self.decode_action.eq(DA.jal) + c[OP.system ] = self.calculate_system_action() # big batch of unrecognised opcodes: throw trap. for o in [ OP.load_fp, OP.custom_0, OP.op_imm_32, -- 2.30.2