This repository has been archived by the owner on Dec 29, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
64 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
./ivltests/indef_width_concat.v:4: error: Concatenation operand "pval" has indefinite width. | ||
./ivltests/indef_width_concat.v:4: error: Concatenation operand "'sd2" has indefinite width. | ||
./ivltests/indef_width_concat.v:4: error: Concatenation may not have zero width in this context. | ||
./ivltests/indef_width_concat.v:4: error: Concatenation/replication may not have zero width in this context. | ||
3 error(s) during elaboration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module test; | ||
parameter width = 32; | ||
localparam fill = 32 - width; | ||
localparam extend = 0; | ||
|
||
reg passed; | ||
reg [width-1:0] in; | ||
reg [31:0] lat1, lat2; | ||
wire sign_bit = in[width-1]; | ||
wire lsb = in[0]; | ||
|
||
initial begin | ||
passed = 1'b1; | ||
in = 32'h80000001; | ||
// The following are asserting(). | ||
lat1 <= {{fill{sign_bit}}, in, {extend{lsb}}}; | ||
lat2 = {{fill{sign_bit}}, in, {extend{lsb}}}; | ||
#1; | ||
if (lat1 !== 32'h80000001) begin | ||
$display("FAILED: zero-replication (NB): got %h", lat1); | ||
passed = 1'b0; | ||
end | ||
if (lat2 !== 32'h80000001) begin | ||
$display("FAILED: zero-replication (B): got %h", lat2); | ||
passed = 1'b0; | ||
end | ||
|
||
if (passed) $display("PASSED"); | ||
end | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module test; | ||
reg [31:0] lat; | ||
wire sign_bit = 1'b1; | ||
|
||
initial begin | ||
// This should be reported as a syntax error (replicating a zero width). | ||
lat = {{2{{0{sign_bit}}}}, 16'h0001}; | ||
|
||
$display("FAILED"); | ||
end | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters