aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-07-09 22:02:45 +0200
committerYann Herklotz <git@yannherklotz.com>2019-07-09 22:02:45 +0200
commit562f0da77e0464bfc21e8753070aec1cf9e60cf2 (patch)
treefe2e93cbe91bbe94d08400f931a1c22b4e13d6d8
parent8260ab85db7da1d5de488226991cdac2f302ab25 (diff)
downloadverismith-562f0da77e0464bfc21e8753070aec1cf9e60cf2.tar.gz
verismith-562f0da77e0464bfc21e8753070aec1cf9e60cf2.zip
Fix missing module instantiation
-rw-r--r--src/VeriFuzz/Verilog/Gen.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/VeriFuzz/Verilog/Gen.hs b/src/VeriFuzz/Verilog/Gen.hs
index 3bfe4b9..2331068 100644
--- a/src/VeriFuzz/Verilog/Gen.hs
+++ b/src/VeriFuzz/Verilog/Gen.hs
@@ -362,7 +362,7 @@ instantiate :: ModDecl -> StateGen ModItem
instantiate (ModDecl i outP inP _ _) = do
context <- get
outs <- replicateM (length outP) (nextPort Wire)
- ins <- take (length inP - 1) <$> Hog.shuffle (context ^. variables)
+ ins <- take (length inP) <$> Hog.shuffle (context ^. variables)
sequence_ $ uncurry resizePort <$> zip (outs <> ins) (outP <> inP)
ident <- makeIdentifier "modinst"
Hog.choice