clash-lib-1.8.1: Clash: a functional hardware description language - As a library

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 | Safe-Inferred
Language | Haskell2010

Clash.Driver.Types

Description

Type definitions used by the Driver module

Synopsis

- data ClashEnv = ClashEnv {
  - envOpts :: ClashOpts
  - envTyConMap :: TyConMap
  - envTupleTyCons :: IntMap TyConName
  - envPrimitives :: CompiledPrimMap
  - envCustomReprs :: CustomReprs
  - envDomains :: DomainMap
  }
- data ClashDesign = ClashDesign {
  - designEntities :: [TopEntityT]
  - designBindings :: BindingMap
  }
- data IsPrim
  - = IsPrim
  - | IsFun
- 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
  - = None
  - | FinalTerm
  - | AppliedName
  - | AppliedTerm
  - | TryName
  - | TryTerm
- data DebugOpts = DebugOpts {
  - dbg_invariants :: Bool
  - dbg_transformationInfo :: TransformationInfo
  - dbg_transformations :: Set String
  - dbg_countTransformations :: Bool
  - dbg_transformationsFrom :: Maybe Word
  - dbg_transformationsLimit :: Maybe Word
  - dbg_historyFile :: Maybe FilePath
  }
- 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

data ClashEnv Source #

Constructors

ClashEnv |

Fields

- envOpts :: ClashOpts
- envTyConMap :: TyConMap
- envTupleTyCons :: IntMap TyConName
- envPrimitives :: CompiledPrimMap
- envCustomReprs :: CustomReprs
- envDomains :: DomainMap

#### Instances

Instances details

Generic ClashEnv Source # |
Instance details Defined in Clash.Driver.Types Associated Types type Rep ClashEnv :: Type -> Type Source # Methods from :: ClashEnv -> Rep ClashEnv x Source # to :: Rep ClashEnv x -> ClashEnv Source #
NFData ClashEnv Source # |
Instance details Defined in Clash.Driver.Types Methods rnf :: ClashEnv -> () Source #
type Rep ClashEnv Source # |

Instance details

Defined in Clash.Driver.Types

type Rep ClashEnv = D1 ('MetaData "ClashEnv" "Clash.Driver.Types" "clash-lib-1.8.1-2YrsOtauO5B4MB9KvGiYOL" 'False) (C1 ('MetaCons "ClashEnv" 'PrefixI 'True) ((S1 ('MetaSel ('Just "envOpts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClashOpts) :*: (S1 ('MetaSel ('Just "envTyConMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyConMap) :*: S1 ('MetaSel ('Just "envTupleTyCons") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (IntMap TyConName)))) :*: (S1 ('MetaSel ('Just "envPrimitives") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CompiledPrimMap) :*: (S1 ('MetaSel ('Just "envCustomReprs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CustomReprs) :*: S1 ('MetaSel ('Just "envDomains") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DomainMap)))))

data ClashDesign Source #

Constructors

ClashDesign |

Fields

- designEntities :: [TopEntityT]
- designBindings :: BindingMap

#### Instances

Instances details

NFData ClashDesign Source # |
Instance details Defined in Clash.Driver.Types Methods rnf :: ClashDesign -> () Source #

data IsPrim Source #

Constructors

IsPrim | The binding is the unfolding for a primitive.
IsFun | The binding is an ordinary function.

#### Instances

Instances details

Generic IsPrim Source # |
Instance details Defined in Clash.Driver.Types Associated Types type Rep IsPrim :: Type -> Type Source # Methods from :: IsPrim -> Rep IsPrim x Source # to :: Rep IsPrim x -> IsPrim Source #
Show IsPrim Source # |
Instance details Defined in Clash.Driver.Types Methods showsPrec :: Int -> IsPrim -> ShowS Source # show :: IsPrim -> String Source # showList :: [IsPrim] -> ShowS Source #
Binary IsPrim Source # |
Instance details Defined in Clash.Driver.Types Methods put :: IsPrim -> Put Source # get :: Get IsPrim Source # putList :: [IsPrim] -> Put Source #
NFData IsPrim Source # |
Instance details Defined in Clash.Driver.Types Methods rnf :: IsPrim -> () Source #
Eq IsPrim Source # |
Instance details Defined in Clash.Driver.Types Methods (==) :: IsPrim -> IsPrim -> Bool Source # (/=) :: IsPrim -> IsPrim -> Bool Source #
type Rep IsPrim Source # |
Instance details Defined in Clash.Driver.Types type Rep IsPrim = D1 ('MetaData "IsPrim" "Clash.Driver.Types" "clash-lib-1.8.1-2YrsOtauO5B4MB9KvGiYOL" 'False) (C1 ('MetaCons "IsPrim" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IsFun" 'PrefixI 'False) (U1 :: Type -> Type))

data Binding a Source #

Constructors

Binding |

Fields

- bindingId :: Id

  The core identifier for this binding.

- bindingLoc :: SrcSpan

  The source location of this binding in the original source code.

- bindingSpec :: InlineSpec

  the inline specification for this binding, in the original source code.

- bindingIsPrim :: IsPrim

  Is the binding a core term corresponding to a primitive with a known implementation? If so, it can potentially be inlined despite being marked as NOINLINE in source.

- bindingTerm :: a

  The term representation for this binding. This is polymorphic so alternate representations can be used if more appropriate (i.e. in the evaluator this can be Value for evaluated bindings).

- bindingRecursive :: Bool

  Whether the binding is recursive.

  TODO Ideally the BindingMap would store recursive and non-recursive bindings in a way similar to Let / Letrec. GHC also does this.

#### Instances

Instances details

Functor Binding Source # |
Instance details Defined in Clash.Driver.Types Methods fmap :: (a -> b) -> Binding a -> Binding b Source # (<$) :: a -> Binding b -> Binding a Source #
Generic (Binding a) Source # |
Instance details Defined in Clash.Driver.Types Associated Types type Rep (Binding a) :: Type -> Type Source # Methods from :: Binding a -> Rep (Binding a) x Source # to :: Rep (Binding a) x -> Binding a Source #
Show a => Show (Binding a) Source # |
Instance details Defined in Clash.Driver.Types Methods showsPrec :: Int -> Binding a -> ShowS Source # show :: Binding a -> String Source # showList :: [Binding a] -> ShowS Source #
Binary a => Binary (Binding a) Source # |
Instance details Defined in Clash.Driver.Types Methods put :: Binding a -> Put Source # get :: Get (Binding a) Source # putList :: [Binding a] -> Put Source #
NFData a => NFData (Binding a) Source # |
Instance details Defined in Clash.Driver.Types Methods rnf :: Binding a -> () Source #
type Rep (Binding a) Source # |

Instance details

Defined in Clash.Driver.Types

type Rep (Binding a) = D1 ('MetaData "Binding" "Clash.Driver.Types" "clash-lib-1.8.1-2YrsOtauO5B4MB9KvGiYOL" '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

Instances details

Generic TransformationInfo Source # |
Instance details Defined in Clash.Driver.Types Associated Types type Rep TransformationInfo :: Type -> Type Source # Methods from :: TransformationInfo -> Rep TransformationInfo x Source # to :: Rep TransformationInfo x -> TransformationInfo Source #
Read TransformationInfo Source # |
Instance details Defined in Clash.Driver.Types Methods readsPrec :: Int -> ReadS TransformationInfo Source # readList :: ReadS [TransformationInfo] Source # readPrec :: ReadPrec TransformationInfo Source # readListPrec :: ReadPrec [TransformationInfo] Source #
Show TransformationInfo Source # |
Instance details Defined in Clash.Driver.Types Methods showsPrec :: Int -> TransformationInfo -> ShowS Source # show :: TransformationInfo -> String Source # showList :: [TransformationInfo] -> ShowS Source #
NFData TransformationInfo Source # |
Instance details Defined in Clash.Driver.Types Methods rnf :: TransformationInfo -> () Source #
Eq TransformationInfo Source # |
Instance details Defined in Clash.Driver.Types Methods (==) :: TransformationInfo -> TransformationInfo -> Bool Source # (/=) :: TransformationInfo -> TransformationInfo -> Bool Source #
Ord TransformationInfo Source # |

Instance details

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 # |
Instance details Defined in Clash.Driver.Types Methods hashWithSalt :: Int -> TransformationInfo -> Int Source # hash :: TransformationInfo -> Int Source #
type Rep TransformationInfo Source # |

Instance details

Defined in Clash.Driver.Types

type Rep TransformationInfo = D1 ('MetaData "TransformationInfo" "Clash.Driver.Types" "clash-lib-1.8.1-2YrsOtauO5B4MB9KvGiYOL" '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))))

data DebugOpts Source #

Options related to debugging. See `ClashOpts`

Constructors

DebugOpts |

Fields

- dbg_invariants :: Bool

  Check that the results of applied transformations do not violate the invariants for rewriting (e.g. no accidental shadowing, or type changes).

  Command line flag: -fclash-debug-invariants

- dbg_transformationInfo :: TransformationInfo

  The information to show when debugging a transformation. See the `TransformationInfo` type for different configurations.

  Command line flag: -fclash-debug-info (None|FinalTerm|AppliedName|AppliedTerm|TryName|TryTerm)

- dbg_transformations :: Set String

  List the transformations that are being debugged. When the set is empty, all transformations are debugged.

  Command line flag: -fclash-debug-transformations t1[,t2...]

- dbg_countTransformations :: Bool

  Count how many times transformations are applied and provide a summary at the end of normalization. This includes all transformations, not just those in `dbg_transformations`.

  Command line flag: -fclash-debug-count-transformations

- dbg_transformationsFrom :: Maybe Word

  Debug transformations applied after the nth transformation applied. This includes all transformations, not just those in `dbg_transformations`.

  Command line flag: -fclash-debug-transformations-from=N

- dbg_transformationsLimit :: Maybe Word

  Debug up to the nth applied transformation. If this limit is exceeded then Clash will error. This includes all transformations, not just those in `dbg_transformations`.

  Command line flag: -fclash-debug-transformations-limit=N

- dbg_historyFile :: Maybe FilePath

  Save information about all applied transformations to a history file for use with `clash-term`.

  Command line flag: -fclash-debug-history[=FILE]

#### Instances

Instances details

Generic DebugOpts Source # |
Instance details Defined in Clash.Driver.Types Associated Types type Rep DebugOpts :: Type -> Type Source # Methods from :: DebugOpts -> Rep DebugOpts x Source # to :: Rep DebugOpts x -> DebugOpts Source #
Show DebugOpts Source # |
Instance details Defined in Clash.Driver.Types Methods showsPrec :: Int -> DebugOpts -> ShowS Source # show :: DebugOpts -> String Source # showList :: [DebugOpts] -> ShowS Source #
NFData DebugOpts Source # |
Instance details Defined in Clash.Driver.Types Methods rnf :: DebugOpts -> () Source #
Eq DebugOpts Source # |
Instance details Defined in Clash.Driver.Types Methods (==) :: DebugOpts -> DebugOpts -> Bool Source # (/=) :: DebugOpts -> DebugOpts -> Bool Source #
Hashable DebugOpts Source # |
Instance details Defined in Clash.Driver.Types Methods hashWithSalt :: Int -> DebugOpts -> Int Source # hash :: DebugOpts -> Int Source #
type Rep DebugOpts Source # |

Instance details

Defined in Clash.Driver.Types

type Rep DebugOpts = D1 ('MetaData "DebugOpts" "Clash.Driver.Types" "clash-lib-1.8.1-2YrsOtauO5B4MB9KvGiYOL" '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.

debugNone :: DebugOpts Source #

- fclash-debug DebugNone

debugSilent :: DebugOpts Source #

- fclash-debug DebugSilent

debugFinal :: DebugOpts Source #

- fclash-debug DebugFinal

debugCount :: DebugOpts Source #

- fclash-debug DebugCount

debugName :: DebugOpts Source #

- fclash-debug DebugName

debugTry :: DebugOpts Source #

- fclash-debug DebugTry

debugApplied :: DebugOpts Source #

- fclash-debug DebugApplied

debugAll :: DebugOpts Source #

- fclash-debug DebugAll

data ClashOpts Source #

Options passed to Clash compiler

Constructors

ClashOpts |

Fields

- opt_werror :: Bool

  Are warnings treated as errors.

  Command line flag: -Werror

- opt_inlineLimit :: Int

  Change the number of times a function f can undergo inlining inside some other function g. This prevents the size of g growing dramatically.

  Command line flag: -fclash-inline-limit

- opt_specLimit :: Int

  Change the number of times a function can undergo specialization.

  Command line flag: -fclash-spec-limit

- opt_inlineFunctionLimit :: Word

  Set the threshold for function size. Below this threshold functions are always inlined (if it is not recursive).

  Command line flag: -fclash-inline-function-limit

- opt_inlineConstantLimit :: Word

  Set the threshold for constant size. Below this threshold constants are always inlined. A value of 0 inlines all constants.

  Command line flag: -fclash-inline-constant-limit

- opt_evaluatorFuelLimit :: Word

  Set the threshold for maximum unfolding depth in the evaluator. A value of zero means no potentially non-terminating binding is unfolded.

  Command line flag: -fclash-evaluator-fuel-limit

- opt_debug :: DebugOpts

  Options which control debugging. See `DebugOpts`.

- opt_cachehdl :: Bool

  Reuse previously generated output from Clash. Only caches topentities.

  Command line flag: -fclash-no-cache

- opt_clear :: Bool

  Remove HDL directories before writing to them. By default, Clash will only write to non-empty directories if it can prove all files in it are generated by a previous run. This option applies to directories of the various top entities, i.e., the subdirectories made in the directory passed in with `-fclash-hdldir`. Note that Clash will still use a cache if it can.

  Command line flag: `-fclash-clear`

- opt_primWarn :: Bool

  Disable warnings for primitives

  Command line flag: -fclash-no-prim-warn

- opt_color :: OverridingBool

  Show colors in debug output

  Command line flag: -fdiagnostics-color

- opt_intWidth :: Int

  Set the bit width for the Int/Word/Integer types. The only allowed values are 32 or 64.

- opt_hdlDir :: Maybe String

  Directory to save HDL files to

- opt_hdlSyn :: HdlSyn

  Synthesis target. See HdlSyn for available options.

- opt_errorExtra :: Bool

  Show additional information in error messages

- opt_importPaths :: [FilePath]

  Paths where Clash should look for modules

- opt_componentPrefix :: Maybe Text

  Prefix components with given string

- opt_newInlineStrat :: Bool

  Use new inline strategy. Functions marked NOINLINE will get their own HDL module.

- opt_escapedIds :: Bool

  Use escaped identifiers in HDL. See:

  - https://peterfab.com/ref/vhdl/vhdl_renerta/source/vhd00037.htm
  - https://peterfab.com/ref/verilog/verilog_renerta/source/vrg00018.htm
- opt_lowerCaseBasicIds :: PreserveCase

  Force all generated basic identifiers to lowercase. Among others, this affects module and file names.

- opt_ultra :: Bool

  Perform a high-effort compile, trading improved performance for potentially much longer compile times.

  Name inspired by Design Compiler's compile_ultra flag.

- opt_forceUndefined :: Maybe (Maybe Int)
  - Nothing: generate undefined's in the HDL
  - Just Nothing: replace undefined's by a constant in the HDL; the compiler decides what's best
  - Just (Just x): replace undefined's by x in the HDL
- opt_checkIDir :: Bool

  Check whether paths specified in `opt_importPaths` exists on the filesystem.

- opt_aggressiveXOpt :: Bool

  Enable aggressive X optimization, which may remove undefineds from generated HDL by replaced with defined alternatives.

- opt_aggressiveXOptBB :: Bool

  Enable aggressive X optimization, which may remove undefineds from HDL generated by blackboxes. This enables the ~ISUNDEFINED template tag.

- opt_inlineWFCacheLimit :: Word

  At what size do we cache normalized work-free top-level binders.

- opt_edalize :: Bool

  Generate an EDAM file for use with Edalize.

- opt_renderEnums :: Bool

  Render sum types with all zero-width fields as enums where supported, as opposed to rendering them as bitvectors.

- opt_timescalePrecision :: Period

  Timescale precision set in Verilog files. E.g., setting this would sets the second part of ``timescale 100fs/100fs`.

#### Instances

Instances details

Show ClashOpts Source # |
Instance details Defined in Clash.Driver.Types Methods showsPrec :: Int -> ClashOpts -> ShowS Source # show :: ClashOpts -> String Source # showList :: [ClashOpts] -> ShowS Source #
NFData ClashOpts Source # |
Instance details Defined in Clash.Driver.Types Methods rnf :: ClashOpts -> () Source #
Eq ClashOpts Source # |
Instance details Defined in Clash.Driver.Types Methods (==) :: ClashOpts -> ClashOpts -> Bool Source # (/=) :: ClashOpts -> ClashOpts -> Bool Source #
Hashable ClashOpts Source # |
Instance details Defined in Clash.Driver.Types Methods hashWithSalt :: Int -> ClashOpts -> Int Source # hash :: ClashOpts -> Int Source #

defClashOpts :: ClashOpts Source #

newtype SdcInfo Source #

Synopsys Design Constraint (SDC) information for a component. Currently this limited to the names and periods of clocks for create_clock.

Constructors

SdcInfo |

Fields

- sdcClock :: [(Text, VDomainConfiguration)]

pprSDC :: SdcInfo -> Doc () Source #

Render an SDC file from an SdcInfo. The clock periods, waveforms, and targets are all hardcoded.