| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
CLaSH.Sized.Signed
Documentation
Instances
| KnownNat n => Bounded (Signed n) | |
| KnownNat n => Enum (Signed n) | |
| Eq (Signed n) | |
| KnownNat n => Integral (Signed n) | |
| KnownNat n => Num (Signed n) | |
| Ord (Signed n) | |
| KnownNat n => Real (Signed n) | |
| Show (Signed n) | |
| KnownNat n => Bits (Signed n) | |
| KnownNat n => FiniteBits (Signed n) | |
| KnownNat n => Default (Signed n) | |
| KnownNat n => Lift (Signed n) | |
| BitVector (Signed n) | |
| Pack (Signed n) | |
| type BitSize (Signed n) = n | |
| type SignalP (Signed n) = Signal (Signed n) |
resizeS :: forall n m. (KnownNat n, KnownNat m) => Signed n -> Signed m Source
A sign-preserving resize operation
Increasing the size of the number replicates the sign bit to the left. Truncating a number to length L keeps the sign bit and the rightmost L-1 bits.
resizeS_wrap :: KnownNat m => Signed n -> Signed m Source
A resize operation that is sign-preserving on extension, but wraps on truncation.
Increasing the size of the number replicates the sign bit to the left. Truncating a number of length N to a length L just removes the leftmost N-L bits.