Hello, I am using a slightly modified version of Flute which allows to set halting variable of CPU module from external source.
https://github.com/michalmonday/Flute/blob/continuous_monitoring/src_Core/CPU/CPU.bsv#L791
I noticed that halting CPU this way prevents new instructions from executing but it does not delay results of the current and previous instruction being written to the GPR file.
This is not a problem from the CPU perspective, but in the project I'm working on, it desynchronises the series of program counters from its corresponding series of GPR file values. The project keeps shadow copy of the GPR file and records every program counter with its corresponding state of the GPR file.
Screenshot below shows what happens without halting CPU.

On the screenshot above the blue colour marks instruction that becomes "extended" when CPU is halted. While it's being "extended" (shown on image below) there are 2 writes to GPR file that would normally happen during different instructions.

(please ignore "2 clk past" on the image, it was self note hinting at naive not-working solution to shift any writes 2 cycles after the "extended" instruction).
My question is:
Is there a way to somehow delay any GPR file writes while halting variable is high?
Hello, I am using a slightly modified version of Flute which allows to set
haltingvariable of CPU module from external source.https://github.com/michalmonday/Flute/blob/continuous_monitoring/src_Core/CPU/CPU.bsv#L791
I noticed that halting CPU this way prevents new instructions from executing but it does not delay results of the current and previous instruction being written to the GPR file.
This is not a problem from the CPU perspective, but in the project I'm working on, it desynchronises the series of program counters from its corresponding series of GPR file values. The project keeps shadow copy of the GPR file and records every program counter with its corresponding state of the GPR file.
Screenshot below shows what happens without halting CPU.
On the screenshot above the blue colour marks instruction that becomes "extended" when CPU is halted. While it's being "extended" (shown on image below) there are 2 writes to GPR file that would normally happen during different instructions.
(please ignore "2 clk past" on the image, it was self note hinting at naive not-working solution to shift any writes 2 cycles after the "extended" instruction).
My question is:
Is there a way to somehow delay any GPR file writes while
haltingvariable is high?