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

Copyright(C) 2015-2016, 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 BlackBoxTemplate 
-> (Identifier -> Identifier) 
-> Maybe TopEntity

TopEntity specifications

-> String

Name of the module containing the topEntity

-> Int

IntWordInteger bit-width

-> 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 BlackBoxTemplate -> [(Identifier, HWType)] -> Int -> Maybe TopEntity -> [Declaration] Source

Create clock generators

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

Create a single clock generator

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

Create a single clock path

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

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

unsafeRunNetlist :: Int -> NetlistMonad a -> a Source

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