Skip to content

Commit 6bd0507

Browse files
committed
Argument order of Thread and ThreadPool is changed.
1 parent 4ddc39e commit 6bd0507

File tree

34 files changed

+51
-51
lines changed

34 files changed

+51
-51
lines changed

examples/thread_matmul/thread_matmul.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def check(matrix_size, a_offset, b_offset, c_offset):
6969
else:
7070
print("NG")
7171

72-
th = vthread.Thread(m, clk, rst, 'th_matmul', matmul)
72+
th = vthread.Thread(m, 'th_matmul', clk, rst, matmul)
7373
fsm = th.start(16, 0, 1024, 2048)
7474

7575
return m

tests/extension/thread_/attribute/thread_attribute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def blink(times):
4242
led.value = my_counter.count
4343
print("led = ", led)
4444

45-
th = vthread.Thread(m, clk, rst, 'th_blink', blink)
45+
th = vthread.Thread(m, 'th_blink', clk, rst, blink)
4646
fsm = th.start(10)
4747

4848
return m

tests/extension/thread_/axi_dma/thread_axi_dma.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def body(size, offset):
8181
print('rdata[%d] = %d' % (i, rdata))
8282
all_ok.value = False
8383

84-
th = vthread.Thread(m, clk, rst, 'th_blink', blink)
84+
th = vthread.Thread(m, 'th_blink', clk, rst, blink)
8585
fsm = th.start(16)
8686

8787
return m

tests/extension/thread_/barrier/thread_barrier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def blink():
3838
for tid in range(numthreads):
3939
pool.join(tid)
4040

41-
th = vthread.Thread(m, clk, rst, 'th_blink', blink)
42-
pool = vthread.ThreadPool(m, clk, rst, 'th_myfunc', myfunc, numthreads)
41+
th = vthread.Thread(m, 'th_blink', clk, rst, blink)
42+
pool = vthread.ThreadPool(m, 'th_myfunc', clk, rst, myfunc, numthreads)
4343
fsm = th.start()
4444

4545
return m

tests/extension/thread_/call_from_different_point/thread_call_from_different_point.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def func_a(a, b=1000):
3636
pass
3737
return a + b
3838

39-
th_blink = vthread.Thread(m, clk, rst, 'th_blink', blink)
40-
th_func_a = vthread.Thread(m, clk, rst, 'th_func_a', func_a)
39+
th_blink = vthread.Thread(m, 'th_blink', clk, rst, blink)
40+
th_func_a = vthread.Thread(m, 'th_func_a', clk, rst, func_a)
4141
fsm = th_blink.start(20)
4242

4343
return m

tests/extension/thread_/child_thread/thread_child_thread.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def subth(a, b, c):
4040
print('# subth end: %d' % ret)
4141
return ret
4242

43-
th_blink = vthread.Thread(m, clk, rst, 'th_blink', blink)
44-
th_subth = vthread.Thread(m, clk, rst, 'th_subth', subth)
43+
th_blink = vthread.Thread(m, 'th_blink', clk, rst, blink)
44+
th_subth = vthread.Thread(m, 'th_subth', clk, rst, subth)
4545
fsm = th_blink.start(20)
4646

4747
return m

tests/extension/thread_/extend/thread_extend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def blink(times):
3333
led.value += 1
3434
print("led = ", led)
3535

36-
th = vthread.Thread(m, clk, rst, 'th_blink', blink)
36+
th = vthread.Thread(m, 'th_blink', clk, rst, blink)
3737
fsm = th.extend(fsm, 10)
3838

3939
return m

tests/extension/thread_/fifo/thread_fifo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def blink(times):
3434

3535
print('sum = %d' % sum)
3636

37-
th = vthread.Thread(m, clk, rst, 'th_blink', blink)
37+
th = vthread.Thread(m, 'th_blink', clk, rst, blink)
3838
fsm = th.start(10)
3939

4040
return m

tests/extension/thread_/fifo_multithread/thread_fifo_multithread.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def blink():
6060
led.value = read_data
6161
print("result fifo.out = %d" % read_data)
6262

63-
th = vthread.Thread(m, clk, rst, 'th_blink', blink)
64-
pool = vthread.ThreadPool(m, clk, rst, 'th_myfunc', myfunc, numthreads)
63+
th = vthread.Thread(m, 'th_blink', clk, rst, blink)
64+
pool = vthread.ThreadPool(m, 'th_myfunc', clk, rst, myfunc, numthreads)
6565
fsm = th.start()
6666

6767
return m

tests/extension/thread_/fifo_try/thread_fifo_try.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def blink(times):
4141

4242
print('sum = %d' % sum)
4343

44-
th = vthread.Thread(m, clk, rst, 'th_blink', blink)
44+
th = vthread.Thread(m, 'th_blink', clk, rst, blink)
4545
fsm = th.start(10)
4646

4747
return m

0 commit comments

Comments
 (0)