Skip to content

Commit

Permalink
StoreQueue: Change timeout to an existing API(TimeOutAssert) implemen…
Browse files Browse the repository at this point in the history
…tation.
  • Loading branch information
Anzooooo authored and Tang-Haojin committed Jul 4, 2024
1 parent 6edb148 commit 42d529e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/main/scala/xiangshan/mem/lsqueue/StoreQueue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -971,18 +971,11 @@ class StoreQueue(implicit p: Parameters) extends XSModule
vecExceptionFlag.valid := false.B
vecExceptionFlag.bits := 0.U.asTypeOf(new DynInst)
}
val vecExceptionFlagAssertReg = RegInit(0.U(8.W))

// A dumb defensive code. The flag should not be placed for a long period of time.
when(vecExceptionFlag.valid){
vecExceptionFlagAssertReg := vecExceptionFlagAssertReg + 1.U
}.otherwise{
vecExceptionFlagAssertReg := 0.U
}
// A relatively large timeout period, not have any special meaning.
// If an assert appears and you confirm that it is not a Bug: Increase the timeout or remove the assert.
assert(vecExceptionFlagAssertReg <= 150.U, s"vecExceptionFlag Timeout.")

TimeOutAssert(vecExceptionFlag.valid, 3000, "vecExceptionFlag timeout, Plase check for bugs or add timeouts.")

// Initialize when unenabled difftest.
for (i <- 0 until EnsbufferWidth) {
Expand Down

0 comments on commit 42d529e

Please sign in to comment.