kronos icon indicating copy to clipboard operation
kronos copied to clipboard

[Bug report] Kronos overcounts the retired instructions

Open flaviens opened this issue 1 year ago • 0 comments

Hi there!

Bug description

I think I found a bug not described in the issues and PRs in this repo. minstret seems to overcount.

Example snippet

The stored value of t0 should be 0, however with Kronos it is 1.

  .section ".text.init","ax",@progbits
  .globl _start
  .align 2
_start:

  li a0, 0x10

  csrrw zero, minstret, zero
  csrrw t0, minstret, zero

  sw t0, (a0)
  sw zero, (zero)

infinite_loop0:
  j infinite_loop0

Notes

The same bug is found in BOOM and Vexriscv.

Thanks!

flaviens avatar May 15 '23 07:05 flaviens