From 4085d7f10a044436f19b8b1ee4a26e36047499f1 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 25 Nov 2018 06:43:31 +0000 Subject: [PATCH] calculate lui_auipc --- cpu.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpu.py b/cpu.py index a7e3ab3..ae24ce4 100644 --- a/cpu.py +++ b/cpu.py @@ -274,6 +274,10 @@ class CPU(Module): ) self.specials += ali + lui_auipc_result = Signal(32) + self.comb += lui_auipc_result.eq(Mux(dc.opcode[5], + dc.immediate, + dc.immediate + fetch_output_pc)) if __name__ == "__main__": example = CPU() -- 2.30.2