projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c9a7ee
)
fhdl: typecheck ClockSignal and ResetSignal arguments
author
Sebastien Bourdeauducq
<sb@m-labs.hk>
Tue, 29 Sep 2015 05:11:40 +0000
(13:11 +0800)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Tue, 29 Sep 2015 05:11:40 +0000
(13:11 +0800)
migen/fhdl/structure.py
patch
|
blob
|
history
diff --git
a/migen/fhdl/structure.py
b/migen/fhdl/structure.py
index ae378062ef4a832223538aeda4b2b55a6b569778..f4250266c827d42d05cd4262f644a02a4df9d48b 100644
(file)
--- a/
migen/fhdl/structure.py
+++ b/
migen/fhdl/structure.py
@@
-379,6
+379,8
@@
class ClockSignal(_Value):
"""
def __init__(self, cd="sys"):
_Value.__init__(self)
+ if not isinstance(cd, str):
+ raise TypeError("Argument of ClockSignal must be a string")
self.cd = cd
@@
-398,6
+400,8
@@
class ResetSignal(_Value):
"""
def __init__(self, cd="sys", allow_reset_less=False):
_Value.__init__(self)
+ if not isinstance(cd, str):
+ raise TypeError("Argument of ResetSignal must be a string")
self.cd = cd
self.allow_reset_less = allow_reset_less