diff --git a/ivtest/ivltests/sv_named_arg_base1.v b/ivtest/ivltests/sv_named_arg_base1.v new file mode 100644 index 000000000..b6448fd08 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base1.v @@ -0,0 +1,25 @@ +// Check that binding task arguments by name is supported. + +module test; + + class B; + integer val; + + function new(integer a, integer b); + val = a + b * 10; + endfunction + endclass + + class C extends B(.b(2), .a(1)); + endclass + + initial begin + C c; + c = new; + if (c.val == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_base2.v b/ivtest/ivltests/sv_named_arg_base2.v new file mode 100644 index 000000000..42a379d8d --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base2.v @@ -0,0 +1,26 @@ +// Check that binding task arguments by name is supported and that a mix of +// positional and named arguments is supported. + +module test; + + class B; + integer val; + + function new(integer a, integer b, integer c); + val = a + b * 10 + c * 100; + endfunction + endclass + + class C extends B(1, .c(3), .b(2)); + endclass + + initial begin + C c; + c = new; + if (c.val == 321) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_base3.v b/ivtest/ivltests/sv_named_arg_base3.v new file mode 100644 index 000000000..e1954044c --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base3.v @@ -0,0 +1,27 @@ +// Check that binding task arguments by name is supported and that an empty +// value can be bound to the name, in which case the default argument value +// should be used. + +module test; + + class B; + integer val; + + function new(integer a, integer b = 2); + val = a + b * 10; + endfunction + endclass + + class C extends B(.a(1), .b()); + endclass + + initial begin + C c; + c = new; + if (c.val == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_base_fail1.v b/ivtest/ivltests/sv_named_arg_base_fail1.v new file mode 100644 index 000000000..378e0c067 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base_fail1.v @@ -0,0 +1,21 @@ +// Check that an error is reported when trying to bind an argument by nae that +// does not exist + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B(.b(2), .c(1)); // This should fail. `c` is not an arugment + // of the base constructor. + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_base_fail2.v b/ivtest/ivltests/sv_named_arg_base_fail2.v new file mode 100644 index 000000000..90180ab19 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base_fail2.v @@ -0,0 +1,21 @@ +// Check that an error is reported when trying to bind the same argument by name +// multiple times. + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B(.a(1), .a(2)); // This should fail. `a` is provided twice + // as a named argument. + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_base_fail3.v b/ivtest/ivltests/sv_named_arg_base_fail3.v new file mode 100644 index 000000000..10728a5fd --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base_fail3.v @@ -0,0 +1,21 @@ +// Check that an error is reported when trying to bind an argument by name that +// is also provided as a positional argument. + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B(1, .a(2)); // This should fail. `a` is provided both as a + // positional and named argument. + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_base_fail4.v b/ivtest/ivltests/sv_named_arg_base_fail4.v new file mode 100644 index 000000000..921fbd198 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base_fail4.v @@ -0,0 +1,21 @@ +// Check that an error is reported trying to provide a positional argument to a +// function after a named argument. + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B(.a(2), 1); // This should fail. Positional arguments must + // precede named arguments. + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_base_fail5.v b/ivtest/ivltests/sv_named_arg_base_fail5.v new file mode 100644 index 000000000..406143563 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_base_fail5.v @@ -0,0 +1,20 @@ +// Check that an error is reported when binding an empty value to an argument by +// name and the argument does not have a default value. + +module test; + + class B; + function new(integer a); + $display("FAILED"); + endfunction + endclass + + class C extends B(.a()); // This should fail. `a` has no default value. + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained1.v b/ivtest/ivltests/sv_named_arg_chained1.v new file mode 100644 index 000000000..d28a70969 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained1.v @@ -0,0 +1,28 @@ +// Check that binding task arguments by name is supported. + +module test; + + class B; + integer val; + + function new(integer a, integer b); + val = a + b * 10; + endfunction + endclass + + class C extends B; + function new; + super.new(.b(2), .a(1)); + endfunction + endclass + + initial begin + C c; + c = new; + if (c.val == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained2.v b/ivtest/ivltests/sv_named_arg_chained2.v new file mode 100644 index 000000000..2816a817d --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained2.v @@ -0,0 +1,29 @@ +// Check that binding task arguments by name is supported and that a mix of +// positional and named arguments is supported. + +module test; + + class B; + integer val; + + function new(integer a, integer b, integer c); + val = a + b * 10 + c * 100; + endfunction + endclass + + class C extends B; + function new; + super.new(1, .c(3), .b(2)); + endfunction + endclass + + initial begin + C c; + c = new; + if (c.val == 321) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained3.v b/ivtest/ivltests/sv_named_arg_chained3.v new file mode 100644 index 000000000..8af5a15c9 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained3.v @@ -0,0 +1,30 @@ +// Check that binding task arguments by name is supported and that an empty +// value can be bound to the name, in which case the default argument value +// should be used. + +module test; + + class B; + integer val; + + function new(integer a, integer b = 2); + val = a + b * 10; + endfunction + endclass + + class C extends B; + function new; + super.new(.a(1), .b()); + endfunction + endclass + + initial begin + C c; + c = new; + if (c.val == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained_fail1.v b/ivtest/ivltests/sv_named_arg_chained_fail1.v new file mode 100644 index 000000000..915664f60 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained_fail1.v @@ -0,0 +1,24 @@ +// Check that an error is reported when trying to bind an argument by nae that +// does not exist + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B; + function new; + super.new(.b(2), .c(1)); // This should fail. `c` is not an arugment of + // the base constructor. + endfunction + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained_fail2.v b/ivtest/ivltests/sv_named_arg_chained_fail2.v new file mode 100644 index 000000000..7002e7595 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained_fail2.v @@ -0,0 +1,24 @@ +// Check that an error is reported when trying to bind the same argument by name +// multiple times. + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B; + function new; + super.new(.a(1), .a(2)); // This should fail. `a` is provided twice as a + // named argument. + endfunction + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained_fail3.v b/ivtest/ivltests/sv_named_arg_chained_fail3.v new file mode 100644 index 000000000..7affb0f9f --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained_fail3.v @@ -0,0 +1,24 @@ +// Check that an error is reported when trying to bind an argument by name that +// is also provided as a positional argument. + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B; + function new; + super.new(1, .a(2)); // This should fail. `a` is provided both as a + // positional and named argument. + endfunction + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained_fail4.v b/ivtest/ivltests/sv_named_arg_chained_fail4.v new file mode 100644 index 000000000..4647ed6f8 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained_fail4.v @@ -0,0 +1,24 @@ +// Check that an error is reported trying to provide a positional argument to a +// function after a named argument. + +module test; + + class B; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + class C extends B; + function new; + super.new(.a(2), 1); // This should fail. Positional arguments must + // precede named arguments. + endfunction + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_chained_fail5.v b/ivtest/ivltests/sv_named_arg_chained_fail5.v new file mode 100644 index 000000000..abf44565e --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_chained_fail5.v @@ -0,0 +1,23 @@ +// Check that an error is reported when binding an empty value to an argument by +// name and the argument does not have a default value. + +module test; + + class B; + function new(integer a); + $display("FAILED"); + endfunction + endclass + + class C extends B; + function new; + super.new(.a()); // This should fail. `a` has no default value. + endfunction + endclass + + initial begin + C c; + c = new; + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func1.v b/ivtest/ivltests/sv_named_arg_func1.v new file mode 100644 index 000000000..c38b26adb --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func1.v @@ -0,0 +1,19 @@ +// Check that binding task arguments by name is supported. + +module test; + + function integer f(integer a, integer b); + return a + b * 10; + endfunction + + initial begin + integer x; + x = f(.b(2), .a(1)); + if (x == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func2.v b/ivtest/ivltests/sv_named_arg_func2.v new file mode 100644 index 000000000..49e211d79 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func2.v @@ -0,0 +1,20 @@ +// Check that binding task arguments by name is supported and that a mix of +// positional and named arguments is supported. + +module test; + + function integer f(integer a, integer b, integer c); + return a + b * 10 + c * 100; + endfunction + + initial begin + integer x; + x = f(1, .c(3), .b(2)); + if (x == 321) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func3.v b/ivtest/ivltests/sv_named_arg_func3.v new file mode 100644 index 000000000..9592f694e --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func3.v @@ -0,0 +1,21 @@ +// Check that binding task arguments by name is supported and that an empty +// value can be bound to the name, in which case the default argument value +// should be used. + +module test; + + function integer f(integer a, integer b = 2); + return a + b * 10; + endfunction + + initial begin + integer x; + x = f(.a(1), .b()); + if (x == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func_fail1.v b/ivtest/ivltests/sv_named_arg_func_fail1.v new file mode 100644 index 000000000..21d3b0494 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func_fail1.v @@ -0,0 +1,15 @@ +// Check that an error is reported when trying to bind an argument by nae that +// does not exist + +module test; + + function f(integer a, integer b); + $display("FAILED"); + endfunction + + initial begin + integer x; + x = f(.b(2), .c(1)); // This should fail. `c` is not an arugment of `f`. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func_fail2.v b/ivtest/ivltests/sv_named_arg_func_fail2.v new file mode 100644 index 000000000..662f37a14 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func_fail2.v @@ -0,0 +1,16 @@ +// Check that an error is reported when trying to bind the same argument by name +// multiple times. + +module test; + + function f(integer a, integer b); + $display("FAILED"); + endfunction + + initial begin + integer x; + x = f(.a(1), .a(2)); // This should fail. `a` is provided twice as a named + // argument. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func_fail3.v b/ivtest/ivltests/sv_named_arg_func_fail3.v new file mode 100644 index 000000000..6c8cbb1e7 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func_fail3.v @@ -0,0 +1,16 @@ +// Check that an error is reported when trying to bind an argument by name that +// is also provided as a positional argument. + +module test; + + function f(integer a, integer b); + $display("FAILED"); + endfunction + + initial begin + integer x; + x = f(1, .a(2)); // This should fail. `a` is provided both as a positional + // and named argument. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func_fail4.v b/ivtest/ivltests/sv_named_arg_func_fail4.v new file mode 100644 index 000000000..e8f8ca070 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func_fail4.v @@ -0,0 +1,16 @@ +// Check that an error is reported trying to provide a positional argument to a +// function after a named argument. + +module test; + + function f(integer a, integer b); + $display("FAILED"); + endfunction + + initial begin + integer x; + x = f(.a(2), 1); // This should fail. Positional arguments must precede + // named arguments. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_func_fail5.v b/ivtest/ivltests/sv_named_arg_func_fail5.v new file mode 100644 index 000000000..ad503d56e --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_func_fail5.v @@ -0,0 +1,15 @@ +// Check that an error is reported when binding an empty value to an argument by +// name and the argument does not have a default value. + +module test; + + function f(integer a); + $display("FAILED"); + endfunction + + initial begin + integer x; + x = f(.a()); // This should fail. `a` has no default value. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new1.v b/ivtest/ivltests/sv_named_arg_new1.v new file mode 100644 index 000000000..c316add56 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new1.v @@ -0,0 +1,22 @@ +// Check that binding task arguments by name is supported. + +module test; + + class C; + integer val; + + function new(integer a, integer b); + val = a + b * 10; + endfunction + endclass + + initial begin + C c; + c = new(.b(2), .a(1)); + if (c.val == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new2.v b/ivtest/ivltests/sv_named_arg_new2.v new file mode 100644 index 000000000..64c1fd8f8 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new2.v @@ -0,0 +1,23 @@ +// Check that binding task arguments by name is supported and that a mix of +// positional and named arguments is supported. + +module test; + + class C; + integer val; + + function new(integer a, integer b, integer c); + val = a + b * 10 + c * 100; + endfunction + endclass + + initial begin + C c; + c = new(1, .c(3), .b(2)); + if (c.val == 321) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new3.v b/ivtest/ivltests/sv_named_arg_new3.v new file mode 100644 index 000000000..80d09bdb0 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new3.v @@ -0,0 +1,24 @@ +// Check that binding task arguments by name is supported and that an empty +// value can be bound to the name, in which case the default argument value +// should be used. + +module test; + + class C; + integer val; + + function new(integer a, integer b = 2); + val = a + b * 10; + endfunction + endclass + + initial begin + C c; + c = new(.a(1), .b()); + if (c.val == 21) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + end +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new_fail1.v b/ivtest/ivltests/sv_named_arg_new_fail1.v new file mode 100644 index 000000000..e9d9403ce --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new_fail1.v @@ -0,0 +1,18 @@ +// Check that an error is reported when trying to bind an argument by nae that +// does not exist + +module test; + + class C; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + initial begin + C c; + c = new(.b(2), .c(1)); // This should fail. `c` is not an arugment of the + // constructor. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new_fail2.v b/ivtest/ivltests/sv_named_arg_new_fail2.v new file mode 100644 index 000000000..8b4e3468b --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new_fail2.v @@ -0,0 +1,18 @@ +// Check that an error is reported when trying to bind the same argument by name +// multiple times. + +module test; + + class C; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + initial begin + C c; + c = new(.a(1), .a(2)); // This should fail. `a` is provided twice as a named + // argument. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new_fail3.v b/ivtest/ivltests/sv_named_arg_new_fail3.v new file mode 100644 index 000000000..de94c4ff0 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new_fail3.v @@ -0,0 +1,18 @@ +// Check that an error is reported when trying to bind an argument by name that +// is also provided as a positional argument. + +module test; + + class C; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + initial begin + C c; + c = new(1, .a(2)); // This should fail. `a` is provided both as a positional + // and named argument. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new_fail4.v b/ivtest/ivltests/sv_named_arg_new_fail4.v new file mode 100644 index 000000000..4803cb5c4 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new_fail4.v @@ -0,0 +1,18 @@ +// Check that an error is reported trying to provide a positional argument to a +// function after a named argument. + +module test; + + class C; + function new(integer a, integer b); + $display("FAILED"); + endfunction + endclass + + initial begin + C c; + c = new(.a(2), 1); // This should fail. Positional arguments must precede + // named arguments. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_new_fail5.v b/ivtest/ivltests/sv_named_arg_new_fail5.v new file mode 100644 index 000000000..fc5bfcdfd --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_new_fail5.v @@ -0,0 +1,17 @@ +// Check that an error is reported when binding an empty value to an argument by +// name and the argument does not have a default value. + +module test; + + class C; + function new(integer a); + $display("FAILED"); + endfunction + endclass + + initial begin + C c; + c = new(.a()); // This should fail. `a` has no default value. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task1.v b/ivtest/ivltests/sv_named_arg_task1.v new file mode 100644 index 000000000..525c334b3 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task1.v @@ -0,0 +1,17 @@ +// Check that binding task arguments by name is supported. + +module test; + + task t(integer a, integer b); + if (a == 1 && b == 2) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + endtask + + initial begin + t(.b(2), .a(1)); + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task2.v b/ivtest/ivltests/sv_named_arg_task2.v new file mode 100644 index 000000000..b0c47d95e --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task2.v @@ -0,0 +1,18 @@ +// Check that binding task arguments by name is supported and that a mix of +// positional and named arguments is supported. + +module test; + + task t(integer a, integer b, integer c); + if (a == 1 && b == 2 && c == 3) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + endtask + + initial begin + t(1, .c(3), .b(2)); + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task3.v b/ivtest/ivltests/sv_named_arg_task3.v new file mode 100644 index 000000000..1018b7e2e --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task3.v @@ -0,0 +1,19 @@ +// Check that binding task arguments by name is supported and that an empty +// value can be bound to the name, in which case the default argument value +// should be used. + +module test; + + task t(integer a, integer b = 2); + if (a == 1 && b == 2) begin + $display("PASSED"); + end else begin + $display("FAILED"); + end + endtask + + initial begin + t(.a(1), .b()); + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task_fail1.v b/ivtest/ivltests/sv_named_arg_task_fail1.v new file mode 100644 index 000000000..2ede7b366 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task_fail1.v @@ -0,0 +1,14 @@ +// Check that an error is reported when trying to bind an argument by nae that +// does not exist + +module test; + + task t(integer a, integer b); + $display("FAILED"); + endtask + + initial begin + t(.b(2), .c(1)); + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task_fail2.v b/ivtest/ivltests/sv_named_arg_task_fail2.v new file mode 100644 index 000000000..1c3cbcca7 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task_fail2.v @@ -0,0 +1,14 @@ +// Check that an error is reported when trying to bind the same argument by name +// multiple times. + +module test; + + task t(integer a, integer b); + $display("FAILED"); + endtask + + initial begin + t(.a(1), .a(2)); + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task_fail3.v b/ivtest/ivltests/sv_named_arg_task_fail3.v new file mode 100644 index 000000000..dccb9c2ed --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task_fail3.v @@ -0,0 +1,14 @@ +// Check that an error is reported when trying to bind an argument by name that +// is also provided as a positional argument. + +module test; + + task t(integer a, integer b); + $display("FAILED"); + endtask + + initial begin + t(1, .a(2)); + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task_fail4.v b/ivtest/ivltests/sv_named_arg_task_fail4.v new file mode 100644 index 000000000..0e4aa101e --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task_fail4.v @@ -0,0 +1,15 @@ +// Check that an error is reported trying to provide a positional argument to a +// task after a named argument. + +module test; + + task t(integer a, integer b); + $display("FAILED"); + endtask + + initial begin + t(.a(2), 1); // This should fail. Positional arguments must precede + // named arguments. + end + +endmodule diff --git a/ivtest/ivltests/sv_named_arg_task_fail5.v b/ivtest/ivltests/sv_named_arg_task_fail5.v new file mode 100644 index 000000000..f549e1ed3 --- /dev/null +++ b/ivtest/ivltests/sv_named_arg_task_fail5.v @@ -0,0 +1,14 @@ +// Check that an error is reported when binding an empty value to an argument by +// name and the argument does not have a default value. + +module test; + + task t(integer a); + $display("FAILED"); + endtask + + initial begin + t(.a()); // This should fail. `a` has no default value. + end + +endmodule diff --git a/ivtest/vvp_tests/sv_named_arg_base1.json b/ivtest/vvp_tests/sv_named_arg_base1.json new file mode 100644 index 000000000..ef23d9462 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base1.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_base1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_base2.json b/ivtest/vvp_tests/sv_named_arg_base2.json new file mode 100644 index 000000000..3707d8096 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base2.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_base2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_base3.json b/ivtest/vvp_tests/sv_named_arg_base3.json new file mode 100644 index 000000000..34edbb3c8 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base3.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_base3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_base_fail1.json b/ivtest/vvp_tests/sv_named_arg_base_fail1.json new file mode 100644 index 000000000..c117c291e --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base_fail1.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_base_fail1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_base_fail2.json b/ivtest/vvp_tests/sv_named_arg_base_fail2.json new file mode 100644 index 000000000..e0e2ab1c7 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base_fail2.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_base_fail2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_base_fail3.json b/ivtest/vvp_tests/sv_named_arg_base_fail3.json new file mode 100644 index 000000000..ed2dc83cc --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base_fail3.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_base_fail3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_base_fail4.json b/ivtest/vvp_tests/sv_named_arg_base_fail4.json new file mode 100644 index 000000000..203a02860 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base_fail4.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_base_fail4.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_base_fail5.json b/ivtest/vvp_tests/sv_named_arg_base_fail5.json new file mode 100644 index 000000000..04f7ce8a2 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_base_fail5.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_base_fail5.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained1.json b/ivtest/vvp_tests/sv_named_arg_chained1.json new file mode 100644 index 000000000..1187d39c6 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained1.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_chained1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained2.json b/ivtest/vvp_tests/sv_named_arg_chained2.json new file mode 100644 index 000000000..909ad3763 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained2.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_chained2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained3.json b/ivtest/vvp_tests/sv_named_arg_chained3.json new file mode 100644 index 000000000..b0270b485 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained3.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_chained3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained_fail1.json b/ivtest/vvp_tests/sv_named_arg_chained_fail1.json new file mode 100644 index 000000000..09ffa9ea7 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained_fail1.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_chained_fail1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained_fail2.json b/ivtest/vvp_tests/sv_named_arg_chained_fail2.json new file mode 100644 index 000000000..7fd51bd3b --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained_fail2.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_chained_fail2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained_fail3.json b/ivtest/vvp_tests/sv_named_arg_chained_fail3.json new file mode 100644 index 000000000..0a0d5ebbd --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained_fail3.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_chained_fail3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained_fail4.json b/ivtest/vvp_tests/sv_named_arg_chained_fail4.json new file mode 100644 index 000000000..7ae7f84c6 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained_fail4.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_chained_fail4.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_chained_fail5.json b/ivtest/vvp_tests/sv_named_arg_chained_fail5.json new file mode 100644 index 000000000..1dd296eec --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_chained_fail5.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_chained_fail5.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func1.json b/ivtest/vvp_tests/sv_named_arg_func1.json new file mode 100644 index 000000000..0fe90f86a --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func1.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_func1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func2.json b/ivtest/vvp_tests/sv_named_arg_func2.json new file mode 100644 index 000000000..4d7363514 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func2.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_func2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func3.json b/ivtest/vvp_tests/sv_named_arg_func3.json new file mode 100644 index 000000000..f8037c5ce --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func3.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_func3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func_fail1.json b/ivtest/vvp_tests/sv_named_arg_func_fail1.json new file mode 100644 index 000000000..70da8a2bc --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func_fail1.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_func_fail1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func_fail2.json b/ivtest/vvp_tests/sv_named_arg_func_fail2.json new file mode 100644 index 000000000..611797c72 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func_fail2.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_func_fail2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func_fail3.json b/ivtest/vvp_tests/sv_named_arg_func_fail3.json new file mode 100644 index 000000000..9f4e80a3b --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func_fail3.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_func_fail3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func_fail4.json b/ivtest/vvp_tests/sv_named_arg_func_fail4.json new file mode 100644 index 000000000..c052b6262 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func_fail4.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_func_fail4.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_func_fail5.json b/ivtest/vvp_tests/sv_named_arg_func_fail5.json new file mode 100644 index 000000000..2df8abb47 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_func_fail5.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_func_fail5.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new1.json b/ivtest/vvp_tests/sv_named_arg_new1.json new file mode 100644 index 000000000..6695b02a4 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new1.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_new1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new2.json b/ivtest/vvp_tests/sv_named_arg_new2.json new file mode 100644 index 000000000..6f4ec4d0b --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new2.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_new2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new3.json b/ivtest/vvp_tests/sv_named_arg_new3.json new file mode 100644 index 000000000..4c2009f8c --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new3.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_new3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new_fail1.json b/ivtest/vvp_tests/sv_named_arg_new_fail1.json new file mode 100644 index 000000000..efe60694e --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new_fail1.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_new_fail1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new_fail2.json b/ivtest/vvp_tests/sv_named_arg_new_fail2.json new file mode 100644 index 000000000..e5e1d890a --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new_fail2.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_new_fail2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new_fail3.json b/ivtest/vvp_tests/sv_named_arg_new_fail3.json new file mode 100644 index 000000000..a8cc1f8f0 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new_fail3.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_new_fail3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new_fail4.json b/ivtest/vvp_tests/sv_named_arg_new_fail4.json new file mode 100644 index 000000000..58128d0ae --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new_fail4.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_new_fail4.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_new_fail5.json b/ivtest/vvp_tests/sv_named_arg_new_fail5.json new file mode 100644 index 000000000..5339eee9a --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_new_fail5.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_new_fail5.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task1.json b/ivtest/vvp_tests/sv_named_arg_task1.json new file mode 100644 index 000000000..10c7cc90c --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task1.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_task1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task2.json b/ivtest/vvp_tests/sv_named_arg_task2.json new file mode 100644 index 000000000..5ba8429ff --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task2.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_task2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task3.json b/ivtest/vvp_tests/sv_named_arg_task3.json new file mode 100644 index 000000000..1ffe13fab --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task3.json @@ -0,0 +1,5 @@ +{ + "type" : "normal", + "source" : "sv_named_arg_task3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task_fail1.json b/ivtest/vvp_tests/sv_named_arg_task_fail1.json new file mode 100644 index 000000000..cbddc6ade --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task_fail1.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_task_fail1.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task_fail2.json b/ivtest/vvp_tests/sv_named_arg_task_fail2.json new file mode 100644 index 000000000..1b438073f --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task_fail2.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_task_fail2.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task_fail3.json b/ivtest/vvp_tests/sv_named_arg_task_fail3.json new file mode 100644 index 000000000..cdf212dd4 --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task_fail3.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_task_fail3.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task_fail4.json b/ivtest/vvp_tests/sv_named_arg_task_fail4.json new file mode 100644 index 000000000..cff8adbbe --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task_fail4.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_task_fail4.v", + "iverilog-args" : [ "-g2005-sv" ] +} diff --git a/ivtest/vvp_tests/sv_named_arg_task_fail5.json b/ivtest/vvp_tests/sv_named_arg_task_fail5.json new file mode 100644 index 000000000..663c7d86c --- /dev/null +++ b/ivtest/vvp_tests/sv_named_arg_task_fail5.json @@ -0,0 +1,5 @@ +{ + "type" : "CE", + "source" : "sv_named_arg_task_fail5.v", + "iverilog-args" : [ "-g2005-sv" ] +}