Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel LiteX
migen
Commits
99646939
Commit
99646939
authored
8 years ago
by
Sebastien Bourdeauducq
Browse files
Options
Download
Email Patches
Plain Diff
module2: function call and if support
parent
fc1fb7ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
migen/fhdl/module2.py
migen/fhdl/module2.py
+7
-1
No files found.
migen/fhdl/module2.py
View file @
99646939
...
...
@@ -8,7 +8,7 @@ from migen.fhdl.structure import *
from
migen.fhdl.structure
import
_Assign
,
_Operator
,
_Fragment
__all__
=
[
"Module2"
,
"ports"
,
"sync"
]
__all__
=
[
"Module2"
,
"ports"
,
"comb"
,
"sync"
]
class
PortManager
:
...
...
@@ -107,6 +107,12 @@ def ast_stmt_to_fhdl(node, globs, locs):
assert
t
.
attr
==
"next"
r
.
append
(
_Assign
(
eval_ast
(
t
.
value
,
globs
,
locs
),
value
))
return
r
elif
isinstance
(
node
,
ast
.
If
):
return
If
(
ast_expr_to_fhdl
(
node
.
test
,
globs
,
locs
),
*
ast_stmt_to_fhdl
(
node
.
body
,
globs
,
locs
)).
Else
(
*
ast_stmt_to_fhdl
(
node
.
orelse
,
globs
,
locs
))
elif
isinstance
(
node
,
ast
.
Expr
):
return
eval_ast
(
node
.
value
,
globs
,
locs
)
else
:
raise
NotImplementedError
...
...
This diff is collapsed.
Click to expand it.
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