Skip to content

Commit d0ccc09

Browse files
committed
bug fix for the write size
1 parent 0f9eff7 commit d0ccc09

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/extension/thread_/stream_ringbuffer_multi/thread_stream_ringbuffer_multi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def mkLed():
5050

5151
def comp_stream(size, offset):
5252
strm.set_source('a', ram_a, offset, size * 3)
53-
strm.set_sink('b', ram_b, offset, size)
53+
strm.set_sink('b', ram_b, offset, size - 2)
5454
strm.set_constant('img_width', size)
5555
strm.run()
5656
strm.join()
5757

5858
def comp_sequential(size, offset):
59-
for i in range(size):
59+
for i in range(size - 2):
6060
a0 = ram_a.read(i + offset)
6161
a1 = ram_a.read(i + offset + 1)
6262
a2 = ram_a.read(i + offset + 2)
@@ -71,7 +71,7 @@ def comp_sequential(size, offset):
7171

7272
def check(size, offset_stream, offset_seq):
7373
all_ok = True
74-
for i in range(size):
74+
for i in range(size - 2):
7575
st = ram_b.read(i + offset_stream)
7676
sq = ram_b.read(i + offset_seq)
7777
if vthread.verilog.NotEql(st, sq):

tests/extension/thread_/stream_scratchpad_multi/thread_stream_scratchpad_multi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def mkLed():
5353

5454
def comp_stream(size, offset):
5555
strm.set_source('a', ram_a, offset, size * 3)
56-
strm.set_sink('b', ram_b, offset, size)
56+
strm.set_sink('b', ram_b, offset, size - 2)
5757
strm.set_constant('img_width', size)
5858
strm.run()
5959
strm.join()
6060

6161
def comp_sequential(size, offset):
62-
for i in range(size):
62+
for i in range(size - 2):
6363
a0 = ram_a.read(i + offset)
6464
a1 = ram_a.read(i + offset + 1)
6565
a2 = ram_a.read(i + offset + 2)
@@ -74,7 +74,7 @@ def comp_sequential(size, offset):
7474

7575
def check(size, offset_stream, offset_seq):
7676
all_ok = True
77-
for i in range(size):
77+
for i in range(size - 2):
7878
st = ram_b.read(i + offset_stream)
7979
sq = ram_b.read(i + offset_seq)
8080
if vthread.verilog.NotEql(st, sq):

0 commit comments

Comments
 (0)