continued arbitrer_handshake test (still doesn't work)
This commit is contained in:
63
test/unit_tests/arbiter_handshake/run/prsim.out
Normal file
63
test/unit_tests/arbiter_handshake/run/prsim.out
Normal file
@ -0,0 +1,63 @@
|
||||
t.in1.r t.in2.r t.out.r t.a.arbiter._y1 t.in1.a t.a.arbiter._y2 t.out.a t.a._y2_arb t.a._y1_arb t.a.ack_cel2._y t.in2.a t.a.or_cell._y t.a.ack_cel1._y
|
||||
0 t.in1.r : 0
|
||||
0 t.out.a : 0
|
||||
0 t.in2.r : 0
|
||||
1 t.a.arbiter._y1 : 1 [by t.in1.r:=0]
|
||||
7092 t.a.arbiter._y2 : 1 [by t.in2.r:=0]
|
||||
t.out.r t.in1.a t.a._y2_arb t.a._y1_arb t.a.ack_cel2._y t.in2.a t.a.or_cell._y t.a.ack_cel1._y
|
||||
[0] reset done
|
||||
7092 t.in1.r : 1
|
||||
17559 t.a.arbiter._y1 : 0 [by t.in1.r:=1]
|
||||
17561 t.a._y1_arb : 1 [by t.a.arbiter._y1:=0]
|
||||
22314 t.a.or_cell._y : 0 [by t.a._y1_arb:=1]
|
||||
23451 t.out.r : 1 [by t.a.or_cell._y:=0]
|
||||
23451 t.out.a : 1
|
||||
23565 t.a.ack_cel1._y : 0 [by t.out.a:=1]
|
||||
88931 t.in1.a : 1 [by t.a.ack_cel1._y:=0]
|
||||
90657 t.a._y2_arb : 0 [by t.in1.a:=1]
|
||||
[1] test in1 done
|
||||
90657 t.in1.r : 0
|
||||
90657 t.out.a : 0
|
||||
90672 t.a.ack_cel2._y : 1 [by t.out.a:=0]
|
||||
WARNING: weak-interference `t.a._y1_arb'
|
||||
>> cause: t.a.arbiter._y1 (val: 1)
|
||||
>> time: 90696
|
||||
90696 t.a.arbiter._y1 : 1 [by t.in1.r:=0]
|
||||
WARNING: weak-interference `t.a.or_cell._y'
|
||||
>> cause: t.a._y1_arb (val: X)
|
||||
>> time: 90709
|
||||
90709 t.a._y1_arb : X [by t.a.arbiter._y1:=1]
|
||||
WARNING: weak-interference `t.in1.a'
|
||||
>> cause: t.a.ack_cel1._y (val: X)
|
||||
>> time: 90749
|
||||
90749 t.a.ack_cel1._y : X [by t.a._y1_arb:=X]
|
||||
WARNING: weak-interference `t.a._y2_arb'
|
||||
>> cause: t.in1.a (val: X)
|
||||
>> time: 90769
|
||||
90769 t.in1.a : X [by t.a.ack_cel1._y:=X]
|
||||
WARNING: weak-interference `t.out.r'
|
||||
>> cause: t.a.or_cell._y (val: X)
|
||||
>> time: 91124
|
||||
91124 t.a.or_cell._y : X [by t.a._y1_arb:=X]
|
||||
91163 t.in2.a : 0 [by t.a.ack_cel2._y:=1]
|
||||
91171 t.out.r : X [by t.a.or_cell._y:=X]
|
||||
91179 t.a._y1_arb : 1 [by t.in2.a:=0]
|
||||
96830 t.a._y2_arb : X [by t.in1.a:=X]
|
||||
135277 t.a.or_cell._y : 0 [by t.a._y1_arb:=1]
|
||||
149001 t.out.r : 1 [by t.a.or_cell._y:=0]
|
||||
t.in1.a t.a._y2_arb t.a.ack_cel1._y
|
||||
WRONG ASSERT: "t.out.r" has value 1 and not 0.
|
||||
WRONG ASSERT: "t.in1.a" has value X and not 0.
|
||||
[2] reset done
|
||||
149001 t.in2.r : 1
|
||||
149005 t.a.arbiter._y2 : 0 [by t.in2.r:=1]
|
||||
158134 t.a._y2_arb : 1 [by t.a.arbiter._y2:=0]
|
||||
158134 t.out.a : 1
|
||||
158149 t.a.ack_cel2._y : 0 [by t.out.a:=1]
|
||||
195080 t.in2.a : 1 [by t.a.ack_cel2._y:=0]
|
||||
WARNING: unstable `t.a.ack_cel1._y'-
|
||||
>> cause: t.a._y1_arb (val: 0)
|
||||
>> time: 195135
|
||||
195135 t.a._y1_arb : 0 [by t.in2.a:=1]
|
||||
201382 t.a.ack_cel1._y : X [by t.a._y1_arb:=0]
|
||||
[3] test in2 done
|
BIN
test/unit_tests/arbiter_handshake/run/prsim.pdf
Normal file
BIN
test/unit_tests/arbiter_handshake/run/prsim.pdf
Normal file
Binary file not shown.
@ -1,3 +1,70 @@
|
||||
= "GND" "GND"
|
||||
= "Vdd" "Vdd"
|
||||
= "Reset" "Reset"
|
||||
= "t.a.in1.d.d[0]" "t.a.in1.r"
|
||||
= "t.a.in1.a" "t.a.arbiter.d"
|
||||
= "t.a.in1.a" "t.a.ack_cel1.y"
|
||||
= "t.a.in1.d.d[0]" "t.a.arbiter.a"
|
||||
= "t.a.in1.d.d[0]" "t.a.in1.r"
|
||||
~"t.a.ack_cel1.c1"&~"t.a.ack_cel1.c2"->"t.a.ack_cel1._y"+
|
||||
"t.a.ack_cel1.c1"&"t.a.ack_cel1.c2"->"t.a.ack_cel1._y"-
|
||||
"t.a.ack_cel1._y"->"t.a.ack_cel1.y"-
|
||||
~("t.a.ack_cel1._y")->"t.a.ack_cel1.y"+
|
||||
~"t.a.ack_cel2.c1"&~"t.a.ack_cel2.c2"->"t.a.ack_cel2._y"+
|
||||
"t.a.ack_cel2.c1"&"t.a.ack_cel2.c2"->"t.a.ack_cel2._y"-
|
||||
"t.a.ack_cel2._y"->"t.a.ack_cel2.y"-
|
||||
~("t.a.ack_cel2._y")->"t.a.ack_cel2.y"+
|
||||
= "t.a.in2.d.d[0]" "t.a.in2.r"
|
||||
= "t.a.in2.a" "t.a.arbiter.c"
|
||||
= "t.a.in2.a" "t.a.ack_cel2.y"
|
||||
= "t.a.in2.d.d[0]" "t.a.arbiter.b"
|
||||
= "t.a.in2.d.d[0]" "t.a.in2.r"
|
||||
= "t.a.supply.vdd" "t.a.arbiter.vdd"
|
||||
= "t.a.supply.vdd" "t.a.or_cell.vdd"
|
||||
= "t.a.supply.vdd" "t.a.ack_cel2.vdd"
|
||||
= "t.a.supply.vdd" "t.a.ack_cel1.vdd"
|
||||
= "t.a.supply.vss" "t.a.arbiter.vss"
|
||||
= "t.a.supply.vss" "t.a.or_cell.vss"
|
||||
= "t.a.supply.vss" "t.a.ack_cel2.vss"
|
||||
= "t.a.supply.vss" "t.a.ack_cel1.vss"
|
||||
"t.a.arbiter.a"&"t.a.arbiter._y2"->"t.a.arbiter._y1"-
|
||||
~"t.a.arbiter.a"|~"t.a.arbiter._y2"->"t.a.arbiter._y1"+
|
||||
"t.a.arbiter.b"&"t.a.arbiter._y1"->"t.a.arbiter._y2"-
|
||||
~"t.a.arbiter.b"|~"t.a.arbiter._y1"->"t.a.arbiter._y2"+
|
||||
~"t.a.arbiter._y1"|~"t.a.arbiter.c"->"t.a.arbiter.y1"+
|
||||
~(~"t.a.arbiter._y1"|~"t.a.arbiter.c")->"t.a.arbiter.y1"-
|
||||
~"t.a.arbiter._y2"|~"t.a.arbiter.d"->"t.a.arbiter.y2"+
|
||||
~(~"t.a.arbiter._y2"|~"t.a.arbiter.d")->"t.a.arbiter.y2"-
|
||||
mk_excllo("t.a.arbiter._y1","t.a.arbiter._y2")
|
||||
= "t.a._y1_arb" "t.a.arbiter.y1"
|
||||
= "t.a._y1_arb" "t.a.or_cell.a"
|
||||
= "t.a._y1_arb" "t.a.ack_cel1.c2"
|
||||
"t.a.or_cell.a"|"t.a.or_cell.b"->"t.a.or_cell._y"-
|
||||
~("t.a.or_cell.a"|"t.a.or_cell.b")->"t.a.or_cell._y"+
|
||||
"t.a.or_cell._y"->"t.a.or_cell.y"-
|
||||
~("t.a.or_cell._y")->"t.a.or_cell.y"+
|
||||
= "t.a.out.d.d[0]" "t.a.out.r"
|
||||
= "t.a.out.a" "t.a.ack_cel2.c1"
|
||||
= "t.a.out.a" "t.a.ack_cel1.c1"
|
||||
= "t.a.out.d.d[0]" "t.a.or_cell.y"
|
||||
= "t.a.out.d.d[0]" "t.a.out.r"
|
||||
= "t.a._y2_arb" "t.a.arbiter.y2"
|
||||
= "t.a._y2_arb" "t.a.or_cell.b"
|
||||
= "t.a._y2_arb" "t.a.ack_cel2.c2"
|
||||
= "Vdd" "t.a.supply.vdd"
|
||||
= "GND" "t.a.supply.vss"
|
||||
= "t.in1.d.d[0]" "t.in1.r"
|
||||
= "t.in1.r" "t.a.in1.r"
|
||||
= "t.in1.a" "t.a.in1.a"
|
||||
= "t.in1.d.d[0]" "t.a.in1.d.d[0]"
|
||||
= "t.in1.d.d[0]" "t.in1.r"
|
||||
= "t.out.d.d[0]" "t.out.r"
|
||||
= "t.out.r" "t.a.out.r"
|
||||
= "t.out.a" "t.a.out.a"
|
||||
= "t.out.d.d[0]" "t.a.out.d.d[0]"
|
||||
= "t.out.d.d[0]" "t.out.r"
|
||||
= "t.in2.d.d[0]" "t.in2.r"
|
||||
= "t.in2.r" "t.a.in2.r"
|
||||
= "t.in2.a" "t.a.in2.a"
|
||||
= "t.in2.d.d[0]" "t.a.in2.d.d[0]"
|
||||
= "t.in2.d.d[0]" "t.in2.r"
|
||||
|
@ -33,9 +33,9 @@ open tmpl::dataflow_neuro;
|
||||
|
||||
defproc arbiter_test(a1of1 in1; a1of1 in2; a1of1 out)
|
||||
{
|
||||
arbiter_handshake a(.in1 = in1, .in2 = in, .out = out);
|
||||
arbiter_handshake a(.in1 = in1, .in2 = in2, .out = out);
|
||||
a.supply.vdd = Vdd;
|
||||
a.supply.vss = Gnd;
|
||||
a.supply.vss = GND;
|
||||
}
|
||||
|
||||
arbiter_test t;
|
@ -1,42 +1,39 @@
|
||||
watchall
|
||||
cycle
|
||||
system "echo 'reset done'"
|
||||
t.in1.d 0
|
||||
t.in2.d 0
|
||||
t.in1.v 0
|
||||
t.in2.v 0
|
||||
t.out.a 0
|
||||
set t.in1.r 0
|
||||
set t.in2.r 0
|
||||
set t.out.a 0
|
||||
cycle
|
||||
status X
|
||||
mode run
|
||||
system "echo 'step 1.1 finished'"
|
||||
set a.a 1
|
||||
set a.b 1
|
||||
advance 1000000
|
||||
system "echo '[0] reset done'"
|
||||
|
||||
set t.in1.r 1
|
||||
cycle
|
||||
assert t.out.r 1
|
||||
set t.out.a 1
|
||||
cycle
|
||||
assert t.in1.a 1
|
||||
system "echo '[1] test in1 done'"
|
||||
|
||||
set t.in1.r 0
|
||||
set t.in2.r 0
|
||||
set t.out.a 0
|
||||
cycle
|
||||
status X
|
||||
mode run
|
||||
system "echo 'step 1.2 finished'"
|
||||
set a.a 0
|
||||
set a.b 0
|
||||
advance 1000000
|
||||
status X
|
||||
mode run
|
||||
system "echo 'step 2.1 finished'"
|
||||
set a.a 1
|
||||
set a.b 1
|
||||
advance 1000000
|
||||
status X
|
||||
mode run
|
||||
system "echo 'step 2.2 finished'"
|
||||
set a.a 0
|
||||
set a.b 0
|
||||
advance 1000000
|
||||
status X
|
||||
mode run
|
||||
system "echo 'step 3.1 finished'"
|
||||
set a.a 0
|
||||
set a.b 1
|
||||
advance 1000000
|
||||
status X
|
||||
mode run
|
||||
system "echo 'step 3.2 finished'"
|
||||
assert t.out.r 0
|
||||
assert t.in1.a 0
|
||||
assert t.in2.a 0
|
||||
system "echo '[2] reset done'"
|
||||
|
||||
set t.in2.r 1
|
||||
set t.in1.r 0
|
||||
set t.out.a 0
|
||||
cycle
|
||||
assert t.out.r 1
|
||||
set t.out.a 1
|
||||
cycle
|
||||
assert t.in2.a 1
|
||||
system "echo '[3] test in2 done'"
|
||||
|
||||
|
Reference in New Issue
Block a user