Skip to content

Commit

Permalink
Merge branch 'rc-1.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
shtaxxx committed May 7, 2019
2 parents a5f57fc + b5d8c38 commit 0f79d5e
Show file tree
Hide file tree
Showing 89 changed files with 4,304 additions and 265 deletions.
12 changes: 6 additions & 6 deletions examples/simulation_verilator/test_simulation_verilator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
wire [4-1:0] myaxi_awcache;
wire [3-1:0] myaxi_awprot;
wire [4-1:0] myaxi_awqos;
wire [1-1:0] myaxi_awuser;
wire [2-1:0] myaxi_awuser;
wire myaxi_awvalid;
reg myaxi_awready;
wire [32-1:0] myaxi_wdata;
Expand All @@ -41,7 +41,7 @@
wire [4-1:0] myaxi_arcache;
wire [3-1:0] myaxi_arprot;
wire [4-1:0] myaxi_arqos;
wire [1-1:0] myaxi_aruser;
wire [2-1:0] myaxi_aruser;
wire myaxi_arvalid;
reg myaxi_arready;
reg [32-1:0] myaxi_rdata;
Expand All @@ -57,7 +57,7 @@
wire [4-1:0] memory_awcache;
wire [3-1:0] memory_awprot;
wire [4-1:0] memory_awqos;
wire [1-1:0] memory_awuser;
wire [2-1:0] memory_awuser;
wire memory_awvalid;
reg memory_awready;
wire [32-1:0] memory_wdata;
Expand All @@ -76,7 +76,7 @@
wire [4-1:0] memory_arcache;
wire [3-1:0] memory_arprot;
wire [4-1:0] memory_arqos;
wire [1-1:0] memory_aruser;
wire [2-1:0] memory_aruser;
wire memory_arvalid;
reg memory_arready;
reg [32-1:0] memory_rdata;
Expand Down Expand Up @@ -550,7 +550,7 @@
output [4-1:0] myaxi_awcache,
output [3-1:0] myaxi_awprot,
output [4-1:0] myaxi_awqos,
output [1-1:0] myaxi_awuser,
output [2-1:0] myaxi_awuser,
output reg myaxi_awvalid,
input myaxi_awready,
output reg [32-1:0] myaxi_wdata,
Expand All @@ -569,7 +569,7 @@
output [4-1:0] myaxi_arcache,
output [3-1:0] myaxi_arprot,
output [4-1:0] myaxi_arqos,
output [1-1:0] myaxi_aruser,
output [2-1:0] myaxi_aruser,
output reg myaxi_arvalid,
input myaxi_arready,
input [32-1:0] myaxi_rdata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
wire [4-1:0] uut_maxi_awcache;
wire [3-1:0] uut_maxi_awprot;
wire [4-1:0] uut_maxi_awqos;
wire [1-1:0] uut_maxi_awuser;
wire [2-1:0] uut_maxi_awuser;
wire uut_maxi_awvalid;
reg uut_maxi_awready;
wire [32-1:0] uut_maxi_wdata;
Expand All @@ -36,7 +36,7 @@
wire [4-1:0] uut_maxi_arcache;
wire [3-1:0] uut_maxi_arprot;
wire [4-1:0] uut_maxi_arqos;
wire [1-1:0] uut_maxi_aruser;
wire [2-1:0] uut_maxi_aruser;
wire uut_maxi_arvalid;
reg uut_maxi_arready;
reg [32-1:0] uut_maxi_rdata;
Expand Down Expand Up @@ -138,7 +138,7 @@
wire [4-1:0] memory_awcache;
wire [3-1:0] memory_awprot;
wire [4-1:0] memory_awqos;
wire [1-1:0] memory_awuser;
wire [2-1:0] memory_awuser;
wire memory_awvalid;
reg memory_awready;
wire [32-1:0] memory_wdata;
Expand All @@ -157,7 +157,7 @@
wire [4-1:0] memory_arcache;
wire [3-1:0] memory_arprot;
wire [4-1:0] memory_arqos;
wire [1-1:0] memory_aruser;
wire [2-1:0] memory_aruser;
wire memory_arvalid;
reg memory_arready;
reg [32-1:0] memory_rdata;
Expand Down Expand Up @@ -1127,7 +1127,7 @@
output [4-1:0] maxi_awcache,
output [3-1:0] maxi_awprot,
output [4-1:0] maxi_awqos,
output [1-1:0] maxi_awuser,
output [2-1:0] maxi_awuser,
output reg maxi_awvalid,
input maxi_awready,
output reg [32-1:0] maxi_wdata,
Expand All @@ -1146,7 +1146,7 @@
output [4-1:0] maxi_arcache,
output [3-1:0] maxi_arprot,
output [4-1:0] maxi_arqos,
output [1-1:0] maxi_aruser,
output [2-1:0] maxi_aruser,
output reg maxi_arvalid,
input maxi_arready,
input [32-1:0] maxi_rdata,
Expand Down
12 changes: 6 additions & 6 deletions examples/thread_memcpy_ipxact/test_thread_memcpy_ipxact.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
wire [4-1:0] uut_maxi_awcache;
wire [3-1:0] uut_maxi_awprot;
wire [4-1:0] uut_maxi_awqos;
wire [1-1:0] uut_maxi_awuser;
wire [2-1:0] uut_maxi_awuser;
wire uut_maxi_awvalid;
reg uut_maxi_awready;
wire [32-1:0] uut_maxi_wdata;
Expand All @@ -35,7 +35,7 @@
wire [4-1:0] uut_maxi_arcache;
wire [3-1:0] uut_maxi_arprot;
wire [4-1:0] uut_maxi_arqos;
wire [1-1:0] uut_maxi_aruser;
wire [2-1:0] uut_maxi_aruser;
wire uut_maxi_arvalid;
reg uut_maxi_arready;
reg [32-1:0] uut_maxi_rdata;
Expand Down Expand Up @@ -136,7 +136,7 @@
wire [4-1:0] memory_awcache;
wire [3-1:0] memory_awprot;
wire [4-1:0] memory_awqos;
wire [1-1:0] memory_awuser;
wire [2-1:0] memory_awuser;
wire memory_awvalid;
reg memory_awready;
wire [32-1:0] memory_wdata;
Expand All @@ -155,7 +155,7 @@
wire [4-1:0] memory_arcache;
wire [3-1:0] memory_arprot;
wire [4-1:0] memory_arqos;
wire [1-1:0] memory_aruser;
wire [2-1:0] memory_aruser;
wire memory_arvalid;
reg memory_arready;
reg [32-1:0] memory_rdata;
Expand Down Expand Up @@ -1124,7 +1124,7 @@
output [4-1:0] maxi_awcache,
output [3-1:0] maxi_awprot,
output [4-1:0] maxi_awqos,
output [1-1:0] maxi_awuser,
output [2-1:0] maxi_awuser,
output reg maxi_awvalid,
input maxi_awready,
output reg [32-1:0] maxi_wdata,
Expand All @@ -1143,7 +1143,7 @@
output [4-1:0] maxi_arcache,
output [3-1:0] maxi_arprot,
output [4-1:0] maxi_arqos,
output [1-1:0] maxi_aruser,
output [2-1:0] maxi_aruser,
output reg maxi_arvalid,
input maxi_arready,
input [32-1:0] maxi_rdata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
wire [4-1:0] uut_maxi_awcache;
wire [3-1:0] uut_maxi_awprot;
wire [4-1:0] uut_maxi_awqos;
wire [1-1:0] uut_maxi_awuser;
wire [2-1:0] uut_maxi_awuser;
wire uut_maxi_awvalid;
reg uut_maxi_awready;
wire [32-1:0] uut_maxi_wdata;
Expand All @@ -36,7 +36,7 @@
wire [4-1:0] uut_maxi_arcache;
wire [3-1:0] uut_maxi_arprot;
wire [4-1:0] uut_maxi_arqos;
wire [1-1:0] uut_maxi_aruser;
wire [2-1:0] uut_maxi_aruser;
wire uut_maxi_arvalid;
reg uut_maxi_arready;
reg [32-1:0] uut_maxi_rdata;
Expand Down Expand Up @@ -138,7 +138,7 @@
wire [4-1:0] memory_awcache;
wire [3-1:0] memory_awprot;
wire [4-1:0] memory_awqos;
wire [1-1:0] memory_awuser;
wire [2-1:0] memory_awuser;
wire memory_awvalid;
reg memory_awready;
wire [32-1:0] memory_wdata;
Expand All @@ -157,7 +157,7 @@
wire [4-1:0] memory_arcache;
wire [3-1:0] memory_arprot;
wire [4-1:0] memory_arqos;
wire [1-1:0] memory_aruser;
wire [2-1:0] memory_aruser;
wire memory_arvalid;
reg memory_arready;
reg [32-1:0] memory_rdata;
Expand Down Expand Up @@ -1127,7 +1127,7 @@
output [4-1:0] maxi_awcache,
output [3-1:0] maxi_awprot,
output [4-1:0] maxi_awqos,
output [1-1:0] maxi_awuser,
output [2-1:0] maxi_awuser,
output reg maxi_awvalid,
input maxi_awready,
output reg [32-1:0] maxi_wdata,
Expand All @@ -1146,7 +1146,7 @@
output [4-1:0] maxi_arcache,
output [3-1:0] maxi_arprot,
output [4-1:0] maxi_arqos,
output [1-1:0] maxi_aruser,
output [2-1:0] maxi_aruser,
output reg maxi_arvalid,
input maxi_arready,
input [32-1:0] maxi_rdata,
Expand Down
12 changes: 9 additions & 3 deletions tests/extension/stream_/cast/test_stream_cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,19 @@
output signed [32-1:0] zdata
);
wire signed [32-1:0] _cast_src_2;
assign _cast_src_2 = xdata;
wire signed [64-1:0] _cast_data_2;
assign _cast_data_2 = xdata << 8;
assign _cast_data_2 = _cast_src_2 << 8;
wire signed [32-1:0] _cast_src_3;
assign _cast_src_3 = ydata;
wire signed [64-1:0] _cast_data_3;
assign _cast_data_3 = ydata << 8;
assign _cast_data_3 = _cast_src_3 << 8;
reg signed [64-1:0] _plus_data_4;
wire signed [64-1:0] _cast_src_5;
assign _cast_src_5 = _plus_data_4;
wire signed [32-1:0] _cast_data_5;
assign _cast_data_5 = _plus_data_4 >>> 8;
assign _cast_data_5 = _cast_src_5 >>> 8;
assign zdata = _cast_data_5;
always @(posedge CLK) begin
Expand Down
4 changes: 2 additions & 2 deletions tests/extension/thread_/stream_cast/thread_stream_cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def mkLed():
strm = vthread.Stream(m, 'mystream', clk, rst)
a = strm.source('a')
b = strm.source('b')
a = strm.Cast(a, 64, 0)
b = strm.Cast(b, 64, 0)
a = strm.Cast(a, 64, 4)
b = strm.Cast(b, 64, 4)
c = a * b
c = strm.Cast(c, 32, 0)
strm.sink(c, 'c')
Expand Down
6 changes: 3 additions & 3 deletions tests/extension/thread_/stream_fixed/thread_stream_fixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def comp_stream(size, offset):
strm.set_source('a', ram_a, offset, size)
strm.set_source('b', ram_b, offset, size)
strm.set_sink('c', ram_c, offset, size)
const = vthread.fixed.FixedConst(3.5, point=point)
const = vthread.fixed.FixedConst(1, point=point)
strm.set_constant('const', const)
strm.run()
strm.join()
Expand All @@ -48,10 +48,10 @@ def comp_sequential(size, offset):
for i in range(size):
a = ram_a.read(i + offset)
b = ram_b.read(i + offset)
const = vthread.fixed.FixedConst(3.5, point=point)
const = vthread.fixed.FixedConst(1, point=point)
c = a * b + const
ram_c.write(i + offset, c)
print('a = %f, b = %f, const = %f, c = %f' % (a, b, const, c))
print('a = %10g, b = %10g, const = %10g, c = %10g' % (a, b, const, c))

def check(size, offset_stream, offset_seq):
all_ok = True
Expand Down
29 changes: 29 additions & 0 deletions tests/extension/thread_/stream_fixed_different_point/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
TARGET=$(shell ls *.py | grep -v test | grep -v parsetab.py)
ARGS=

PYTHON=python3
#PYTHON=python
#OPT=-m pdb
#OPT=-m cProfile -s time
#OPT=-m cProfile -o profile.rslt

.PHONY: all
all: test

.PHONY: run
run:
$(PYTHON) $(OPT) $(TARGET) $(ARGS)

.PHONY: test
test:
$(PYTHON) -m pytest -vv

.PHONY: check
check:
$(PYTHON) $(OPT) $(TARGET) $(ARGS) > tmp.v
iverilog -tnull -Wall tmp.v
rm -f tmp.v

.PHONY: clean
clean:
rm -rf *.pyc __pycache__ parsetab.py .cache *.out *.png *.dot tmp.v uut.vcd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from __future__ import absolute_import
from __future__ import print_function

import os
import veriloggen
import thread_stream_fixed_different_point


def test(request):
veriloggen.reset()

simtype = request.config.getoption('--sim')

rslt = thread_stream_fixed_different_point.run(filename=None, simtype=simtype,
outputfile=os.path.splitext(os.path.basename(__file__))[0] + '.out')

verify_rslt = rslt.splitlines()[-1]
assert(verify_rslt == '# verify: PASSED')
Loading

0 comments on commit 0f79d5e

Please sign in to comment.