package hardcaml_circuits

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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

The mask has the form:

  • 0 11..1111
  • 1 11..1110
  • 2 11..1100
  • 3 11..1000
  • num_sources-1 10..0000
type 'a t =
  1. | Offset of 'a
  2. | 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.