clash-multisignal-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

CLaSH.Signal.MultiSignal

Contents

Synopsis

Documentation

data MultiSignal n a Source #

Constructors

MultiSignal 

Fields

Instances

Functor (MultiSignal n) Source # 

Methods

fmap :: (a -> b) -> MultiSignal n a -> MultiSignal n b #

(<$) :: a -> MultiSignal n b -> MultiSignal n a #

KnownNat n => Applicative (MultiSignal n) Source # 

Methods

pure :: a -> MultiSignal n a #

(<*>) :: MultiSignal n (a -> b) -> MultiSignal n a -> MultiSignal n b #

(*>) :: MultiSignal n a -> MultiSignal n b -> MultiSignal n b #

(<*) :: MultiSignal n a -> MultiSignal n b -> MultiSignal n a #

Foldable (MultiSignal n) Source # 

Methods

fold :: Monoid m => MultiSignal n m -> m #

foldMap :: Monoid m => (a -> m) -> MultiSignal n a -> m #

foldr :: (a -> b -> b) -> b -> MultiSignal n a -> b #

foldr' :: (a -> b -> b) -> b -> MultiSignal n a -> b #

foldl :: (b -> a -> b) -> b -> MultiSignal n a -> b #

foldl' :: (b -> a -> b) -> b -> MultiSignal n a -> b #

foldr1 :: (a -> a -> a) -> MultiSignal n a -> a #

foldl1 :: (a -> a -> a) -> MultiSignal n a -> a #

toList :: MultiSignal n a -> [a] #

null :: MultiSignal n a -> Bool #

length :: MultiSignal n a -> Int #

elem :: Eq a => a -> MultiSignal n a -> Bool #

maximum :: Ord a => MultiSignal n a -> a #

minimum :: Ord a => MultiSignal n a -> a #

sum :: Num a => MultiSignal n a -> a #

product :: Num a => MultiSignal n a -> a #

(KnownNat m, (~) Nat m ((+) n 1)) => Traversable (MultiSignal m) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> MultiSignal m a -> f (MultiSignal m b) #

sequenceA :: Applicative f => MultiSignal m (f a) -> f (MultiSignal m a) #

mapM :: Monad m => (a -> m b) -> MultiSignal m a -> m (MultiSignal m b) #

sequence :: Monad m => MultiSignal m (m a) -> m (MultiSignal m a) #

(KnownNat n, (~) Nat n ((+) m 1)) => Prependable (MultiSignal n) Source # 

Methods

prepend :: a -> MultiSignal n a -> MultiSignal n a Source #

(Bounded a, KnownNat n) => Bounded (MultiSignal n a) Source # 
Eq (MultiSignal n a) Source # 

Methods

(==) :: MultiSignal n a -> MultiSignal n a -> Bool #

(/=) :: MultiSignal n a -> MultiSignal n a -> Bool #

(Fractional a, KnownNat n) => Fractional (MultiSignal n a) Source # 
(Num a, KnownNat n) => Num (MultiSignal n a) Source # 
Show a => Show (MultiSignal n a) Source # 

Methods

showsPrec :: Int -> MultiSignal n a -> ShowS #

show :: MultiSignal n a -> String #

showList :: [MultiSignal n a] -> ShowS #

(Bits a, KnownNat n) => Bits (MultiSignal n a) Source # 
(FiniteBits a, KnownNat n) => FiniteBits (MultiSignal n a) Source # 
(Default a, KnownNat n, (~) Nat n ((+) m 1)) => Default (MultiSignal n a) Source # 

Methods

def :: MultiSignal n a

(SaturatingNum a, KnownNat n, (~) Nat n ((+) m 1)) => SaturatingNum (MultiSignal n a) Source # 

Methods

satPlus :: SaturationMode -> MultiSignal n a -> MultiSignal n a -> MultiSignal n a

satMin :: SaturationMode -> MultiSignal n a -> MultiSignal n a -> MultiSignal n a

satMult :: SaturationMode -> MultiSignal n a -> MultiSignal n a -> MultiSignal n a

CoArbitrary a => CoArbitrary (MultiSignal n a) Source # 

Methods

coarbitrary :: MultiSignal n a -> Gen b -> Gen b

(Arbitrary a, KnownNat n) => Arbitrary (MultiSignal n a) Source # 

Methods

arbitrary :: Gen (MultiSignal n a)

shrink :: MultiSignal n a -> [MultiSignal n a]

(ExtendingNum a b, KnownNat n, (~) Nat n ((+) m 1)) => ExtendingNum (MultiSignal n a) (MultiSignal n b) Source # 

Associated Types

type AResult (MultiSignal n a) (MultiSignal n b) :: *

type MResult (MultiSignal n a) (MultiSignal n b) :: *

Methods

plus :: MultiSignal n a -> MultiSignal n b -> AResult (MultiSignal n a) (MultiSignal n b)

minus :: MultiSignal n a -> MultiSignal n b -> AResult (MultiSignal n a) (MultiSignal n b)

times :: MultiSignal n a -> MultiSignal n b -> MResult (MultiSignal n a) (MultiSignal n b)

type MResult (MultiSignal n a) (MultiSignal n b) Source # 
type MResult (MultiSignal n a) (MultiSignal n b) = MultiSignal n (MResult a b)
type AResult (MultiSignal n a) (MultiSignal n b) Source # 
type AResult (MultiSignal n a) (MultiSignal n b) = MultiSignal n (AResult a b)

Prependable

class Prependable f where Source #

class that can be prepended

rule
 toList (prepend a ax) == a : toList ax

Minimal complete definition

prepend

Methods

prepend :: a -> f a -> f a Source #

Instances

Prependable ZipList Source # 

Methods

prepend :: a -> ZipList a -> ZipList a Source #

Prependable (Signal' SystemClock) Source # 

Methods

prepend :: a -> Signal' SystemClock a -> Signal' SystemClock a Source #

(KnownNat n, (~) Nat n ((+) m 1)) => Prependable (MultiSignal n) Source # 

Methods

prepend :: a -> MultiSignal n a -> MultiSignal n a Source #

Utility functions

type SignalLike f = (Prependable f, Applicative f) Source #

Constraints synonym

mealyP Source #

Arguments

:: SignalLike f 
=> (s -> i -> (s, o))

Transfer function in mealy machine form: state -> input -> (newstate,output)

-> s

Initial state

-> f i -> f o

Synchronous sequential function with input and output matching that of the mealy machine

mooreP Source #

Arguments

:: SignalLike f 
=> (s -> i -> s)

Transfer function in moore machine form: state -> input -> newstate

-> (s -> o)

Output function in moore machine form: state -> output

-> s

Initial state

-> f i -> f o

Synchronous sequential function with input and output matching that of the moore machine

windowP Source #

Arguments

:: (KnownNat n, Default a, SignalLike f) 
=> f a

SignalLike to create a window over

-> Vec n (f a)

Vector of signals