Skip to content

Question about arbitrateSimp #43

@pdnm

Description

@pdnm

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions