Documentation

Sparkle.IR.Type

A hardware dimension that is either concrete or depends on retained module parameters. This is deliberately a small, closed language: the compiler must reject Lean computations it cannot preserve instead of evaluating them only at a parameter's default value.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Hardware Type: The subset of types that can be synthesized to hardware.

          • Bit: Single bit (wire)
          • BitVector: n-bit vector
          • Array: Fixed-size array (for memories/ROMs)
          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              Instances For

                Get the bit width of a hardware type

                Equations
                Instances For

                  Check if a hardware type is a single bit

                  Equations
                  Instances For

                    Check if a hardware type is an array

                    Equations
                    Instances For

                      Convert a Lean type with BitPack instance to HWType

                      Equations
                      Instances For

                        Construct a packed hardware type while preserving a symbolic dimension.

                        Equations
                        Instances For

                          Reset kind: synchronous or asynchronous.

                          Lives here (not in Sparkle.Core.Domain) so the IR layer can reference it without importing Core/Domain.lean (which would create a layering inversion). Sparkle.Core.Domain re-exports this so user code keeps seeing Sparkle.Core.Domain.ResetKind.

                          Instances For
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              @[implicit_reducible]
                              Equations