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

Safe HaskellNone

CLaSH.Normalize.Util

Description

Utility functions used by the normalisation transformations

Synopsis

Documentation

alreadyInlined :: TmName -> NormalizeMonad BoolSource

Determine if a function is already inlined in the context of the NetlistMonad

commitNewInlined :: NormRewriteSource

Move the names of inlined functions collected during a traversal into the permanent inlined function cache

isClosed :: (Functor m, Fresh m) => Term -> m BoolSource

Determine if a term is closed

isConstant :: Term -> BoolSource

Determine if a term represents a constant

getWrappedF :: (Fresh m, Functor m) => Term -> m (Maybe Term)Source

Get the "Wrapped" function out of a normalized Term. Returns Nothing if the normalized term is not actually a wrapper.

callGraphSource

Arguments

:: [TmName]

List of functions that should not be inspected

-> HashMap TmName Term

Global binders

-> TmName

Root of the call graph

-> [(TmName, [TmName])] 

Create a call graph for a set of global binders, given a root

recursiveComponentsSource

Arguments

:: [(TmName, [TmName])]
(calling function,[called function
)]
-> [[TmName]] 

Determine the sets of recursive components given the edges of a callgraph