Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imperas lockstep simulation hangs on rv64gc when minstret = 0xFFFFFFFFFFFFFFFF and then a csrrc is done on bit 63 #1304

Open
davidharrishmc opened this issue Mar 1, 2025 · 0 comments

Comments

@davidharrishmc
Copy link
Contributor

davidharrishmc commented Mar 1, 2025

The following program hangs in lockstep after the csrrc. minstret contains 0xFFFFFFFFFFFFFFFF, and then it tries to clear the most significant bit. If I uncomment the nop, it finishes normally. If I don't initialize minstret to all 1s, it also finishes.

wsim rv64gc hang.elf --lockstepverbose

.section .text.init
.global rvtest_entry_point

main:

	li t1, -1           # all 1s
	li t0, 1            # 1 in lsb
	slli t0, t0, 63
    csrrs t6, minstret, t1	# set all bits 
#    nop
	csrrc t6, minstret, t0 # clear msb

self_loop:
    j self_loop

hang.elf.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant