projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86abb25
)
Raise exception when not using correct boolean operators
author
Yann Sionneau
<ys@m-labs.hk>
Mon, 27 Oct 2014 11:41:17 +0000
(12:41 +0100)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Mon, 27 Oct 2014 11:40:22 +0000
(19:40 +0800)
migen/fhdl/structure.py
patch
|
blob
|
history
diff --git
a/migen/fhdl/structure.py
b/migen/fhdl/structure.py
index 2859345d812356323aed765ec3f3d4078151bc73..071ae23c6ebddb01b638a0ebe453f81a217ea5d3 100644
(file)
--- a/
migen/fhdl/structure.py
+++ b/
migen/fhdl/structure.py
@@
-24,6
+24,9
@@
class Value(HUID):
Values created from integers have the minimum bit width to necessary to
represent the integer.
"""
+ def __bool__(self):
+ raise NotImplementedError("For boolean operations between expressions: use '&'/'|' instead of 'and'/'or'")
+
def __invert__(self):
return _Operator("~", [self])
def __neg__(self):