projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c5c327
)
host/drivers: add possibility to pass cond dict to ease trigger pattern generation
author
Florent Kermarrec
<florent@enjoy-digital.fr>
Tue, 23 Dec 2014 19:53:05 +0000
(20:53 +0100)
committer
Florent Kermarrec
<florent@enjoy-digital.fr>
Tue, 23 Dec 2014 19:53:05 +0000
(20:53 +0100)
miscope/host/drivers.py
patch
|
blob
|
history
diff --git
a/miscope/host/drivers.py
b/miscope/host/drivers.py
index eab1d9e75219e1b0811907a7560253d928e2eb72..a3d6563360381c48dc9ebbe05f72166e890bf9d6 100644
(file)
--- a/
miscope/host/drivers.py
+++ b/
miscope/host/drivers.py
@@
-67,7
+67,11
@@
class MiLaDriver():
print(s, end="|")
sys.stdout.flush()
- def prog_term(self, port, trigger, mask):
+ def prog_term(self, port, trigger=0, mask=0, cond=None):
+ if cond is not None:
+ for k, v in cond.items():
+ trigger |= getattr(self, k+"_o")*v
+ mask |= getattr(self, k+"_m")*v
t = getattr(self, "mila_trigger_port{d}_trig".format(d=int(port)))
m = getattr(self, "mila_trigger_port{d}_mask".format(d=int(port)))
t.write(trigger)