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
edaff3dc
Commit
edaff3dc
authored
Mar 26, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added conversion to make functions and tasks use only one statement
parent
4b3966aa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
src/Convert.hs
+2
-0
src/Convert/StmtBlock.hs
+30
-0
sv2v.cabal
+1
-0
No files found.
src/Convert.hs
View file @
edaff3dc
...
@@ -18,6 +18,7 @@ import qualified Convert.Logic
...
@@ -18,6 +18,7 @@ import qualified Convert.Logic
import
qualified
Convert.PackedArray
import
qualified
Convert.PackedArray
import
qualified
Convert.Return
import
qualified
Convert.Return
import
qualified
Convert.StarPort
import
qualified
Convert.StarPort
import
qualified
Convert.StmtBlock
import
qualified
Convert.Struct
import
qualified
Convert.Struct
import
qualified
Convert.Typedef
import
qualified
Convert.Typedef
import
qualified
Convert.UnbasedUnsized
import
qualified
Convert.UnbasedUnsized
...
@@ -33,6 +34,7 @@ phases excludes =
...
@@ -33,6 +34,7 @@ phases excludes =
,
Convert
.
Enum
.
convert
,
Convert
.
Enum
.
convert
,
Convert
.
PackedArray
.
convert
,
Convert
.
PackedArray
.
convert
,
Convert
.
StarPort
.
convert
,
Convert
.
StarPort
.
convert
,
Convert
.
StmtBlock
.
convert
,
Convert
.
Struct
.
convert
,
Convert
.
Struct
.
convert
,
Convert
.
Return
.
convert
,
Convert
.
Return
.
convert
,
Convert
.
Typedef
.
convert
,
Convert
.
Typedef
.
convert
...
...
src/Convert/StmtBlock.hs
0 → 100644
View file @
edaff3dc
{- sv2v
- Author: Zachary Snow <zach@zachjs.com>
-
- Conversion for tasks and functions to use only one statement, as required in
- Verilog-2005.
-}
module
Convert.StmtBlock
(
convert
)
where
import
Convert.Traverse
import
Language.SystemVerilog.AST
convert
::
AST
->
AST
convert
=
traverseDescriptions
$
traverseModuleItems
convertModuleItem
convertModuleItem
::
ModuleItem
->
ModuleItem
convertModuleItem
(
MIPackageItem
packageItem
)
=
MIPackageItem
$
convertPackageItem
packageItem
convertModuleItem
other
=
other
convertPackageItem
::
PackageItem
->
PackageItem
convertPackageItem
(
Function
ml
t
f
decls
stmts
)
=
Function
ml
t
f
decls
[
stmtsToStmt
stmts
]
convertPackageItem
(
Task
ml
f
decls
stmts
)
=
Task
ml
f
decls
[
stmtsToStmt
stmts
]
convertPackageItem
other
=
other
stmtsToStmt
::
[
Stmt
]
->
Stmt
stmtsToStmt
[
stmt
]
=
stmt
stmtsToStmt
stmts
=
Block
Nothing
[]
stmts
sv2v.cabal
View file @
edaff3dc
...
@@ -58,6 +58,7 @@ executable sv2v
...
@@ -58,6 +58,7 @@ executable sv2v
Convert.PackedArray
Convert.PackedArray
Convert.Return
Convert.Return
Convert.StarPort
Convert.StarPort
Convert.StmtBlock
Convert.Struct
Convert.Struct
Convert.Typedef
Convert.Typedef
Convert.Traverse
Convert.Traverse
...
...
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