未验证 提交 a391e081 编写于 作者: W William Wang 提交者: GitHub

mem: enable non pow of 2 load queue size (#912)

* Fix allocated flag update logic
上级 53d2b484
......@@ -252,11 +252,9 @@ class LoadQueue(implicit p: Parameters) extends XSModule
// Generate writeback indexes
def getEvenBits(input: UInt): UInt = {
require(input.getWidth == LoadQueueSize)
VecInit((0 until LoadQueueSize/2).map(i => {input(2*i)})).asUInt
}
def getOddBits(input: UInt): UInt = {
require(input.getWidth == LoadQueueSize)
VecInit((0 until LoadQueueSize/2).map(i => {input(2*i+1)})).asUInt
}
......@@ -349,7 +347,7 @@ class LoadQueue(implicit p: Parameters) extends XSModule
*/
(0 until CommitWidth).map(i => {
when(commitCount > i.U){
allocated(deqPtr+i.U) := false.B
allocated((deqPtrExt+i.U).value) := false.B
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册