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

Copyright(C) 2015, University of Twente
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010
Extensions
  • TemplateHaskell
  • OverloadedStrings
  • DisambiguateRecordFields
  • RecordWildCards
  • TupleSections

CLaSH.Driver.TopWrapper

Description

 

Synopsis

Documentation

mkTopWrapper Source

Arguments

:: PrimMap 
-> Maybe TopEntity

TopEntity specifications

-> String

Name of the module containing the topEntity

-> Component

Entity to wrap

-> Component 

Create a wrapper around a component, potentially initiating clock sources

extraIn :: Maybe TopEntity -> [(Identifier, HWType)] Source

Create extra input ports for the wrapper

extraOut :: Maybe TopEntity -> [(Identifier, HWType)] Source

Create extra output ports for the wrapper

mkInput :: [Identifier] -> (Identifier, HWType) -> Int -> ([Identifier], ([(Identifier, HWType)], ([Declaration], Identifier))) Source

Generate input port mappings

mkVectorChain :: Int -> HWType -> [Identifier] -> Expr Source

Create a Vector chain for a list of Identifiers

mkOutput :: [Identifier] -> (Identifier, HWType) -> Int -> ([Identifier], ([(Identifier, HWType)], ([Declaration], Identifier))) Source

Generate output port mappings

mkClocks :: PrimMap -> [(Identifier, HWType)] -> Maybe TopEntity -> [Declaration] Source

Create clock generators

mkClock :: ClockSource -> ([Declaration], (Identifier, [String], Bool)) Source

Create a single clock generator

clockPorts :: Maybe (String, String) -> [(String, String)] -> ([(Identifier, Expr)], [String]) Source

Create a single clock path

mkResets :: PrimMap -> [(Identifier, HWType)] -> [(Identifier, [String], Bool)] -> [Declaration] Source

Generate resets

genSyncReset :: PrimMap -> Identifier -> Identifier -> Text -> Int -> NetlistMonad [Declaration] Source

Generate a reset synchroniser that synchronously de-asserts an asynchronous reset signal

unsafeRunNetlist :: NetlistMonad a -> a Source

The NetListMonad is an transformer stack with IO at the bottom. So we must use unsafePerformIO.