projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6875044
)
tb_TriggerCsr.py : use truth table generator for Sum Lut
author
Florent Kermarrec
<florent@enjoy-digital.fr>
Sun, 26 Aug 2012 13:44:43 +0000
(15:44 +0200)
committer
Florent Kermarrec
<florent@enjoy-digital.fr>
Sun, 26 Aug 2012 13:44:43 +0000
(15:44 +0200)
sim/tb_TriggerCsr.py
patch
|
blob
|
history
diff --git
a/sim/tb_TriggerCsr.py
b/sim/tb_TriggerCsr.py
index 6990b6c298f42e923a653b6555a9f6cfded96ac5..7356bfc1353b9cd9efd6b0108cbc68d49864f411 100644
(file)
--- a/
sim/tb_TriggerCsr.py
+++ b/
sim/tb_TriggerCsr.py
@@
-9,6
+9,8
@@
import sys
sys.path.append("../")
import migScope
+from migScope.tools.truthtable import *
+
def term_prog(off, dat):
for i in range(4):
yield TWrite(off+3-i, (dat>>(8*i))&0xFF)
@@
-43,6
+45,15
@@
def csr_transactions():
for t in sum_trans:
for r in t:
yield r
+
+ sum_tt = gen_truth_table("i1 & i2 & i3 & i4")
+ sum_trans = []
+ for i in range(len(sum_tt)):
+ sum_trans.append(sum_prog(0x00,i,sum_tt[i]))
+ print(sum_tt)
+ for t in sum_trans:
+ for r in t:
+ yield r
global csr_done
csr_done = True