From 4f5b1da58b34c28a4953b47d103808a1aa849142 Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Tue, 16 Feb 2016 10:02:48 -0800 Subject: [PATCH] add a resp_len helper to AtosRequest --- junctions/src/main/scala/atos.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/junctions/src/main/scala/atos.scala b/junctions/src/main/scala/atos.scala index ed2160a8..f11c7877 100644 --- a/junctions/src/main/scala/atos.scala +++ b/junctions/src/main/scala/atos.scala @@ -97,6 +97,11 @@ class AtosRequest(implicit p: Parameters) typ === AtosRequest.arType || (typ === AtosRequest.wType && last()) def nbytes: Int = atosRequestBytes + + def resp_len(dummy: Int = 0) = + MuxLookup(typ, UInt(0), Seq( + AtosRequest.arType -> (len() + UInt(1)), + AtosRequest.awType -> UInt(1))) } object AtosResponse {