Skip to content

Commit c7a4d8a

Browse files
author
Yasuhiro Nitta
committed
apply 0-origin counter index to existing test
1 parent a06e168 commit c7a4d8a

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

tests/extension/thread_/stream_graph_ringbuffer_multi/thread_stream_graph_ringbuffer_multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def mkLed():
4646
#b = a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8
4747
b = strm.AddN(a0, a1, a2, a3, a4, a5, a6, a7, a8)
4848

49-
strm.sink(b, 'b', when=counter > img_width + img_width + 2)
49+
strm.sink(b, 'b', when=counter >= img_width + img_width + 2)
5050

5151
def comp_stream(size, offset):
5252
strm.set_source('a', ram_a, offset, size * 3)

tests/extension/thread_/stream_graph_scratchpad_multi/thread_stream_graph_scratchpad_multi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def mkLed():
2929
counter = strm.Counter()
3030

3131
a = strm.source('a')
32-
a_addr = strm.Counter() - 1
32+
a_addr = strm.Counter()
3333
sp = strm.Scratchpad(a, a_addr, length=128)
3434

3535
a0 = a
@@ -49,7 +49,7 @@ def mkLed():
4949
#b = a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8
5050
b = strm.AddN(a0, a1, a2, a3, a4, a5, a6, a7, a8)
5151

52-
strm.sink(b, 'b', when=counter > img_width + img_width + 2)
52+
strm.sink(b, 'b', when=counter >= img_width + img_width + 2)
5353

5454
def comp_stream(size, offset):
5555
strm.set_source('a', ram_a, offset, size * 3)

tests/extension/thread_/stream_ringbuffer/thread_stream_ringbuffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def mkLed():
3535

3636
b = a + a_old
3737

38-
strm.sink(b, 'b', when=counter > img_width)
38+
strm.sink(b, 'b', when=counter >= img_width)
3939

4040
def comp_stream(size, offset):
4141
strm.set_source('a', ram_a, offset, size * 2)

tests/extension/thread_/stream_ringbuffer_multi/thread_stream_ringbuffer_multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def mkLed():
4646
#b = a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8
4747
b = strm.AddN(a0, a1, a2, a3, a4, a5, a6, a7, a8)
4848

49-
strm.sink(b, 'b', when=counter > img_width + img_width + 2)
49+
strm.sink(b, 'b', when=counter >= img_width + img_width + 2)
5050

5151
def comp_stream(size, offset):
5252
strm.set_source('a', ram_a, offset, size * 3)

tests/extension/thread_/stream_ringbuffer_reuse/thread_stream_ringbuffer_reuse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def mkLed():
3636

3737
b = a + a_old
3838

39-
strm.sink(b, 'b', when=counter > wait_num)
39+
strm.sink(b, 'b', when=counter >= wait_num)
4040

4141
def comp_stream(size, offset):
4242
strm.set_source('a', ram_a, offset, size * 2)

tests/extension/thread_/stream_scratchpad/thread_stream_scratchpad.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ def mkLed():
2929
counter = strm.Counter()
3030

3131
a = strm.source('a')
32-
a_addr = strm.Counter() - 1
32+
a_addr = strm.Counter()
3333

3434
sp = strm.Scratchpad(a, a_addr, length=128)
3535

36-
a_old_addr = strm.Counter() - img_width - 1
36+
a_old_addr = strm.Counter() - img_width
3737
a_old = sp.read(a_old_addr)
3838

3939
b = a + a_old
4040

41-
strm.sink(b, 'b', when=counter > img_width)
41+
strm.sink(b, 'b', when=counter >= img_width)
4242

4343
def comp_stream(size, offset):
4444
strm.set_source('a', ram_a, offset, size * 2)

tests/extension/thread_/stream_scratchpad_multi/thread_stream_scratchpad_multi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def mkLed():
2929
counter = strm.Counter()
3030

3131
a = strm.source('a')
32-
a_addr = strm.Counter() - 1
32+
a_addr = strm.Counter()
3333
sp = strm.Scratchpad(a, a_addr, length=128)
3434

3535
a0 = a
@@ -49,7 +49,7 @@ def mkLed():
4949
#b = a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8
5050
b = strm.AddN(a0, a1, a2, a3, a4, a5, a6, a7, a8)
5151

52-
strm.sink(b, 'b', when=counter > img_width + img_width + 2)
52+
strm.sink(b, 'b', when=counter >= img_width + img_width + 2)
5353

5454
def comp_stream(size, offset):
5555
strm.set_source('a', ram_a, offset, size * 3)

tests/extension/thread_/stream_scratchpad_when/thread_stream_scratchpad_when.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ def mkLed():
2929
counter = strm.Counter()
3030

3131
a = strm.source('a')
32-
a_addr = strm.Counter() - 1
32+
a_addr = strm.Counter()
3333

3434
sp = strm.Scratchpad(a, a_addr, when=counter <= img_width, length=128)
3535

36-
a_old_addr = strm.Counter() - img_width - 1
36+
a_old_addr = strm.Counter() - img_width
3737
a_old = sp.read(a_old_addr)
3838

3939
b = a + a_old
4040

41-
strm.sink(b, 'b', when=counter > img_width)
41+
strm.sink(b, 'b', when=counter >= img_width)
4242

4343
def comp_stream(size, offset):
4444
strm.set_source('a', ram_a, offset, size * 2)

tests/extension/thread_/stream_write_ram/thread_stream_write_ram.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ def mkLed():
3131
counter = strm.Counter()
3232

3333
a = strm.source('a')
34-
a_addr = strm.Counter() - 1
34+
a_addr = strm.Counter()
3535

36-
strm.write_RAM('write_ext', a_addr, a, when=counter <= img_width)
36+
strm.write_RAM('write_ext', a_addr, a, when=counter < img_width)
3737

38-
a_old_addr = strm.Counter() - img_width - 1
38+
a_old_addr = strm.Counter() - img_width
3939
a_old = strm.read_RAM('read_ext', a_old_addr)
4040

4141
b = a + a_old
4242

43-
strm.sink(b, 'b', when=counter > img_width)
43+
strm.sink(b, 'b', when=counter >= img_width)
4444

4545
def comp_stream(size, offset):
4646
strm.set_source('a', ram_a, offset, size * 2)

tests/extension/thread_/stream_write_ram_dump/thread_stream_write_ram_dump.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ def mkLed():
3232
counter = strm.Counter()
3333

3434
a = strm.source('a')
35-
a_addr = strm.Counter() - 1
35+
a_addr = strm.Counter()
3636

37-
strm.write_RAM('write_ext', a_addr, a, when=counter <= img_width)
37+
strm.write_RAM('write_ext', a_addr, a, when=counter < img_width)
3838

39-
a_old_addr = strm.Counter() - img_width - 1
39+
a_old_addr = strm.Counter() - img_width
4040
a_old = strm.read_RAM('read_ext', a_old_addr)
4141

4242
b = a + a_old
4343

44-
strm.sink(b, 'b', when=counter > img_width)
44+
strm.sink(b, 'b', when=counter >= img_width)
4545

4646
def comp_stream(size, offset):
4747
strm.set_source('a', ram_a, offset, size * 2)

0 commit comments

Comments
 (0)