fixed PackedArray conversion assigning to reg for Local arrays

This commit is contained in:
Zachary Snow 2019-04-01 02:45:36 -04:00
parent 00d12c7ae5
commit f1ac4fc04f
1 changed files with 2 additions and 1 deletions

View File

@ -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