diff options
| author | Claire Wolf <claire@symbioticeda.com> | 2020-04-29 14:28:54 +0200 | 
|---|---|---|
| committer | Claire Wolf <claire@symbioticeda.com> | 2020-05-02 11:21:01 +0200 | 
| commit | 749c2ff84a618cdb1d0c38fefde9445ece42e6fb (patch) | |
| tree | 99daf394749ead13cb631afa958b40f7df0cfaca /tests | |
| parent | 589ed2d97032829568e73a5858772e39088aeeeb (diff) | |
| download | yosys-749c2ff84a618cdb1d0c38fefde9445ece42e6fb.tar.gz yosys-749c2ff84a618cdb1d0c38fefde9445ece42e6fb.tar.bz2 yosys-749c2ff84a618cdb1d0c38fefde9445ece42e6fb.zip | |
Add tests based on the test case from #1990
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/simple/partsel.v | 46 | 
1 files changed, 46 insertions, 0 deletions
| diff --git a/tests/simple/partsel.v b/tests/simple/partsel.v index 83493fcb0..dd66ded55 100644 --- a/tests/simple/partsel.v +++ b/tests/simple/partsel.v @@ -64,3 +64,49 @@ endmodule  module partsel_test003(input [2:0] a, b, input [31:0] din, output [3:0] dout);  assign dout = din[a*b +: 2];  endmodule + +module partsel_test004 ( +	input [31:0] din, +	input signed [4:0] n, +	output reg [31:0] dout +); +	always @(*) begin +		dout = 0; +		dout[n+1 +: 2] = din[n +: 2]; +	end +endmodule + + +module partsel_test005 ( +	input [31:0] din, +	input signed [4:0] n, +	output reg [31:0] dout +); +	always @(*) begin +		dout = 0; +		dout[n+1] = din[n]; +	end +endmodule + +module partsel_test006 ( +	input [31:0] din, +	input signed [4:0] n, +	output reg [31:-32] dout +); +	always @(*) begin +		dout = 0; +		dout[n+1 +: 2] = din[n +: 2]; +	end +endmodule + + +module partsel_test007 ( +	input [31:0] din, +	input signed [4:0] n, +	output reg [31:-32] dout +); +	always @(*) begin +		dout = 0; +		dout[n+1] = din[n]; +	end +endmodule | 
