~ubuntu-branches/ubuntu/wily/verilator/wily

« back to all changes in this revision

Viewing changes to src/verilog.y

  • Committer: Package Import Robot
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2014-01-27 10:44:06 UTC
  • mfrom: (1.2.25)
  • Revision ID: package-import@ubuntu.com-20140127104406-s0cbt1mvn7h0169e
Tags: 3.855-1
* New upstream release.
* Refreshed shebang.diff patch.
* debian/copyright: update copyright years

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
//
7
7
//*************************************************************************
8
8
//
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
12
12
// Version 2.0.
1058
1058
                id/*new-modport*/ '(' modportPortsDeclList ')'          { $$ = new AstModport($2,*$1,$3); }
1059
1059
        ;
1060
1060
 
1061
 
modportPortsDeclList<modportvarrefp>:
 
1061
modportPortsDeclList<nodep>:
1062
1062
                modportPortsDecl                            { $$ = $1; }
1063
 
        |       modportPortsDeclList ',' modportPortsDecl   { $$ = $1->addNextNull($3)->castModportVarRef(); }
 
1063
        |       modportPortsDeclList ',' modportPortsDecl   { $$ = $1->addNextNull($3); }
1064
1064
        ;
1065
1065
 
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); }
1883
1888
        ;
1884
1889
 
1885
1890
netId<strp>:
2632
2637
        |       yVL_ISOLATE_ASSIGNMENTS                 { $$ = 1; }
2633
2638
        ;
2634
2639
 
 
2640
method_prototype:
 
2641
                task_prototype                          { }
 
2642
        |       function_prototype                      { }
 
2643
        ;
 
2644
 
2635
2645
lifetimeE:                      // IEEE: [lifetime]
2636
2646
                /* empty */                             { }
2637
2647
        |       lifetime                                { }