-
Notifications
You must be signed in to change notification settings - Fork 55
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
134 additions
and
39 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
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,6 @@ | ||
`define TEST_INNER(expr, size) \ | ||
initial $display(`"expr %0d %0d %0d`", \ | ||
$bits(expr), $bits(type(expr)), size); | ||
localparam type T = logic; | ||
localparam type U = logic [2:1]; | ||
`include "typename_deep.svh" |
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,14 @@ | ||
`define TEST(expr, size) \ | ||
`TEST_INNER(expr, size) \ | ||
`TEST_INNER(expr[2], size * 2) \ | ||
`TEST_INNER(expr[2][3], size * 6) \ | ||
`TEST_INNER(expr[3:7], size * 5) \ | ||
`TEST_INNER(expr[$bits(T)], size) \ | ||
`TEST_INNER(expr[$bits(U)], size * 2) \ | ||
`TEST_INNER(expr[$bits(T[$bits(U)])], size * 2) \ | ||
`TEST_INNER(expr[$bits(U[$bits(U)])], size * 4) | ||
|
||
module top; | ||
`TEST(T, 1) | ||
`TEST(U, 2) | ||
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,4 @@ | ||
`define TEST_INNER(expr, size) \ | ||
initial $display(`"expr %0d %0d %0d`", \ | ||
size, size, size); | ||
`include "typename_deep.svh" |
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,5 @@ | ||
// pattern: couldn't resolve typename "T" | ||
// location: typedef_missing.sv:4:5 | ||
module top; | ||
T x; | ||
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,6 @@ | ||
// pattern: expected typename, but found localparam identifier "L" | ||
// location: typedef_not_type_localparam.sv:5:5 | ||
module top; | ||
localparam L = 0; | ||
L x; | ||
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,6 @@ | ||
// pattern: expected typename, but found net identifier "w" | ||
// location: typedef_not_type_net.sv:5:5 | ||
module top; | ||
wire w; | ||
w x; | ||
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,6 @@ | ||
// pattern: expected typename, but found var identifier "v" | ||
// location: typedef_not_type_var.sv:5:5 | ||
module top; | ||
var v; | ||
v x; | ||
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,9 @@ | ||
// pattern: expected interface-based typename, but found net x.y | ||
// location: typedef_ref_not_type.sv:7:5 | ||
module top; | ||
if (1) begin : x | ||
wire y; | ||
end | ||
typedef x.y T; | ||
T x; | ||
endmodule |