clash-prelude-0.6.0.1: CAES Language for Synchronous Hardware - Prelude library

Safe HaskellNone
LanguageHaskell2010

CLaSH.Signal.Bundle

Description

The Product/Signal isomorphism

Synopsis

Documentation

class Bundle a where Source

Isomorphism between a CSignal of a product type (e.g. a tuple) and a product type of CSignals.

Instances of Bundle must satisfy the following laws:

bundle . unbundle = id
unbundle . bundle = id

Minimal complete definition

Nothing

Associated Types

type Unbundled clk a Source

Methods

bundle :: SClock clk -> Unbundled clk a -> CSignal clk a Source

Example:

bundle :: (CSignal clk a, CSignal clk b) -> CSignal clk (a,b)

However:

bundle :: CSignal clk Bit -> CSignal clk Bit

unbundle :: SClock clk -> CSignal clk a -> Unbundled clk a Source

Example:

unbundle :: CSignal clk (a,b) -> (CSignal clk a, CSignal clk b)

However:

unbundle :: CSignal clk Bit -> CSignal clk Bit

Instances

Bundle Bool 
Bundle Double 
Bundle Float 
Bundle Int 
Bundle Integer 
Bundle () 
Bundle (Maybe a) 
Bundle (Index n) 
Bundle (BitVector n) 
Bundle (Signed n) 
Bundle (Unsigned n) 
Bundle (Either a b) 
Bundle (a, b) 
KnownNat n => Bundle (Vec n a) 
Bundle (a, b, c) 
Bundle (Fixed rep int frac) 
Bundle (a, b, c, d) 
Bundle (a, b, c, d, e) 
Bundle (a, b, c, d, e, f) 
Bundle (a, b, c, d, e, f, g) 
Bundle (a, b, c, d, e, f, g, h)