sst-elements icon indicating copy to clipboard operation
sst-elements copied to clipboard

Pipeline stages sequence in Vanadis

Open Connie120 opened this issue 1 year ago • 2 comments

Hello,

I'm wondering why the simulation sequence for the pipeline stages in Vanadis is Fetch->Decode->Issue->Execute->Retire, rather than Retire->Execute->Issue->Decode->Fetch, which is the other way around.

I tried to run a simple program using the latest Vanadis in the devel branch and printed out the ROB states:

Screenshot from 2023-09-08 15-15-27

This is the first cycle (cycle 13590) that Vanadis starts to simulate the program. As from the screenshot, the instruction PCADDI64 (Addr 1013e) is decoded and issued in the same cycle, and it's sent to the execution unit. The reason why it's not retired is that it hasn't finished execution.

So I tried to invert the sequence of the stages and printed out the the ROB states again, also cycle 13590:

Screenshot from 2023-09-25 15-10-15

Here the instruction is only decoded but not issued, and it's issued in the next cycle (cycle 13591):

Screenshot from 2023-09-25 14-57-38

Please let me know if I understand the code incorrectly and thanks for the help!

Connie120 avatar Sep 25 '23 19:09 Connie120

@Connie120 After internal discussions, we think that swapping the pipeline order is a viable solution. You're welcome to submit a PR to fix this or we can work on it.

hughes-c avatar Oct 11 '23 14:10 hughes-c

Created a PR in #2240, please check. Thanks! @hughes-c

Connie120 avatar Oct 11 '23 18:10 Connie120