Skip to content

Halting behaviour #43

Description

@michalmonday

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.

image

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.

image

(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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions