About Xiangshan IFU, where is the 2nd cacheline used? Is it a bug? #3865
-
Hi Guys. While I was reading the code of Xiangshan's IFU code. I realized that the return data of the second cacheline from ICache was never used? Based on my understanding it should be used by
Is it really correct? I thought it should be the following in order to deal with the situation that a 4B instruction crossing the cacheline.
I am not sure. Please correct me if I was wrong. Jerry |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
No, this is legacy code that needs refactoring. Historically we use 2 ports in ICache for crossline fetching. However, this wastes power and registers. Because a fetch block in XiangShan is 34B max, so at most we need 48B of ICache data (with 16B banking). These 48B data are passed through port 0 now, and port 1 is no longer used. |
Beta Was this translation helpful? Give feedback.
-
This is actually a frequently asked question. I've added comments to the code that you can refer to. -> #3874 |
Beta Was this translation helpful? Give feedback.
No, this is legacy code that needs refactoring. Historically we use 2 ports in ICache for crossline fetching. However, this wastes power and registers. Because a fetch block in XiangShan is 34B max, so at most we need 48B of ICache data (with 16B banking). These 48B data are passed through port 0 now, and port 1 is no longer used.