Skip to content

Commit 0f79d5e

Browse files
committed
Merge branch 'rc-1.7.0'
2 parents a5f57fc + b5d8c38 commit 0f79d5e

File tree

89 files changed

+4304
-265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+4304
-265
lines changed

examples/simulation_verilator/test_simulation_verilator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
wire [4-1:0] myaxi_awcache;
2323
wire [3-1:0] myaxi_awprot;
2424
wire [4-1:0] myaxi_awqos;
25-
wire [1-1:0] myaxi_awuser;
25+
wire [2-1:0] myaxi_awuser;
2626
wire myaxi_awvalid;
2727
reg myaxi_awready;
2828
wire [32-1:0] myaxi_wdata;
@@ -41,7 +41,7 @@
4141
wire [4-1:0] myaxi_arcache;
4242
wire [3-1:0] myaxi_arprot;
4343
wire [4-1:0] myaxi_arqos;
44-
wire [1-1:0] myaxi_aruser;
44+
wire [2-1:0] myaxi_aruser;
4545
wire myaxi_arvalid;
4646
reg myaxi_arready;
4747
reg [32-1:0] myaxi_rdata;
@@ -57,7 +57,7 @@
5757
wire [4-1:0] memory_awcache;
5858
wire [3-1:0] memory_awprot;
5959
wire [4-1:0] memory_awqos;
60-
wire [1-1:0] memory_awuser;
60+
wire [2-1:0] memory_awuser;
6161
wire memory_awvalid;
6262
reg memory_awready;
6363
wire [32-1:0] memory_wdata;
@@ -76,7 +76,7 @@
7676
wire [4-1:0] memory_arcache;
7777
wire [3-1:0] memory_arprot;
7878
wire [4-1:0] memory_arqos;
79-
wire [1-1:0] memory_aruser;
79+
wire [2-1:0] memory_aruser;
8080
wire memory_arvalid;
8181
reg memory_arready;
8282
reg [32-1:0] memory_rdata;
@@ -550,7 +550,7 @@
550550
output [4-1:0] myaxi_awcache,
551551
output [3-1:0] myaxi_awprot,
552552
output [4-1:0] myaxi_awqos,
553-
output [1-1:0] myaxi_awuser,
553+
output [2-1:0] myaxi_awuser,
554554
output reg myaxi_awvalid,
555555
input myaxi_awready,
556556
output reg [32-1:0] myaxi_wdata,
@@ -569,7 +569,7 @@
569569
output [4-1:0] myaxi_arcache,
570570
output [3-1:0] myaxi_arprot,
571571
output [4-1:0] myaxi_arqos,
572-
output [1-1:0] myaxi_aruser,
572+
output [2-1:0] myaxi_aruser,
573573
output reg myaxi_arvalid,
574574
input myaxi_arready,
575575
input [32-1:0] myaxi_rdata,

examples/thread_embedded_verilog_ipcore/test_thread_embedded_verilog_ipxact.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
wire [4-1:0] uut_maxi_awcache;
1818
wire [3-1:0] uut_maxi_awprot;
1919
wire [4-1:0] uut_maxi_awqos;
20-
wire [1-1:0] uut_maxi_awuser;
20+
wire [2-1:0] uut_maxi_awuser;
2121
wire uut_maxi_awvalid;
2222
reg uut_maxi_awready;
2323
wire [32-1:0] uut_maxi_wdata;
@@ -36,7 +36,7 @@
3636
wire [4-1:0] uut_maxi_arcache;
3737
wire [3-1:0] uut_maxi_arprot;
3838
wire [4-1:0] uut_maxi_arqos;
39-
wire [1-1:0] uut_maxi_aruser;
39+
wire [2-1:0] uut_maxi_aruser;
4040
wire uut_maxi_arvalid;
4141
reg uut_maxi_arready;
4242
reg [32-1:0] uut_maxi_rdata;
@@ -138,7 +138,7 @@
138138
wire [4-1:0] memory_awcache;
139139
wire [3-1:0] memory_awprot;
140140
wire [4-1:0] memory_awqos;
141-
wire [1-1:0] memory_awuser;
141+
wire [2-1:0] memory_awuser;
142142
wire memory_awvalid;
143143
reg memory_awready;
144144
wire [32-1:0] memory_wdata;
@@ -157,7 +157,7 @@
157157
wire [4-1:0] memory_arcache;
158158
wire [3-1:0] memory_arprot;
159159
wire [4-1:0] memory_arqos;
160-
wire [1-1:0] memory_aruser;
160+
wire [2-1:0] memory_aruser;
161161
wire memory_arvalid;
162162
reg memory_arready;
163163
reg [32-1:0] memory_rdata;
@@ -1127,7 +1127,7 @@
11271127
output [4-1:0] maxi_awcache,
11281128
output [3-1:0] maxi_awprot,
11291129
output [4-1:0] maxi_awqos,
1130-
output [1-1:0] maxi_awuser,
1130+
output [2-1:0] maxi_awuser,
11311131
output reg maxi_awvalid,
11321132
input maxi_awready,
11331133
output reg [32-1:0] maxi_wdata,
@@ -1146,7 +1146,7 @@
11461146
output [4-1:0] maxi_arcache,
11471147
output [3-1:0] maxi_arprot,
11481148
output [4-1:0] maxi_arqos,
1149-
output [1-1:0] maxi_aruser,
1149+
output [2-1:0] maxi_aruser,
11501150
output reg maxi_arvalid,
11511151
input maxi_arready,
11521152
input [32-1:0] maxi_rdata,

examples/thread_memcpy_ipxact/test_thread_memcpy_ipxact.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
wire [4-1:0] uut_maxi_awcache;
1717
wire [3-1:0] uut_maxi_awprot;
1818
wire [4-1:0] uut_maxi_awqos;
19-
wire [1-1:0] uut_maxi_awuser;
19+
wire [2-1:0] uut_maxi_awuser;
2020
wire uut_maxi_awvalid;
2121
reg uut_maxi_awready;
2222
wire [32-1:0] uut_maxi_wdata;
@@ -35,7 +35,7 @@
3535
wire [4-1:0] uut_maxi_arcache;
3636
wire [3-1:0] uut_maxi_arprot;
3737
wire [4-1:0] uut_maxi_arqos;
38-
wire [1-1:0] uut_maxi_aruser;
38+
wire [2-1:0] uut_maxi_aruser;
3939
wire uut_maxi_arvalid;
4040
reg uut_maxi_arready;
4141
reg [32-1:0] uut_maxi_rdata;
@@ -136,7 +136,7 @@
136136
wire [4-1:0] memory_awcache;
137137
wire [3-1:0] memory_awprot;
138138
wire [4-1:0] memory_awqos;
139-
wire [1-1:0] memory_awuser;
139+
wire [2-1:0] memory_awuser;
140140
wire memory_awvalid;
141141
reg memory_awready;
142142
wire [32-1:0] memory_wdata;
@@ -155,7 +155,7 @@
155155
wire [4-1:0] memory_arcache;
156156
wire [3-1:0] memory_arprot;
157157
wire [4-1:0] memory_arqos;
158-
wire [1-1:0] memory_aruser;
158+
wire [2-1:0] memory_aruser;
159159
wire memory_arvalid;
160160
reg memory_arready;
161161
reg [32-1:0] memory_rdata;
@@ -1124,7 +1124,7 @@
11241124
output [4-1:0] maxi_awcache,
11251125
output [3-1:0] maxi_awprot,
11261126
output [4-1:0] maxi_awqos,
1127-
output [1-1:0] maxi_awuser,
1127+
output [2-1:0] maxi_awuser,
11281128
output reg maxi_awvalid,
11291129
input maxi_awready,
11301130
output reg [32-1:0] maxi_wdata,
@@ -1143,7 +1143,7 @@
11431143
output [4-1:0] maxi_arcache,
11441144
output [3-1:0] maxi_arprot,
11451145
output [4-1:0] maxi_arqos,
1146-
output [1-1:0] maxi_aruser,
1146+
output [2-1:0] maxi_aruser,
11471147
output reg maxi_arvalid,
11481148
input maxi_arready,
11491149
input [32-1:0] maxi_rdata,

examples/thread_verilog_submodule_ipxact/test_thread_verilog_submodule_ipxact.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
wire [4-1:0] uut_maxi_awcache;
1818
wire [3-1:0] uut_maxi_awprot;
1919
wire [4-1:0] uut_maxi_awqos;
20-
wire [1-1:0] uut_maxi_awuser;
20+
wire [2-1:0] uut_maxi_awuser;
2121
wire uut_maxi_awvalid;
2222
reg uut_maxi_awready;
2323
wire [32-1:0] uut_maxi_wdata;
@@ -36,7 +36,7 @@
3636
wire [4-1:0] uut_maxi_arcache;
3737
wire [3-1:0] uut_maxi_arprot;
3838
wire [4-1:0] uut_maxi_arqos;
39-
wire [1-1:0] uut_maxi_aruser;
39+
wire [2-1:0] uut_maxi_aruser;
4040
wire uut_maxi_arvalid;
4141
reg uut_maxi_arready;
4242
reg [32-1:0] uut_maxi_rdata;
@@ -138,7 +138,7 @@
138138
wire [4-1:0] memory_awcache;
139139
wire [3-1:0] memory_awprot;
140140
wire [4-1:0] memory_awqos;
141-
wire [1-1:0] memory_awuser;
141+
wire [2-1:0] memory_awuser;
142142
wire memory_awvalid;
143143
reg memory_awready;
144144
wire [32-1:0] memory_wdata;
@@ -157,7 +157,7 @@
157157
wire [4-1:0] memory_arcache;
158158
wire [3-1:0] memory_arprot;
159159
wire [4-1:0] memory_arqos;
160-
wire [1-1:0] memory_aruser;
160+
wire [2-1:0] memory_aruser;
161161
wire memory_arvalid;
162162
reg memory_arready;
163163
reg [32-1:0] memory_rdata;
@@ -1127,7 +1127,7 @@
11271127
output [4-1:0] maxi_awcache,
11281128
output [3-1:0] maxi_awprot,
11291129
output [4-1:0] maxi_awqos,
1130-
output [1-1:0] maxi_awuser,
1130+
output [2-1:0] maxi_awuser,
11311131
output reg maxi_awvalid,
11321132
input maxi_awready,
11331133
output reg [32-1:0] maxi_wdata,
@@ -1146,7 +1146,7 @@
11461146
output [4-1:0] maxi_arcache,
11471147
output [3-1:0] maxi_arprot,
11481148
output [4-1:0] maxi_arqos,
1149-
output [1-1:0] maxi_aruser,
1149+
output [2-1:0] maxi_aruser,
11501150
output reg maxi_arvalid,
11511151
input maxi_arready,
11521152
input [32-1:0] maxi_rdata,

tests/extension/stream_/cast/test_stream_cast.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,19 @@
128128
output signed [32-1:0] zdata
129129
);
130130
131+
wire signed [32-1:0] _cast_src_2;
132+
assign _cast_src_2 = xdata;
131133
wire signed [64-1:0] _cast_data_2;
132-
assign _cast_data_2 = xdata << 8;
134+
assign _cast_data_2 = _cast_src_2 << 8;
135+
wire signed [32-1:0] _cast_src_3;
136+
assign _cast_src_3 = ydata;
133137
wire signed [64-1:0] _cast_data_3;
134-
assign _cast_data_3 = ydata << 8;
138+
assign _cast_data_3 = _cast_src_3 << 8;
135139
reg signed [64-1:0] _plus_data_4;
140+
wire signed [64-1:0] _cast_src_5;
141+
assign _cast_src_5 = _plus_data_4;
136142
wire signed [32-1:0] _cast_data_5;
137-
assign _cast_data_5 = _plus_data_4 >>> 8;
143+
assign _cast_data_5 = _cast_src_5 >>> 8;
138144
assign zdata = _cast_data_5;
139145
140146
always @(posedge CLK) begin

tests/extension/thread_/stream_cast/thread_stream_cast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def mkLed():
2727
strm = vthread.Stream(m, 'mystream', clk, rst)
2828
a = strm.source('a')
2929
b = strm.source('b')
30-
a = strm.Cast(a, 64, 0)
31-
b = strm.Cast(b, 64, 0)
30+
a = strm.Cast(a, 64, 4)
31+
b = strm.Cast(b, 64, 4)
3232
c = a * b
3333
c = strm.Cast(c, 32, 0)
3434
strm.sink(c, 'c')

tests/extension/thread_/stream_fixed/thread_stream_fixed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def comp_stream(size, offset):
3939
strm.set_source('a', ram_a, offset, size)
4040
strm.set_source('b', ram_b, offset, size)
4141
strm.set_sink('c', ram_c, offset, size)
42-
const = vthread.fixed.FixedConst(3.5, point=point)
42+
const = vthread.fixed.FixedConst(1, point=point)
4343
strm.set_constant('const', const)
4444
strm.run()
4545
strm.join()
@@ -48,10 +48,10 @@ def comp_sequential(size, offset):
4848
for i in range(size):
4949
a = ram_a.read(i + offset)
5050
b = ram_b.read(i + offset)
51-
const = vthread.fixed.FixedConst(3.5, point=point)
51+
const = vthread.fixed.FixedConst(1, point=point)
5252
c = a * b + const
5353
ram_c.write(i + offset, c)
54-
print('a = %f, b = %f, const = %f, c = %f' % (a, b, const, c))
54+
print('a = %10g, b = %10g, const = %10g, c = %10g' % (a, b, const, c))
5555

5656
def check(size, offset_stream, offset_seq):
5757
all_ok = True
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
TARGET=$(shell ls *.py | grep -v test | grep -v parsetab.py)
2+
ARGS=
3+
4+
PYTHON=python3
5+
#PYTHON=python
6+
#OPT=-m pdb
7+
#OPT=-m cProfile -s time
8+
#OPT=-m cProfile -o profile.rslt
9+
10+
.PHONY: all
11+
all: test
12+
13+
.PHONY: run
14+
run:
15+
$(PYTHON) $(OPT) $(TARGET) $(ARGS)
16+
17+
.PHONY: test
18+
test:
19+
$(PYTHON) -m pytest -vv
20+
21+
.PHONY: check
22+
check:
23+
$(PYTHON) $(OPT) $(TARGET) $(ARGS) > tmp.v
24+
iverilog -tnull -Wall tmp.v
25+
rm -f tmp.v
26+
27+
.PHONY: clean
28+
clean:
29+
rm -rf *.pyc __pycache__ parsetab.py .cache *.out *.png *.dot tmp.v uut.vcd
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from __future__ import absolute_import
2+
from __future__ import print_function
3+
4+
import os
5+
import veriloggen
6+
import thread_stream_fixed_different_point
7+
8+
9+
def test(request):
10+
veriloggen.reset()
11+
12+
simtype = request.config.getoption('--sim')
13+
14+
rslt = thread_stream_fixed_different_point.run(filename=None, simtype=simtype,
15+
outputfile=os.path.splitext(os.path.basename(__file__))[0] + '.out')
16+
17+
verify_rslt = rslt.splitlines()[-1]
18+
assert(verify_rslt == '# verify: PASSED')

0 commit comments

Comments
 (0)