Remove duplicate instantiation of table entryT
This commit is contained in:
@@ -59,7 +59,6 @@ case class CoalescerConfig(
|
|||||||
|
|
||||||
object defaultConfig extends CoalescerConfig(
|
object defaultConfig extends CoalescerConfig(
|
||||||
numLanes = 4,
|
numLanes = 4,
|
||||||
// TODO: bigger size
|
|
||||||
queueDepth = 1,
|
queueDepth = 1,
|
||||||
waitTimeout = 8,
|
waitTimeout = 8,
|
||||||
addressWidth = 24,
|
addressWidth = 24,
|
||||||
@@ -681,19 +680,9 @@ class CoalescingUnitImp(outer: CoalescingUnit, config: CoalescerConfig) extends
|
|||||||
// logic to generate the Inflight Entry into the uncoalescer, where it should be.
|
// logic to generate the Inflight Entry into the uncoalescer, where it should be.
|
||||||
// this also reduces top level clutter.
|
// this also reduces top level clutter.
|
||||||
|
|
||||||
val offsetBits = 4 // FIXME hardcoded
|
val uncoalescer = Module(new Uncoalescer(config))
|
||||||
// but the width of the size enum
|
|
||||||
val newEntry = Wire(
|
val newEntry = Wire(uncoalescer.inflightTable.entryT)
|
||||||
new InflightCoalReqTableEntry(
|
|
||||||
config.numLanes,
|
|
||||||
numPerLaneReqs,
|
|
||||||
sourceWidth,
|
|
||||||
offsetBits,
|
|
||||||
config.sizeEnum
|
|
||||||
)
|
|
||||||
)
|
|
||||||
println(s"=========== table sourceWidth: ${sourceWidth}")
|
|
||||||
// println(s"=========== table sizeEnumBits: ${newEntry.sizeEnumBits}")
|
|
||||||
newEntry.source := coalescer.io.coalReq.bits.source
|
newEntry.source := coalescer.io.coalReq.bits.source
|
||||||
|
|
||||||
// TODO: richard to write table fill logic
|
// TODO: richard to write table fill logic
|
||||||
@@ -719,13 +708,11 @@ class CoalescingUnitImp(outer: CoalescingUnit, config: CoalescerConfig) extends
|
|||||||
reqEntry.source := req.source
|
reqEntry.source := req.source
|
||||||
reqEntry.offset := ((req.address % (1 << config.maxCoalLogSize).U) >> config.wordWidth)
|
reqEntry.offset := ((req.address % (1 << config.maxCoalLogSize).U) >> config.wordWidth)
|
||||||
reqEntry.sizeEnum := config.sizeEnum.logSizeToEnum(req.size)
|
reqEntry.sizeEnum := config.sizeEnum.logSizeToEnum(req.size)
|
||||||
|
// TODO: load/store op
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dontTouch(newEntry)
|
dontTouch(newEntry)
|
||||||
|
|
||||||
// Uncoalescer module uncoalesces responses back to each lane
|
|
||||||
val uncoalescer = Module(new Uncoalescer(config))
|
|
||||||
|
|
||||||
uncoalescer.io.coalReqValid := coalescer.io.coalReq.valid
|
uncoalescer.io.coalReqValid := coalescer.io.coalReq.valid
|
||||||
uncoalescer.io.newEntry := newEntry
|
uncoalescer.io.newEntry := newEntry
|
||||||
// Cleanup: custom <>?
|
// Cleanup: custom <>?
|
||||||
@@ -745,9 +732,10 @@ class CoalescingUnitImp(outer: CoalescingUnit, config: CoalescerConfig) extends
|
|||||||
)
|
)
|
||||||
q.io.enq(respQueueUncoalPortOffset + i).valid := resp.valid
|
q.io.enq(respQueueUncoalPortOffset + i).valid := resp.valid
|
||||||
q.io.enq(respQueueUncoalPortOffset + i).bits := resp.bits
|
q.io.enq(respQueueUncoalPortOffset + i).bits := resp.bits
|
||||||
when (resp.valid) {
|
// debug
|
||||||
printf(s"${i}-th uncoalesced response came back from lane ${lane}\n")
|
// when (resp.valid) {
|
||||||
}
|
// printf(s"${i}-th uncoalesced response came back from lane ${lane}\n")
|
||||||
|
// }
|
||||||
// dontTouch(q.io.enq(respQueueCoalPortOffset))
|
// dontTouch(q.io.enq(respQueueCoalPortOffset))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -873,8 +861,7 @@ class Uncoalescer(config: CoalescerConfig) extends Module {
|
|||||||
// split the coalesced response back to individual per-lane responses with the
|
// split the coalesced response back to individual per-lane responses with the
|
||||||
// right metadata.
|
// right metadata.
|
||||||
class InflightCoalReqTable(config: CoalescerConfig) extends Module {
|
class InflightCoalReqTable(config: CoalescerConfig) extends Module {
|
||||||
val offsetBits = 4 // FIXME hardcoded
|
val offsetBits = config.maxCoalLogSize - config.wordWidth // assumes word offset
|
||||||
val sizeBits = 2 // FIXME hardcoded
|
|
||||||
val entryT = new InflightCoalReqTableEntry(
|
val entryT = new InflightCoalReqTableEntry(
|
||||||
config.numLanes,
|
config.numLanes,
|
||||||
config.queueDepth,
|
config.queueDepth,
|
||||||
@@ -886,6 +873,9 @@ class InflightCoalReqTable(config: CoalescerConfig) extends Module {
|
|||||||
val entries = config.numNewSrcIds
|
val entries = config.numNewSrcIds
|
||||||
val sourceWidth = log2Ceil(config.numOldSrcIds)
|
val sourceWidth = log2Ceil(config.numOldSrcIds)
|
||||||
|
|
||||||
|
println(s"=========== table sourceWidth: ${sourceWidth}")
|
||||||
|
println(s"=========== table sizeEnumBits: ${entryT.sizeEnumT.getWidth}")
|
||||||
|
|
||||||
val io = IO(new Bundle {
|
val io = IO(new Bundle {
|
||||||
val enq = Flipped(Decoupled(entryT))
|
val enq = Flipped(Decoupled(entryT))
|
||||||
// TODO: return actual stuff
|
// TODO: return actual stuff
|
||||||
|
|||||||
Reference in New Issue
Block a user