projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcf6299
)
fhdl/structure: all case statements should be lists
author
Sebastien Bourdeauducq
<sb@m-labs.hk>
Thu, 17 Sep 2015 09:22:24 +0000
(17:22 +0800)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Thu, 17 Sep 2015 09:22:24 +0000
(17:22 +0800)
migen/fhdl/structure.py
patch
|
blob
|
history
diff --git
a/migen/fhdl/structure.py
b/migen/fhdl/structure.py
index e3faae51d77ddd2e4cb2026bc61e0d4ece9fd761..ba72f09b056a6ebc6bd1465973b8237c6af1ab11 100644
(file)
--- a/
migen/fhdl/structure.py
+++ b/
migen/fhdl/structure.py
@@
-547,6
+547,8
@@
class Case(_Statement):
if (not isinstance(k, Constant)
and not (isinstance(k, str) and k == "default")):
raise TypeError("Case object is not a Migen constant")
+ if not isinstance(v, _collections.Iterable):
+ v = [v]
if not _check_statement(v):
raise TypeError("Not all objects for case {} "
"are Migen statements".format(k))