From: Luke Kenneth Casson Leighton Date: Sun, 25 Nov 2018 06:43:31 +0000 (+0000) Subject: calculate lui_auipc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4085d7f10a044436f19b8b1ee4a26e36047499f1;p=rv32.git calculate lui_auipc --- 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()