Commit 2d134a86 by Zachary Snow

fix verbose mode crash

parent c005e5c6
......@@ -31,7 +31,7 @@ convertStmt (For (Left inits) cc asgns stmt) =
initAsgns ++
[For (Right [(lhs, expr)]) cc asgns stmt]
where
splitDecls = map splitDecl inits
splitDecls = map splitDecl $ filter (not . isComment) inits
decls = map fst splitDecls
initAsgns = map asgnStmt $ init $ map snd splitDecls
(lhs, expr) = snd $ last splitDecls
......@@ -54,6 +54,10 @@ splitDecl (Variable d t ident a e) =
splitDecl decl =
error $ "invalid for loop decl: " ++ show decl
isComment :: Decl -> Bool
isComment CommentDecl{} = True
isComment _ = False
asgnStmt :: (LHS, Expr) -> Stmt
asgnStmt = uncurry $ Asgn AsgnOpEq Nothing
......
......@@ -58,6 +58,8 @@ assertConverts() {
diff $ac_tmpb $ac_tmpc > /dev/null
assertTrue "conversion of $ac_file not stable after the second iteration" $?
fi
$SV2V -v $ac_file 2> /dev/null > /dev/null
assertTrue "verbose conversion of $ac_file failed" $?
# using sed to remove quoted strings
filtered=`sed -E 's/"([^"]|\")+"//g' $ac_tmpa`
# check for various things iverilog accepts which we don't want to output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment