Documentation

Sparkle.Core.Signal

Signal Module #

This module defines the stream-based signal semantics for Sparkle HDL.

Overview #

Signals represent time-varying hardware values using infinite streams. A Signal d α is essentially a function Nat → α where Nat represents discrete time steps (clock cycles).

Key Concepts #

Core Primitives #

Registers #

Use Signal.register init input to create state elements (delays by 1 cycle):

-- Simple register chain (feed-forward)
def registerChain (input : Signal Domain (BitVec 8)) : Signal Domain (BitVec 8) :=
  let d1 := Signal.register 0#8 input
  let d2 := Signal.register 0#8 d1
  d2

-- Counter with feedback (requires let rec)
def counter {dom : DomainConfig} : Signal dom (BitVec 8) :=
  let rec count := Signal.register 0#8 (count.map (· + 1))
  count

Multiplexers #

Use Signal.mux for conditional logic (NOT if-then-else):

def conditionalInc (enable : Signal Domain Bool) (input : Signal Domain (BitVec 8))
    : Signal Domain (BitVec 8) :=
  let next := input.map (· + 1)
  Signal.mux enable next input  -- Select between increment or hold

Simulation #

Signals can be simulated directly to verify behavior before synthesis:

#eval Signal.simulate myCircuit inputs |>.take 10

See also: Sparkle.Core.Domain for clock domain configuration.

Stream is an infinite sequence of values indexed by natural numbers. Time 0 is the initial state, time 1 is after first clock cycle, etc.

Equations
Instances For

    Signal represents a time-varying value in a specific clock domain. It wraps a Stream and carries domain information at the type level.

    The domain parameter ensures signals from different clock domains cannot be accidentally mixed.

    Instances For
      @[inline]
      def Sparkle.Core.Signal.Signal.atTime {dom : Domain.DomainConfig} {α : Type u} (s : Signal dom α) (t : Nat) :
      α

      Access the value of a signal at a specific time

      Equations
      Instances For
        def Sparkle.Core.Signal.Signal.pure {dom : Domain.DomainConfig} {α : Type u} (x : α) :
        Signal dom α

        Create a constant signal (same value at all times)

        Equations
        Instances For
          def Sparkle.Core.Signal.Signal.map {dom : Domain.DomainConfig} {α β : Type u} (f : αβ) (s : Signal dom α) :
          Signal dom β

          Map a function over a signal (combinational logic)

          Equations
          Instances For
            def Sparkle.Core.Signal.Signal.ap {dom : Domain.DomainConfig} {α β : Type u} (sf : Signal dom (αβ)) (s : Signal dom α) :
            Signal dom β

            Apply a signal of functions to a signal of values

            Equations
            Instances For
              def Sparkle.Core.Signal.Signal.seq {dom : Domain.DomainConfig} {α β : Type u} (sf : Signal dom (αβ)) (s : UnitSignal dom α) :
              Signal dom β

              Sequence two signals

              Equations
              Instances For
                def Sparkle.Core.Signal.Signal.bind {dom : Domain.DomainConfig} {α β : Type u} (s : Signal dom α) (f : αSignal dom β) :
                Signal dom β

                Monadic bind for signals

                Equations
                Instances For
                  def Sparkle.Core.Signal.Signal.register {dom : Domain.DomainConfig} {α : Type u} (init : α) (input : Signal dom α) :
                  Signal dom α

                  Register (D Flip-Flop) primitive.

                  At time 0: outputs the initial value At time t > 0: outputs the input value from time (t-1)

                  This implements a single-cycle delay, the fundamental building block of sequential logic.

                  Equations
                  Instances For
                    def Sparkle.Core.Signal.Signal.registerWithEnable {dom : Domain.DomainConfig} {α : Type u} (init : α) (en : Signal dom Bool) (input : Signal dom α) :
                    Signal dom α

                    Register with enable signal.

                    When enable is true: register updates normally When enable is false: register holds its current value

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Sparkle.Core.Signal.Signal.registerWithEnable.go {dom : Domain.DomainConfig} {α : Type u} (init : α) (en : Signal dom Bool) (input : Signal dom α) (t : Nat) (prev : α) :
                      α
                      Equations
                      Instances For

                        Helper to create a signal from a stream

                        Equations
                        Instances For

                          Helper to extract stream from signal

                          Equations
                          Instances For
                            def Sparkle.Core.Signal.Signal.sample {dom : Domain.DomainConfig} {α : Type u} (s : Signal dom α) (n : Nat) :
                            List α

                            Sample a signal for the first n cycles

                            Equations
                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              Equations
                              Equations
                              Equations
                              Equations
                              Equations
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Equations
                              Equations
                              Equations
                              Equations
                              Equations
                              def Sparkle.Core.Signal.Signal.lt {α : Type} {dom : Domain.DomainConfig} [LT α] [DecidableRel fun (x1 x2 : α) => x1 < x2] (a b : Signal dom α) :

                              Unsigned less-than: a <ₛ b on signals.

                              Equations
                              Instances For
                                def Sparkle.Core.Signal.Signal.le {α : Type} {dom : Domain.DomainConfig} [LE α] [DecidableRel fun (x1 x2 : α) => x1 x2] (a b : Signal dom α) :

                                Unsigned less-or-equal: a ≤ₛ b on signals.

                                Equations
                                Instances For

                                  Signed less-than on BitVec signals.

                                  Equations
                                  Instances For

                                    Unsigned less-than on BitVec signals.

                                    Equations
                                    Instances For

                                      Signed less-or-equal on BitVec signals.

                                      Equations
                                      Instances For

                                        Unsigned less-or-equal on BitVec signals.

                                        Equations
                                        Instances For

                                          Arithmetic shift right on BitVec signals.

                                          Equations
                                          Instances For
                                            Equations
                                            Instances For
                                              Equations
                                              Instances For
                                                def Sparkle.Core.Signal.Signal.ashrC {dom : Domain.DomainConfig} {n : Nat} (a : Signal dom (BitVec n)) (b : BitVec n) :
                                                Signal dom (BitVec n)
                                                Equations
                                                Instances For
                                                  def Sparkle.Core.Signal.Signal.beq {α : Type} {dom : Domain.DomainConfig} [BEq α] (a b : Signal dom α) :

                                                  Hardware equality: a === b compares two signals element-wise each cycle.

                                                  Equations
                                                  • a.beq b = (fun (x1 x2 : α) => x1 == x2) <$> a <*> b
                                                  Instances For
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      @[reducible, inline]
                                                      abbrev Sparkle.Core.Signal.Signal.lit {α : Type u_1} (dom : Domain.DomainConfig) (x : α) :
                                                      Signal dom α

                                                      Constant signal with explicit domain binding. Use instead of Signal.pure when the domain can't be inferred: let rnd := Signal.lit dom 32#16 instead of let rnd := Signal.pure 32#16

                                                      Equations
                                                      Instances For
                                                        def Sparkle.Core.Signal.Signal.lift2 {dom : Domain.DomainConfig} {α β γ : Type u} (f : αβγ) (sa : Signal dom α) (sb : Signal dom β) :
                                                        Signal dom γ

                                                        Lift a binary operation to signals (combinational logic)

                                                        Equations
                                                        Instances For
                                                          def Sparkle.Core.Signal.Signal.delay {dom : Domain.DomainConfig} {α : Type u} (n : Nat) (init : α) (s : Signal dom α) :
                                                          Signal dom α

                                                          Delay a signal by n cycles, filling with initial value

                                                          Equations
                                                          Instances For
                                                            def Sparkle.Core.Signal.Signal.mux {dom : Domain.DomainConfig} {α : Type u} (cond : Signal dom Bool) (thenSig elseSig : Signal dom α) :
                                                            Signal dom α

                                                            Mux (multiplexer): select between two signals based on condition

                                                            Equations
                                                            Instances For
                                                              @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.Signal.memoryImpl]
                                                              opaque Sparkle.Core.Signal.Signal.memory {dom : Domain.DomainConfig} {addrWidth dataWidth : Nat} (writeAddr : Signal dom (BitVec addrWidth)) (writeData : Signal dom (BitVec dataWidth)) (writeEnable : Signal dom Bool) (readAddr : Signal dom (BitVec addrWidth)) :
                                                              Signal dom (BitVec dataWidth)
                                                              @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.Signal.memoryComboReadImpl]
                                                              opaque Sparkle.Core.Signal.Signal.memoryComboRead {dom : Domain.DomainConfig} {addrWidth dataWidth : Nat} (writeAddr : Signal dom (BitVec addrWidth)) (writeData : Signal dom (BitVec dataWidth)) (writeEnable : Signal dom Bool) (readAddr : Signal dom (BitVec addrWidth)) :
                                                              Signal dom (BitVec dataWidth)
                                                              @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.Signal.memoryWithInitImpl]
                                                              opaque Sparkle.Core.Signal.Signal.memoryWithInit {dom : Domain.DomainConfig} {addrWidth dataWidth : Nat} (initData : BitVec addrWidthBitVec dataWidth) (writeAddr : Signal dom (BitVec addrWidth)) (writeData : Signal dom (BitVec dataWidth)) (writeEnable : Signal dom Bool) (readAddr : Signal dom (BitVec addrWidth)) :
                                                              Signal dom (BitVec dataWidth)
                                                              @[irreducible]
                                                              def Sparkle.Core.Signal.Signal.loopGo {dom : Domain.DomainConfig} {α : Type} [Inhabited α] (f : Signal dom αSignal dom α) (t : Nat) :
                                                              α

                                                              The pure fixpoint value of a feedback loop, computed by strong recursion on the time index.

                                                              To compute the value at time t, we apply the loop body f to a signal that recursively supplies the already-computed values for every earlier cycle i < t and default at t and beyond. For a strictly causal f (every feedback path runs through a Signal.register, so the output at t reads only inputs strictly before t), the default placeholder at ≥ t is never observed, so this is exactly the loop's fixpoint — see loop_unfold in Sparkle/Verification/LoopProps.lean, now a theorem rather than an axiom.

                                                              The if i < t guard makes the recursion well-founded (t strictly decreases), so this is a total, axiom-free definition.

                                                              Runtime note: this naive form recomputes the < t prefix on every cycle (O(t) work per cycle → O(n²) for an n-cycle sim). The @[implemented_by loopImpl] on loop below swaps in the memoizing loopImpl for execution, keeping O(n); the pure loopGo/loop definitions are what the kernel and the proofs see.

                                                              Equations
                                                              Instances For
                                                                @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.Signal.loopImpl]
                                                                def Sparkle.Core.Signal.Signal.loop {dom : Domain.DomainConfig} {α : Type} [Inhabited α] (f : Signal dom αSignal dom α) :
                                                                Signal dom α

                                                                Fixed-point combinator for feedback loops.

                                                                Logically this is the pure loopGo fixpoint (no axiom, no opaque, no unsafe). For execution it is compiled to the memoizing loopImpl via @[implemented_by], which keeps cycle-by-cycle simulation at O(n) instead of the O(n²) the naive loopGo would cost.

                                                                Equations
                                                                Instances For
                                                                  theorem Sparkle.Core.Signal.Signal.loopGo_eq {dom : Domain.DomainConfig} {α : Type} [Inhabited α] (f : Signal dom αSignal dom α) (t : Nat) :
                                                                  loopGo f t = (f { val := fun (i : Nat) => if i < t then loopGo f i else default }).val t

                                                                  loopGo's defining equation, exposed for proofs.

                                                                  @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.Signal.memoizeImpl]
                                                                  opaque Sparkle.Core.Signal.Signal.memoize {dom : Domain.DomainConfig} {α : Type} [Inhabited α] (s : Signal dom α) :
                                                                  Signal dom α
                                                                  @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.Signal.loopMemoImpl]
                                                                  opaque Sparkle.Core.Signal.Signal.loopMemo {dom : Domain.DomainConfig} {α : Type} [Inhabited α] (f : Signal dom αSignal dom α) :
                                                                  IO (Signal dom α)
                                                                  def Sparkle.Core.Signal.Signal.cond {dom : Domain.DomainConfig} {α : Type u} (cases : List (Signal dom Bool × Signal dom α)) (default : Signal dom α) :
                                                                  Signal dom α

                                                                  Chained conditional mux: priority-encoded multiplexer. Signal.cond [(c1, v1), (c2, v2), ...] default selects the first matching condition's value, falling back to default.

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

                                                                    Hardware switch: replaces deeply nested Signal.mux chains. Default value comes first, then condition/value pairs (first match wins):

                                                                    hw_cond fsmReg
                                                                      | startAndIdle  => (1#4 : Signal dom _)
                                                                      | stemDone      => (2#4 : Signal dom _)
                                                                    

                                                                    expands to Signal.mux startAndIdle (1#4) (Signal.mux stemDone (2#4) fsmReg)

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      def Sparkle.Core.Signal.ashr {n : Nat} (a b : BitVec n) :

                                                                      Arithmetic shift right with BitVec shift amount. Wraps BitVec.sshiftRight (which takes Nat) so it can be used in the applicative Signal DSL pattern: (ashr · ·) <$> a <*> b

                                                                      Equations
                                                                      Instances For
                                                                        @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.bundle2Impl]
                                                                        def Sparkle.Core.Signal.bundle2 {dom : Domain.DomainConfig} {α β : Type u} (a : Signal dom α) (b : Signal dom β) :
                                                                        Signal dom (α × β)
                                                                        Equations
                                                                        Instances For
                                                                          @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.bundle3Impl]
                                                                          def Sparkle.Core.Signal.bundle3 {dom : Domain.DomainConfig} {α β γ : Type u} (a : Signal dom α) (b : Signal dom β) (c : Signal dom γ) :
                                                                          Signal dom (α × β × γ)
                                                                          Equations
                                                                          Instances For
                                                                            @[deprecated "Use `Signal.fst` and `Signal.snd` directly. Pattern-matching on `unbundle2` breaks in synthesis." (since := "2026-04-08")]
                                                                            def Sparkle.Core.Signal.unbundle2 {dom : Domain.DomainConfig} {α β : Type u} (s : Signal dom (α × β)) :
                                                                            Signal dom α × Signal dom β

                                                                            Unbundle a signal of pairs.

                                                                            ⚠️ Returns a Lean-level tuple. Pattern-matching on the result (let (a, b) := unbundle2 signal) silently breaks in synthesis because the tuple is destructured at elaboration time. Use Signal.fst / Signal.snd directly instead. This binding is kept only so legacy test files still compile.

                                                                            Equations
                                                                            Instances For
                                                                              @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.fstImpl]
                                                                              def Sparkle.Core.Signal.Signal.fst {dom : Domain.DomainConfig} {α β : Type u} (s : Signal dom (α × β)) :
                                                                              Signal dom α
                                                                              Equations
                                                                              Instances For
                                                                                @[implemented_by _private.Sparkle.Core.Signal.0.Sparkle.Core.Signal.sndImpl]
                                                                                def Sparkle.Core.Signal.Signal.snd {dom : Domain.DomainConfig} {α β : Type u} (s : Signal dom (α × β)) :
                                                                                Signal dom β
                                                                                Equations
                                                                                Instances For
                                                                                  @[deprecated "Use `Signal.proj3_1`, `Signal.proj3_2`, `Signal.proj3_3` directly." (since := "2026-04-08")]
                                                                                  def Sparkle.Core.Signal.unbundle3 {dom : Domain.DomainConfig} {α β γ : Type u} (s : Signal dom (α × β × γ)) :
                                                                                  Signal dom α × Signal dom β × Signal dom γ

                                                                                  Unbundle a 3-tuple signal.

                                                                                  ⚠️ Same caveat as unbundle2: the returned Lean tuple cannot be pattern-matched in synthesis code. Use Signal.proj3_1 / proj3_2 / proj3_3 instead.

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For
                                                                                    def Sparkle.Core.Signal.Signal.proj3_1 {dom : Domain.DomainConfig} {α β γ : Type u} (s : Signal dom (α × β × γ)) :
                                                                                    Signal dom α

                                                                                    Project first element from a 3-tuple signal

                                                                                    Equations
                                                                                    Instances For
                                                                                      def Sparkle.Core.Signal.Signal.proj3_2 {dom : Domain.DomainConfig} {α β γ : Type u} (s : Signal dom (α × β × γ)) :
                                                                                      Signal dom β

                                                                                      Project second element from a 3-tuple signal

                                                                                      Equations
                                                                                      Instances For
                                                                                        def Sparkle.Core.Signal.Signal.proj3_3 {dom : Domain.DomainConfig} {α β γ : Type u} (s : Signal dom (α × β × γ)) :
                                                                                        Signal dom γ

                                                                                        Project third element from a 3-tuple signal

                                                                                        Equations
                                                                                        Instances For
                                                                                          @[deprecated "Use `Signal.proj4_1..proj4_4` directly." (since := "2026-04-08")]
                                                                                          def Sparkle.Core.Signal.unbundle4 {dom : Domain.DomainConfig} {α β γ δ : Type u} (s : Signal dom (α × β × γ × δ)) :
                                                                                          Signal dom α × Signal dom β × Signal dom γ × Signal dom δ

                                                                                          Unbundle a 4-tuple signal.

                                                                                          ⚠️ Same caveat as unbundle2. Use Signal.proj4_1..proj4_4 instead.

                                                                                          Equations
                                                                                          • One or more equations did not get rendered due to their size.
                                                                                          Instances For
                                                                                            def Sparkle.Core.Signal.Signal.proj4_1 {dom : Domain.DomainConfig} {α β γ δ : Type u} (s : Signal dom (α × β × γ × δ)) :
                                                                                            Signal dom α

                                                                                            Project first element from a 4-tuple signal

                                                                                            Equations
                                                                                            Instances For
                                                                                              def Sparkle.Core.Signal.Signal.proj4_2 {dom : Domain.DomainConfig} {α β γ δ : Type u} (s : Signal dom (α × β × γ × δ)) :
                                                                                              Signal dom β

                                                                                              Project second element from a 4-tuple signal

                                                                                              Equations
                                                                                              Instances For
                                                                                                def Sparkle.Core.Signal.Signal.proj4_3 {dom : Domain.DomainConfig} {α β γ δ : Type u} (s : Signal dom (α × β × γ × δ)) :
                                                                                                Signal dom γ

                                                                                                Project third element from a 4-tuple signal

                                                                                                Equations
                                                                                                Instances For
                                                                                                  def Sparkle.Core.Signal.Signal.proj4_4 {dom : Domain.DomainConfig} {α β γ δ : Type u} (s : Signal dom (α × β × γ × δ)) :
                                                                                                  Signal dom δ

                                                                                                  Project fourth element from a 4-tuple signal

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    def Sparkle.Core.Signal.unbundle5 {dom : Domain.DomainConfig} {α β γ δ ε : Type u} (s : Signal dom (α × β × γ × δ × ε)) :
                                                                                                    Signal dom α × Signal dom β × Signal dom γ × Signal dom δ × Signal dom ε

                                                                                                    Unbundle a 5-tuple signal

                                                                                                    Equations
                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                    Instances For
                                                                                                      def Sparkle.Core.Signal.unbundle6 {dom : Domain.DomainConfig} {α β γ δ ε ζ : Type u} (s : Signal dom (α × β × γ × δ × ε × ζ)) :
                                                                                                      Signal dom α × Signal dom β × Signal dom γ × Signal dom δ × Signal dom ε × Signal dom ζ

                                                                                                      Unbundle a 6-tuple signal

                                                                                                      Equations
                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                      Instances For
                                                                                                        def Sparkle.Core.Signal.unbundle7 {dom : Domain.DomainConfig} {α β γ δ ε ζ η : Type u} (s : Signal dom (α × β × γ × δ × ε × ζ × η)) :
                                                                                                        Signal dom α × Signal dom β × Signal dom γ × Signal dom δ × Signal dom ε × Signal dom ζ × Signal dom η

                                                                                                        Unbundle a 7-tuple signal

                                                                                                        Equations
                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                        Instances For
                                                                                                          def Sparkle.Core.Signal.unbundle8 {dom : Domain.DomainConfig} {α β γ δ ε ζ η θ : Type u} (s : Signal dom (α × β × γ × δ × ε × ζ × η × θ)) :
                                                                                                          Signal dom α × Signal dom β × Signal dom γ × Signal dom δ × Signal dom ε × Signal dom ζ × Signal dom η × Signal dom θ

                                                                                                          Unbundle an 8-tuple signal

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

                                                                                                            Project the i-th element (0-indexed) from a right-nested pair signal. projN! state n i extracts element i from n-element nested pair.

                                                                                                            Example (4-element tuple (A × (B × (C × D)))): projN! s 4 0Signal.fst s -- A projN! s 4 1Signal.fst (Signal.snd s) -- B projN! s 4 2Signal.fst (Signal.snd (Signal.snd s)) -- C projN! s 4 3Signal.snd (Signal.snd (Signal.snd s)) -- D (last uses snd)

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

                                                                                                              Bundle a list of signals into a right-nested pair using bundle2. bundleAll! [a, b, c, d]bundle2 a (bundle2 b (bundle2 c d))

                                                                                                              For a single element, returns that element directly.

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

                                                                                                                Destructure a 2-element right-nested pair signal into named bindings. hw_let (a, b) := sig; body expands to: let a := Signal.fst sig; let b := Signal.snd sig; body

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

                                                                                                                  Destructure a 3-element right-nested pair signal (A × (B × C)).

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

                                                                                                                    Destructure a 4-element right-nested pair signal (A × (B × (C × D))).

                                                                                                                    Equations
                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                    Instances For
                                                                                                                      @[inline]
                                                                                                                      def Sparkle.Core.Signal.bitsHL {w : Nat} (x : BitVec w) (hi lo : Nat) :
                                                                                                                      BitVec (hi - lo + 1)

                                                                                                                      Verilog-style slice: bitsHL inst hi loinst[hi,lo].

                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        Equations
                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                        Instances For
                                                                                                                          • slice : α(hi lo : Nat) → β (hi - lo + 1)
                                                                                                                          Instances
                                                                                                                            Equations
                                                                                                                            • One or more equations did not get rendered due to their size.