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
55afc58f
Commit
55afc58f
authored
Sep 20, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify interface parameter override logic
parent
b1f1b822
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
src/Convert/Interface.hs
+6
-9
No files found.
src/Convert/Interface.hs
View file @
55afc58f
...
@@ -606,18 +606,15 @@ inlineInstance global ranges modportBindings items partName
...
@@ -606,18 +606,15 @@ inlineInstance global ranges modportBindings items partName
overrideParam
::
Decl
->
Decl
overrideParam
::
Decl
->
Decl
overrideParam
(
Param
Parameter
t
x
e
)
=
overrideParam
(
Param
Parameter
t
x
e
)
=
Param
Localparam
t
x
$
case
lookup
x
instanceParams
of
case
lookup
x
instanceParams
of
Nothing
->
Param
Localparam
t
x
e
Nothing
->
e
Just
(
Right
_
)
->
Param
Localparam
t
x
(
Ident
$
paramTmp
++
x
)
Just
_
->
Ident
$
paramTmp
++
x
Just
(
Left
t'
)
->
error
$
inlineKind
++
" param "
++
x
++
" expected expr, found type: "
++
show
t'
overrideParam
(
ParamType
Parameter
x
t
)
=
overrideParam
(
ParamType
Parameter
x
t
)
=
ParamType
Localparam
x
$
case
lookup
x
instanceParams
of
case
lookup
x
instanceParams
of
Nothing
->
ParamType
Localparam
x
t
Nothing
->
t
Just
(
Left
_
)
->
Just
_
->
Alias
(
paramTmp
++
x
)
[]
ParamType
Localparam
x
$
Alias
(
paramTmp
++
x
)
[]
Just
(
Right
e'
)
->
error
$
inlineKind
++
" param "
++
x
++
" expected type, found expr: "
++
show
e'
overrideParam
other
=
other
overrideParam
other
=
other
portBindingItem
::
PortBinding
->
ModuleItem
portBindingItem
::
PortBinding
->
ModuleItem
...
...
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