aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Config.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@ymhg.org>2019-05-13 20:50:01 +0100
committerYann Herklotz <git@ymhg.org>2019-05-13 20:50:01 +0100
commit76e9b994258d9af87868ba9f420db4ee1c29de67 (patch)
treef11b3729582a21ea31555a9106d2190e180e2ce9 /src/VeriFuzz/Config.hs
parent3ddfc0111566113b3ec15725cb5ced6dea531a3a (diff)
downloadverismith-76e9b994258d9af87868ba9f420db4ee1c29de67.tar.gz
verismith-76e9b994258d9af87868ba9f420db4ee1c29de67.zip
Format with brittany
Diffstat (limited to 'src/VeriFuzz/Config.hs')
-rw-r--r--src/VeriFuzz/Config.hs71
1 files changed, 33 insertions, 38 deletions
diff --git a/src/VeriFuzz/Config.hs b/src/VeriFuzz/Config.hs
index 04b2d78..9295f71 100644
--- a/src/VeriFuzz/Config.hs
+++ b/src/VeriFuzz/Config.hs
@@ -237,48 +237,39 @@ defaultValue x = Toml.dimap Just (fromMaybe x) . Toml.dioptional
fromXST :: XST -> SynthDescription
fromXST (XST a b c) =
- SynthDescription
- "xst"
- (toTextIgnore <$> a)
- (Just b)
- (Just $ toTextIgnore c)
+ SynthDescription "xst" (toTextIgnore <$> a) (Just b) (Just $ toTextIgnore c)
fromYosys :: Yosys -> SynthDescription
-fromYosys (Yosys a b c) =
- SynthDescription
- "yosys"
- (toTextIgnore <$> a)
- (Just b)
- (Just $ toTextIgnore c)
+fromYosys (Yosys a b c) = SynthDescription "yosys"
+ (toTextIgnore <$> a)
+ (Just b)
+ (Just $ toTextIgnore c)
fromVivado :: Vivado -> SynthDescription
-fromVivado (Vivado a b c) =
- SynthDescription
- "vivado"
- (toTextIgnore <$> a)
- (Just b)
- (Just $ toTextIgnore c)
+fromVivado (Vivado a b c) = SynthDescription "vivado"
+ (toTextIgnore <$> a)
+ (Just b)
+ (Just $ toTextIgnore c)
fromQuartus :: Quartus -> SynthDescription
-fromQuartus (Quartus a b c) =
- SynthDescription
- "quartus"
- (toTextIgnore <$> a)
- (Just b)
- (Just $ toTextIgnore c)
+fromQuartus (Quartus a b c) = SynthDescription "quartus"
+ (toTextIgnore <$> a)
+ (Just b)
+ (Just $ toTextIgnore c)
defaultConfig :: Config
-defaultConfig = Config (Info (pack $(gitHash)) (pack $ showVersion version))
- (Probability defModItem defStmnt defExpr)
- (ConfProperty 20 Nothing 3 2 5)
- []
- [fromYosys defaultYosys, fromVivado defaultVivado]
+defaultConfig = Config
+ (Info (pack $(gitHash)) (pack $ showVersion version))
+ (Probability defModItem defStmnt defExpr)
+ (ConfProperty 20 Nothing 3 2 5)
+ []
+ [fromYosys defaultYosys, fromVivado defaultVivado]
where
defModItem =
ProbModItem 5 -- Assign
- 1 -- Sequential Always
- 1 -- Combinational Always
- 1 -- Instantiation
+ 1 -- Sequential Always
+ 1 -- Combinational Always
+ 1 -- Instantiation
defStmnt =
ProbStatement 0 -- Blocking assignment
3 -- Non-blocking assignment
@@ -405,17 +396,21 @@ synthesiser =
.= synthOut
infoCodec :: TomlCodec Info
-infoCodec = Info
- <$> defaultValue (defaultConfig ^. configInfo . infoCommit) (Toml.text "commit")
- .= _infoCommit
- <*> defaultValue (defaultConfig ^. configInfo . infoVersion) (Toml.text "version")
- .= _infoVersion
+infoCodec =
+ Info
+ <$> defaultValue (defaultConfig ^. configInfo . infoCommit)
+ (Toml.text "commit")
+ .= _infoCommit
+ <*> defaultValue (defaultConfig ^. configInfo . infoVersion)
+ (Toml.text "version")
+ .= _infoVersion
configCodec :: TomlCodec Config
configCodec =
Config
- <$> defaultValue (defaultConfig ^. configInfo) (Toml.table infoCodec "info")
- .= _configInfo
+ <$> defaultValue (defaultConfig ^. configInfo)
+ (Toml.table infoCodec "info")
+ .= _configInfo
<*> defaultValue (defaultConfig ^. configProbability)
(Toml.table probCodec "probability")
.= _configProbability