Module Arbiters.Index

Priority is specified as either a offset to start searching from, or as a special mask.

The mask has the form:

type 'a t =
| Offset of 'a
| Mask of 'a

Compute the next value of a priority mask register. The initial (reset) value should be all ones, though it probably doesn't matter too much if it comes up all zeros as it will correctly set itself in the next cycle.