clash-protocols
Safe HaskellNone
LanguageGHC2021

Protocols.ToConst

Description

Definitions for the ToConst protocol. Usable to pass constant values in circuits.

Synopsis

Documentation

data ToConst a #

Instances

Instances details
Protocol (ToConst a) # 
Instance details

Defined in Protocols.Plugin

Associated Types

type Fwd (ToConst a) 
Instance details

Defined in Protocols.Plugin

type Fwd (ToConst a) = a
type Bwd (ToConst a) 
Instance details

Defined in Protocols.Plugin

type Bwd (ToConst a) = ()
type Bwd (ToConst a) # 
Instance details

Defined in Protocols.Plugin

type Bwd (ToConst a) = ()
type Fwd (ToConst a) # 
Instance details

Defined in Protocols.Plugin

type Fwd (ToConst a) = a

data ToConstBwd a #

Instances

Instances details
Protocol (ToConstBwd a) # 
Instance details

Defined in Protocols.Plugin

Associated Types

type Fwd (ToConstBwd a) 
Instance details

Defined in Protocols.Plugin

type Fwd (ToConstBwd a) = ()
type Bwd (ToConstBwd a) 
Instance details

Defined in Protocols.Plugin

type Bwd (ToConstBwd a) = a
type Bwd (ToConstBwd a) # 
Instance details

Defined in Protocols.Plugin

type Bwd (ToConstBwd a) = a
type Fwd (ToConstBwd a) # 
Instance details

Defined in Protocols.Plugin

type Fwd (ToConstBwd a) = ()

to :: a -> Circuit () (ToConst a) Source #

Convert a value to a Circuit that produces a constant value on the forward channel.

from :: Circuit () (ToConst a) -> a Source #

Extract the constant value from the forward direction.

toBwd :: a -> Circuit (ToConstBwd a) () Source #

Convert a value to a Circuit that produces a constant value in the backward direction.

fromBwd :: Circuit (ToConstBwd a) () -> a Source #

Extract the constant value from the backward direction.