projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee3fa60
)
build.plat: avoid type confusion in _check_feature.
author
whitequark
<whitequark@whitequark.org>
Thu, 15 Oct 2020 08:54:48 +0000
(08:54 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 31 Dec 2021 15:12:47 +0000
(15:12 +0000)
Before this commit, `_check_feature(valid_xdrs=0)` would mean that
XDR buffers are not supported. Only `_check_feature(valid_xdrs=())`
was intended to be an indicator of that.
nmigen/build/plat.py
patch
|
blob
|
history
diff --git
a/nmigen/build/plat.py
b/nmigen/build/plat.py
index 63842499e09118b1ed85b2af8083c86a2de28a00..31c9704ccb8d346e8bbde98f2fe77822793d8aa0 100644
(file)
--- a/
nmigen/build/plat.py
+++ b/
nmigen/build/plat.py
@@
-177,7
+177,7
@@
class Platform(ResourceManager, metaclass=ABCMeta):
.format(type(self).__name__))
def _check_feature(self, feature, pin, attrs, valid_xdrs, valid_attrs):
- if
not valid_xdrs
:
+ if
len(valid_xdrs) == 0
:
raise NotImplementedError("Platform '{}' does not support {}"
.format(type(self).__name__, feature))
elif pin.xdr not in valid_xdrs: