1
0

use options for NastiWriteDataChannel write mask

This commit is contained in:
Howard Mao 2016-07-05 16:03:25 -07:00
parent ed9fcea7f8
commit 96f09003f2
2 changed files with 4 additions and 9 deletions

View File

@ -246,7 +246,7 @@ class AtosRequestDecoder(implicit p: Parameters) extends AtosModule()(p) {
io.w.bits := NastiWriteDataChannel(
id = io.req.bits.id(),
data = io.req.bits.data(),
strb = io.req.bits.strb(),
strb = Some(io.req.bits.strb()),
last = io.req.bits.last())
io.req.ready := (io.ar.ready && is_ar) ||

View File

@ -168,21 +168,16 @@ object NastiReadAddressChannel {
}
object NastiWriteDataChannel {
def apply(data: UInt, last: Bool = Bool(true), id: UInt = UInt(0))
def apply(data: UInt, strb: Option[UInt] = None,
last: Bool = Bool(true), id: UInt = UInt(0))
(implicit p: Parameters): NastiWriteDataChannel = {
val w = Wire(new NastiWriteDataChannel)
w.strb := Fill(w.nastiWStrobeBits, UInt(1, 1))
w.strb := strb.getOrElse(Fill(w.nastiWStrobeBits, UInt(1, 1)))
w.data := data
w.last := last
w.user := UInt(0)
w
}
def apply(data: UInt, strb: UInt, last: Bool, id: UInt)
(implicit p: Parameters): NastiWriteDataChannel = {
val w = apply(data, last, id)
w.strb := strb
w
}
}
object NastiReadDataChannel {