From 59d700bf66c2952076333d6746d5542669c2acf8 Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Fri, 15 Jul 2016 18:45:37 -0700 Subject: [PATCH] fix combinational loop in NASTI -> HASTI converter --- junctions/src/main/scala/hasti.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/junctions/src/main/scala/hasti.scala b/junctions/src/main/scala/hasti.scala index fe177500..abb3ee81 100644 --- a/junctions/src/main/scala/hasti.scala +++ b/junctions/src/main/scala/hasti.scala @@ -405,9 +405,8 @@ class HastiMasterIONastiIOConverter(implicit p: Parameters) extends HastiModule( assert(!r_queue.io.enq.valid || r_queue.io.enq.ready, "NASTI -> HASTI converter queue overflow") - val next_count = r_queue.io.count + - r_queue.io.enq.valid - - r_queue.io.deq.ready + // How many read requests have we not delivered a response for yet? + val pending_count = r_queue.io.count + rvalid io.hasti.haddr := addr io.hasti.hsize := size @@ -422,7 +421,7 @@ class HastiMasterIONastiIOConverter(implicit p: Parameters) extends HastiModule( Mux(first, HTRANS_IDLE, HTRANS_BUSY)), s_read -> MuxCase(HTRANS_BUSY, Seq( first -> HTRANS_NONSEQ, - (next_count <= UInt(1)) -> HTRANS_SEQ)))) + (pending_count <= UInt(1)) -> HTRANS_SEQ)))) when (io.nasti.aw.fire()) { first := Bool(true)