projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f689b77
)
compat.fhdl.structure: fix Case().makedefault().
author
whitequark
<whitequark@whitequark.org>
Thu, 13 Jun 2019 03:54:46 +0000
(
03:54
+0000)
committer
whitequark
<whitequark@whitequark.org>
Thu, 13 Jun 2019 03:56:57 +0000
(
03:56
+0000)
Fixes #100.
nmigen/compat/fhdl/structure.py
patch
|
blob
|
history
diff --git
a/nmigen/compat/fhdl/structure.py
b/nmigen/compat/fhdl/structure.py
index a36086ec9d28e61dca0904be2754530aaf052d61..0a58d743aec80e16f3178040ddd1b8063adc7806 100644
(file)
--- a/
nmigen/compat/fhdl/structure.py
+++ b/
nmigen/compat/fhdl/structure.py
@@
-105,7
+105,7
@@
class Case(ast.Switch):
or (isinstance(choice, str) and choice == "default")
or choice > key):
key = choice
- if isinstance(key, str) and key == "default":
+
el
if isinstance(key, str) and key == "default":
key = "-" * len(self.test)
else:
key = "{:0{}b}".format(wrap(key).value, len(self.test))