Copyright | (C) 2019 Myrtle Software Ltd. 2018 @blaxill 2018 QBayLogic B.V. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Clash.Signal.Delayed.Bundle
Description
Synopsis
- class Bundle a where
- data EmptyTuple = EmptyTuple
- data TaggedEmptyTuple (dom :: Domain) (d :: Nat) = TaggedEmptyTuple
Documentation
Isomorphism between a DSignal
of a product type
(e.g. a tuple) and a product type of DSignal
s.
Instances of Bundle
must satisfy the following laws:
bundle
.unbundle
=id
unbundle
.bundle
=id
By default, bundle
and unbundle
, are defined as the identity, that is,
writing:
data D = A | B instance Bundle D
is the same as:
data D = A | B instance Bundle D where typeUnbundled
dom delay D =DSignal
dom delay Dbundle
s = sunbundle
s = s
Minimal complete definition
Nothing
Methods
bundle :: Unbundled dom d a -> DSignal dom d a Source #
Example:
bundle :: (DSignal
dom d a,DSignal
dom d b) ->DSignal
clk d (a,b)
However:
bundle ::DSignal
domBit
->DSignal
domBit
bundle :: DSignal dom d a ~ Unbundled dom d a => Unbundled dom d a -> DSignal dom d a Source #
Example:
bundle :: (DSignal
dom d a,DSignal
dom d b) ->DSignal
clk d (a,b)
However:
bundle ::DSignal
domBit
->DSignal
domBit
unbundle :: DSignal dom d a -> Unbundled dom d a Source #
Example:
unbundle ::DSignal
dom d (a,b) -> (DSignal
dom d a,DSignal
dom d b)
However:
unbundle ::DSignal
domBit
->DSignal
domBit
unbundle :: Unbundled dom d a ~ DSignal dom d a => DSignal dom d a -> Unbundled dom d a Source #
Instances
Tools to emulate pre Clash 1.0 Bundle ()
instance
data EmptyTuple Source #
See TaggedEmptyTuple
Constructors
EmptyTuple |
Instances
data TaggedEmptyTuple (dom :: Domain) (d :: Nat) Source #
Same as Clash.Signal.Bundle.TaggedEmptyTuple, but adapted for DSignal.
Constructors
TaggedEmptyTuple |