package hardcaml_circuits

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

Parameters

module Spec : Spec

Signature

module I : sig ... end
module O : sig ... end
module State : sig ... end

Creates a non-restoring divider with config specified in Spec. The width of the input arguments is defined with Spec.width. The divider can operate on signed or unsigned arguments as defined in Spec.signed and performs truncated division (which aligns with default OCaml behaviour of Int.( / ) and Int.( mod )).

The delay of the divider is fixed at Spec.width cycles regardless of architecture.

Three divider architectures are supported as set in Spec.architecture. In Iterative mode, only one operation per Spec.width cycles is supported. If start is asserted prior to the completion of the previous result, that operation is aborted and the new operation commences. start can be asserted on the same cycle that valid is high.

In Pipelined or Combinational mode, one operation can be performed every cycle. In this mode start informs the divider that the inputs are valid. In Combinational mode, valid is assigned to start and outputs are updated in the same cycle. In Pipelined mode, valid will be asserted Spec.width cycles after start with the result of the divide.

val hierarchical : ?instance:Base.string -> ?name:Base.string -> Hardcaml.Scope.t -> Hardcaml.Signal.t I.t -> Hardcaml.Signal.t O.t
OCaml

Innovation. Community. Security.