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

Copyright(C) 2012-2016 University of Twente
2016-2017 Myrtle Software Ltd
2017 QBayLogic Google Inc.
LicenseBSD2 (see the file LICENSE)
MaintainerChristiaan Baaij <christiaan.baaij@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Driver

Description

Module that connects all the parts of the Clash compiler library

Synopsis

Documentation

generateHDL Source #

Arguments

:: Backend backend 
=> BindingMap

Set of functions

-> Maybe backend 
-> PrimMap Text

Primitive / BlackBox Definitions

-> HashMap TyConOccName TyCon

TyCon cache

-> IntMap TyConName

Tuple TyCon cache

-> (HashMap TyConOccName TyCon -> Bool -> Type -> Maybe (Either String HWType))

Hardcoded Type -> HWType translator

-> PrimEvaluator

Hardcoded evaluator (delta-reduction)

-> [(TmName, Type, Maybe TopEntity, Maybe TmName)]

topEntity bndr + (maybe) TopEntity annotation + (maybe) testBench bndr

-> ClashOpts

Debug information level for the normalization process

-> (UTCTime, UTCTime) 
-> IO () 

Create a set of target HDL files for a set of functions

createHDL Source #

Arguments

:: Backend backend 
=> backend

Backend

-> String

Module hierarchy root

-> [(SrcSpan, Component)]

List of components

-> Component

Top component

-> (String, Either Manifest Manifest)

Name of the manifest file + Either: * Left manifest: Only write/update the hashes of the manifest * Right manifest: Update all fields of the manifest

-> ([(String, Doc)], Manifest)

The pretty-printed HDL documents + The update manifest file

Pretty print Components to HDL Documents

prepareDir Source #

Arguments

:: Bool

Remove existing HDL files

-> String

File extension of the HDL files.

-> String 
-> IO () 

Prepares the directory for writing HDL files. This means creating the dir if it does not exist and removing all existing .hdl files from it.

writeHDL :: FilePath -> (String, Doc) -> IO () Source #

Writes a HDL file to the given directory

callGraphBindings Source #

Arguments

:: BindingMap

All bindings

-> TmOccName

Root of the call graph

-> [Term] 

Get all the terms corresponding to a call graph

normalizeEntity Source #

Arguments

:: BindingMap

All bindings

-> PrimMap BlackBoxTemplate

BlackBox HDL templates

-> HashMap TyConOccName TyCon

TyCon cache

-> IntMap TyConName

Tuple TyCon cache

-> (HashMap TyConOccName TyCon -> Bool -> Type -> Maybe (Either String HWType))

Hardcoded Type -> HWType translator

-> PrimEvaluator

Hardcoded evaluator (delta-reduction)

-> [TmOccName]

TopEntities

-> ClashOpts

Debug information level for the normalization process

-> Supply

Unique supply

-> TmOccName

root of the hierarchy

-> BindingMap 

Normalize a complete hierarchy