Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about arbitrateSimp #43

Open
pdnm opened this issue Jan 15, 2023 · 0 comments · May be fixed by #44
Open

Question about arbitrateSimp #43

pdnm opened this issue Jan 15, 2023 · 0 comments · May be fixed by #44

Comments

@pdnm
Copy link

pdnm commented Jan 15, 2023

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!

@pdnm pdnm linked a pull request Jan 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant