From f1ac4fc04f1ea95524dce12d61026f48f74b2a9a Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Mon, 1 Apr 2019 02:45:36 -0400 Subject: [PATCH] fixed PackedArray conversion assigning to reg for Local arrays --- src/Convert/PackedArray.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Convert/PackedArray.hs b/src/Convert/PackedArray.hs index 2dc358b..e23cb79 100644 --- a/src/Convert/PackedArray.hs +++ b/src/Convert/PackedArray.hs @@ -175,7 +175,8 @@ flattenModuleItem info (origDecl @ (MIDecl (Variable dir t ident a me))) = where Info typeDims portDirs idxUses seqUses = info duoUses = Set.intersection idxUses seqUses - writeToFlatVariant = Map.lookup ident portDirs == Just Output + portDir = Map.lookup ident portDirs + writeToFlatVariant = portDir == Just Output || portDir == Nothing genItems = unflattener writeToFlatVariant ident (typeDims Map.! ident) (tf, rs) = typeRanges t flipDecl = MIDecl $ Variable dir (tf $ tail rs) ident (a ++ [head rs]) me