aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Env.hs
blob: a20fd2d5f443055c53cb7864d5204f2d09ff5f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{-|
Module      : VeriFuzz.Env
Description : Environment to run the simulator and synthesisers in a matrix.
Copyright   : (c) 2019, Yann Herklotz Grave
License     : GPL-3
Maintainer  : ymherklotz [at] gmail [dot] com
Stability   : experimental
Portability : POSIX

Environment to run the simulator and synthesisers in a matrix.
-}

module VeriFuzz.Env where

import           Control.Monad.Trans.Reader
import           VeriFuzz.Icarus
import           VeriFuzz.XST
import           VeriFuzz.Yosys

-- | Environment used to run the main
data SimMatrix = SimMatrix { yosys  :: Yosys
                           , xst    :: Maybe Xst
                           , icarus :: Maybe Icarus
                           }

type SimEnv = ReaderT SimMatrix IO

runAll :: SimEnv ()
runAll = do
  val <- asks xst
  shelly $ run_ "echo" ["Hello World"]