Set lgSize=0 as memtrace addresses are not aligned
This is TODO, we need to have a logic inside MemTraceDriver that aligns these addresses to word boundaries and sets the right masks, similar to how an actual core issues load/stores.
This commit is contained in:
@@ -183,16 +183,19 @@ class MemTraceDriverImp(outer: MemTraceDriver, numThreads: Int)
|
|||||||
tlOut.a.bits := edge.Put(
|
tlOut.a.bits := edge.Put(
|
||||||
fromSource = sourceIdCounter,
|
fromSource = sourceIdCounter,
|
||||||
toAddress = req.address,
|
toAddress = req.address,
|
||||||
// 64 bits = 8 bytes = 2**(3) bytes
|
// Memory trace addresses are not aligned in word addresses (e.g.
|
||||||
lgSize = 3.U,
|
// read of size 1 at 0x1007) so leave lgSize to 0.
|
||||||
|
// TODO: We need to build an issue logic that aligns addresses at
|
||||||
|
// word boundaries and uses masks.
|
||||||
|
// NOTE: this is in byte size, not bits
|
||||||
|
lgSize = 0.U,
|
||||||
data = req.data
|
data = req.data
|
||||||
)._2
|
)._2
|
||||||
}.otherwise {
|
}.otherwise {
|
||||||
tlOut.a.bits := edge.Get(
|
tlOut.a.bits := edge.Get(
|
||||||
fromSource = sourceIdCounter,
|
fromSource = sourceIdCounter,
|
||||||
toAddress = req.address,
|
toAddress = req.address,
|
||||||
// 64 bits = 8 bytes = 2**(3) bytes
|
lgSize = 0.U
|
||||||
lgSize = 3.U,
|
|
||||||
)._2
|
)._2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user