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
dd951740
Commit
dd951740
authored
Jul 16, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some dead code
parent
d6d3938d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
29 deletions
+7
-29
src/Convert/FuncRet.hs
+0
-1
src/Convert/TFBlock.hs
+2
-6
src/Language/SystemVerilog/AST/Decl.hs
+1
-4
src/Language/SystemVerilog/AST/Expr.hs
+0
-1
src/Language/SystemVerilog/AST/GenItem.hs
+3
-13
src/Language/SystemVerilog/AST/Stmt.hs
+1
-4
No files found.
src/Convert/FuncRet.hs
View file @
dd951740
...
@@ -21,6 +21,5 @@ convertFunction (MIPackageItem (Function ml t f decls stmts)) =
...
@@ -21,6 +21,5 @@ convertFunction (MIPackageItem (Function ml t f decls stmts)) =
where
where
t'
=
case
t
of
t'
=
case
t
of
IntegerVector
TReg
sg
rs
->
Implicit
sg
rs
IntegerVector
TReg
sg
rs
->
Implicit
sg
rs
IntegerVector
TLogic
sg
rs
->
Implicit
sg
rs
_
->
t
_
->
t
convertFunction
other
=
other
convertFunction
other
=
other
src/Convert/TFBlock.hs
View file @
dd951740
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
module
Convert.TFBlock
(
convert
)
where
module
Convert.TFBlock
(
convert
)
where
import
Data.List
(
intersect
,
isPrefixOf
)
import
Data.List
(
intersect
)
import
Convert.Traverse
import
Convert.Traverse
import
Language.SystemVerilog.AST
import
Language.SystemVerilog.AST
...
@@ -53,7 +53,7 @@ flattenOuterBlocks (Block Seq "" declsA (Block Seq name declsB stmtsA : stmtsB))
...
@@ -53,7 +53,7 @@ flattenOuterBlocks (Block Seq "" declsA (Block Seq name declsB stmtsA : stmtsB))
Block
Seq
name
(
declsA
++
declsB
)
(
stmtsA
++
stmtsB
)
Block
Seq
name
(
declsA
++
declsB
)
(
stmtsA
++
stmtsB
)
else
(
declsA
,
Block
Seq
name
declsB
stmtsA
:
stmtsB
)
else
(
declsA
,
Block
Seq
name
declsB
stmtsA
:
stmtsB
)
flattenOuterBlocks
(
Block
Seq
name
decls
stmts
)
flattenOuterBlocks
(
Block
Seq
name
decls
stmts
)
|
n
otscope
name
=
(
decls
,
stmts
)
|
n
ull
name
=
(
decls
,
stmts
)
|
otherwise
=
(
[]
,
[
Block
Seq
name
decls
stmts
])
|
otherwise
=
(
[]
,
[
Block
Seq
name
decls
stmts
])
flattenOuterBlocks
stmt
=
(
[]
,
[
stmt
])
flattenOuterBlocks
stmt
=
(
[]
,
[
stmt
])
...
@@ -72,7 +72,3 @@ declName (Net _ _ _ _ x _ _) = x
...
@@ -72,7 +72,3 @@ declName (Net _ _ _ _ x _ _) = x
declName
(
Param
_
_
x
_
)
=
x
declName
(
Param
_
_
x
_
)
=
x
declName
(
ParamType
_
x
_
)
=
x
declName
(
ParamType
_
x
_
)
=
x
declName
CommentDecl
{}
=
""
declName
CommentDecl
{}
=
""
notscope
::
Identifier
->
Bool
notscope
""
=
True
notscope
name
=
"sv2v_autoblock_"
`
isPrefixOf
`
name
src/Language/SystemVerilog/AST/Decl.hs
View file @
dd951740
...
@@ -37,10 +37,7 @@ instance Show Decl where
...
@@ -37,10 +37,7 @@ instance Show Decl where
where
tStr
=
if
t
==
UnknownType
then
""
else
" = "
++
show
t
where
tStr
=
if
t
==
UnknownType
then
""
else
" = "
++
show
t
show
(
Variable
d
t
x
a
e
)
=
printf
"%s%s%s%s%s;"
(
showPad
d
)
(
showPad
t
)
x
(
showRanges
a
)
(
showAssignment
e
)
show
(
Variable
d
t
x
a
e
)
=
printf
"%s%s%s%s%s;"
(
showPad
d
)
(
showPad
t
)
x
(
showRanges
a
)
(
showAssignment
e
)
show
(
Net
d
n
s
t
x
a
e
)
=
printf
"%s%s%s %s%s%s%s;"
(
showPad
d
)
(
show
n
)
(
showPadBefore
s
)
(
showPad
t
)
x
(
showRanges
a
)
(
showAssignment
e
)
show
(
Net
d
n
s
t
x
a
e
)
=
printf
"%s%s%s %s%s%s%s;"
(
showPad
d
)
(
show
n
)
(
showPadBefore
s
)
(
showPad
t
)
x
(
showRanges
a
)
(
showAssignment
e
)
show
(
CommentDecl
c
)
=
show
(
CommentDecl
c
)
=
"// "
++
c
if
elem
'
\n
'
c
then
"// "
++
show
c
else
"// "
++
c
data
Direction
data
Direction
=
Input
=
Input
...
...
src/Language/SystemVerilog/AST/Expr.hs
View file @
dd951740
...
@@ -199,6 +199,5 @@ showParams :: [ParamBinding] -> String
...
@@ -199,6 +199,5 @@ showParams :: [ParamBinding] -> String
showParams
params
=
indentedParenList
$
map
showParam
params
showParams
params
=
indentedParenList
$
map
showParam
params
showParam
::
ParamBinding
->
String
showParam
::
ParamBinding
->
String
showParam
(
"*"
,
Right
Nil
)
=
".*"
showParam
(
""
,
arg
)
=
showEither
arg
showParam
(
""
,
arg
)
=
showEither
arg
showParam
(
i
,
arg
)
=
printf
".%s(%s)"
i
(
showEither
arg
)
showParam
(
i
,
arg
)
=
printf
".%s(%s)"
i
(
showEither
arg
)
src/Language/SystemVerilog/AST/GenItem.hs
View file @
dd951740
...
@@ -42,7 +42,7 @@ instance Show GenItem where
...
@@ -42,7 +42,7 @@ instance Show GenItem where
x1
(
show
e1
)
x1
(
show
e1
)
(
show
c
)
(
show
c
)
x2
(
show
o2
)
(
show
e2
)
x2
(
show
o2
)
(
show
e2
)
(
if
s
==
GenNull
then
"begin end"
else
showBareBlock
s
)
(
showBareBlock
s
)
show
(
GenNull
)
=
";"
show
(
GenNull
)
=
";"
show
(
GenModuleItem
item
)
=
show
item
show
(
GenModuleItem
item
)
=
show
item
...
@@ -54,18 +54,8 @@ showBareBlock (GenBlock x i) =
...
@@ -54,18 +54,8 @@ showBareBlock (GenBlock x i) =
showBareBlock
item
=
show
item
showBareBlock
item
=
show
item
showBlockedBranch
::
GenItem
->
String
showBlockedBranch
::
GenItem
->
String
showBlockedBranch
genItem
=
showBlockedBranch
genItem
@
GenBlock
{}
=
showBareBlock
genItem
showBareBlock
$
showBlockedBranch
genItem
=
showBareBlock
$
GenBlock
""
[
genItem
]
if
isControl
genItem
then
GenBlock
""
[
genItem
]
else
genItem
where
isControl
::
GenItem
->
Bool
isControl
GenIf
{}
=
True
isControl
GenFor
{}
=
True
isControl
GenCase
{}
=
True
isControl
GenModuleItem
{}
=
True
isControl
_
=
False
type
GenCase
=
([
Expr
],
GenItem
)
type
GenCase
=
([
Expr
],
GenItem
)
...
...
src/Language/SystemVerilog/AST/Stmt.hs
View file @
dd951740
...
@@ -98,10 +98,7 @@ instance Show Stmt where
...
@@ -98,10 +98,7 @@ instance Show Stmt where
show
(
Continue
)
=
"continue;"
show
(
Continue
)
=
"continue;"
show
(
Break
)
=
"break;"
show
(
Break
)
=
"break;"
show
(
Null
)
=
";"
show
(
Null
)
=
";"
show
(
CommentStmt
c
)
=
show
(
CommentStmt
c
)
=
"// "
++
c
if
elem
'
\n
'
c
then
"// "
++
show
c
else
"// "
++
c
showAssign
::
(
LHS
,
AsgnOp
,
Expr
)
->
String
showAssign
::
(
LHS
,
AsgnOp
,
Expr
)
->
String
showAssign
(
l
,
op
,
e
)
=
(
showPad
l
)
++
(
showPad
op
)
++
(
show
e
)
showAssign
(
l
,
op
,
e
)
=
(
showPad
l
)
++
(
showPad
op
)
++
(
show
e
)
...
...
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