Skip to content

Commit

Permalink
[ipemu] debug for xprop
Browse files Browse the repository at this point in the history
  • Loading branch information
sequencer committed Jul 31, 2024
1 parent b666eca commit ed7bf72
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions ipemu/src/TestBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,13 @@ 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 && !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)
didIssue := doIssue || didIssue
val hasBeenReset = RegNext(true.B, false.B)
val doIssue: Bool = dut.io.issue.ready && !fence && hasBeenReset
outstanding := outstanding + (RegNext(doIssue) && (issue.meta === 1.U)) - dut.io.issue.valid
// TODO: refactor driver to spawn 3 scoreboards for record different retirement.
val t1Probe = probe.read(dut.io.t1Probe)
fence := Mux(doIssue, issue.meta === 2.U, fence && !t1Probe.retireValid && !(outstanding === 0.U))

issue := Mux(didIssue || doIssue,
fence := Mux(RegNext(doIssue), issue.meta === 2.U, fence && !t1Probe.retireValid && !(outstanding === 0.U))
issue := Mux(doIssue,
RawClockedNonVoidFunctionCall("issue_vector_instruction", new Issue)(
clock,
doIssue,
Expand Down

0 comments on commit ed7bf72

Please sign in to comment.