clash-lib-0.3.2: CAES Language for Synchronous Hardware - As a Library

Safe HaskellNone
LanguageHaskell2010

CLaSH.Netlist.BlackBox.Types

Description

Types used in BlackBox modules

Synopsis

Documentation

data BlackBoxContext Source

Context used to fill in the holes of a BlackBox template

Constructors

Context 

Fields

result :: (SyncIdentifier, HWType)

Result name and type

inputs :: [(SyncIdentifier, HWType)]

Argument names and types

litInputs :: [Identifier]

Literal arguments (subset of inputs)

funInputs :: [(BlackBoxTemplate, BlackBoxContext)]

Function arguments (subset of inputs):

  • (Blackbox Template,Partial Blackbox Concext)

type SyncIdentifier = Either Identifier (Identifier, (Identifier, Int)) Source

Either the name of the identifier, or a tuple of the identifier and the corresponding clock

type BlackBoxTemplate = [Element] Source

A BlackBox Template is a List of Elements

data Element Source

Elements of a blackbox context

Constructors

C Text

Constant

D Decl

Component instantiation hole

O

Output hole

I Int

Input hole

L Int

Literal hole

Sym Int

Symbol hole

Clk (Maybe Int)

Clock hole (Maybe clk corresponding to input, clk corresponding to output if Nothing)

Rst (Maybe Int)

Reset hole

Typ (Maybe Int)

Type declaration hole

TypM (Maybe Int)

Type root hole

Err (Maybe Int)

Error value hole

TypElem Element

Select element type from a vector type

Instances

data Decl Source

Component instantiation hole. First argument indicates which function argument to instantiate. Second argument corresponds to output and input assignments, where the first element is the output assignment, and the subsequent elements are the consecutive input assignments.

The LHS of the tuple is the name of the signal, while the RHS of the tuple is the type of the signal

Instances

newtype BlackBoxMonad a Source

Monad that caches VHDL information and remembers hidden inputs of black boxes that are being generated (WriterT)

Constructors

B