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

Stall does not stall PC stage (at least in a core view) #16

Closed
ppisa opened this issue Dec 1, 2021 · 5 comments · Fixed by #17
Closed

Stall does not stall PC stage (at least in a core view) #16

ppisa opened this issue Dec 1, 2021 · 5 comments · Fixed by #17
Assignees

Comments

@ppisa
Copy link
Member

ppisa commented Dec 1, 2021

screenshot-11

.text

_start:
loop:
	addi x1, x0, 0x11
	addi x2, x0, 0x22
	addi x3, x0, 0x33
	lw   x4, 0x44(x0)
	addi x5, x4, 0x55
	beq  x0, x0, tgt1
	addi x11, x0, 0x11
	addi x12, x0, 0x22
	addi x13, x0, 0x33
	addi x14, x0, 0x44
	addi x15, x0, 0x55
tgt1:
	addi x21, x0, 0x11
	addi x22, x0, 0x22
	addi x23, x0, 0x33
	addi x24, x0, 0x44
	addi x25, x0, 0x55

	ebreak
@jdupak jdupak self-assigned this Dec 2, 2021
@ppisa
Copy link
Member Author

ppisa commented Dec 2, 2021

Thanks for updates. I have doubts if to remove IMF_STOP_IF, because barrier instructions would require something like that one day. May it be even syscall and some other instructions... On the other hand, it can be reintroduced when required again and adjusted for actual needs.

The state is much better then before but there are still some problems in visualization.

screenshot-14
screenshot-15

@jdupak
Copy link
Collaborator

jdupak commented Dec 2, 2021

The regwrite box in mem is IMO correct as NOP is ADDI x0, x0, 0.

@ppisa
Copy link
Member Author

ppisa commented Dec 2, 2021

Hmm, I am in the doubt there, I would prefer if the flush sets all signals into inactive state and because signal should go as independent signal through stages then it should be assigned by flush already anyway so I would left it inactive in the stall bubble.

@jdupak
Copy link
Collaborator

jdupak commented Dec 2, 2021

I have pushed a fix of the misconnected labels.

Hmm, I am in the doubt there, I would prefer if the flush sets all signals into inactive state and because signal should go as independent signal through stages then it should be assigned by flush already anyway so I would left it inactive in the stall bubble.

I dislike the idea, that I say, that the stage processes a NOP (which is ADDI), but the bubbles would behave differently for explicit NOP and stall caused NOP (and for the initial state of the pipeline as well).

@ppisa
Copy link
Member Author

ppisa commented Dec 2, 2021

The other option is to set RegWrite to 0 even for these instructions which write to reg x0. May it be it even can simplify some expression in forwarding.

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

Successfully merging a pull request may close this issue.

2 participants