diff --git a/ipemu/src/TestBench.scala b/ipemu/src/TestBench.scala index 7cebddac0..5a5e37ec3 100644 --- a/ipemu/src/TestBench.scala +++ b/ipemu/src/TestBench.scala @@ -115,10 +115,11 @@ class TestBench(generator: SerializableModuleGenerator[T1, T1Parameter]) extends outstanding := outstanding + (doIssue && (issue.meta === 1.U)) - dut.response.valid fence := Mux(doIssue, issue.meta === 2.U, fence && !dut.response.valid && !(outstanding === 0.U)) - issue := RawClockedNonVoidFunctionCall("issue_vector_instruction", new Issue)( + // RawClockedNonVoidFunctionCall result is initialized to X, hack it to zero + issue := Mux(RegNext(true.B, false.B), RawClockedNonVoidFunctionCall("issue_vector_instruction", new Issue)( clock, doIssue, - ) + ), 0.U.asTypeOf(new Issue)) dut.request.bits.instruction := issue.instruction dut.request.bits.src1Data := issue.src1Data dut.request.bits.src2Data := issue.src2Data