7
7
//*************************************************************************
9
// Copyright 2003-2013 by Wilson Snyder. This program is free software; you can
9
// Copyright 2003-2014 by Wilson Snyder. This program is free software; you can
10
10
// redistribute it and/or modify it under the terms of either the GNU
11
11
// Lesser General Public License Version 3 or the Perl Artistic License
1058
1058
id/*new-modport*/ '(' modportPortsDeclList ')' { $$ = new AstModport($2,*$1,$3); }
1061
modportPortsDeclList<modportvarrefp>:
1061
modportPortsDeclList<nodep>:
1062
1062
modportPortsDecl { $$ = $1; }
1063
| modportPortsDeclList ',' modportPortsDecl { $$ = $1->addNextNull($3)->castModportVarRef(); }
1063
| modportPortsDeclList ',' modportPortsDecl { $$ = $1->addNextNull($3); }
1066
1066
// IEEE: modport_ports_declaration + modport_simple_ports_declaration
1067
1067
// + (modport_tf_ports_declaration+import_export) + modport_clocking_declaration
1068
1068
// We've expanded the lists each take to instead just have standalone ID ports.
1069
1069
// We track the type as with the V2k series of defines, then create as each ID is seen.
1070
modportPortsDecl<modportvarrefp>:
1070
modportPortsDecl<nodep>:
1071
1071
// // IEEE: modport_simple_ports_declaration
1072
1072
port_direction modportSimplePort { $$ = new AstModportVarRef($<fl>1,*$2,GRAMMARP->m_varIO); }
1073
1073
// // IEEE: modport_clocking_declaration
1074
//UNSUP yCLOCKING idAny/*clocking_identifier*/ { }
1075
//UNSUP yIMPORT modport_tf_port { }
1076
//UNSUP yEXPORT modport_tf_port { }
1074
| yCLOCKING idAny/*clocking_identifier*/ { $1->v3error("Unsupported: Modport clocking"); }
1075
// // IEEE: yIMPORT modport_tf_port
1076
// // IEEE: yEXPORT modport_tf_port
1077
// // modport_tf_port expanded here
1078
| yIMPORT id/*tf_identifier*/ { $$ = new AstModportFTaskRef($<fl>1,*$2,false); }
1079
| yEXPORT id/*tf_identifier*/ { $$ = new AstModportFTaskRef($<fl>1,*$2,true); }
1080
| yIMPORT method_prototype { $1->v3error("Unsupported: Modport import with prototype"); }
1081
| yEXPORT method_prototype { $1->v3error("Unsupported: Modport export with prototype"); }
1077
1082
// Continuations of above after a comma.
1078
1083
// // IEEE: modport_simple_ports_declaration
1079
1084
| modportSimplePort { $$ = new AstModportVarRef($<fl>1,*$1,AstVarType::INOUT); }
1879
1884
netSig<varp>: // IEEE: net_decl_assignment - one element from list_of_port_identifiers
1880
1885
netId sigAttrListE { $$ = VARDONEA($<fl>1,*$1, NULL, $2); }
1881
1886
| netId sigAttrListE '=' expr { $$ = VARDONEA($<fl>1,*$1, NULL, $2); $$->addNext(new AstAssignW($3,new AstVarRef($3,$$->name(),true),$4)); }
1882
| netId rangeList sigAttrListE { $$ = VARDONEA($<fl>1,*$1, $2, $3); }
1887
| netId variable_dimensionList sigAttrListE { $$ = VARDONEA($<fl>1,*$1, $2, $3); }