From 2fee3fd0fd634a97bc0bf8a5980c994cba5d9c7c Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Tue, 13 Oct 2015 12:44:48 -0700 Subject: [PATCH] make sure NASTI -> SMI converter still works if words per beat is 1 --- junctions/src/main/scala/smi.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/junctions/src/main/scala/smi.scala b/junctions/src/main/scala/smi.scala index ec2e554e..d2d65067 100644 --- a/junctions/src/main/scala/smi.scala +++ b/junctions/src/main/scala/smi.scala @@ -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