Hi @schoeberl,
In arbitrateSimp, regEmpty is updated to true when (out.ready), but what if out.ready is true when regEmpty is true?
The following test fails while I think it should pass:
class ArbiterTester extends AnyFlatSpec with ChiselScalatestTester {
"arbiter" should "work" in {
test(new ArbiterSimpleTree(2, UInt(4.W))) { dut =>
dut.io.in(0).valid.poke(true)
dut.io.in(0).bits.poke(14.U)
dut.io.in(1).valid.poke(false)
dut.io.out.ready.poke(false)
dut.clock.step()
dut.io.out.ready.poke(true)
dut.clock.step()
dut.io.out.valid.expect(true)
dut.io.out.bits.expect(14.U)
}
}
}
Please help advice, thanks!
Hi @schoeberl,
In
arbitrateSimp,regEmptyis updated to true when (out.ready), but what ifout.readyis true whenregEmptyis true?The following test fails while I think it should pass:
Please help advice, thanks!