Add regression tests for UDP names shadowing type identifiers
Check that UDP primitive and port names can shadow visible type identifiers. Cover old-style UDP declarations, including input and output declarations and the initial target, as well as ANSI-style UDP port declarations. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
56c42dcf37
commit
2b67d9f754
|
|
@ -0,0 +1,25 @@
|
|||
// Check that ANSI-style UDP names can shadow visible type identifiers.
|
||||
|
||||
package p;
|
||||
typedef int ANSI_UDP;
|
||||
typedef int Y;
|
||||
typedef int I0;
|
||||
typedef int I1;
|
||||
endpackage
|
||||
|
||||
import p::*;
|
||||
|
||||
primitive ANSI_UDP (output Y, input I0, input I1);
|
||||
table
|
||||
00 : 0;
|
||||
01 : 0;
|
||||
10 : 0;
|
||||
11 : 1;
|
||||
endtable
|
||||
endprimitive
|
||||
|
||||
module test;
|
||||
initial begin
|
||||
$display("PASSED");
|
||||
end
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// Check that old-style UDP names can shadow visible type identifiers.
|
||||
|
||||
package p;
|
||||
typedef int OLD_UDP;
|
||||
typedef int Q;
|
||||
typedef int A;
|
||||
typedef int B;
|
||||
endpackage
|
||||
|
||||
import p::*;
|
||||
|
||||
primitive OLD_UDP (Q, A, B);
|
||||
output reg Q;
|
||||
input A, B;
|
||||
initial Q = 0;
|
||||
|
||||
table
|
||||
00 : ? : 0;
|
||||
01 : ? : 0;
|
||||
10 : ? : 0;
|
||||
11 : ? : 1;
|
||||
endtable
|
||||
endprimitive
|
||||
|
||||
module test;
|
||||
initial begin
|
||||
$display("PASSED");
|
||||
end
|
||||
endmodule
|
||||
|
|
@ -403,6 +403,8 @@ sv_type_identifier_port_name vvp_tests/sv_type_identifier_port_name.json
|
|||
sv_type_identifier_specparam_name vvp_tests/sv_type_identifier_specparam_name.json
|
||||
sv_type_identifier_task_function_argument_name vvp_tests/sv_type_identifier_task_function_argument_name.json
|
||||
sv_type_identifier_task_name vvp_tests/sv_type_identifier_task_name.json
|
||||
sv_type_identifier_udp_ansi_name vvp_tests/sv_type_identifier_udp_ansi_name.json
|
||||
sv_type_identifier_udp_name vvp_tests/sv_type_identifier_udp_name.json
|
||||
sv_type_identifier_variable_name vvp_tests/sv_type_identifier_variable_name.json
|
||||
sv_type_param_restrict_class1 vvp_tests/sv_type_param_restrict_class1.json
|
||||
sv_type_param_restrict_class2 vvp_tests/sv_type_param_restrict_class2.json
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"type" : "normal",
|
||||
"source" : "sv_type_identifier_udp_ansi_name.v",
|
||||
"iverilog-args" : [ "-g2005-sv" ]
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"type" : "normal",
|
||||
"source" : "sv_type_identifier_udp_name.v",
|
||||
"iverilog-args" : [ "-g2005-sv" ]
|
||||
}
|
||||
Loading…
Reference in New Issue