From 8c613969bba0d0296c2090ef3e20e3e0f500b50d Mon Sep 17 00:00:00 2001 From: Jiuyang Liu Date: Sun, 28 Jul 2024 16:52:21 +0800 Subject: [PATCH] [ipemu] gate dpi call with !reset to work around verilator scheduling bug --- ipemu/src/TestBench.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipemu/src/TestBench.scala b/ipemu/src/TestBench.scala index e4d2a55df..8288043ca 100644 --- a/ipemu/src/TestBench.scala +++ b/ipemu/src/TestBench.scala @@ -113,7 +113,7 @@ class TestBench(generator: SerializableModuleGenerator[T1, T1Parameter]) val issue = WireDefault(0.U.asTypeOf(new Issue)) val fence = RegInit(false.B) val outstanding = RegInit(0.U(4.W)) - val doIssue: Bool = dut.io.issue.ready && !fence + val doIssue: Bool = dut.io.issue.ready && !fence && !reset outstanding := outstanding + (doIssue && (issue.meta === 1.U)) - dut.io.issue.valid // used to gate Xprop when DPI hasn't issued yet. val didIssue = RegInit(false.B)