From ba194f3790a24c0fbc9e16fdb073d79673bcf708 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 8 Feb 2026 18:20:28 -0500 Subject: [PATCH] Tests: Avoid implied static variables, to avoid future warning --- test_regress/t/t_array_method_map.v | 4 +- test_regress/t/t_assigndly_deep_ref.v | 6 +-- test_regress/t/t_assigndly_deep_ref_array.v | 6 +-- test_regress/t/t_assoc_compare.v | 8 ++-- test_regress/t/t_assoc_enum.v | 2 +- test_regress/t/t_assoc_method_map.v | 4 +- test_regress/t/t_assoc_nokey_bad.out | 12 ++--- test_regress/t/t_assoc_nokey_bad.v | 16 +++---- test_regress/t/t_assoc_ref_type.v | 12 ++--- test_regress/t/t_assoc_wildcard_map.v | 4 +- test_regress/t/t_assoc_wildcard_method.v | 2 +- test_regress/t/t_case_call_count.v | 2 +- test_regress/t/t_case_inside_call_count.v | 2 +- test_regress/t/t_cast_stream.v | 6 +-- test_regress/t/t_class_assign_cond.v | 9 ++-- test_regress/t/t_class_class_extends.v | 2 +- test_regress/t/t_class_compare.v | 12 ++--- test_regress/t/t_class_const.v | 2 +- test_regress/t/t_class_dead_varscope_uaf.v | 2 +- test_regress/t/t_class_dict.v | 6 +-- test_regress/t/t_class_dyn_cast_empty_if.v | 6 +-- test_regress/t/t_class_extern.v | 4 +- test_regress/t/t_class_field_name.v | 2 +- test_regress/t/t_class_func_arg_unused.v | 2 +- test_regress/t/t_class_hier_construction.v | 8 ++-- test_regress/t/t_class_if_assign.v | 6 +-- test_regress/t/t_class_local_nested_bad.v | 2 +- test_regress/t/t_class_method_str_literal.v | 4 +- test_regress/t/t_class_method_struct.v | 4 +- test_regress/t/t_class_mispure_bad.v | 2 +- test_regress/t/t_class_misstatic_bad.v | 2 +- test_regress/t/t_class_nested.v | 16 +++---- test_regress/t/t_class_new.v | 2 +- test_regress/t/t_class_new_ref_bad.out | 6 +-- test_regress/t/t_class_new_ref_bad.v | 2 +- test_regress/t/t_class_new_supernfirst_bad.v | 2 +- test_regress/t/t_class_param_enum.v | 5 +- test_regress/t/t_class_param_enum_bad.out | 6 +-- test_regress/t/t_class_param_enum_bad.v | 4 +- test_regress/t/t_class_param_extends2.v | 4 +- test_regress/t/t_class_param_type.v | 6 +-- test_regress/t/t_class_param_typedef.v | 12 ++--- test_regress/t/t_class_param_typedef2.v | 2 +- test_regress/t/t_class_param_unused_default.v | 2 +- test_regress/t/t_class_param_virtual_bad.out | 6 +-- test_regress/t/t_class_param_virtual_bad.v | 4 +- test_regress/t/t_class_ref_as_arg_cast.v | 3 +- test_regress/t/t_class_static_default_arg.v | 2 +- test_regress/t/t_class_static_member_sel.v | 10 ++-- test_regress/t/t_class_super_new3.v | 2 +- test_regress/t/t_class_typedef.v | 2 +- test_regress/t/t_class_virtual.v | 12 ++--- test_regress/t/t_class_virtual_bad.out | 6 +-- test_regress/t/t_class_virtual_bad.v | 2 +- test_regress/t/t_class_virtual_chain_ctor.v | 2 +- test_regress/t/t_constraint_countones.v | 4 +- test_regress/t/t_constraint_dist.v | 7 +-- test_regress/t/t_constraint_foreach.v | 8 ++-- .../t/t_constraint_global_arr_unsup.v | 2 +- test_regress/t/t_constraint_inheritance.v | 14 +++--- .../t/t_constraint_inheritance_with.v | 14 +++--- test_regress/t/t_constraint_mode.v | 8 ++-- test_regress/t/t_constraint_pure.v | 2 +- test_regress/t/t_constraint_state.v | 4 +- test_regress/t/t_constraint_unsup_unq_arr.v | 2 +- test_regress/t/t_cover_expr.out | 8 ++-- test_regress/t/t_cover_expr.v | 8 ++-- test_regress/t/t_cover_expr_array_class.v | 4 +- .../t/t_cover_expr_associative_array_class.v | 6 +-- test_regress/t/t_cover_expr_dyn_array_class.v | 6 +-- test_regress/t/t_cover_expr_max.out | 8 ++-- test_regress/t/t_cover_expr_queue_class.v | 4 +- test_regress/t/t_cover_expr_trace.out | 8 ++-- test_regress/t/t_cover_line_expr.out | 8 ++-- test_regress/t/t_covergroup_unsup.v | 4 +- test_regress/t/t_disable_empty_outside.v | 2 +- test_regress/t/t_disable_inside.v | 4 +- test_regress/t/t_disable_outside.v | 2 +- test_regress/t/t_disable_outside2.v | 2 +- test_regress/t/t_disable_outside3.v | 2 +- test_regress/t/t_disable_outside4.v | 2 +- test_regress/t/t_disable_task_simple.v | 2 +- test_regress/t/t_disable_within_task_unsup.v | 2 +- test_regress/t/t_do_while.v | 4 +- test_regress/t/t_dpi_inline_new.v | 2 +- test_regress/t/t_dynarray_cast_write.v | 8 ++-- test_regress/t/t_expr_incr_unsup.v | 2 +- test_regress/t/t_flag_output_groups.v | 2 +- test_regress/t/t_foreach_iface.v | 2 +- test_regress/t/t_foreach_nested.v | 2 +- .../t/t_fork_block_item_declaration.v | 2 +- test_regress/t/t_fork_none_var.v | 2 +- test_regress/t/t_func_call_super_arg.v | 2 +- test_regress/t/t_inside_extend.v | 15 +++--- test_regress/t/t_inside_queue_elem.v | 3 +- test_regress/t/t_interface_dearray.v | 2 +- test_regress/t/t_interface_virtual_do_while.v | 2 +- test_regress/t/t_lint_dtype_compare.v | 38 +++++++-------- test_regress/t/t_lint_dtype_compare_bad.v | 38 +++++++-------- test_regress/t/t_lint_sideeffect_bad.v | 2 +- .../t/t_lint_unusedloop_removed_bad.v | 6 +-- test_regress/t/t_math_shortcircuit_assocsel.v | 2 +- test_regress/t/t_math_shortcircuit_dynsel.v | 2 +- test_regress/t/t_package.v | 2 +- test_regress/t/t_param_passed_to_port.v | 2 +- test_regress/t/t_param_slice.v | 4 +- test_regress/t/t_queue_compare.v | 4 +- test_regress/t/t_queue_concat_assign.v | 4 +- test_regress/t/t_queue_slice.v | 2 +- test_regress/t/t_rand_member_mode_deriv.v | 2 +- test_regress/t/t_randomize.v | 4 +- .../t/t_randomize_arraysel_membersel.v | 2 +- test_regress/t/t_randomize_complex.v | 4 +- test_regress/t/t_randomize_complex_queue.v | 8 ++-- .../t/t_randomize_from_randomized_class.v | 2 +- .../t/t_randomize_inline_var_ctl_bad.v | 8 ++-- .../t/t_randomize_inline_var_ctl_unsup_1.v | 4 +- test_regress/t/t_randomize_method.v | 4 +- test_regress/t/t_randomize_method_std.v | 2 +- test_regress/t/t_randomize_method_with.v | 21 ++++---- .../t/t_randomize_method_with_bad.out | 6 +-- test_regress/t/t_randomize_method_with_bad.v | 4 +- test_regress/t/t_randomize_param_with.v | 8 ++-- .../t/t_randomize_queue_constraints.v | 6 +-- test_regress/t/t_randomize_queue_size.v | 10 ++-- test_regress/t/t_randomize_queue_wide.v | 2 +- test_regress/t/t_randomize_rand_mode_constr.v | 10 ++-- test_regress/t/t_randomize_rand_mode_unsup.v | 2 +- test_regress/t/t_randomize_this_with.v | 2 +- test_regress/t/t_randomize_unpacked_wide.v | 2 +- test_regress/t/t_randomize_within_func.v | 2 +- test_regress/t/t_randsequence_svtests.v | 6 +-- test_regress/t/t_recursive_method.v | 4 +- test_regress/t/t_runflag_seed.v | 2 +- test_regress/t/t_select_bad_width0.out | 12 ++--- test_regress/t/t_select_bad_width0.v | 6 +-- test_regress/t/t_selextract_in_paramextends.v | 2 +- test_regress/t/t_static_in_loop.v | 4 +- test_regress/t/t_std_randomize_mod.v | 2 +- test_regress/t/t_std_randomize_with.v | 2 +- test_regress/t/t_stmt_incr_unsup.v | 2 +- test_regress/t/t_stream_unpack.v | 48 +++++++++---------- test_regress/t/t_stream_unpack_wider.v | 22 ++++----- test_regress/t/t_string_sel.v | 6 +-- test_regress/t/t_timing_class.v | 14 +++--- test_regress/t/t_timing_localevent.v | 2 +- test_regress/t/t_type_expression_compare.v | 4 +- test_regress/t/t_typedef_param_class.v | 6 +-- test_regress/t/t_unpacked_str_pair.v | 4 +- test_regress/t/t_var_local.v | 4 +- test_regress/t/t_var_static_assign_decl_bad.v | 2 +- test_regress/t/t_virtual_interface_method.v | 4 +- .../t/t_virtual_interface_method_bad.v | 2 +- test_regress/t/t_virtual_interface_param.v | 4 +- .../t/t_virtual_interface_param_bind.v | 4 +- test_regress/t/t_wide_temp_while_cond.v | 6 +-- test_regress/t/t_with.v | 16 +++---- 157 files changed, 448 insertions(+), 441 deletions(-) diff --git a/test_regress/t/t_array_method_map.v b/test_regress/t/t_array_method_map.v index 8c4293548..8025971f7 100644 --- a/test_regress/t/t_array_method_map.v +++ b/test_regress/t/t_array_method_map.v @@ -12,8 +12,8 @@ module t; initial begin - int res[]; - int a[3] = '{100, 200, 300}; + automatic int res[]; + automatic int a[3] = '{100, 200, 300}; // TODO results not known to be correct res = a.map(el) with (el == 200); diff --git a/test_regress/t/t_assigndly_deep_ref.v b/test_regress/t/t_assigndly_deep_ref.v index b3b11c9e6..56fd8e0d3 100644 --- a/test_regress/t/t_assigndly_deep_ref.v +++ b/test_regress/t/t_assigndly_deep_ref.v @@ -51,9 +51,9 @@ module t; endtask initial begin - Foo foo = new(iface); - Foo foo2 = new(iface2); - Bar bar = new(foo); + automatic Foo foo = new(iface); + automatic Foo foo2 = new(iface2); + automatic Bar bar = new(foo); clockSome(); if (iface.x != 0) $stop; if (iface2.x != 0) $stop; diff --git a/test_regress/t/t_assigndly_deep_ref_array.v b/test_regress/t/t_assigndly_deep_ref_array.v index 414e468d6..8ac1a84b6 100644 --- a/test_regress/t/t_assigndly_deep_ref_array.v +++ b/test_regress/t/t_assigndly_deep_ref_array.v @@ -55,9 +55,9 @@ module t; endtask initial begin - Foo foo = new(iface); - Foo foo2 = new(iface2); - Bar bar = new(foo); + automatic Foo foo = new(iface); + automatic Foo foo2 = new(iface2); + automatic Bar bar = new(foo); clockSome(); if (iface.x[0] != 0) $stop; if (iface.x[1] != 0) $stop; diff --git a/test_regress/t/t_assoc_compare.v b/test_regress/t/t_assoc_compare.v index f6a43a5fc..ce4923359 100644 --- a/test_regress/t/t_assoc_compare.v +++ b/test_regress/t/t_assoc_compare.v @@ -39,8 +39,8 @@ module t; begin // check that a class as key is fine int assoc1[Cls]; int assoc2[Cls]; - Cls a = new; - Cls b = new; + automatic Cls a = new; + automatic Cls b = new; int t; assoc1[a] = 0; `check_ne(assoc1, assoc2) @@ -53,8 +53,8 @@ module t; begin // check that a class as value is fine Cls assoc1[int]; Cls assoc2[int]; - Cls a = new; - Cls b = new; + automatic Cls a = new; + automatic Cls b = new; assoc1[1] = a; assoc2[1] = b; `check_ne(assoc1, assoc2) diff --git a/test_regress/t/t_assoc_enum.v b/test_regress/t/t_assoc_enum.v index c4f32b8fc..79de64a4d 100644 --- a/test_regress/t/t_assoc_enum.v +++ b/test_regress/t/t_assoc_enum.v @@ -36,7 +36,7 @@ endclass module t; initial begin - X x = new; + automatic X x = new; $finish; end diff --git a/test_regress/t/t_assoc_method_map.v b/test_regress/t/t_assoc_method_map.v index 54e7a929e..c01a19a30 100644 --- a/test_regress/t/t_assoc_method_map.v +++ b/test_regress/t/t_assoc_method_map.v @@ -10,8 +10,8 @@ module t; initial begin - int res[]; - int a[int] = '{1: 100, 2: 200, 3: 300}; + automatic int res[]; + automatic int a[int] = '{1: 100, 2: 200, 3: 300}; // TODO results not known to be correct res = a.map(el) with (el == 2); diff --git a/test_regress/t/t_assoc_nokey_bad.out b/test_regress/t/t_assoc_nokey_bad.out index 3ad1b3790..02de8ff85 100644 --- a/test_regress/t/t_assoc_nokey_bad.out +++ b/test_regress/t/t_assoc_nokey_bad.out @@ -1,10 +1,10 @@ -%Error: t/t_assoc_nokey_bad.v:12:28: Missing pattern key (need an expression then a ':') +%Error: t/t_assoc_nokey_bad.v:12:36: Missing pattern key (need an expression then a ':') : ... note: In instance 't' - 12 | int dict[string] = '{1, 2}; - | ^ + 12 | automatic int dict[string] = '{1, 2}; + | ^ ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. -%Error: t/t_assoc_nokey_bad.v:12:31: Missing pattern key (need an expression then a ':') +%Error: t/t_assoc_nokey_bad.v:12:39: Missing pattern key (need an expression then a ':') : ... note: In instance 't' - 12 | int dict[string] = '{1, 2}; - | ^ + 12 | automatic int dict[string] = '{1, 2}; + | ^ %Error: Exiting due to diff --git a/test_regress/t/t_assoc_nokey_bad.v b/test_regress/t/t_assoc_nokey_bad.v index d094726cc..afc76fe71 100644 --- a/test_regress/t/t_assoc_nokey_bad.v +++ b/test_regress/t/t_assoc_nokey_bad.v @@ -8,13 +8,13 @@ module t; - initial begin - int dict[string] = '{1, 2}; - int dict2[string] = '{3: 4}; // Legal due to value-to-string conversion - $display("dict=%p", dict); - $display("dict2=%p", dict2); - $write("*-* All Finished *-*\n"); - $finish; - end + initial begin + automatic int dict[string] = '{1, 2}; + automatic int dict2[string] = '{3: 4}; // Legal due to value-to-string conversion + $display("dict=%p", dict); + $display("dict2=%p", dict2); + $write("*-* All Finished *-*\n"); + $finish; + end endmodule diff --git a/test_regress/t/t_assoc_ref_type.v b/test_regress/t/t_assoc_ref_type.v index 54007c453..276f98893 100644 --- a/test_regress/t/t_assoc_ref_type.v +++ b/test_regress/t/t_assoc_ref_type.v @@ -66,13 +66,13 @@ module t; localparam string str_key = "the_key"; initial begin - Bar bar_i = new; - Baz baz_1_i = new; - Baz #(Foo2) baz_2_i = new; - Bum bum_i; + automatic Bar bar_i = new; + automatic Baz baz_1_i = new; + automatic Baz #(Foo2) baz_2_i = new; + automatic Bum bum_i; - Wrapper#(wrap_map_t) wrap_map = new(); - Wrapper#(wrap_queue_t) wrap_queue = new(); + automatic Wrapper#(wrap_map_t) wrap_map = new(); + automatic Wrapper#(wrap_queue_t) wrap_queue = new(); bar_i.set(1); baz_1_i.set(2); diff --git a/test_regress/t/t_assoc_wildcard_map.v b/test_regress/t/t_assoc_wildcard_map.v index f6d7bff6f..befe2d958 100644 --- a/test_regress/t/t_assoc_wildcard_map.v +++ b/test_regress/t/t_assoc_wildcard_map.v @@ -12,8 +12,8 @@ module t; initial begin - int res[]; - int a [*] = '{1: 100, 2: 200, 3: 300}; + automatic int res[]; + automatic int a [*] = '{1: 100, 2: 200, 3: 300}; // TODO results not known to be correct res = a.map(el) with (el == 2); diff --git a/test_regress/t/t_assoc_wildcard_method.v b/test_regress/t/t_assoc_wildcard_method.v index a9304b9a9..d9b784d2d 100644 --- a/test_regress/t/t_assoc_wildcard_method.v +++ b/test_regress/t/t_assoc_wildcard_method.v @@ -18,7 +18,7 @@ module t; initial begin int q[*]; int qe [ * ]; // Empty - Note spaces around [*] for parsing coverage - point points_q[*] = '{"a": point'{1, 2}, "b": point'{2, 4}, "c": point'{1, 4}}; + automatic point points_q[*] = '{"a": point'{1, 2}, "b": point'{2, 4}, "c": point'{1, 4}}; int qv[$]; // Value returns int qi[$]; // Index returns int i; diff --git a/test_regress/t/t_case_call_count.v b/test_regress/t/t_case_call_count.v index 62d97c1b0..529596992 100644 --- a/test_regress/t/t_case_call_count.v +++ b/test_regress/t/t_case_call_count.v @@ -25,7 +25,7 @@ endclass module t; Cls c; initial begin - bit called = 0; + bit called; c = new; case (c.get()) 4: $stop; diff --git a/test_regress/t/t_case_inside_call_count.v b/test_regress/t/t_case_inside_call_count.v index 3f228050e..227de3f05 100644 --- a/test_regress/t/t_case_inside_call_count.v +++ b/test_regress/t/t_case_inside_call_count.v @@ -25,7 +25,7 @@ endclass module t; Cls c; initial begin - bit called = 0; + bit called; c = new; case (c.get()) inside [0:5]: $stop; diff --git a/test_regress/t/t_cast_stream.v b/test_regress/t/t_cast_stream.v index 0511dece8..703ced890 100644 --- a/test_regress/t/t_cast_stream.v +++ b/test_regress/t/t_cast_stream.v @@ -18,9 +18,9 @@ typedef enum { module t; initial begin - bit array[] = new [8]; - int unsigned m_length; - uvm_tlm_command_e m_command; + automatic bit array[] = new [8]; + automatic int unsigned m_length; + automatic uvm_tlm_command_e m_command; m_length = 2; array = '{0, 0, 0, 0, 0, 0, 1, 0}; diff --git a/test_regress/t/t_class_assign_cond.v b/test_regress/t/t_class_assign_cond.v index a6c5002c1..c1a040e2b 100644 --- a/test_regress/t/t_class_assign_cond.v +++ b/test_regress/t/t_class_assign_cond.v @@ -33,10 +33,11 @@ module t; typedef ExtendCls ExtendCls_t; initial begin - Cls cls1 = null, cls2 = null; - ExtendCls_t ext_cls = null; - AnotherExtendCls an_ext_cls = null; - ExtendExtendCls ext_ext_cls = null; + automatic Cls cls1 = null; + automatic Cls cls2 = null; + automatic ExtendCls_t ext_cls = null; + automatic AnotherExtendCls an_ext_cls = null; + automatic ExtendExtendCls ext_ext_cls = null; int r; cls1 = (cls1 == null) ? cls2 : cls1; diff --git a/test_regress/t/t_class_class_extends.v b/test_regress/t/t_class_class_extends.v index 84a872f93..6f40138c2 100644 --- a/test_regress/t/t_class_class_extends.v +++ b/test_regress/t/t_class_class_extends.v @@ -107,7 +107,7 @@ module t; endclass initial begin - Cls c = new(); + automatic Cls c = new(); $finish; end endmodule diff --git a/test_regress/t/t_class_compare.v b/test_regress/t/t_class_compare.v index 28b96fff4..22521ee02 100644 --- a/test_regress/t/t_class_compare.v +++ b/test_regress/t/t_class_compare.v @@ -22,12 +22,12 @@ endclass module t; initial begin - Cls a = new; - Cls b = new; - ExtendCls ext = new; - Cls::InnerCls ia = new; - Cls::InnerCls ib = new; - ExtendCls::InnerCls iext = new; + automatic Cls a = new; + automatic Cls b = new; + automatic ExtendCls ext = new; + automatic Cls::InnerCls ia = new; + automatic Cls::InnerCls ib = new; + automatic ExtendCls::InnerCls iext = new; `check_ne(a, b) `check_ne(a, ext) `check_ne(ext, a) diff --git a/test_regress/t/t_class_const.v b/test_regress/t/t_class_const.v index 497e65b8b..e0ab5aaac 100644 --- a/test_regress/t/t_class_const.v +++ b/test_regress/t/t_class_const.v @@ -11,7 +11,7 @@ endclass module t; initial begin - Cls c = new; + automatic Cls c = new; if (c.aconst !== 10) $stop; if (Cls::astatic !== 20) $stop; $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_class_dead_varscope_uaf.v b/test_regress/t/t_class_dead_varscope_uaf.v index f2e2aabea..e573079a7 100644 --- a/test_regress/t/t_class_dead_varscope_uaf.v +++ b/test_regress/t/t_class_dead_varscope_uaf.v @@ -49,7 +49,7 @@ module t; import p::*; initial begin - comp_proxy cp = new; + automatic comp_proxy cp = new; void'(cp.get_config_object("x")); $finish; end diff --git a/test_regress/t/t_class_dict.v b/test_regress/t/t_class_dict.v index 10a13ca70..bef95456d 100644 --- a/test_regress/t/t_class_dict.v +++ b/test_regress/t/t_class_dict.v @@ -16,9 +16,9 @@ endclass module t; initial begin - int dict[Cls]; - Cls c1 = new(1); - Cls c2 = new(2); + automatic int dict[Cls]; + automatic Cls c1 = new(1); + automatic Cls c2 = new(2); dict[c1] = 1; dict[c2] = 2; `checkh(dict[c1], 1); diff --git a/test_regress/t/t_class_dyn_cast_empty_if.v b/test_regress/t/t_class_dyn_cast_empty_if.v index 3987d61e0..2d2435018 100644 --- a/test_regress/t/t_class_dyn_cast_empty_if.v +++ b/test_regress/t/t_class_dyn_cast_empty_if.v @@ -23,9 +23,9 @@ endclass module t; initial begin - Derived d = new("Hello"); - Base b = d; - Derived c = b.cast(); + automatic Derived d = new("Hello"); + automatic Base b = d; + automatic Derived c = b.cast(); if (d.get() != c.get()) $stop; $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_class_extern.v b/test_regress/t/t_class_extern.v index 77bb006a5..15ac405ac 100644 --- a/test_regress/t/t_class_extern.v +++ b/test_regress/t/t_class_extern.v @@ -87,8 +87,8 @@ endtask module t; initial begin - Cls c = new; - Cls::SubCls subc = new; + automatic Cls c = new; + automatic Cls::SubCls subc = new; c.ext_t_i(2); if (c.ext_f_np() != 1) $stop; if (c.ext_f_p() != 2) $stop; diff --git a/test_regress/t/t_class_field_name.v b/test_regress/t/t_class_field_name.v index a0e6dcaf1..96e575836 100644 --- a/test_regress/t/t_class_field_name.v +++ b/test_regress/t/t_class_field_name.v @@ -11,7 +11,7 @@ endclass module t; initial begin - Cls cls = new; + automatic Cls cls = new; cls.queue = 1; if (cls.queue == 1) begin $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_class_func_arg_unused.v b/test_regress/t/t_class_func_arg_unused.v index ba99fbd20..5a31df2d7 100644 --- a/test_regress/t/t_class_func_arg_unused.v +++ b/test_regress/t/t_class_func_arg_unused.v @@ -19,7 +19,7 @@ endpackage module t; initial begin - uvm_pkg::uvm_reg_field c = new; + automatic uvm_pkg::uvm_reg_field c = new; c.configure(1, 0); c.configure(0, 0); $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_class_hier_construction.v b/test_regress/t/t_class_hier_construction.v index 6075ee65a..6c7edda44 100644 --- a/test_regress/t/t_class_hier_construction.v +++ b/test_regress/t/t_class_hier_construction.v @@ -72,10 +72,10 @@ endclass module t; initial begin - sky_class s = new("ahoj"); - bottom_class b = s; - top_class t = s; - IMid im; + automatic sky_class s = new("ahoj"); + automatic bottom_class b = s; + automatic top_class t = s; + automatic IMid im; `checks(b.name, "middle ahoj 42"); `checks(s.name, "middle ahoj 42"); diff --git a/test_regress/t/t_class_if_assign.v b/test_regress/t/t_class_if_assign.v index 009c5a12a..cfa9226d4 100644 --- a/test_regress/t/t_class_if_assign.v +++ b/test_regress/t/t_class_if_assign.v @@ -25,9 +25,9 @@ endclass module t; initial begin - Cls cls = new; - ExtendCls ext_cls = new; - AnotherExtendCls an_ext_cls = new; + automatic Cls cls = new; + automatic ExtendCls ext_cls = new; + automatic AnotherExtendCls an_ext_cls = new; if (cls.x == 1) cls = ext_cls; else cls = an_ext_cls; diff --git a/test_regress/t/t_class_local_nested_bad.v b/test_regress/t/t_class_local_nested_bad.v index 1c5732482..5adcc9b2c 100644 --- a/test_regress/t/t_class_local_nested_bad.v +++ b/test_regress/t/t_class_local_nested_bad.v @@ -17,7 +17,7 @@ endclass module t; initial begin - NodeList n = new; + automatic NodeList n = new; $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_class_method_str_literal.v b/test_regress/t/t_class_method_str_literal.v index cf40cf948..688e6ff76 100644 --- a/test_regress/t/t_class_method_str_literal.v +++ b/test_regress/t/t_class_method_str_literal.v @@ -36,8 +36,8 @@ endclass initial begin - T t_c = new; - uvm_reg u_r = new; + automatic T t_c = new; + automatic uvm_reg u_r = new; if (u_r.get_string() != "user backdoor") $stop; if (t_c.return_str("A") != "A") $stop; if (t_c.static_return_str("B") != "B") $stop; diff --git a/test_regress/t/t_class_method_struct.v b/test_regress/t/t_class_method_struct.v index 09bb851c8..70c6a68b8 100644 --- a/test_regress/t/t_class_method_struct.v +++ b/test_regress/t/t_class_method_struct.v @@ -22,8 +22,8 @@ endclass : Cls module t; initial begin - Cls c = new; - my_struct s = c.get_struct; + automatic Cls c = new; + automatic my_struct s = c.get_struct; if (s.x != 1) $stop; if (s.y != 2) $stop; if (s.z != 3) $stop; diff --git a/test_regress/t/t_class_mispure_bad.v b/test_regress/t/t_class_mispure_bad.v index bf65dfd9e..453b457f3 100644 --- a/test_regress/t/t_class_mispure_bad.v +++ b/test_regress/t/t_class_mispure_bad.v @@ -14,7 +14,7 @@ endclass module t; initial begin - Bar obj = new(); + automatic Bar obj = new(); obj.pvfunc(); $stop; end diff --git a/test_regress/t/t_class_misstatic_bad.v b/test_regress/t/t_class_misstatic_bad.v index cbd0cfe3f..c5a56bef3 100644 --- a/test_regress/t/t_class_misstatic_bad.v +++ b/test_regress/t/t_class_misstatic_bad.v @@ -46,7 +46,7 @@ module t; Cls::isst(); endfunction initial begin - Bar obj = new(); + automatic Bar obj = new(); obj.bar(); Cls::nonstatic(); // <--- bad static ref Cls::isst(); diff --git a/test_regress/t/t_class_nested.v b/test_regress/t/t_class_nested.v index c19dd5ab3..10c2f547d 100644 --- a/test_regress/t/t_class_nested.v +++ b/test_regress/t/t_class_nested.v @@ -46,14 +46,14 @@ endclass module t; initial begin - NodeList n = new; - NodeList::Node n1 = new; - NodeList::Node n2 = new; - NodeTree tr = new; - NodeTree::Node t1 = new; - NodeTree::Node t2 = new; - Outer o = new; - Outer::Inner i = new; + automatic NodeList n = new; + automatic NodeList::Node n1 = new; + automatic NodeList::Node n2 = new; + automatic NodeTree tr = new; + automatic NodeTree::Node t1 = new; + automatic NodeTree::Node t2 = new; + automatic Outer o = new; + automatic Outer::Inner i = new; i.innerMethod(o); diff --git a/test_regress/t/t_class_new.v b/test_regress/t/t_class_new.v index 0a1b60dcd..981033ecf 100644 --- a/test_regress/t/t_class_new.v +++ b/test_regress/t/t_class_new.v @@ -63,7 +63,7 @@ module t; ClsArg c2; Cls2Arg c3; Cls2Arg c4; - ClsNoArg::InnerNoArg c5 = new; + automatic ClsNoArg::InnerNoArg c5 = new; c1 = new; if (c1.imembera != 5) $stop; diff --git a/test_regress/t/t_class_new_ref_bad.out b/test_regress/t/t_class_new_ref_bad.out index bd21bae13..b949f859e 100644 --- a/test_regress/t/t_class_new_ref_bad.out +++ b/test_regress/t/t_class_new_ref_bad.out @@ -7,8 +7,8 @@ : ... note: In instance 't' 17 | txn_type_t copy = new txn; | ^~~ -%Error: t/t_class_new_ref_bad.v:26:21: Assign RHS expects a CLASSREFDTYPE 'Base', got BASICDTYPE 'int' +%Error: t/t_class_new_ref_bad.v:26:31: Assign RHS expects a CLASSREFDTYPE 'Base', got BASICDTYPE 'int' : ... note: In instance 't' - 26 | Base b = Cls::generate_txn(); - | ^~~~~~~~~~~~ + 26 | automatic Base b = Cls::generate_txn(); + | ^~~~~~~~~~~~ %Error: Exiting due to diff --git a/test_regress/t/t_class_new_ref_bad.v b/test_regress/t/t_class_new_ref_bad.v index d32df53b6..fbab68617 100644 --- a/test_regress/t/t_class_new_ref_bad.v +++ b/test_regress/t/t_class_new_ref_bad.v @@ -23,7 +23,7 @@ endclass module t; initial begin - Base b = Cls::generate_txn(); + automatic Base b = Cls::generate_txn(); $display("%p", b); $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_class_new_supernfirst_bad.v b/test_regress/t/t_class_new_supernfirst_bad.v index 05602c074..5abf35cff 100644 --- a/test_regress/t/t_class_new_supernfirst_bad.v +++ b/test_regress/t/t_class_new_supernfirst_bad.v @@ -23,7 +23,7 @@ endclass module t; initial begin - spi_reg_block test = new; + automatic spi_reg_block test = new; $finish; end endmodule diff --git a/test_regress/t/t_class_param_enum.v b/test_regress/t/t_class_param_enum.v index 871366340..8a7821bc2 100644 --- a/test_regress/t/t_class_param_enum.v +++ b/test_regress/t/t_class_param_enum.v @@ -14,8 +14,9 @@ endclass module t; initial begin - Converter#(enum_t) conv1 = new; - Converter#(bit) conv2 = new; + automatic Converter#(enum_t) conv1 = new; + automatic Converter#(bit) conv2 = new; + if (conv1.toInt(A) != 0) $stop; if (conv2.toInt(1) != 1) $stop; diff --git a/test_regress/t/t_class_param_enum_bad.out b/test_regress/t/t_class_param_enum_bad.out index afd1047ca..1367e3acb 100644 --- a/test_regress/t/t_class_param_enum_bad.out +++ b/test_regress/t/t_class_param_enum_bad.out @@ -1,7 +1,7 @@ -%Error: t/t_class_param_enum_bad.v:20:31: Assign RHS expects a CLASSREFDTYPE 'Converter__Tz2', got CLASSREFDTYPE 'Converter__Tz1' +%Error: t/t_class_param_enum_bad.v:20:41: Assign RHS expects a CLASSREFDTYPE 'Converter__Tz2', got CLASSREFDTYPE 'Converter__Tz1' : ... note: In instance 't' - 20 | Converter#(bit) conv2 = conv1; - | ^~~~~ + 20 | automatic Converter#(bit) conv2 = conv1; + | ^~~~~ ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. %Error-ENUMVALUE: t/t_class_param_enum_bad.v:21:19: Implicit conversion to enum 'enum{}$unit::enum_t' from 'logic[31:0]' (IEEE 1800-2023 6.19.3) : ... note: In instance 't' diff --git a/test_regress/t/t_class_param_enum_bad.v b/test_regress/t/t_class_param_enum_bad.v index 8821c5ce5..b7215093e 100644 --- a/test_regress/t/t_class_param_enum_bad.v +++ b/test_regress/t/t_class_param_enum_bad.v @@ -14,10 +14,10 @@ endclass module t; initial begin - Converter#(enum_t) conv1 = new; + automatic Converter#(enum_t) conv1 = new; // enum types does not match with other types (IEEE 1800-2023 6.22.1 and 6.22.4) // The assignment and the function call should throw an error. - Converter#(bit) conv2 = conv1; + automatic Converter#(bit) conv2 = conv1; conv1.toInt(0); $stop; end diff --git a/test_regress/t/t_class_param_extends2.v b/test_regress/t/t_class_param_extends2.v index 89e371ed4..1158d689a 100644 --- a/test_regress/t/t_class_param_extends2.v +++ b/test_regress/t/t_class_param_extends2.v @@ -26,8 +26,8 @@ typedef Baz baz_t; module t; initial begin - bar_default_t bar_default = new; - baz_t baz = new; + automatic bar_default_t bar_default = new; + automatic baz_t baz = new; if (bar_default.x != 32) $stop; if (baz.bar_x != 8) $stop; diff --git a/test_regress/t/t_class_param_type.v b/test_regress/t/t_class_param_type.v index 8f06f7410..038abcc6f 100644 --- a/test_regress/t/t_class_param_type.v +++ b/test_regress/t/t_class_param_type.v @@ -125,9 +125,9 @@ module t; automatic GetStaticXVal#(StaticX) get_statix_x_val = new; typedef bit my_bit_t; - Bar#(.A(my_bit_t)) bar_a_bit = new; - Bar#(.B(my_bit_t)) bar_b_bit = new; - Bar#() bar_default = new; + automatic Bar#(.A(my_bit_t)) bar_a_bit = new; + automatic Bar#(.B(my_bit_t)) bar_b_bit = new; + automatic Bar#() bar_default = new; if (bar_a_bit.get_size_A != 1) $stop; if (bar_a_bit.get_size_B != 1) $stop; diff --git a/test_regress/t/t_class_param_typedef.v b/test_regress/t/t_class_param_typedef.v index 0f436c7f9..3d1862b69 100644 --- a/test_regress/t/t_class_param_typedef.v +++ b/test_regress/t/t_class_param_typedef.v @@ -46,14 +46,14 @@ endclass module t; initial begin - Cls1::type_id bar1 = new; - Cls2::type_id bar2 = new; + automatic Cls1::type_id bar1 = new; + automatic Cls2::type_id bar2 = new; - ClsTypedefParam #(int) cls_int = new; - ClsTypedefParam#() cls_def; + automatic ClsTypedefParam #(int) cls_int = new; + automatic ClsTypedefParam#() cls_def; - uvm_sequencer #(int, int) uvm_seq1 = new; - uvm_sequencer #(int, int)::this_type uvm_seq2; + automatic uvm_sequencer #(int, int) uvm_seq1 = new; + automatic uvm_sequencer #(int, int)::this_type uvm_seq2; if (bar1.get_x() != 1) $stop; if (bar2.get_x() != 2) $stop; diff --git a/test_regress/t/t_class_param_typedef2.v b/test_regress/t/t_class_param_typedef2.v index e5f59ab42..6d1b48dfc 100644 --- a/test_regress/t/t_class_param_typedef2.v +++ b/test_regress/t/t_class_param_typedef2.v @@ -25,7 +25,7 @@ typedef uvm_object_registry#(MyInt) type_id; module t; initial begin - MyInt mi = type_id::create_object(); + automatic MyInt mi = type_id::create_object(); if (mi.x != 1) $stop; $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_class_param_unused_default.v b/test_regress/t/t_class_param_unused_default.v index 1ae68fe69..e1563c077 100644 --- a/test_regress/t/t_class_param_unused_default.v +++ b/test_regress/t/t_class_param_unused_default.v @@ -17,7 +17,7 @@ endclass module t; initial begin - Bar#(Baz) bar_baz = new; + automatic Bar#(Baz) bar_baz = new; if (bar_baz.t.x != 1) $stop; $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_class_param_virtual_bad.out b/test_regress/t/t_class_param_virtual_bad.out index 22322b74a..c53f4d7b3 100644 --- a/test_regress/t/t_class_param_virtual_bad.out +++ b/test_regress/t/t_class_param_virtual_bad.out @@ -1,7 +1,7 @@ -%Error: t/t_class_param_virtual_bad.v:23:28: Illegal to call 'new' using an abstract virtual class 'ClsVirt' (IEEE 1800-2023 8.21) +%Error: t/t_class_param_virtual_bad.v:23:38: Illegal to call 'new' using an abstract virtual class 'ClsVirt' (IEEE 1800-2023 8.21) : ... note: In instance 't' - 23 | ClsVirt#(VBase) cv = new; - | ^~~ + 23 | automatic ClsVirt#(VBase) cv = new; + | ^~~ ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. %Error: t/t_class_param_virtual_bad.v:13:11: Illegal to call 'new' using an abstract virtual class 'VBase' (IEEE 1800-2023 8.21) : ... note: In instance 't' diff --git a/test_regress/t/t_class_param_virtual_bad.v b/test_regress/t/t_class_param_virtual_bad.v index e9c73f968..d53651d88 100644 --- a/test_regress/t/t_class_param_virtual_bad.v +++ b/test_regress/t/t_class_param_virtual_bad.v @@ -19,8 +19,8 @@ endclass module t; initial begin - Cls c = new; // Error - ClsVirt#(VBase) cv = new; // Error + automatic Cls c = new; // Error + automatic ClsVirt#(VBase) cv = new; // Error $stop; end endmodule diff --git a/test_regress/t/t_class_ref_as_arg_cast.v b/test_regress/t/t_class_ref_as_arg_cast.v index 702a5b5d1..458437e35 100644 --- a/test_regress/t/t_class_ref_as_arg_cast.v +++ b/test_regress/t/t_class_ref_as_arg_cast.v @@ -14,7 +14,8 @@ endclass module t; initial begin - Qux qux = new; + Qux qux; + qux = new; Foo::bar(qux); Foo::bar(null); end diff --git a/test_regress/t/t_class_static_default_arg.v b/test_regress/t/t_class_static_default_arg.v index 851b914c4..bd6a4d7d2 100644 --- a/test_regress/t/t_class_static_default_arg.v +++ b/test_regress/t/t_class_static_default_arg.v @@ -14,7 +14,7 @@ module t; initial begin bit first; - bit arg[$] = {1'b0, 1'b1}; + automatic bit arg[$] = {1'b0, 1'b1}; first = Foo::get_first(); if (first != 1) $stop; first = Foo::get_first(arg); diff --git a/test_regress/t/t_class_static_member_sel.v b/test_regress/t/t_class_static_member_sel.v index 49de35924..e83659fb2 100644 --- a/test_regress/t/t_class_static_member_sel.v +++ b/test_regress/t/t_class_static_member_sel.v @@ -57,11 +57,11 @@ endclass module t; initial begin - Foo foo = new; - Bar bar = new; - Baz baz = new; - ExtendCls ec = new; - Getter1 getter1 = new; + automatic Foo foo = new; + automatic Bar bar = new; + automatic Baz baz = new; + automatic ExtendCls ec = new; + automatic Getter1 getter1 = new; if (foo.x != 1) $stop; diff --git a/test_regress/t/t_class_super_new3.v b/test_regress/t/t_class_super_new3.v index d5517c8e5..77ccdf7b1 100644 --- a/test_regress/t/t_class_super_new3.v +++ b/test_regress/t/t_class_super_new3.v @@ -21,7 +21,7 @@ endclass module t; initial begin - Derived d = new; + automatic Derived d = new; if (d.j != 8) $stop; $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_class_typedef.v b/test_regress/t/t_class_typedef.v index a5be747ca..89a79f563 100644 --- a/test_regress/t/t_class_typedef.v +++ b/test_regress/t/t_class_typedef.v @@ -23,7 +23,7 @@ endclass module t; initial begin - uvm_resource_pool pool = new; + automatic uvm_resource_pool pool = new; typedef logic [7:0] t_t0; C#(t_t0,3)::t_vector v0; C#(t_t0,3)::t_array a0; diff --git a/test_regress/t/t_class_virtual.v b/test_regress/t/t_class_virtual.v index 3cd4c5b60..be46496e0 100644 --- a/test_regress/t/t_class_virtual.v +++ b/test_regress/t/t_class_virtual.v @@ -72,12 +72,12 @@ endclass module t; initial begin - VA va = new; - VB vb = new; - VA::VNested vna = new; - VB::VNested vnb = new; - VBase b; - VBase::VNested bn; + automatic VA va = new; + automatic VB vb = new; + automatic VA::VNested vna = new; + automatic VB::VNested vnb = new; + automatic VBase b; + automatic VBase::VNested bn; uvm_build_phase ph; ExtendsCls ec; diff --git a/test_regress/t/t_class_virtual_bad.out b/test_regress/t/t_class_virtual_bad.out index 6ac64a912..9174bb2ab 100644 --- a/test_regress/t/t_class_virtual_bad.out +++ b/test_regress/t/t_class_virtual_bad.out @@ -1,6 +1,6 @@ -%Error: t/t_class_virtual_bad.v:12:17: Illegal to call 'new' using an abstract virtual class 'VBase' (IEEE 1800-2023 8.21) +%Error: t/t_class_virtual_bad.v:12:27: Illegal to call 'new' using an abstract virtual class 'VBase' (IEEE 1800-2023 8.21) : ... note: In instance 't' - 12 | VBase b = new; - | ^~~ + 12 | automatic VBase b = new; + | ^~~ ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. %Error: Exiting due to diff --git a/test_regress/t/t_class_virtual_bad.v b/test_regress/t/t_class_virtual_bad.v index 304a2e109..86e3d6fb8 100644 --- a/test_regress/t/t_class_virtual_bad.v +++ b/test_regress/t/t_class_virtual_bad.v @@ -9,6 +9,6 @@ endclass module t; initial begin - VBase b = new; // Error + automatic VBase b = new; // Error end endmodule diff --git a/test_regress/t/t_class_virtual_chain_ctor.v b/test_regress/t/t_class_virtual_chain_ctor.v index 2a064e140..0ac078f73 100644 --- a/test_regress/t/t_class_virtual_chain_ctor.v +++ b/test_regress/t/t_class_virtual_chain_ctor.v @@ -29,6 +29,6 @@ endclass module t; initial begin - VChild2 c = new; + automatic VChild2 c = new; end endmodule diff --git a/test_regress/t/t_constraint_countones.v b/test_regress/t/t_constraint_countones.v index 681e21235..5ddce3e57 100644 --- a/test_regress/t/t_constraint_countones.v +++ b/test_regress/t/t_constraint_countones.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize())) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ diff --git a/test_regress/t/t_constraint_dist.v b/test_regress/t/t_constraint_dist.v index 7190d05a5..56cacf9c6 100644 --- a/test_regress/t/t_constraint_dist.v +++ b/test_regress/t/t_constraint_dist.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize())) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ @@ -39,7 +39,8 @@ endclass module t; initial begin - C c = new; + C c; + c = new; `check_rand(c, c.x, 5 <= c.x && c.x <= 6); `check_rand(c, c.y, 5 <= c.y && c.y <= 6); `check_rand(c, c.z, 3 <= c.z && c.z <= 5); diff --git a/test_regress/t/t_constraint_foreach.v b/test_regress/t/t_constraint_foreach.v index 5555d72c7..bc56a8488 100644 --- a/test_regress/t/t_constraint_foreach.v +++ b/test_regress/t/t_constraint_foreach.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize())) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ @@ -61,8 +61,8 @@ endclass module t; initial begin - C c = new; - D d = new; + automatic C c = new; + automatic D d = new; `check_rand(c, c.x, 4 < c.x && c.x < 7); `check_rand(d, d.posit, (d.posit ? 4 : -3) < d.x && d.x < (d.posit ? 7 : 0)); $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_constraint_global_arr_unsup.v b/test_regress/t/t_constraint_global_arr_unsup.v index 9809ce8e6..268e3ca0f 100644 --- a/test_regress/t/t_constraint_global_arr_unsup.v +++ b/test_regress/t/t_constraint_global_arr_unsup.v @@ -56,7 +56,7 @@ endclass module t_constraint_global_arr_unsup; initial begin - Outer o = new; + automatic Outer o = new; if (o.randomize()) begin $display("Case 1 - Simple: mid.obj.x = %0d (expected 100)", o.m_mid.m_obj.m_x); $display("Case 1 - Simple: mid.obj.y = %0d (expected 101)", o.m_mid.m_obj.m_y); diff --git a/test_regress/t/t_constraint_inheritance.v b/test_regress/t/t_constraint_inheritance.v index f664c4dfa..1759d8797 100644 --- a/test_regress/t/t_constraint_inheritance.v +++ b/test_regress/t/t_constraint_inheritance.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize())) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ @@ -47,11 +47,11 @@ endclass module t; initial begin - B b = new; - C c = new; - D d = new; - E e = new; - A a = b; + automatic B b = new; + automatic C c = new; + automatic D d = new; + automatic E e = new; + automatic A a = b; `check_rand(a, b.x, b.x > 0); `check_rand(c, c.x, c.x > 0); `check_rand(c, c.y, c.x > 0); diff --git a/test_regress/t/t_constraint_inheritance_with.v b/test_regress/t/t_constraint_inheritance_with.v index f2f10926c..23d23dc3d 100644 --- a/test_regress/t/t_constraint_inheritance_with.v +++ b/test_regress/t/t_constraint_inheritance_with.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, constr, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize() with { constr; })) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ @@ -47,11 +47,11 @@ endclass module t; initial begin - B b = new; - C c = new; - D d = new; - E e = new; - A a = b; + automatic B b = new; + automatic C c = new; + automatic D d = new; + automatic E e = new; + automatic A a = b; `check_rand(a, a.x, x < 10, a.x > 0 && a.x < 10); `check_rand(c, c.x, x < 100, c.x > 0 && c.x < 100); `check_rand(c, c.y, x == 5, c.x == 5); diff --git a/test_regress/t/t_constraint_mode.v b/test_regress/t/t_constraint_mode.v index f03ba993f..4ea067f32 100644 --- a/test_regress/t/t_constraint_mode.v +++ b/test_regress/t/t_constraint_mode.v @@ -62,10 +62,10 @@ endclass module t; initial begin - logic[1:0] ok = 0; - int res; - Qux qux = new; - Bar bar = qux; + automatic logic[1:0] ok = 0; + automatic int res; + automatic Qux qux = new; + automatic Bar bar = qux; qux.test; diff --git a/test_regress/t/t_constraint_pure.v b/test_regress/t/t_constraint_pure.v index 128d3aa02..17e5d7bd5 100644 --- a/test_regress/t/t_constraint_pure.v +++ b/test_regress/t/t_constraint_pure.v @@ -19,7 +19,7 @@ endclass module t; initial begin - Cls c = new; + automatic Cls c = new; $write("*-* All Finished *-*\n"); $finish; end diff --git a/test_regress/t/t_constraint_state.v b/test_regress/t/t_constraint_state.v index bd3a69150..6a6af40ac 100644 --- a/test_regress/t/t_constraint_state.v +++ b/test_regress/t/t_constraint_state.v @@ -7,8 +7,8 @@ `define check_rand(cl, field, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize())) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ diff --git a/test_regress/t/t_constraint_unsup_unq_arr.v b/test_regress/t/t_constraint_unsup_unq_arr.v index 30a43026d..8759092c7 100644 --- a/test_regress/t/t_constraint_unsup_unq_arr.v +++ b/test_regress/t/t_constraint_unsup_unq_arr.v @@ -57,7 +57,7 @@ endclass : UniqueMultipleArray module t; initial begin // Create an instance of the UniqueMultipleArray class - UniqueMultipleArray array_instance = new(); + automatic UniqueMultipleArray array_instance = new(); // Attempt to randomize and verify the constraints /* verilator lint_off WIDTHTRUNC */ diff --git a/test_regress/t/t_cover_expr.out b/test_regress/t/t_cover_expr.out index 7ba2faa79..f973e7fbb 100644 --- a/test_regress/t/t_cover_expr.out +++ b/test_regress/t/t_cover_expr.out @@ -288,10 +288,10 @@ logic ta, tb, tc; initial begin - cls obj = new; - cls null_obj = null; - int q[5]; - int qv[$]; + automatic cls obj = new; + automatic cls null_obj = null; + automatic int q[5]; + automatic int qv[$]; q = '{1, 2, 2, 4, 3}; // lambas not handled diff --git a/test_regress/t/t_cover_expr.v b/test_regress/t/t_cover_expr.v index cc4705ede..7026c5b49 100644 --- a/test_regress/t/t_cover_expr.v +++ b/test_regress/t/t_cover_expr.v @@ -128,10 +128,10 @@ module t (/*AUTOARG*/ logic ta, tb, tc; initial begin - cls obj = new; - cls null_obj = null; - int q[5]; - int qv[$]; + automatic cls obj = new; + automatic cls null_obj = null; + automatic int q[5]; + automatic int qv[$]; q = '{1, 2, 2, 4, 3}; // lambas not handled diff --git a/test_regress/t/t_cover_expr_array_class.v b/test_regress/t/t_cover_expr_array_class.v index 2e21c532d..e2f6f2d3a 100644 --- a/test_regress/t/t_cover_expr_array_class.v +++ b/test_regress/t/t_cover_expr_array_class.v @@ -10,10 +10,10 @@ endclass module t; initial begin - int i = 0; + int i; Class1 q[15]; for (int j = 0; j < 15; j = j + 1) begin - Class1 x = new; + automatic Class1 x = new; q[j] = x; end while (i < 15) begin diff --git a/test_regress/t/t_cover_expr_associative_array_class.v b/test_regress/t/t_cover_expr_associative_array_class.v index 3072ca2d6..ac7b1ef6c 100644 --- a/test_regress/t/t_cover_expr_associative_array_class.v +++ b/test_regress/t/t_cover_expr_associative_array_class.v @@ -10,10 +10,10 @@ endclass module t; initial begin - int i = 0; - Class1 q[int] = '{}; + int i; + automatic Class1 q[int] = '{}; for (int j = 0; j < 15; j = j + 1) begin - Class1 x = new; + automatic Class1 x = new; q[j] = x; end while (i < 15) begin diff --git a/test_regress/t/t_cover_expr_dyn_array_class.v b/test_regress/t/t_cover_expr_dyn_array_class.v index 73b4e0a7e..47e4ede5b 100644 --- a/test_regress/t/t_cover_expr_dyn_array_class.v +++ b/test_regress/t/t_cover_expr_dyn_array_class.v @@ -10,10 +10,10 @@ endclass module t; initial begin - int i = 0; - Class1 q[] = new [15]; + automatic int i; + automatic Class1 q[] = new [15]; for (int j = 0; j < 15; j = j + 1) begin - Class1 x = new; + automatic Class1 x = new; q[j] = x; end while (i < 15) begin diff --git a/test_regress/t/t_cover_expr_max.out b/test_regress/t/t_cover_expr_max.out index 62c4af20c..1ad79a715 100644 --- a/test_regress/t/t_cover_expr_max.out +++ b/test_regress/t/t_cover_expr_max.out @@ -416,10 +416,10 @@ logic ta, tb, tc; initial begin - cls obj = new; - cls null_obj = null; - int q[5]; - int qv[$]; + automatic cls obj = new; + automatic cls null_obj = null; + automatic int q[5]; + automatic int qv[$]; q = '{1, 2, 2, 4, 3}; // lambas not handled diff --git a/test_regress/t/t_cover_expr_queue_class.v b/test_regress/t/t_cover_expr_queue_class.v index 1523e77cd..abae5e3b5 100644 --- a/test_regress/t/t_cover_expr_queue_class.v +++ b/test_regress/t/t_cover_expr_queue_class.v @@ -10,10 +10,10 @@ endclass module t; initial begin - int i = 0; + int i; Class1 q[$]; repeat(15) begin - Class1 x = new; + automatic Class1 x = new; q = { q, x }; end while (i < q.size()) begin diff --git a/test_regress/t/t_cover_expr_trace.out b/test_regress/t/t_cover_expr_trace.out index 7ba2faa79..f973e7fbb 100644 --- a/test_regress/t/t_cover_expr_trace.out +++ b/test_regress/t/t_cover_expr_trace.out @@ -288,10 +288,10 @@ logic ta, tb, tc; initial begin - cls obj = new; - cls null_obj = null; - int q[5]; - int qv[$]; + automatic cls obj = new; + automatic cls null_obj = null; + automatic int q[5]; + automatic int qv[$]; q = '{1, 2, 2, 4, 3}; // lambas not handled diff --git a/test_regress/t/t_cover_line_expr.out b/test_regress/t/t_cover_line_expr.out index e1e2519b9..15c2aa4a8 100644 --- a/test_regress/t/t_cover_line_expr.out +++ b/test_regress/t/t_cover_line_expr.out @@ -397,12 +397,12 @@ logic ta, tb, tc; %000001 initial begin -000001 point: comment=block hier=top.t -%000001 cls obj = new; +%000001 automatic cls obj = new; -000001 point: comment=block hier=top.t -%000001 cls null_obj = null; +%000001 automatic cls null_obj = null; -000001 point: comment=block hier=top.t - int q[5]; - int qv[$]; + automatic int q[5]; + automatic int qv[$]; %000001 q = '{1, 2, 2, 4, 3}; -000001 point: comment=block hier=top.t diff --git a/test_regress/t/t_covergroup_unsup.v b/test_regress/t/t_covergroup_unsup.v index 37f844a5c..dcdac2852 100644 --- a/test_regress/t/t_covergroup_unsup.v +++ b/test_regress/t/t_covergroup_unsup.v @@ -197,9 +197,9 @@ module t (/*AUTOARG*/ endclass initial begin - cg_empty cov1 = new; + automatic cg_empty cov1 = new; `ifndef T_COVERGROUP_UNSUP_IGN - cgArgs cov2 = new(2); + automatic cgArgs cov2 = new(2); `endif end diff --git a/test_regress/t/t_disable_empty_outside.v b/test_regress/t/t_disable_empty_outside.v index 16bebdae0..de71c4429 100644 --- a/test_regress/t/t_disable_empty_outside.v +++ b/test_regress/t/t_disable_empty_outside.v @@ -7,7 +7,7 @@ module t; initial begin begin : blk - int x = 0; + static int x = 0; fork : fork_blk begin end diff --git a/test_regress/t/t_disable_inside.v b/test_regress/t/t_disable_inside.v index c305e85b9..8cd151611 100644 --- a/test_regress/t/t_disable_inside.v +++ b/test_regress/t/t_disable_inside.v @@ -6,7 +6,7 @@ module t; initial begin - int x = 0; + static int x = 0; fork : fork_blk begin #1; @@ -28,7 +28,7 @@ module t; end initial begin - int y = 0; + static int y = 0; fork begin : fork_branch #1; diff --git a/test_regress/t/t_disable_outside.v b/test_regress/t/t_disable_outside.v index 723d92cae..065bdee7e 100644 --- a/test_regress/t/t_disable_outside.v +++ b/test_regress/t/t_disable_outside.v @@ -7,7 +7,7 @@ module t; initial begin begin : blk - int x = 0; + int x; fork : fork_blk begin x = 1; diff --git a/test_regress/t/t_disable_outside2.v b/test_regress/t/t_disable_outside2.v index 0d58486cc..cd4a4e8f3 100644 --- a/test_regress/t/t_disable_outside2.v +++ b/test_regress/t/t_disable_outside2.v @@ -8,7 +8,7 @@ module t; initial begin for (int i = 0; i < 3; i++) begin begin : blk - int x = 0; + int x; fork : fork_blk begin x = 1; diff --git a/test_regress/t/t_disable_outside3.v b/test_regress/t/t_disable_outside3.v index 001277cdb..0193608ea 100644 --- a/test_regress/t/t_disable_outside3.v +++ b/test_regress/t/t_disable_outside3.v @@ -7,7 +7,7 @@ module t; initial begin begin : blk - int x = 0; + int x; fork : fork_blk begin #4; diff --git a/test_regress/t/t_disable_outside4.v b/test_regress/t/t_disable_outside4.v index ea32845ba..02942a608 100644 --- a/test_regress/t/t_disable_outside4.v +++ b/test_regress/t/t_disable_outside4.v @@ -7,7 +7,7 @@ module t; initial begin begin : blk - int x = 0; + int x; fork begin #1; diff --git a/test_regress/t/t_disable_task_simple.v b/test_regress/t/t_disable_task_simple.v index a107e7f77..a594146ad 100644 --- a/test_regress/t/t_disable_task_simple.v +++ b/test_regress/t/t_disable_task_simple.v @@ -34,7 +34,7 @@ endclass module t; initial begin - Cls c = new; + automatic Cls c = new; c.disable_outside_fork(); #2; if (c.x != 1) $stop; diff --git a/test_regress/t/t_disable_within_task_unsup.v b/test_regress/t/t_disable_within_task_unsup.v index 3a00865c2..4ae25c626 100644 --- a/test_regress/t/t_disable_within_task_unsup.v +++ b/test_regress/t/t_disable_within_task_unsup.v @@ -11,7 +11,7 @@ endtask module t; initial begin : init - int x = 0; + int x; fork : fork_blk begin x = 1; diff --git a/test_regress/t/t_do_while.v b/test_regress/t/t_do_while.v index 53eacab1f..10e734d52 100644 --- a/test_regress/t/t_do_while.v +++ b/test_regress/t/t_do_while.v @@ -20,7 +20,7 @@ module t; a = 0; do begin - int x = 1; + automatic int x = 1; a += x; if (a == 1) begin a = 2; @@ -55,7 +55,7 @@ module t; a = 1; do begin do begin - int x = 1; + automatic int x = 1; a += x; end while (a < 3); end while (a < 5); diff --git a/test_regress/t/t_dpi_inline_new.v b/test_regress/t/t_dpi_inline_new.v index 789c68b20..eee47f080 100644 --- a/test_regress/t/t_dpi_inline_new.v +++ b/test_regress/t/t_dpi_inline_new.v @@ -41,7 +41,7 @@ module t ( import pyhdl_if::*; initial begin - py_tuple t0 = new; + automatic py_tuple t0 = new; py_object o; o = t0.get_item(1); $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_dynarray_cast_write.v b/test_regress/t/t_dynarray_cast_write.v index 82f7dea19..b7e69e509 100644 --- a/test_regress/t/t_dynarray_cast_write.v +++ b/test_regress/t/t_dynarray_cast_write.v @@ -16,10 +16,10 @@ endclass module t; initial begin - int sel_bit = 3; - Bar bar = new; - Foo foo = bar; - Bar bars[] = new[4]; + automatic int sel_bit = 3; + automatic Bar bar = new; + automatic Foo foo = bar; + automatic Bar bars[] = new[4]; $cast(bars[0], foo); if (bars[0].x != 2) $stop; diff --git a/test_regress/t/t_expr_incr_unsup.v b/test_regress/t/t_expr_incr_unsup.v index af7b31fad..0e48015f0 100644 --- a/test_regress/t/t_expr_incr_unsup.v +++ b/test_regress/t/t_expr_incr_unsup.v @@ -12,7 +12,7 @@ endfunction module t; initial begin - int arr [1:0] = {0, 0}; + automatic int arr [1:0] = {0, 0}; i = 0; $display("Value: %d", arr[postincrement_i()]++); end diff --git a/test_regress/t/t_flag_output_groups.v b/test_regress/t/t_flag_output_groups.v index 7bd911b49..909fa1c23 100644 --- a/test_regress/t/t_flag_output_groups.v +++ b/test_regress/t/t_flag_output_groups.v @@ -27,7 +27,7 @@ module t (/*AUTOARG*/ genvar i; for (i = 0; i < MAX; i++) initial begin - Foo#(i) item = new; + automatic Foo#(i) item = new; q.push_back(item); end endgenerate diff --git a/test_regress/t/t_foreach_iface.v b/test_regress/t/t_foreach_iface.v index a93695d0f..7f7146ef2 100644 --- a/test_regress/t/t_foreach_iface.v +++ b/test_regress/t/t_foreach_iface.v @@ -6,7 +6,7 @@ interface Iface (input bit [31:0] regs [1]); initial begin - string instance_path = $sformatf("%m"); + automatic string instance_path = $sformatf("%m"); $display("Iface path %s\n", instance_path); $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_foreach_nested.v b/test_regress/t/t_foreach_nested.v index 042d7200a..9afa6e957 100644 --- a/test_regress/t/t_foreach_nested.v +++ b/test_regress/t/t_foreach_nested.v @@ -21,7 +21,7 @@ endclass module t; initial begin - Bar b = new; + automatic Bar b = new; b.test; $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_fork_block_item_declaration.v b/test_regress/t/t_fork_block_item_declaration.v index 20c438229..79f996d63 100644 --- a/test_regress/t/t_fork_block_item_declaration.v +++ b/test_regress/t/t_fork_block_item_declaration.v @@ -23,7 +23,7 @@ endclass module t(); initial begin - int desired_counts[10] = '{10{1}}; + automatic int desired_counts[10] = '{10{1}}; counts = '{10{0}}; Foo::do_something(); diff --git a/test_regress/t/t_fork_none_var.v b/test_regress/t/t_fork_none_var.v index ede254ff7..bbf2b5b6c 100644 --- a/test_regress/t/t_fork_none_var.v +++ b/test_regress/t/t_fork_none_var.v @@ -10,7 +10,7 @@ module t; initial begin int i; - int n = 4; + automatic int n = 4; m_mask = 0; fork begin diff --git a/test_regress/t/t_func_call_super_arg.v b/test_regress/t/t_func_call_super_arg.v index befee3703..2e0065931 100644 --- a/test_regress/t/t_func_call_super_arg.v +++ b/test_regress/t/t_func_call_super_arg.v @@ -23,6 +23,6 @@ endclass module t; initial begin - derived test = new; + automatic derived test = new; end endmodule diff --git a/test_regress/t/t_inside_extend.v b/test_regress/t/t_inside_extend.v index 79cb8e31e..4b80e1654 100644 --- a/test_regress/t/t_inside_extend.v +++ b/test_regress/t/t_inside_extend.v @@ -10,12 +10,13 @@ class Cls; endclass module t; - initial begin - Cls c = new; - int i = 0; - if (i inside {c.sp}) $stop; + initial begin + Cls c; + int i; + c = new; + if (i inside {c.sp}) $stop; - $write("*-* All Finished *-*\n"); - $finish; - end + $write("*-* All Finished *-*\n"); + $finish; + end endmodule diff --git a/test_regress/t/t_inside_queue_elem.v b/test_regress/t/t_inside_queue_elem.v index 8d1161d83..c0fcad54b 100644 --- a/test_regress/t/t_inside_queue_elem.v +++ b/test_regress/t/t_inside_queue_elem.v @@ -7,7 +7,8 @@ module t; initial begin - int q[$] = {1, 2}; + automatic int q[$] = {1, 2}; + if (!(1 inside {q[0], q[1]})) $stop; if (3 inside {q[0], q[1]}) $stop; diff --git a/test_regress/t/t_interface_dearray.v b/test_regress/t/t_interface_dearray.v index 45de9528b..88f355664 100644 --- a/test_regress/t/t_interface_dearray.v +++ b/test_regress/t/t_interface_dearray.v @@ -31,7 +31,7 @@ module tb_top(); initial begin static a_t aa = a[0]; - B b = new(a[0]); + automatic B b = new(a[0]); c = new(); c.vif = a; diff --git a/test_regress/t/t_interface_virtual_do_while.v b/test_regress/t/t_interface_virtual_do_while.v index 774636755..5137fe530 100644 --- a/test_regress/t/t_interface_virtual_do_while.v +++ b/test_regress/t/t_interface_virtual_do_while.v @@ -23,7 +23,7 @@ module t; initial @(posedge vif.data) ok = 1; initial begin - bit first = 1; + static bit first = 1; #1; do begin if (!first) $stop; diff --git a/test_regress/t/t_lint_dtype_compare.v b/test_regress/t/t_lint_dtype_compare.v index 3e1cf970c..ea54c8705 100644 --- a/test_regress/t/t_lint_dtype_compare.v +++ b/test_regress/t/t_lint_dtype_compare.v @@ -14,42 +14,42 @@ module t; initial begin // Scalar - int a = 1, b = 1; + automatic int a = 1, b = 1; // Unpacked array - int u1[2] = '{1, 2}; - int u2[2] = '{1, 2}; + automatic int u1[2] = '{1, 2}; + automatic int u2[2] = '{1, 2}; - int m1[2][2] = '{{1, 2}, {3, 4}}; - int m2[2][2] = '{{1, 2}, {3, 4}}; + automatic int m1[2][2] = '{{1, 2}, {3, 4}}; + automatic int m2[2][2] = '{{1, 2}, {3, 4}}; // Dynamic array - int d1[] = new[2]; - int d2[] = new[2]; + automatic int d1[] = new[2]; + automatic int d2[] = new[2]; // Queue - int q1[$] = '{10, 20}; - int q2[$] = '{10, 20}; + automatic int q1[$] = '{10, 20}; + automatic int q2[$] = '{10, 20}; // Associative array - int aa1[string]; - int aa2[string]; + automatic int aa1[string]; + automatic int aa2[string]; // Typedef array - myint_t t1[2] = '{1, 2}; - myint2_t t2[2] = '{1, 2}; + automatic myint_t t1[2] = '{1, 2}; + automatic myint2_t t2[2] = '{1, 2}; // Typedef queue - myq_t tq1 = '{1, 2}; - int tq2[$] = '{1, 2}; + automatic myq_t tq1 = '{1, 2}; + automatic int tq2[$] = '{1, 2}; // Typedef associative array - myval_t aa_typedef1[mykey_t]; - int aa_typedef2[string]; + automatic myval_t aa_typedef1[mykey_t]; + automatic int aa_typedef2[string]; // Typedef scalar - bit signed [31:0] b1 = 1; - int i1 = 1; + automatic bit signed [31:0] b1 = 1; + automatic int i1 = 1; d1[0] = 5; d1[1] = 6; d2[0] = 5; d2[1] = 6; diff --git a/test_regress/t/t_lint_dtype_compare_bad.v b/test_regress/t/t_lint_dtype_compare_bad.v index 563f994c2..13be87d02 100644 --- a/test_regress/t/t_lint_dtype_compare_bad.v +++ b/test_regress/t/t_lint_dtype_compare_bad.v @@ -18,33 +18,33 @@ module t; typedef logic [31:0] mylogic_t; initial begin - int queue_var[$] = '{1, 2, 3}; - int q1[$] = '{1, 2}; - bit q2[$] = '{1'b1, 1'b0}; + automatic int queue_var[$] = '{1, 2, 3}; + automatic int q1[$] = '{1, 2}; + automatic bit q2[$] = '{1'b1, 1'b0}; - int d1[] = new[2]; - bit d2[] = new[2]; + automatic int d1[] = new[2]; + automatic bit d2[] = new[2]; - int u1[2] = '{1, 2}; - int u2[2][1] = '{{1}, {2}}; + automatic int u1[2] = '{1, 2}; + automatic int u2[2][1] = '{{1}, {2}}; - int a1[2] = '{1, 2}; - int a2[3] = '{1, 2, 3}; + automatic int a1[2] = '{1, 2}; + automatic int a2[3] = '{1, 2, 3}; - int aa1[string]; - int aa2[int]; + automatic int aa1[string]; + automatic int aa2[int]; - int aa3[string]; - logic [3:0] aa4[string]; + automatic int aa3[string]; + automatic logic [3:0] aa4[string]; - myint_t bad1[2] = '{1, 2}; - mybit_t bad2[2] = '{1, 0}; + automatic myint_t bad1[2] = '{1, 2}; + automatic mybit_t bad2[2] = '{1, 0}; - myval_t val1[mystr_t] = '{"foo": 123}; - mylogic_t val2[string] = '{"foo": 32'h12345678}; + automatic myval_t val1[mystr_t] = '{"foo": 123}; + automatic mylogic_t val2[string] = '{"foo": 32'h12345678}; - myint_t aa5[string]; - myint_t aa6[int]; + automatic myint_t aa5[string]; + automatic myint_t aa6[int]; aa5["a"] = 1; aa6[1] = 1; diff --git a/test_regress/t/t_lint_sideeffect_bad.v b/test_regress/t/t_lint_sideeffect_bad.v index 8c6b99ad6..951150aec 100644 --- a/test_regress/t/t_lint_sideeffect_bad.v +++ b/test_regress/t/t_lint_sideeffect_bad.v @@ -12,7 +12,7 @@ endfunction module t; initial begin - int arr [3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; + automatic int arr [3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; i = 0; arr[postincrement_i()][postincrement_i()]++; $display("Value: %d", i); diff --git a/test_regress/t/t_lint_unusedloop_removed_bad.v b/test_regress/t/t_lint_unusedloop_removed_bad.v index 2521e9f90..ccf2bcade 100644 --- a/test_regress/t/t_lint_unusedloop_removed_bad.v +++ b/test_regress/t/t_lint_unusedloop_removed_bad.v @@ -226,21 +226,21 @@ module if_with_param; initial begin if (ZERO_PARAM) begin // loop under false parameterized if - no warning - int prints = 0; + int prints; while(prints < 5) begin prints++; end $write("Prints %d\n", prints); end else if (!ONE_PARAM) begin // loop under false parameterized if - no warning - int prints = 0; + int prints; while(prints < 5) begin prints++; end $write("Prints %d\n", prints); end else begin // loop under true parameterized if - no warning - int prints = 0; + int prints; while(prints < 5) begin prints++; end diff --git a/test_regress/t/t_math_shortcircuit_assocsel.v b/test_regress/t/t_math_shortcircuit_assocsel.v index 04081e757..3de494fbb 100644 --- a/test_regress/t/t_math_shortcircuit_assocsel.v +++ b/test_regress/t/t_math_shortcircuit_assocsel.v @@ -24,7 +24,7 @@ module t; return next_nonzero; endfunction initial begin - logic r = f(0); + automatic logic r = f(0); $display(r); $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_math_shortcircuit_dynsel.v b/test_regress/t/t_math_shortcircuit_dynsel.v index f3424e26b..164f41e02 100644 --- a/test_regress/t/t_math_shortcircuit_dynsel.v +++ b/test_regress/t/t_math_shortcircuit_dynsel.v @@ -24,7 +24,7 @@ module t; return next_nonzero; endfunction initial begin - logic r = f(0); + automatic logic r = f(0); $display(r); $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_package.v b/test_regress/t/t_package.v index d5d30265c..99d559c4e 100644 --- a/test_regress/t/t_package.v +++ b/test_regress/t/t_package.v @@ -66,7 +66,7 @@ module t2; package_type_t vp; package2_type_t vp2; initial begin - bit x = realCompare(1.0); + automatic bit x = realCompare(1.0); if (plusone(1) !== 2) $stop; if (plustwo(1) !== 3) $stop; if (p::pi !== 123 && p::pi !== 124) $stop; // may race with other initial, so either value diff --git a/test_regress/t/t_param_passed_to_port.v b/test_regress/t/t_param_passed_to_port.v index ddaf83eb0..ff971ed03 100644 --- a/test_regress/t/t_param_passed_to_port.v +++ b/test_regress/t/t_param_passed_to_port.v @@ -10,7 +10,7 @@ module flash_mp_data_region_sel ( input int region_attrs_i[1] ); initial begin - int o = 0; + automatic int o = 0; for (int i = 0; i < 1; i++) begin o = region_attrs_i[i]; end diff --git a/test_regress/t/t_param_slice.v b/test_regress/t/t_param_slice.v index bd771dfef..358c1edd6 100644 --- a/test_regress/t/t_param_slice.v +++ b/test_regress/t/t_param_slice.v @@ -21,7 +21,7 @@ module issue_desc #( ) x(); end initial begin - int expected = orig_els - els_p + 1; + automatic int expected = orig_els - els_p + 1; if (val_p[2] !== expected) begin $error("DESC wrong value %0d expected %0d in %m", val_p[2], expected); $finish; @@ -44,7 +44,7 @@ module issue_rev #( ) x(); end initial begin - int expected = orig_els - els_p + 1; + automatic int expected = orig_els - els_p + 1; if (val_p[2] !== expected) begin $error("REV wrong value %0d expected %0d in %m", val_p[2], expected); $finish; diff --git a/test_regress/t/t_queue_compare.v b/test_regress/t/t_queue_compare.v index 79f04b30c..eeaa1ddfa 100644 --- a/test_regress/t/t_queue_compare.v +++ b/test_regress/t/t_queue_compare.v @@ -42,8 +42,8 @@ module t; end begin // classes - Cls a = new; - Cls b = new; + automatic Cls a = new; + automatic Cls b = new; Cls q1[$]; Cls q2[$]; q1.push_back(a); diff --git a/test_regress/t/t_queue_concat_assign.v b/test_regress/t/t_queue_concat_assign.v index b6cd8faa3..f6fcc8114 100644 --- a/test_regress/t/t_queue_concat_assign.v +++ b/test_regress/t/t_queue_concat_assign.v @@ -7,11 +7,11 @@ module t; initial begin - bit q1[$] = {1'b1}; + automatic bit q1[$] = {1'b1}; bit q2[$]; bit q3[$]; - bit [1:0] d1[$] = {2'b10}; + automatic bit [1:0] d1[$] = {2'b10}; bit [1:0] d2[$]; bit [1:0] d3[$]; diff --git a/test_regress/t/t_queue_slice.v b/test_regress/t/t_queue_slice.v index 55354b276..925dd6122 100644 --- a/test_regress/t/t_queue_slice.v +++ b/test_regress/t/t_queue_slice.v @@ -77,7 +77,7 @@ module t; `checkp(q, "'{\"a\", \"b\", \"a\", \"b\"}"); begin - string ai[$] = '{ "Foo", "Bar" }; + static string ai[$] = '{ "Foo", "Bar" }; q = ai; // Copy i = q.size(); `checkh(i, 2); v = q.pop_front(); `checks(v, "Foo"); diff --git a/test_regress/t/t_rand_member_mode_deriv.v b/test_regress/t/t_rand_member_mode_deriv.v index aaafaba91..cb1376d2c 100644 --- a/test_regress/t/t_rand_member_mode_deriv.v +++ b/test_regress/t/t_rand_member_mode_deriv.v @@ -24,7 +24,7 @@ endclass module t; Base b; initial begin - Foo d = new; + automatic Foo d = new; b = d; d.v.disable_val(); d.v.value = 11; diff --git a/test_regress/t/t_randomize.v b/test_regress/t/t_randomize.v index a1c293b8a..2c613ac94 100644 --- a/test_regress/t/t_randomize.v +++ b/test_regress/t/t_randomize.v @@ -56,8 +56,8 @@ module t; initial begin - int v; - bit if_4 = '0; + automatic int v; + automatic bit if_4 = '0; // TODO not testing constrained values v = p.randomize(); if (v != 1) $stop; diff --git a/test_regress/t/t_randomize_arraysel_membersel.v b/test_regress/t/t_randomize_arraysel_membersel.v index 1dee6edbb..845ccffd8 100644 --- a/test_regress/t/t_randomize_arraysel_membersel.v +++ b/test_regress/t/t_randomize_arraysel_membersel.v @@ -21,7 +21,7 @@ endclass module t; initial begin - int x = 2; + automatic int x = 2; test_class example; example = new; example.b = new; diff --git a/test_regress/t/t_randomize_complex.v b/test_regress/t/t_randomize_complex.v index 26e70ff8a..9a0debf0f 100644 --- a/test_regress/t/t_randomize_complex.v +++ b/test_regress/t/t_randomize_complex.v @@ -34,8 +34,8 @@ endclass module t; initial begin - WeNeedToGoDeeper cl_inst = new; - MyClass cl_inst2 = new; + automatic WeNeedToGoDeeper cl_inst = new; + automatic MyClass cl_inst2 = new; repeat (10) begin if (cl_inst.sc_inst.sc_inst1.sc_inst2.randomize() with {field inside {1, 2, 3};} == 0) begin $stop; diff --git a/test_regress/t/t_randomize_complex_queue.v b/test_regress/t/t_randomize_complex_queue.v index 4d9a3fce6..9c3dc9e84 100644 --- a/test_regress/t/t_randomize_complex_queue.v +++ b/test_regress/t/t_randomize_complex_queue.v @@ -35,10 +35,10 @@ endclass module t; initial begin - WeNeedToGoDeeper inst = new; - MyClass inst2 = new; - WeNeedToGoDeeper cl_inst[$] = {inst}; - MyClass cl_inst2[$] = {inst2}; + automatic WeNeedToGoDeeper inst = new; + automatic MyClass inst2 = new; + automatic WeNeedToGoDeeper cl_inst[$] = {inst}; + automatic MyClass cl_inst2[$] = {inst2}; repeat (10) begin if (cl_inst[0].sc_inst.sc_inst1.sc_inst2[0].randomize() with { field inside {1, 2, 3}; diff --git a/test_regress/t/t_randomize_from_randomized_class.v b/test_regress/t/t_randomize_from_randomized_class.v index 44b01ee62..46a6b8b7a 100644 --- a/test_regress/t/t_randomize_from_randomized_class.v +++ b/test_regress/t/t_randomize_from_randomized_class.v @@ -22,7 +22,7 @@ endclass module t; initial begin - B b = new; + automatic B b = new; b.r(); if (b.a.j != 7) $stop; $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_randomize_inline_var_ctl_bad.v b/test_regress/t/t_randomize_inline_var_ctl_bad.v index e16dfab29..6b806e823 100644 --- a/test_regress/t/t_randomize_inline_var_ctl_bad.v +++ b/test_regress/t/t_randomize_inline_var_ctl_bad.v @@ -19,10 +19,10 @@ endclass module t; initial begin - Foo foo = new; - Foo qux = new; - Bar bar = new; - int x; + automatic Foo foo = new; + automatic Foo qux = new; + automatic Bar bar = new; + automatic int x; void'(foo.randomize(x, foo.x, null, qux.x, bar.y, 0 + 1, x ** 2)); end endmodule diff --git a/test_regress/t/t_randomize_inline_var_ctl_unsup_1.v b/test_regress/t/t_randomize_inline_var_ctl_unsup_1.v index f25d0173b..96224aac2 100644 --- a/test_regress/t/t_randomize_inline_var_ctl_unsup_1.v +++ b/test_regress/t/t_randomize_inline_var_ctl_unsup_1.v @@ -15,8 +15,8 @@ endclass module t; initial begin - Foo foo = Foo::get(); - Foo foos[] = new[1]; + automatic Foo foo = Foo::get(); + automatic Foo foos[] = new[1]; void'(foo.randomize(Foo::get().x)); void'(foo.randomize(foos[0].x)); void'(foo.randomize(null)); diff --git a/test_regress/t/t_randomize_method.v b/test_regress/t/t_randomize_method.v index b3863d1df..d5fa914c0 100644 --- a/test_regress/t/t_randomize_method.v +++ b/test_regress/t/t_randomize_method.v @@ -6,8 +6,8 @@ `define check_rand(cl, field) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ void'(cl.randomize()); \ prev_result = longint'(field); \ repeat(9) begin \ diff --git a/test_regress/t/t_randomize_method_std.v b/test_regress/t/t_randomize_method_std.v index 5b859ba89..6c1d2cbe1 100644 --- a/test_regress/t/t_randomize_method_std.v +++ b/test_regress/t/t_randomize_method_std.v @@ -14,7 +14,7 @@ endclass module t; initial begin - C c = new; + automatic C c = new; $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_randomize_method_with.v b/test_regress/t/t_randomize_method_with.v index 22fc0c46f..4b2f638a9 100644 --- a/test_regress/t/t_randomize_method_with.v +++ b/test_regress/t/t_randomize_method_with.v @@ -6,8 +6,8 @@ `define check_rand(cl, field) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ void'(cl.randomize()); \ prev_result = longint'(field); \ repeat(9) begin \ @@ -106,15 +106,16 @@ module mwith(); endfunction initial begin - int c = 30; - Foo foo = new(c); - Baz baz = new; + automatic int c = 30; + automatic Foo foo = new(c); + automatic Baz baz = new; typedef Baz baz_t; - baz_t baz1 = new; - Baz2 baz2 = new; - Bar bar = new; - Cls2 cls2 = new; - Cls cls = cls2; + automatic baz_t baz1 = new; + automatic Baz2 baz2 = new; + automatic Bar bar = new; + automatic Cls2 cls2 = new; + automatic Cls cls = cls2; + $display("foo.x = %d", foo.x); $display("-----------------"); diff --git a/test_regress/t/t_randomize_method_with_bad.out b/test_regress/t/t_randomize_method_with_bad.out index 736915084..b0dc8912b 100644 --- a/test_regress/t/t_randomize_method_with_bad.out +++ b/test_regress/t/t_randomize_method_with_bad.out @@ -1,5 +1,5 @@ -%Error: t/t_randomize_method_with_bad.v:18:42: Can't find definition of task/function: 'in_mod_function' - 18 | int res = foo.randomize() with { v < in_mod_function(); }; - | ^~~~~~~~~~~~~~~ +%Error: t/t_randomize_method_with_bad.v:18:52: Can't find definition of task/function: 'in_mod_function' + 18 | automatic int res = foo.randomize() with { v < in_mod_function(); }; + | ^~~~~~~~~~~~~~~ ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. %Error: Exiting due to diff --git a/test_regress/t/t_randomize_method_with_bad.v b/test_regress/t/t_randomize_method_with_bad.v index a4afd0901..5e6ce7ac8 100644 --- a/test_regress/t/t_randomize_method_with_bad.v +++ b/test_regress/t/t_randomize_method_with_bad.v @@ -14,7 +14,7 @@ module t_randomize_method_with_bad(); endfunction initial begin - Foo foo = new; - int res = foo.randomize() with { v < in_mod_function(); }; + automatic Foo foo = new; + automatic int res = foo.randomize() with { v < in_mod_function(); }; end endmodule diff --git a/test_regress/t/t_randomize_param_with.v b/test_regress/t/t_randomize_param_with.v index 113f02f40..89dcede46 100644 --- a/test_regress/t/t_randomize_param_with.v +++ b/test_regress/t/t_randomize_param_with.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, constr, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize() with { constr; })) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ @@ -30,8 +30,8 @@ endclass module t; initial begin - Cls#() cd = new; - Cls#(5) c5 = new; + automatic Cls#() cd = new; + automatic Cls#(5) c5 = new; `check_rand(cd, cd.x, x > 0, cd.x > 0 && cd.x <= 3); `check_rand(cd, cd.x, x > y, cd.x > -100 && cd.x <= 3); diff --git a/test_regress/t/t_randomize_queue_constraints.v b/test_regress/t/t_randomize_queue_constraints.v index bfc0f2282..6677b110e 100644 --- a/test_regress/t/t_randomize_queue_constraints.v +++ b/test_regress/t/t_randomize_queue_constraints.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize())) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ @@ -41,7 +41,7 @@ endclass module t_randomize_queue_constraints; initial begin - Foo foo = new; + automatic Foo foo = new; `check_rand(foo, foo.m_idx, foo.m_idx inside {[0:9]} && foo.m_intQueue[foo.m_idx] == foo.m_idx + 1); $display("Queue: %p", foo.m_intQueue); diff --git a/test_regress/t/t_randomize_queue_size.v b/test_regress/t/t_randomize_queue_size.v index b1707b77d..2fbc550a6 100644 --- a/test_regress/t/t_randomize_queue_size.v +++ b/test_regress/t/t_randomize_queue_size.v @@ -6,8 +6,8 @@ `define check_rand(cl, field, cond) \ begin \ - longint prev_result; \ - int ok = 0; \ + automatic longint prev_result; \ + automatic int ok; \ if (!bit'(cl.randomize())) $stop; \ prev_result = longint'(field); \ if (!(cond)) $stop; \ @@ -55,9 +55,9 @@ endclass module t; initial begin - Foo foo = new; - Bar bar = new; - Baz baz = new; + automatic Foo foo = new; + automatic Bar bar = new; + automatic Baz baz = new; void'(foo.randomize()); if (foo.q.size() != 15) $stop; diff --git a/test_regress/t/t_randomize_queue_wide.v b/test_regress/t/t_randomize_queue_wide.v index 1e7801f62..12643c64e 100644 --- a/test_regress/t/t_randomize_queue_wide.v +++ b/test_regress/t/t_randomize_queue_wide.v @@ -26,7 +26,7 @@ endclass module t; int success; initial begin - Foo foo = new; + automatic Foo foo = new; success = foo.randomize(); if (success != 1) $stop; foo.self_check(); diff --git a/test_regress/t/t_randomize_rand_mode_constr.v b/test_regress/t/t_randomize_rand_mode_constr.v index 5f5bc536e..49e6dba4d 100644 --- a/test_regress/t/t_randomize_rand_mode_constr.v +++ b/test_regress/t/t_randomize_rand_mode_constr.v @@ -99,11 +99,11 @@ endclass module t; initial begin - logic ok = 0; - int res; - Baz baz = new; - Qux qux = new; - Quux quux = new; + automatic logic ok = 0; + automatic int res; + automatic Baz baz = new; + automatic Qux qux = new; + automatic Quux quux = new; baz.test; qux.test; diff --git a/test_regress/t/t_randomize_rand_mode_unsup.v b/test_regress/t/t_randomize_rand_mode_unsup.v index 89cf1039a..98fcdd99a 100644 --- a/test_regress/t/t_randomize_rand_mode_unsup.v +++ b/test_regress/t/t_randomize_rand_mode_unsup.v @@ -13,7 +13,7 @@ endclass module t; initial begin - Packet p = new; + automatic Packet p = new; p.m_dyn_arr[0].rand_mode(0); p.m_unp_arr[0].rand_mode(0); p.m_struct.y.rand_mode(0); diff --git a/test_regress/t/t_randomize_this_with.v b/test_regress/t/t_randomize_this_with.v index 33aa0067d..8a2d3d7b2 100644 --- a/test_regress/t/t_randomize_this_with.v +++ b/test_regress/t/t_randomize_this_with.v @@ -23,7 +23,7 @@ endclass module t; initial begin - Cls c = new; + automatic Cls c = new; c.body(); $finish; end diff --git a/test_regress/t/t_randomize_unpacked_wide.v b/test_regress/t/t_randomize_unpacked_wide.v index afd975960..74c4174bc 100644 --- a/test_regress/t/t_randomize_unpacked_wide.v +++ b/test_regress/t/t_randomize_unpacked_wide.v @@ -22,7 +22,7 @@ endclass module t; int success; initial begin - Foo foo = new; + automatic Foo foo = new; success = foo.randomize(); if (success != 1) $stop; foo.self_check(); diff --git a/test_regress/t/t_randomize_within_func.v b/test_regress/t/t_randomize_within_func.v index 4fcde6809..d17390857 100644 --- a/test_regress/t/t_randomize_within_func.v +++ b/test_regress/t/t_randomize_within_func.v @@ -23,7 +23,7 @@ endclass module t_randomize_within_func; initial begin - Cls c = new; + automatic Cls c = new; c.test_this_randomize(); $write("*-* All Finished *-*\n"); diff --git a/test_regress/t/t_randsequence_svtests.v b/test_regress/t/t_randsequence_svtests.v index 04e6eaf1c..dd087d63b 100644 --- a/test_regress/t/t_randsequence_svtests.v +++ b/test_regress/t/t_randsequence_svtests.v @@ -24,9 +24,9 @@ module t; initial begin int x; - bit flag = 1; - int switch = 1; - int break_on = 1; + automatic bit flag = 1; + automatic int switch = 1; + automatic int break_on = 1; static int return_on = 1; x = 0; diff --git a/test_regress/t/t_recursive_method.v b/test_regress/t/t_recursive_method.v index 0ba12d75f..1209221af 100644 --- a/test_regress/t/t_recursive_method.v +++ b/test_regress/t/t_recursive_method.v @@ -46,8 +46,8 @@ endclass module t; initial begin - Fib fib = new; - Getter3 getter3 = new; + automatic Fib fib = new; + automatic Getter3 getter3 = new; if (fib.get_fib(0) != 0) $stop; if (fib.get_fib(1) != 1) $stop; diff --git a/test_regress/t/t_runflag_seed.v b/test_regress/t/t_runflag_seed.v index e553f9261..5e52bf1ec 100644 --- a/test_regress/t/t_runflag_seed.v +++ b/test_regress/t/t_runflag_seed.v @@ -9,7 +9,7 @@ module t; initial begin - integer r = $random; + automatic integer r = $random; integer ex; if ($value$plusargs("SEED=%x", ex) !== 1) $stop; `checkh(r, ex); diff --git a/test_regress/t/t_select_bad_width0.out b/test_regress/t/t_select_bad_width0.out index 0e761e160..bb6fd52bb 100644 --- a/test_regress/t/t_select_bad_width0.out +++ b/test_regress/t/t_select_bad_width0.out @@ -1,12 +1,12 @@ -%Error: t/t_select_bad_width0.v:15:21: Width of bit extract must be positive (IEEE 1800-2023 11.5.1) +%Error: t/t_select_bad_width0.v:15:31: Width of bit extract must be positive (IEEE 1800-2023 11.5.1) : ... note: In instance 't' - 15 | int part = val[left +: ZERO]; - | ^ + 15 | automatic int part = val[left +: ZERO]; + | ^ ... See the manual at https://verilator.org/verilator_doc.html?v=latest for more assistance. -%Warning-WIDTHEXPAND: t/t_select_bad_width0.v:15:21: Operator ASSIGN expects 32 bits on the Assign RHS, but Assign RHS's SEL generates 1 bits. +%Warning-WIDTHEXPAND: t/t_select_bad_width0.v:15:31: Operator ASSIGN expects 32 bits on the Assign RHS, but Assign RHS's SEL generates 1 bits. : ... note: In instance 't' - 15 | int part = val[left +: ZERO]; - | ^ + 15 | automatic int part = val[left +: ZERO]; + | ^ ... For warning description see https://verilator.org/warn/WIDTHEXPAND?v=latest ... Use "/* verilator lint_off WIDTHEXPAND */" and lint_on around source to disable this message. %Error: t/t_select_bad_width0.v:17:17: Width of bit extract must be positive (IEEE 1800-2023 11.5.1) diff --git a/test_regress/t/t_select_bad_width0.v b/test_regress/t/t_select_bad_width0.v index cd077c3d1..ec96804a7 100644 --- a/test_regress/t/t_select_bad_width0.v +++ b/test_regress/t/t_select_bad_width0.v @@ -9,10 +9,10 @@ module t; parameter int ZERO = 0; initial begin - bit [31:0] val = '1; - int left = 4; + automatic bit [31:0] val = '1; + automatic int left = 4; - int part = val[left +: ZERO]; + automatic int part = val[left +: ZERO]; $display(part); part = val[left -: ZERO]; $display(part); diff --git a/test_regress/t/t_selextract_in_paramextends.v b/test_regress/t/t_selextract_in_paramextends.v index e7db853dc..a882aadb5 100644 --- a/test_regress/t/t_selextract_in_paramextends.v +++ b/test_regress/t/t_selextract_in_paramextends.v @@ -29,7 +29,7 @@ endclass module test(); initial begin - Foo foo = new; + automatic Foo foo = new; for (int i = 0; i < 10; i++) begin logic [3:0] v; diff --git a/test_regress/t/t_static_in_loop.v b/test_regress/t/t_static_in_loop.v index 466b249e8..164fe3f5e 100644 --- a/test_regress/t/t_static_in_loop.v +++ b/test_regress/t/t_static_in_loop.v @@ -6,9 +6,9 @@ module t; initial begin - int x = 0; + automatic int x = 0; while (x < 10) begin : outer_loop - int y = 0; + automatic int y = 0; while (y < x) begin : inner_loop static int a = 0; a++; diff --git a/test_regress/t/t_std_randomize_mod.v b/test_regress/t/t_std_randomize_mod.v index 3199911d1..4db4d6648 100644 --- a/test_regress/t/t_std_randomize_mod.v +++ b/test_regress/t/t_std_randomize_mod.v @@ -28,7 +28,7 @@ module t_scope_std_randomize; endfunction initial begin - bit ok = 0; + automatic bit ok = 0; int success; ok = 0; diff --git a/test_regress/t/t_std_randomize_with.v b/test_regress/t/t_std_randomize_with.v index 40ad458a2..8faa3a9da 100644 --- a/test_regress/t/t_std_randomize_with.v +++ b/test_regress/t/t_std_randomize_with.v @@ -17,7 +17,7 @@ endclass module t; initial begin int a, b; - int limit = 10; + automatic int limit = 10; external_cl obj; // Test 1: Basic std::randomize with 'with' clause diff --git a/test_regress/t/t_stmt_incr_unsup.v b/test_regress/t/t_stmt_incr_unsup.v index a908b2167..e95bc9a4f 100644 --- a/test_regress/t/t_stmt_incr_unsup.v +++ b/test_regress/t/t_stmt_incr_unsup.v @@ -12,7 +12,7 @@ endfunction module t; initial begin - int arr [3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; + automatic int arr [3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; i = 0; arr[postincrement_i()][postincrement_i()]++; $display("Value: %d", i); diff --git a/test_regress/t/t_stream_unpack.v b/test_regress/t/t_stream_unpack.v index 02fd0ab41..924f91e86 100644 --- a/test_regress/t/t_stream_unpack.v +++ b/test_regress/t/t_stream_unpack.v @@ -17,30 +17,30 @@ module t; initial begin typedef bit [5:0] bit6_t; typedef bit bit6_unpacked_t[6]; - bit6_unpacked_t arr; - bit [1:0] arr2[3]; - bit6_t arr6[1]; - bit6_t [0:0] parr6; - bit6_t bit6 = 6'b111000; - bit [5:0] ans; - bit [2:0][1:0] ans_packed; - enum_t ans_enum; - logic [1:0] a [3] = {1, 0, 3}; - logic [1:0] b [3] = {1, 2, 0}; - logic c [4] = {1, 1, 0, 0}; - logic [15:0] d; - logic [3:0] e [2]; - logic f [8]; - logic [1:0][7:0] g; - logic [1:0][1:0][3:0] h; - byte i []; - longint j; - int k; - int l []; - logic [127:0] m; - longint n []; - logic [255:0] o; - logic [127:0] p[]; + automatic bit6_unpacked_t arr; + automatic bit [1:0] arr2[3]; + automatic bit6_t arr6[1]; + automatic bit6_t [0:0] parr6; + automatic bit6_t bit6 = 6'b111000; + automatic bit [5:0] ans; + automatic bit [2:0][1:0] ans_packed; + automatic enum_t ans_enum; + automatic logic [1:0] a [3] = {1, 0, 3}; + automatic logic [1:0] b [3] = {1, 2, 0}; + automatic logic c [4] = {1, 1, 0, 0}; + automatic logic [15:0] d; + automatic logic [3:0] e [2]; + automatic logic f [8]; + automatic logic [1:0][7:0] g; + automatic logic [1:0][1:0][3:0] h; + automatic byte i []; + automatic longint j; + automatic int k; + automatic int l []; + automatic logic [127:0] m; + automatic longint n []; + automatic logic [255:0] o; + automatic logic [127:0] p[]; { >> bit {arr}} = bit6; `checkp(arr, "'{'h1, 'h1, 'h1, 'h0, 'h0, 'h0}"); diff --git a/test_regress/t/t_stream_unpack_wider.v b/test_regress/t/t_stream_unpack_wider.v index c8b2e5da4..5d53b551c 100644 --- a/test_regress/t/t_stream_unpack_wider.v +++ b/test_regress/t/t_stream_unpack_wider.v @@ -10,20 +10,20 @@ module t; initial begin - logic [7:0] src_1 = 8'b1010_0011; // 8 bits wide source - logic [1:0] dst_1 [3]; // 6 bits wide target - logic [1:0] exp_1 [3]; // 6 bits wide target + automatic logic [7:0] src_1 = 8'b1010_0011; // 8 bits wide source + automatic logic [1:0] dst_1 [3]; // 6 bits wide target + automatic logic [1:0] exp_1 [3]; // 6 bits wide target - logic [1:0] src_2 [3] = '{2'b10, 2'b10, 2'b10}; // 6 bits wide source - logic [7:0] dst_2; // 8 bits wide target - logic [7:0] exp_2; // 8 bits wide target + automatic logic [1:0] src_2 [3] = '{2'b10, 2'b10, 2'b10}; // 6 bits wide source + automatic logic [7:0] dst_2; // 8 bits wide target + automatic logic [7:0] exp_2; // 8 bits wide target - logic [7:0] src_3 = 8'hA5; // 8 bits wide source - logic [27:0] dst_3; // 28 bits wide target - logic [27:0] exp_3; // 28 bits wide target + automatic logic [7:0] src_3 = 8'hA5; // 8 bits wide source + automatic logic [27:0] dst_3; // 28 bits wide target + automatic logic [27:0] exp_3; // 28 bits wide target - string expv; - string gotv; + automatic string expv; + automatic string gotv; // unpack as target, StreamR {>>{dst_1}} = src_1; diff --git a/test_regress/t/t_string_sel.v b/test_regress/t/t_string_sel.v index 5afa9a74a..d0334c030 100644 --- a/test_regress/t/t_string_sel.v +++ b/test_regress/t/t_string_sel.v @@ -26,9 +26,9 @@ module t; endfunction initial begin - c o = new; - str_s st = '{"qux"}; - string sc = {"foo", "bar"}; + automatic c o = new; + automatic str_s st = '{"qux"}; + automatic string sc = {"foo", "bar"}; // read if (str[0] != "b") $stop; diff --git a/test_regress/t/t_timing_class.v b/test_regress/t/t_timing_class.v index be8f702e6..4029ddd36 100644 --- a/test_regress/t/t_timing_class.v +++ b/test_regress/t/t_timing_class.v @@ -193,12 +193,12 @@ module t; endclass initial begin - DelayClass dc; - Delay10 d10 = new; - Delay20 d20 = new; - Delay40 d40 = new; - NoDelay dNo = new; - AssignDelayClass dAsgn = new; + static DelayClass dc; + static Delay10 d10 = new; + static Delay20 d20 = new; + static Delay40 d40 = new; + static NoDelay dNo = new; + static AssignDelayClass dAsgn = new; `WRITE_VERBOSE(("I'm at time %0t\n", $time)); dc = d10; dc.do_delay; @@ -266,7 +266,7 @@ module t; endclass initial begin - ForkClass fc = new; + automatic ForkClass fc = new; fc.do_fork; if (fc.done != 4 || $time != 70) $stop; end diff --git a/test_regress/t/t_timing_localevent.v b/test_regress/t/t_timing_localevent.v index b0b5fe83c..0616d0676 100644 --- a/test_regress/t/t_timing_localevent.v +++ b/test_regress/t/t_timing_localevent.v @@ -31,7 +31,7 @@ module t; endclass initial begin - Foo foo = new; + automatic Foo foo = new; foo.test; $write("*-* All Finished *-*\n"); $finish; diff --git a/test_regress/t/t_type_expression_compare.v b/test_regress/t/t_type_expression_compare.v index ba4098d8c..023f289b5 100644 --- a/test_regress/t/t_type_expression_compare.v +++ b/test_regress/t/t_type_expression_compare.v @@ -8,8 +8,8 @@ typedef int Int_T; module t; initial begin - Int_T value1 = 7; - int value2 = 13; + automatic Int_T value1 = 7; + automatic int value2 = 13; real r; if (type(value1) != type(value2)) $stop; if (type(value1 + value2) != type(value2 + 18)) $stop; diff --git a/test_regress/t/t_typedef_param_class.v b/test_regress/t/t_typedef_param_class.v index fdba93dad..c21c88bbd 100644 --- a/test_regress/t/t_typedef_param_class.v +++ b/test_regress/t/t_typedef_param_class.v @@ -16,9 +16,9 @@ endclass module t; initial begin - int value0 = 7; - Class1#(Class2)::Some_type1 value1 = value0; - int value2 = value1; + automatic int value0 = 7; + automatic Class1#(Class2)::Some_type1 value1 = value0; + automatic int value2 = value1; $write("*-* All Finished *-*\n"); $finish; end diff --git a/test_regress/t/t_unpacked_str_pair.v b/test_regress/t/t_unpacked_str_pair.v index 9c23763f1..60b68735b 100644 --- a/test_regress/t/t_unpacked_str_pair.v +++ b/test_regress/t/t_unpacked_str_pair.v @@ -37,8 +37,8 @@ module t; endfunction initial begin - string raw_filter = "parta-partb"; - filter_expression_parts_t parts = get_filter_expression_parts(raw_filter); + automatic string raw_filter = "parta-partb"; + automatic filter_expression_parts_t parts = get_filter_expression_parts(raw_filter); $display("%p", parts); if (parts.positive != "parta") $stop; if (parts.negative != "partb") $stop; diff --git a/test_regress/t/t_var_local.v b/test_regress/t/t_var_local.v index 8790f1d67..fbc74d2f5 100644 --- a/test_regress/t/t_var_local.v +++ b/test_regress/t/t_var_local.v @@ -33,8 +33,8 @@ module t; initial begin begin : a - integer lower; - integer lower_assign=1; + automatic integer lower; + automatic integer lower_assign = 1; lower = 1; top = 1; if (lower != 1) $stop; diff --git a/test_regress/t/t_var_static_assign_decl_bad.v b/test_regress/t/t_var_static_assign_decl_bad.v index b186c850a..3cad90701 100644 --- a/test_regress/t/t_var_static_assign_decl_bad.v +++ b/test_regress/t/t_var_static_assign_decl_bad.v @@ -89,7 +89,7 @@ module no_warn#(PARAM = 1)(input in, input clk); // Do not warn on variables under blocks. initial begin - logic init_tmp = in; + static logic init_tmp = in; end always @(posedge clk) begin diff --git a/test_regress/t/t_virtual_interface_method.v b/test_regress/t/t_virtual_interface_method.v index 61c47d7ed..d85419b3f 100644 --- a/test_regress/t/t_virtual_interface_method.v +++ b/test_regress/t/t_virtual_interface_method.v @@ -122,8 +122,8 @@ module t; initial begin: main - DriverStim driverStim = new(); - MonitorCheck monitorCheck = new(); + static DriverStim driverStim = new(); + static MonitorCheck monitorCheck = new(); driverStim.bind_if(example_if_inst); monitorCheck.bind_if(example_if_inst); diff --git a/test_regress/t/t_virtual_interface_method_bad.v b/test_regress/t/t_virtual_interface_method_bad.v index 2622d0c81..41af2735e 100644 --- a/test_regress/t/t_virtual_interface_method_bad.v +++ b/test_regress/t/t_virtual_interface_method_bad.v @@ -27,7 +27,7 @@ module t; example_if example_if_inst(); initial begin: main - ExampleClass exampleClass = new(); + automatic ExampleClass exampleClass = new(); exampleClass.bind_if(example_if_inst); exampleClass.run(); diff --git a/test_regress/t/t_virtual_interface_param.v b/test_regress/t/t_virtual_interface_param.v index bb8c5d6f8..6caaacf4c 100644 --- a/test_regress/t/t_virtual_interface_param.v +++ b/test_regress/t/t_virtual_interface_param.v @@ -14,8 +14,8 @@ module t; m #(.p(2)) m_i (); initial begin - virtual b_if #(2) vif = m_i.b; - int y = m_i.b.x; + static virtual b_if #(2) vif = m_i.b; + automatic int y = m_i.b.x; if (vif.x != 2) $stop; if (y != 2) $stop; diff --git a/test_regress/t/t_virtual_interface_param_bind.v b/test_regress/t/t_virtual_interface_param_bind.v index 931219eb4..d957791ae 100644 --- a/test_regress/t/t_virtual_interface_param_bind.v +++ b/test_regress/t/t_virtual_interface_param_bind.v @@ -14,8 +14,8 @@ module t; typedef virtual b_if vif_t; initial begin - vif_t vif = t.m_i.if_bind; - int y = t.m_i.if_bind.x; + static vif_t vif = t.m_i.if_bind; + static int y = t.m_i.if_bind.x; if (vif.x != 1) $stop; if (y != 1) $stop; diff --git a/test_regress/t/t_wide_temp_while_cond.v b/test_regress/t/t_wide_temp_while_cond.v index 25993a2ca..66a775b57 100644 --- a/test_regress/t/t_wide_temp_while_cond.v +++ b/test_regress/t/t_wide_temp_while_cond.v @@ -8,9 +8,9 @@ import "DPI-C" pure function int identity(input int value); module t; initial begin - int n = 0; - logic [127:0] val = 128'b1; - logic [15:0] one = 16'b1; + automatic int n; + automatic logic [127:0] val = 128'b1; + automatic logic [15:0] one = 16'b1; // This condition involves multiple wide temporaries, and an over-width // shift, all of which requires V3Premit to fix up. diff --git a/test_regress/t/t_with.v b/test_regress/t/t_with.v index b3b663ad2..312e0e63c 100644 --- a/test_regress/t/t_with.v +++ b/test_regress/t/t_with.v @@ -15,14 +15,14 @@ module t; initial begin - int tofind; - int aliases[$]; - int found[$]; - int i; - byte byteq[$] = {2, -1, 127}; - byte b[]; - logic [7:0] m[2][2]; - logic bit_arr[1024]; + automatic int tofind; + automatic int aliases[$]; + automatic int found[$]; + automatic int i; + automatic byte byteq[$] = {2, -1, 127}; + automatic byte b[]; + automatic logic [7:0] m[2][2]; + automatic logic bit_arr[1024]; aliases = '{1, 4, 6, 8}; tofind = 6;