Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
2d134a86
Commit
2d134a86
authored
Jun 22, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix verbose mode crash
parent
c005e5c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
src/Convert/ForDecl.hs
+5
-1
test/lib/functions.sh
+2
-0
No files found.
src/Convert/ForDecl.hs
View file @
2d134a86
...
...
@@ -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
...
...
test/lib/functions.sh
View file @
2d134a86
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment