- # code-morph: moving the actual PC-setting out of "execute"
- # so that it's easier to move this into an "issue" FSM.
-
- # ok here we are not reading the branch unit. TODO
- # this just blithely overwrites whatever pipeline
- # updated the PC
- pc_changed = Signal() # note write to PC
- insn_done = Signal() # fires just once
- core_busy_o = core.busy_o # core is busy
- with m.If(insn_done & (~pc_changed) & (~core_busy_o)):
- comb += self.state_w_pc.wen.eq(1<<StateRegs.PC)
- comb += self.state_w_pc.data_i.eq(nia)
-