diff --git a/parse.y b/parse.y index 61643bb633..270a52a3be 100644 --- a/parse.y +++ b/parse.y @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if HAVE_CVS_IDENT -#ident "$Id: parse.y,v 1.177 2003/04/28 17:50:57 steve Exp $" +#ident "$Id: parse.y,v 1.178 2003/06/13 00:27:09 steve Exp $" #endif # include "config.h" @@ -992,20 +992,30 @@ expr_primary function_item : K_input range_opt list_of_identifiers ';' { svector*tmp - = pform_make_task_ports(NetNet::PINPUT, $2, $3, + = pform_make_task_ports(NetNet::PINPUT, false, + $2, $3, + @1.text, @1.first_line); + $$ = tmp; + } + | K_input K_signed range_opt list_of_identifiers ';' + { svector*tmp + = pform_make_task_ports(NetNet::PINPUT, true, + $3, $4, @1.text, @1.first_line); $$ = tmp; } | K_output range_opt list_of_identifiers ';' { svector*tmp - = pform_make_task_ports(NetNet::PINPUT, $2, $3, + = pform_make_task_ports(NetNet::PINPUT, false, + $2, $3, @1.text, @1.first_line); $$ = tmp; yyerror(@1, "Functions may not have output ports."); } | K_inout range_opt list_of_identifiers ';' { svector*tmp - = pform_make_task_ports(NetNet::PINPUT, $2, $3, + = pform_make_task_ports(NetNet::PINPUT, false, + $2, $3, @1.text, @1.first_line); $$ = tmp; yyerror(@1, "Functions may not have inout ports."); @@ -2717,19 +2727,22 @@ task_item { $$ = new svector(0); } | K_input range_opt list_of_identifiers ';' { svector*tmp - = pform_make_task_ports(NetNet::PINPUT, $2, - $3, @1.text, @1.first_line); + = pform_make_task_ports(NetNet::PINPUT, false, + $2, $3, + @1.text, @1.first_line); $$ = tmp; } | K_output range_opt list_of_identifiers ';' { svector*tmp - = pform_make_task_ports(NetNet::POUTPUT, $2, $3, + = pform_make_task_ports(NetNet::POUTPUT, false, + $2, $3, @1.text, @1.first_line); $$ = tmp; } | K_inout range_opt list_of_identifiers ';' { svector*tmp - = pform_make_task_ports(NetNet::PINOUT, $2, $3, + = pform_make_task_ports(NetNet::PINOUT, false, + $2, $3, @1.text, @1.first_line); $$ = tmp; } diff --git a/pform.cc b/pform.cc index 4c9567a737..26ed0b0cb8 100644 --- a/pform.cc +++ b/pform.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: pform.cc,v 1.113 2003/04/28 17:50:57 steve Exp $" +#ident "$Id: pform.cc,v 1.114 2003/06/13 00:27:09 steve Exp $" #endif # include "config.h" @@ -1121,6 +1121,7 @@ void pform_set_port_type(const char*nm, NetNet::PortType pt, * no output or inout ports. */ svector*pform_make_task_ports(NetNet::PortType pt, + bool signed_flag, svector*range, list*names, const char* file, @@ -1146,6 +1147,8 @@ svector*pform_make_task_ports(NetNet::PortType pt, pform_cur_module->add_wire(curw); } + curw->set_signed(signed_flag); + /* If there is a range involved, it needs to be set. */ if (range) curw->set_range((*range)[0], (*range)[1]); @@ -1466,6 +1469,9 @@ int pform_parse(const char*path, FILE*file) /* * $Log: pform.cc,v $ + * Revision 1.114 2003/06/13 00:27:09 steve + * Task/functions can have signed ports. + * * Revision 1.113 2003/04/28 17:50:57 steve * More 2001 port declaration support. * diff --git a/pform.h b/pform.h index b2e8863696..a8afabb123 100644 --- a/pform.h +++ b/pform.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: pform.h,v 1.70 2003/04/28 17:50:57 steve Exp $" +#ident "$Id: pform.h,v 1.71 2003/06/13 00:27:09 steve Exp $" #endif # include "netlist.h" @@ -264,6 +264,7 @@ extern void pform_make_pgassign_list(svector*alist, /* Given a port type and a list of names, make a list of wires that can be used as task port information. */ extern svector*pform_make_task_ports(NetNet::PortType pt, + bool signed_flag, svector*range, list*names, const char* file, @@ -280,6 +281,9 @@ extern void pform_dump(ostream&out, Module*mod); /* * $Log: pform.h,v $ + * Revision 1.71 2003/06/13 00:27:09 steve + * Task/functions can have signed ports. + * * Revision 1.70 2003/04/28 17:50:57 steve * More 2001 port declaration support. *