diff --git a/ivtest/ivltests/udp_ansi_initial_nonreg_fail.v b/ivtest/ivltests/udp_ansi_initial_nonreg_fail.v new file mode 100644 index 000000000..25ce9da6d --- /dev/null +++ b/ivtest/ivltests/udp_ansi_initial_nonreg_fail.v @@ -0,0 +1,8 @@ +// Check that an ANSI-style UDP output initializer requires a reg output. + +primitive udp_ansi_initial_nonreg_fail (output o = 1'b0, input i); + table + 0 : 0; + 1 : 1; + endtable +endprimitive diff --git a/ivtest/ivltests/udp_ansi_initial_reg.v b/ivtest/ivltests/udp_ansi_initial_reg.v new file mode 100644 index 000000000..cfbcdd6b1 --- /dev/null +++ b/ivtest/ivltests/udp_ansi_initial_reg.v @@ -0,0 +1,21 @@ +// Check that an ANSI-style UDP reg output can have an initializer. + +primitive udp_ansi_initial_reg (output reg o = 1'b0, input i); + table + 0 : ? : 0; + 1 : ? : 1; + endtable +endprimitive + +module test; + reg i; + wire o; + + udp_ansi_initial_reg i_udp(o, i); + + initial begin + i = 1'b0; + #1; + $display("PASSED"); + end +endmodule diff --git a/ivtest/ivltests/udp_initial_nonreg_fail.v b/ivtest/ivltests/udp_initial_nonreg_fail.v new file mode 100644 index 000000000..689b63e45 --- /dev/null +++ b/ivtest/ivltests/udp_initial_nonreg_fail.v @@ -0,0 +1,12 @@ +// Check that an old-style UDP initial statement requires a reg output. + +primitive udp_initial_nonreg_fail (o, i); + output o; + input i; + initial o = 1'b0; + + table + 0 : 0; + 1 : 1; + endtable +endprimitive diff --git a/ivtest/ivltests/udp_port_decl_conflict_fail.v b/ivtest/ivltests/udp_port_decl_conflict_fail.v new file mode 100644 index 000000000..00ebdfe55 --- /dev/null +++ b/ivtest/ivltests/udp_port_decl_conflict_fail.v @@ -0,0 +1,12 @@ +// Check that conflicting UDP port declarations generate an error. + +primitive udp_port_decl_conflict_fail (o, i); + output o; + input o; + input i; + + table + 0 : 0; + 1 : 1; + endtable +endprimitive diff --git a/ivtest/regress-vvp.list b/ivtest/regress-vvp.list index e81949a7b..85cfa1dda 100644 --- a/ivtest/regress-vvp.list +++ b/ivtest/regress-vvp.list @@ -430,7 +430,11 @@ test_va_math vvp_tests/test_va_math.json test_vams_math vvp_tests/test_vams_math.json timing_check_syntax vvp_tests/timing_check_syntax.json timing_check_delayed_signals vvp_tests/timing_check_delayed_signals.json +udp_ansi_initial_nonreg_fail vvp_tests/udp_ansi_initial_nonreg_fail.json +udp_ansi_initial_reg vvp_tests/udp_ansi_initial_reg.json udp_empty_table_fail vvp_tests/udp_empty_table_fail.json +udp_initial_nonreg_fail vvp_tests/udp_initial_nonreg_fail.json +udp_port_decl_conflict_fail vvp_tests/udp_port_decl_conflict_fail.json uwire_fail2 vvp_tests/uwire_fail2.json uwire_fail3 vvp_tests/uwire_fail3.json value_range1 vvp_tests/value_range1.json diff --git a/ivtest/vvp_tests/udp_ansi_initial_nonreg_fail.json b/ivtest/vvp_tests/udp_ansi_initial_nonreg_fail.json new file mode 100644 index 000000000..1a984c32f --- /dev/null +++ b/ivtest/vvp_tests/udp_ansi_initial_nonreg_fail.json @@ -0,0 +1,4 @@ +{ + "type" : "CE", + "source" : "udp_ansi_initial_nonreg_fail.v" +} diff --git a/ivtest/vvp_tests/udp_ansi_initial_reg.json b/ivtest/vvp_tests/udp_ansi_initial_reg.json new file mode 100644 index 000000000..5f72fea49 --- /dev/null +++ b/ivtest/vvp_tests/udp_ansi_initial_reg.json @@ -0,0 +1,4 @@ +{ + "type" : "normal", + "source" : "udp_ansi_initial_reg.v" +} diff --git a/ivtest/vvp_tests/udp_initial_nonreg_fail.json b/ivtest/vvp_tests/udp_initial_nonreg_fail.json new file mode 100644 index 000000000..735d978fd --- /dev/null +++ b/ivtest/vvp_tests/udp_initial_nonreg_fail.json @@ -0,0 +1,4 @@ +{ + "type" : "CE", + "source" : "udp_initial_nonreg_fail.v" +} diff --git a/ivtest/vvp_tests/udp_port_decl_conflict_fail.json b/ivtest/vvp_tests/udp_port_decl_conflict_fail.json new file mode 100644 index 000000000..56a5fdb42 --- /dev/null +++ b/ivtest/vvp_tests/udp_port_decl_conflict_fail.json @@ -0,0 +1,4 @@ +{ + "type" : "CE", + "source" : "udp_port_decl_conflict_fail.v" +}