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

TLToAXI4 should not block AXI4-b writeacks indefinitely #2805

Merged
merged 1 commit into from May 11, 2021

Conversation

jerryz123
Copy link
Contributor

// R and B => D arbitration
val r_holds_d = RegInit(Bool(false))
when (out.r.fire()) { r_holds_d := !out.r.bits.last }
// Give R higher priority than B
val r_wins = out.r.valid || r_holds_d

The current arbitration policy in the TLToAXI4 converter always prioritizes AXI4 r-channel responses. This policy leads to starvation for clients waiting for a AccessAck, when the AXI4 r-channel is saturated. For example, a system where the L2 cache evicts a line, then saturates AXI4 with reads, may stall indefinitely waiting for a WriteAck.

This PR implements an alternate policy that stalls for b-channel acks if the b-channel ack has been blocked for 7 consecutive cycles. This is just one possible approach to avoid the indefinite stall.

Type of issue: bug report

Development Phase: implementation

@jerryz123
Copy link
Contributor Author

@hcook @terpstra

@hcook
Copy link
Member

hcook commented May 6, 2021

Ideally this would be a configurable policy, but I agree this approach will prevent starvation and so is better than the status quo. What led you to choose the number 7?

@hcook hcook self-requested a review May 6, 2021 20:54
Copy link
Contributor

@terpstra terpstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- deleted --

Copy link
Contributor

@terpstra terpstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree a configurable policy would be better, but this is better than nothing.

@hcook hcook merged commit c7da610 into chipsalliance:master May 11, 2021
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 this pull request may close these issues.

None yet

3 participants