aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorClaire Wolf <clifford@clifford.at>2020-05-07 18:11:48 +0200
committerGitHub <noreply@github.com>2020-05-07 18:11:48 +0200
commit06104249406972de01d0360df63a32cafcdf2ec5 (patch)
tree22b352c1ebf2289e7cc61561d233501762742580 /tests
parent3a985d82851e498ba768d46403c41c05e5897eb4 (diff)
parent885deb4e88e847e1314b8a67087f72c3809a6995 (diff)
downloadyosys-06104249406972de01d0360df63a32cafcdf2ec5.tar.gz
yosys-06104249406972de01d0360df63a32cafcdf2ec5.tar.bz2
yosys-06104249406972de01d0360df63a32cafcdf2ec5.zip
Merge pull request #2005 from YosysHQ/claire/fix1990
Add "nowrshmsk" attribute, fix shift-and-mask bit slice write for signed offset
Diffstat (limited to 'tests')
-rw-r--r--tests/simple/partsel.v46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/simple/partsel.v b/tests/simple/partsel.v
index 83493fcb0..5e9730d6b 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:-32] 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:-32] din,
+ input signed [4:0] n,
+ output reg [31:-32] dout
+);
+ always @(*) begin
+ dout = 0;
+ dout[n+1] = din[n];
+ end
+endmodule