| Copyright | (C) 2013-2016 University of Twente 2016-2017 Myrtle Software Ltd 2017 QBayLogic Google Inc. 2020-2022 QBayLogic 2022 Google Inc. |
|---|---|
| License | BSD2 (see the file LICENSE) |
| Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Clash.Driver.Types
Description
Type definitions used by the Driver module
Synopsis
- data ClashEnv = ClashEnv {}
- data ClashDesign = ClashDesign {}
- data IsPrim
- data Binding a = Binding {
- bindingId :: Id
- bindingLoc :: SrcSpan
- bindingSpec :: InlineSpec
- bindingIsPrim :: IsPrim
- bindingTerm :: a
- bindingRecursive :: Bool
- type BindingMap = VarEnv (Binding Term)
- type DomainMap = HashMap Text VDomainConfiguration
- data TransformationInfo
- data DebugOpts = DebugOpts {}
- isDebugging :: DebugOpts -> Bool
- hasDebugInfo :: TransformationInfo -> String -> DebugOpts -> Bool
- hasTransformationInfo :: TransformationInfo -> DebugOpts -> Bool
- debugNone :: DebugOpts
- debugSilent :: DebugOpts
- debugFinal :: DebugOpts
- debugCount :: DebugOpts
- debugName :: DebugOpts
- debugTry :: DebugOpts
- debugApplied :: DebugOpts
- debugAll :: DebugOpts
- data ClashOpts = ClashOpts {
- opt_werror :: Bool
- opt_inlineLimit :: Int
- opt_specLimit :: Int
- opt_inlineFunctionLimit :: Word
- opt_inlineConstantLimit :: Word
- opt_evaluatorFuelLimit :: Word
- opt_debug :: DebugOpts
- opt_cachehdl :: Bool
- opt_clear :: Bool
- opt_primWarn :: Bool
- opt_color :: OverridingBool
- opt_intWidth :: Int
- opt_hdlDir :: Maybe String
- opt_hdlSyn :: HdlSyn
- opt_errorExtra :: Bool
- opt_importPaths :: [FilePath]
- opt_componentPrefix :: Maybe Text
- opt_newInlineStrat :: Bool
- opt_escapedIds :: Bool
- opt_lowerCaseBasicIds :: PreserveCase
- opt_ultra :: Bool
- opt_forceUndefined :: Maybe (Maybe Int)
- opt_checkIDir :: Bool
- opt_aggressiveXOpt :: Bool
- opt_aggressiveXOptBB :: Bool
- opt_inlineWFCacheLimit :: Word
- opt_edalize :: Bool
- opt_renderEnums :: Bool
- opt_timescalePrecision :: Period
- defClashOpts :: ClashOpts
- newtype SdcInfo = SdcInfo {
- sdcClock :: [(Text, VDomainConfiguration)]
- pprSDC :: SdcInfo -> Doc ()
Documentation
Constructors
| ClashEnv | |
Fields | |
Instances
data ClashDesign Source #
Constructors
| ClashDesign | |
Fields | |
Instances
| NFData ClashDesign Source # | |
Defined in Clash.Driver.Types Methods rnf :: ClashDesign -> () Source # | |
Constructors
| IsPrim | The binding is the unfolding for a primitive. |
| IsFun | The binding is an ordinary function. |
Constructors
| Binding | |
Fields
| |
Instances
| Functor Binding Source # | |||||
| Binary a => Binary (Binding a) Source # | |||||
| NFData a => NFData (Binding a) Source # | |||||
Defined in Clash.Driver.Types | |||||
| Generic (Binding a) Source # | |||||
Defined in Clash.Driver.Types Associated Types
| |||||
| Show a => Show (Binding a) Source # | |||||
| type Rep (Binding a) Source # | |||||
Defined in Clash.Driver.Types type Rep (Binding a) = D1 ('MetaData "Binding" "Clash.Driver.Types" "clash-lib-1.8.4-Avs1lkPVzQY2EJC6aQfI6Y" 'False) (C1 ('MetaCons "Binding" 'PrefixI 'True) ((S1 ('MetaSel ('Just "bindingId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Id) :*: (S1 ('MetaSel ('Just "bindingLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SrcSpan) :*: S1 ('MetaSel ('Just "bindingSpec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InlineSpec))) :*: (S1 ('MetaSel ('Just "bindingIsPrim") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IsPrim) :*: (S1 ('MetaSel ('Just "bindingTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "bindingRecursive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))) | |||||
type BindingMap = VarEnv (Binding Term) Source #
Global function binders
Global functions cannot be mutually recursive, only self-recursive.
type DomainMap = HashMap Text VDomainConfiguration Source #
data TransformationInfo Source #
Information to show about transformations during compilation.
NB: The Ord instance compares by amount of information.
Constructors
| None | Show no information about transformations. |
| FinalTerm | Show the final term after all applied transformations. |
| AppliedName | Show the name of every transformation that is applied. |
| AppliedTerm | Show the name and result of every transformation that is applied. |
| TryName | Show the name of every transformation that is attempted, and the result of every transformation that is applied. |
| TryTerm | Show the name and input to every transformation that is applied, and the result of every transformation that is applied. |
Instances
| NFData TransformationInfo Source # | |||||
Defined in Clash.Driver.Types Methods rnf :: TransformationInfo -> () Source # | |||||
| Generic TransformationInfo Source # | |||||
Defined in Clash.Driver.Types Associated Types
Methods from :: TransformationInfo -> Rep TransformationInfo x Source # to :: Rep TransformationInfo x -> TransformationInfo Source # | |||||
| Read TransformationInfo Source # | |||||
Defined in Clash.Driver.Types | |||||
| Show TransformationInfo Source # | |||||
Defined in Clash.Driver.Types | |||||
| Eq TransformationInfo Source # | |||||
Defined in Clash.Driver.Types Methods (==) :: TransformationInfo -> TransformationInfo -> Bool Source # (/=) :: TransformationInfo -> TransformationInfo -> Bool Source # | |||||
| Ord TransformationInfo Source # | |||||
Defined in Clash.Driver.Types Methods compare :: TransformationInfo -> TransformationInfo -> Ordering Source # (<) :: TransformationInfo -> TransformationInfo -> Bool Source # (<=) :: TransformationInfo -> TransformationInfo -> Bool Source # (>) :: TransformationInfo -> TransformationInfo -> Bool Source # (>=) :: TransformationInfo -> TransformationInfo -> Bool Source # max :: TransformationInfo -> TransformationInfo -> TransformationInfo Source # min :: TransformationInfo -> TransformationInfo -> TransformationInfo Source # | |||||
| Hashable TransformationInfo Source # | |||||
Defined in Clash.Driver.Types | |||||
| type Rep TransformationInfo Source # | |||||
Defined in Clash.Driver.Types type Rep TransformationInfo = D1 ('MetaData "TransformationInfo" "Clash.Driver.Types" "clash-lib-1.8.4-Avs1lkPVzQY2EJC6aQfI6Y" 'False) ((C1 ('MetaCons "None" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "FinalTerm" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AppliedName" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "AppliedTerm" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TryName" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TryTerm" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
Options related to debugging. See ClashOpts
Constructors
| DebugOpts | |
Fields
| |
Instances
| NFData DebugOpts Source # | |||||
Defined in Clash.Driver.Types | |||||
| Generic DebugOpts Source # | |||||
Defined in Clash.Driver.Types Associated Types
| |||||
| Show DebugOpts Source # | |||||
| Eq DebugOpts Source # | |||||
| Hashable DebugOpts Source # | |||||
Defined in Clash.Driver.Types | |||||
| type Rep DebugOpts Source # | |||||
Defined in Clash.Driver.Types type Rep DebugOpts = D1 ('MetaData "DebugOpts" "Clash.Driver.Types" "clash-lib-1.8.4-Avs1lkPVzQY2EJC6aQfI6Y" 'False) (C1 ('MetaCons "DebugOpts" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dbg_invariants") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "dbg_transformationInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TransformationInfo) :*: S1 ('MetaSel ('Just "dbg_transformations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Set String)))) :*: ((S1 ('MetaSel ('Just "dbg_countTransformations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "dbg_transformationsFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Word))) :*: (S1 ('MetaSel ('Just "dbg_transformationsLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Word)) :*: S1 ('MetaSel ('Just "dbg_historyFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)))))) | |||||
isDebugging :: DebugOpts -> Bool Source #
Check whether the debugging options mean the compiler is debugging. This is true only if at least one debugging feature is enabled, namely one of
- checking for invariants
- showing info for transformations
- counting applied transformations
- limiting the number of transformations
Other flags, such as writing to a history file or offsetting which applied
transformation to show information from do not affect the result, as it is
possible to enable these but still not perform any debugging checks in
functions like applyDebug. If this is no longer the case, this function
will need to be changed.
hasDebugInfo :: TransformationInfo -> String -> DebugOpts -> Bool Source #
Check whether the requested information is available to the specified transformation according to the options. e.g.
traceIf (hasDebugInfo AppliedName name opts) ("Trace something using: " <> show name)
This accounts for the set of transformations which are being debugged. For a
check which is agnostic to the a transformation, see hasTransformationInfo.
hasTransformationInfo :: TransformationInfo -> DebugOpts -> Bool Source #
Check that the transformation info shown supports the requested info.
If the call-site is in the context of a particular transformation,
hasDebugInfo should be used instead.
debugSilent :: DebugOpts Source #
- fclash-debug DebugSilent
debugFinal :: DebugOpts Source #
- fclash-debug DebugFinal
debugCount :: DebugOpts Source #
- fclash-debug DebugCount
debugApplied :: DebugOpts Source #
- fclash-debug DebugApplied
Options passed to Clash compiler
Constructors
| ClashOpts | |
Fields
| |
Instances
| NFData ClashOpts Source # | |||||
Defined in Clash.Driver.Types | |||||
| Generic ClashOpts Source # | |||||
Defined in Clash.Driver.Types Associated Types
| |||||
| Show ClashOpts Source # | |||||
| Eq ClashOpts Source # | |||||
| Hashable ClashOpts Source # | |||||
Defined in Clash.Driver.Types | |||||
| type Rep ClashOpts Source # | |||||
Defined in Clash.Driver.Types type Rep ClashOpts = D1 ('MetaData "ClashOpts" "Clash.Driver.Types" "clash-lib-1.8.4-Avs1lkPVzQY2EJC6aQfI6Y" 'False) (C1 ('MetaCons "ClashOpts" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "opt_werror") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "opt_inlineLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "opt_specLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) :*: ((S1 ('MetaSel ('Just "opt_inlineFunctionLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "opt_inlineConstantLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word)) :*: (S1 ('MetaSel ('Just "opt_evaluatorFuelLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "opt_debug") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DebugOpts)))) :*: ((S1 ('MetaSel ('Just "opt_cachehdl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "opt_clear") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "opt_primWarn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "opt_color") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 OverridingBool) :*: S1 ('MetaSel ('Just "opt_intWidth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "opt_hdlDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "opt_hdlSyn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HdlSyn))))) :*: (((S1 ('MetaSel ('Just "opt_errorExtra") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "opt_importPaths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: S1 ('MetaSel ('Just "opt_componentPrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "opt_newInlineStrat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "opt_escapedIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "opt_lowerCaseBasicIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PreserveCase) :*: S1 ('MetaSel ('Just "opt_ultra") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: (((S1 ('MetaSel ('Just "opt_forceUndefined") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Maybe Int))) :*: S1 ('MetaSel ('Just "opt_checkIDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "opt_aggressiveXOpt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "opt_aggressiveXOptBB") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "opt_inlineWFCacheLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word) :*: S1 ('MetaSel ('Just "opt_edalize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "opt_renderEnums") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "opt_timescalePrecision") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Period))))))) | |||||
Synopsys Design Constraint (SDC) information for a component. Currently this limited to the names and periods of clocks for create_clock.
Constructors
| SdcInfo | |
Fields
| |