fixed TL refill request when TL request is not accepted #3704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue:
Type of change: bug report
Impact: API modification
Development Phase: implementation
Release Notes
There is a peculiarity in the rocket chip I$ that seems to be a bug. Namely, it seems that the I$ is coded such that when a miss takes place, the I$ only requests a refill from the TL bus once, and achieves this by checking if the previous cycle has a miss and the I$ is currently missing. This works okay most of the time but doesnt account for the TL.A channel not accepting the request.
ex:
![I$_Bug](https://private-user-images.githubusercontent.com/83780720/399871813-cecdca00-81b9-4d9f-a101-f83a96b35563.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTM3ODUsIm5iZiI6MTczOTE5MzQ4NSwicGF0aCI6Ii84Mzc4MDcyMC8zOTk4NzE4MTMtY2VjZGNhMDAtODFiOS00ZDlmLWExMDEtZjgzYTk2YjM1NTYzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEzMTgwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk1OTU0NDkwNWE5NmNlMjRlMTFjMDU5ZTAxM2E0MWIxMmUwNWY5MjZkYmU0MTcxZmM1NzZlZjFlZjI1Yjc2OWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KWTCe94TJ27j0NoQGFBR-R1He8wWHdCUaM2BIvtvC3M)
What I suspect the offending line of code is (line 380 in icache.scala):
Waveform after the change:
edit:
![image](https://private-user-images.githubusercontent.com/83780720/399873131-9be54446-52bc-499e-850e-939d8853b74f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTM3ODUsIm5iZiI6MTczOTE5MzQ4NSwicGF0aCI6Ii84Mzc4MDcyMC8zOTk4NzMxMzEtOWJlNTQ0NDYtNTJiYy00OTllLTg1MGUtOTM5ZDg4NTNiNzRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEzMTgwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmMDYyZjQ2YzdmOGYxNDViY2U5ZTRmNzAxYjlkMTQ4YjBjNzM1ZmM1MWM5ZTFhZTI2OWZjMDk5MjQ3N2E5NmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.-k4IfU91Ay4Xy_d5nRSeaSo11Fg8PsrMjXYGLflt9no)
A more complete pic of the code for context.