3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

Merge pull request #2005 from YosysHQ/claire/fix1990

Add "nowrshmsk" attribute, fix shift-and-mask bit slice write for signed offset
This commit is contained in:
Claire Wolf 2020-05-07 18:11:48 +02:00 committed by GitHub
commit 0610424940
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 142 additions and 19 deletions

View file

@ -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