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
88c401e8
Commit
88c401e8
authored
Feb 07, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional interface conversion error messages
parent
eed5444d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/Convert/Interface.hs
+9
-2
No files found.
src/Convert/Interface.hs
View file @
88c401e8
...
@@ -80,7 +80,10 @@ convertDescription interfaces modules (Part attrs extern Module lifetime name po
...
@@ -80,7 +80,10 @@ convertDescription interfaces modules (Part attrs extern Module lifetime name po
Nothing
->
orig
Nothing
->
orig
where
where
InterfaceT
interfaceName
(
Just
_
)
[]
=
t
InterfaceT
interfaceName
(
Just
_
)
[]
=
t
interfaceItems
=
snd
$
interfaces
Map
.!
interfaceName
interfaceItems
=
case
Map
.
lookup
interfaceName
interfaces
of
Just
res
->
snd
res
Nothing
->
error
$
"could not find interface "
++
show
interfaceName
mapper
(
dir
,
port
,
expr
)
=
mapper
(
dir
,
port
,
expr
)
=
Variable
dir
mpt
(
ident
++
"_"
++
port
)
mprs
Nothing
Variable
dir
mpt
(
ident
++
"_"
++
port
)
mprs
Nothing
where
(
mpt
,
mprs
)
=
lookupType
interfaceItems
(
fromJust
expr
)
where
(
mpt
,
mprs
)
=
lookupType
interfaceItems
(
fromJust
expr
)
...
@@ -133,7 +136,11 @@ convertDescription interfaces modules (Part attrs extern Module lifetime name po
...
@@ -133,7 +136,11 @@ convertDescription interfaces modules (Part attrs extern Module lifetime name po
expandPortBinding
moduleName
(
portName
,
Just
newExpr
)
expandPortBinding
moduleName
(
portName
,
Just
newExpr
)
where
where
InterfaceT
_
(
Just
modportName
)
[]
=
InterfaceT
_
(
Just
modportName
)
[]
=
modules
Map
.!
(
moduleName
,
portName
)
case
Map
.
lookup
(
moduleName
,
portName
)
modules
of
Just
t
->
t
Nothing
->
error
$
"could not find port "
++
show
portName
++
" in module "
++
show
moduleName
newExpr
=
Dot
(
Ident
ident
)
modportName
newExpr
=
Dot
(
Ident
ident
)
modportName
(
_
,
Just
decls
)
->
(
_
,
Just
decls
)
->
-- modport directly bound to a modport
-- modport directly bound to a modport
...
...
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