diff --git a/elab_sig.cc b/elab_sig.cc index e92ad6667..b0c702bc9 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -757,6 +757,11 @@ void PTaskFunc::elaborate_sig_ports_(Design*des, NetScope*scope, << "Function arguments must be input ports." << endl; des->errors += 1; } + if (tmp->unpacked_dimensions() != 0) { + cerr << get_fileline() << ": sorry: Subroutine ports with " + "unpacked dimensions are not yet supported." << endl; + des->errors += 1; + } } } diff --git a/parse.y b/parse.y index c1215df57..2f6af7361 100644 --- a/parse.y +++ b/parse.y @@ -2212,7 +2212,11 @@ tf_port_item /* IEEE1800-2005: A.2.7 */ tmp = pform_make_task_ports(@3, use_port_type, $2, ilist); } if ($4 != 0) { - pform_set_reg_idx(name, $4); + if (gn_system_verilog()) { + pform_set_reg_idx(name, $4); + } else { + yyerror(@4, "error: Task/function port with unpacked dimensions requires SystemVerilog."); + } } $$ = tmp;