diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-05-22 15:14:30 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-05-22 15:14:30 +0100 |
commit | 5df5d613e3aaf5f14368903b5fec5596d848ef44 (patch) | |
tree | ce51864287f6ce584754a6a22a4c1791089fe790 /src/VeriFuzz/Verilog | |
parent | d14ec7f57e678fdf478d3c138fe74b03cf8f0523 (diff) | |
download | verismith-5df5d613e3aaf5f14368903b5fec5596d848ef44.tar.gz verismith-5df5d613e3aaf5f14368903b5fec5596d848ef44.zip |
Change parameters of generation
Diffstat (limited to 'src/VeriFuzz/Verilog')
-rw-r--r-- | src/VeriFuzz/Verilog/Gen.hs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/VeriFuzz/Verilog/Gen.hs b/src/VeriFuzz/Verilog/Gen.hs index bd80c3d..bc40de5 100644 --- a/src/VeriFuzz/Verilog/Gen.hs +++ b/src/VeriFuzz/Verilog/Gen.hs @@ -231,11 +231,6 @@ someI m f = do amount <- gen $ Hog.int (Hog.linear 1 m) replicateM amount f -many :: StateGen a -> StateGen [a] -many f = do - amount <- gen $ Hog.int (Hog.linear 0 50) - replicateM amount f - makeIdentifier :: T.Text -> StateGen Identifier makeIdentifier prefix = do context <- get @@ -458,7 +453,7 @@ moduleDef top = do name <- moduleName top portList <- Hog.list (Hog.linear 4 10) $ nextPort Wire mi <- Hog.list (Hog.linear 4 100) modItem - ps <- many parameter + ps <- Hog.list (Hog.linear 0 10) parameter context <- get let local = filter (`notElem` portList) $ _variables context let @@ -473,7 +468,7 @@ moduleDef top = do let comb = combineAssigns_ yport local return . declareMod local - . ModDecl name [yport] (clock : portList) (mi <> [comb]) + . ModDecl name [yport] (clock : portList) (comb : mi) $ ps -- | Procedural generation method for random Verilog. Uses internal 'Reader' and |