ucb-bar / chisel2-deprecated

chisel.eecs.berkeley.edu
387 stars 90 forks source link

add stable arbiters #519

Closed wsong83 closed 8 years ago

wsong83 commented 9 years ago

Add a new arbiter type named StableArbiter.

Stable arbiters ensure that the output of an arbiter is stable once out.valid is asserted. This arbiter is necessary when the client device on the output side is slow and needs to latch the request content (out.bits) or to process the requests for extra cycles before asserting ready (out.ready).

The differences before the origin arbiter and a stable arbiter: In stable arbiters, once there is one or more inputs becoming valid, the output is locked to the chosen input until it is fired for count times. Inputs with higher priorities cannot pre-empt a chosen input with lower priority if it comes late. (Priority is used only when multiple requests become valid at the same cycle).

Another choice could be adding another parameter after "needsLock", eg: "needsHold" and extending the original arbiter.

ucbjrl commented 8 years ago

There appears to be consensus that this should be implemented as an additional parameter to the standard arbiters.

wsong83 commented 8 years ago

I have redone the pull request. Now a needsHold parameter is added to all arbiters. When it is set true, the chosen port is held until it is fired. The parameter is set to false in default so no effect to existing code.

Test cases are revised accordingly and passed.