feldspar-language-0.6.0.2: A functional embedded language for DSP and parallelism

Safe Haskell | None

Feldspar.Algorithm.CRC

Synopsis

- tstBit :: Bits a => Data a -> Data Index -> Data Bool
- makeCrcTable :: Bits a => Data a -> Vector1 a
- crcNormal :: Bits a => Vector1 a -> Data a -> Vector1 Word8 -> Data a
- crcReflected :: Bits a => Vector1 a -> Data a -> Vector1 Word8 -> Data a
- crcNaive :: Bits a => Data a -> Data a -> Vector1 Word8 -> Data a
- data CRC a = CRC {
  - name :: String
  - width :: Index
  - poly :: a
  - init :: a
  - reflectIn :: Bool
  - reflectOut :: Bool
  - xorOut :: a
  }
- crc16 :: CRC (Data Word16)
- reflect :: Bits a => Data a -> Data Length -> Data a

# Documentation

tstBit :: Bits a => Data a -> Data Index -> Data Bool

makeCrcTable :: Bits a => Data a -> Vector1 a

crcNormal :: Bits a => Vector1 a -> Data a -> Vector1 Word8 -> Data a

Calculate the normal form CRC using a table

crcReflected :: Bits a => Vector1 a -> Data a -> Vector1 Word8 -> Data a

Calculate the reflected form CRC using a table needs reflected tables

crcNaive :: Bits a => Data a -> Data a -> Vector1 Word8 -> Data a

Calculate normal form CRC from a polynominal

data CRC a

Constructors

CRC |

Fields

name :: String
width :: Index
poly :: a
init :: a
reflectIn :: Bool
reflectOut :: Bool
xorOut :: a

crc16 :: CRC (Data Word16)

reflect :: Bits a => Data a -> Data Length -> Data a

Reflect the bottom b bits of value t