1
0

make sure NASTI -> SMI converter still works if words per beat is 1

This commit is contained in:
Howard Mao 2015-10-13 12:44:48 -07:00
parent a08872c0e9
commit 2fee3fd0fd

View File

@ -215,13 +215,14 @@ class SMIIONASTIWriteIOConverter(val dataWidth: Int, val addrWidth: Int)
io.b.valid := (state === s_resp)
io.b.bits := NASTIWriteResponseChannel(id)
val jump = PriorityMux(strb(maxWordsPerBeat - 1, 1),
(1 until maxWordsPerBeat).map(UInt(_)))
val jump = if (maxWordsPerBeat > 1)
PriorityMux(strb(maxWordsPerBeat - 1, 1),
(1 until maxWordsPerBeat).map(UInt(_)))
else UInt(1)
when (io.aw.fire()) {
addr := io.aw.bits.addr(addrOffBits - 1, byteOffBits)
id := io.aw.bits.id
//size := io.aw.bits.size - UInt(byteOffBits)
size := io.aw.bits.size
last := Bool(false)
state := s_data