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
Equations
Equations
- Sparkle.IR.Type.instBEqHWType.beq Sparkle.IR.Type.HWType.bit Sparkle.IR.Type.HWType.bit = true
- Sparkle.IR.Type.instBEqHWType.beq (Sparkle.IR.Type.HWType.bitVector a) (Sparkle.IR.Type.HWType.bitVector b) = (a == b)
- Sparkle.IR.Type.instBEqHWType.beq (Sparkle.IR.Type.HWType.array a a_1) (Sparkle.IR.Type.HWType.array b b_1) = (a == b && Sparkle.IR.Type.instBEqHWType.beq a_1 b_1)
- Sparkle.IR.Type.instBEqHWType.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Sparkle.IR.Type.instDecidableEqHWType.decEq Sparkle.IR.Type.HWType.bit Sparkle.IR.Type.HWType.bit = isTrue ⋯
- Sparkle.IR.Type.instDecidableEqHWType.decEq Sparkle.IR.Type.HWType.bit (Sparkle.IR.Type.HWType.bitVector width) = isFalse ⋯
- Sparkle.IR.Type.instDecidableEqHWType.decEq Sparkle.IR.Type.HWType.bit (Sparkle.IR.Type.HWType.array size elemType) = isFalse ⋯
- Sparkle.IR.Type.instDecidableEqHWType.decEq (Sparkle.IR.Type.HWType.bitVector width) Sparkle.IR.Type.HWType.bit = isFalse ⋯
- Sparkle.IR.Type.instDecidableEqHWType.decEq (Sparkle.IR.Type.HWType.bitVector a) (Sparkle.IR.Type.HWType.bitVector b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Sparkle.IR.Type.instDecidableEqHWType.decEq (Sparkle.IR.Type.HWType.bitVector width) (Sparkle.IR.Type.HWType.array size elemType) = isFalse ⋯
- Sparkle.IR.Type.instDecidableEqHWType.decEq (Sparkle.IR.Type.HWType.array size elemType) Sparkle.IR.Type.HWType.bit = isFalse ⋯
- Sparkle.IR.Type.instDecidableEqHWType.decEq (Sparkle.IR.Type.HWType.array size elemType) (Sparkle.IR.Type.HWType.bitVector width) = isFalse ⋯
Instances For
Equations
Get the bit width of a hardware type
Equations
Instances For
Check if a hardware type is a bit vector
Equations
Instances For
Convert hardware type to a human-readable string
Equations
- Sparkle.IR.Type.HWType.bit.toString = "Bit"
- (Sparkle.IR.Type.HWType.bitVector 1).toString = "Bit"
- (Sparkle.IR.Type.HWType.bitVector w).toString = toString "BitVec" ++ toString w
- (Sparkle.IR.Type.HWType.array size elemType).toString = toString "Array[" ++ toString size ++ toString "](" ++ toString elemType.toString ++ toString ")"
Instances For
Equations
Convert a Lean type with BitPack instance to HWType
Equations
Instances For
Helper to infer HWType from a Nat width
Equations
Instances For
8-bit hardware type
Instances For
16-bit hardware type
Equations
Instances For
32-bit hardware type
Equations
Instances For
64-bit hardware type
Equations
Instances For
Boolean hardware type
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Sparkle.IR.Type.instBEqResetKind.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)