package hardcaml_circuits

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

A counter. If the current value is n, it outputs n/divisor (as quotient) and n mod divisor (as remainder). Since the counter doesn't track n directly, the maximum values must be specified as max_quotient and max_remainder, and the counter will wrap when its outputs reach max_quotient AND max_remainder.

It also has set functionality, but again set_quotient and set_remainder must be directly specified.

It has special cases to simplify HW when divisor is a power of 2 and if also max_remainder = divisor - 1, and if also max_quotient + 1 is a power of 2.

module type Config = sig ... end
module Make (Config : Config) : sig ... end
OCaml

Innovation. Community. Security.