From 8f269b2eec3ede9578213ed6d31fc80434a0d86c Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Tue, 31 May 2016 19:46:42 -0700 Subject: [PATCH] stall for more cycles in Hasti test --- groundtest/src/main/scala/unittest.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundtest/src/main/scala/unittest.scala b/groundtest/src/main/scala/unittest.scala index 465f5eb9..affbfbdf 100644 --- a/groundtest/src/main/scala/unittest.scala +++ b/groundtest/src/main/scala/unittest.scala @@ -30,6 +30,8 @@ class HastiTestDriver(implicit p: Parameters) extends NastiModule { s_read_addr :: s_read_data :: s_read_stall :: s_done :: Nil) = Enum(Bits(), 9) val state = Reg(init = s_idle) + val (stall_cnt, stall_done) = Counter(state === s_read_stall, 2) + io.nasti.aw.valid := (state === s_write_addr) io.nasti.aw.bits := NastiWriteAddressChannel( id = UInt(0), @@ -63,7 +65,7 @@ class HastiTestDriver(implicit p: Parameters) extends NastiModule { when (io.nasti.b.fire()) { state := s_read_addr } when (io.nasti.ar.fire()) { state := s_read_data } when (io.nasti.r.fire()) { state := s_read_stall } - when (state === s_read_stall) { state := s_read_data } + when (stall_done) { state := s_read_data } when (read_done) { state := s_done } val read_data = Mux(read_cnt(0),