mirror of
https://github.com/verilator/verilator.git
synced 2025-01-25 07:44:14 +00:00
Support edge, 1800-2009
This commit is contained in:
parent
dbce06500d
commit
f3347be629
@ -153,7 +153,7 @@ public:
|
|||||||
};
|
};
|
||||||
const char* verilogKwd() const {
|
const char* verilogKwd() const {
|
||||||
static const char* names[] = {
|
static const char* names[] = {
|
||||||
"%E-edge", "[any]", "[both]", "posedge", "negedge", "[high]","[low]",
|
"%E-edge", "[any]", "edge", "posedge", "negedge", "[high]","[low]",
|
||||||
"*","[initial]","[settle]","[never]"
|
"*","[initial]","[settle]","[never]"
|
||||||
};
|
};
|
||||||
return names[m_e];
|
return names[m_e];
|
||||||
|
@ -127,7 +127,7 @@ class EmitVBaseVisitor : public EmitCBaseVisitor {
|
|||||||
// AstSenItem is called for dumping in isolation by V3Order
|
// AstSenItem is called for dumping in isolation by V3Order
|
||||||
putbs("@(");
|
putbs("@(");
|
||||||
for (AstNode* expp=nodep->sensesp(); expp; expp = expp->nextp()) {
|
for (AstNode* expp=nodep->sensesp(); expp; expp = expp->nextp()) {
|
||||||
nodep->iterateChildren(*this);
|
expp->accept(*this);
|
||||||
if (expp->nextp()) puts(" or ");
|
if (expp->nextp()) puts(" or ");
|
||||||
}
|
}
|
||||||
puts(")");
|
puts(")");
|
||||||
|
@ -206,7 +206,7 @@ escid \\[^ \t\f\r\n]+
|
|||||||
"default" { FL; return yDEFAULT; }
|
"default" { FL; return yDEFAULT; }
|
||||||
"defparam" { FL; return yDEFPARAM; }
|
"defparam" { FL; return yDEFPARAM; }
|
||||||
"disable" { FL; return yDISABLE; }
|
"disable" { FL; return yDISABLE; }
|
||||||
"edge" { FL; return yaTIMINGSPEC; }
|
"edge" { FL; return yEDGE; }
|
||||||
"else" { FL; return yELSE; }
|
"else" { FL; return yELSE; }
|
||||||
"end" { FL; return yEND; }
|
"end" { FL; return yEND; }
|
||||||
"endcase" { FL; return yENDCASE; }
|
"endcase" { FL; return yENDCASE; }
|
||||||
|
@ -265,6 +265,7 @@ class AstSenTree;
|
|||||||
%token<fl> yDEFPARAM "defparam"
|
%token<fl> yDEFPARAM "defparam"
|
||||||
%token<fl> yDISABLE "disable"
|
%token<fl> yDISABLE "disable"
|
||||||
%token<fl> yDO "do"
|
%token<fl> yDO "do"
|
||||||
|
%token<fl> yEDGE "edge"
|
||||||
%token<fl> yELSE "else"
|
%token<fl> yELSE "else"
|
||||||
%token<fl> yEND "end"
|
%token<fl> yEND "end"
|
||||||
%token<fl> yENDCASE "endcase"
|
%token<fl> yENDCASE "endcase"
|
||||||
@ -1680,8 +1681,10 @@ senitemVar<senitemp>:
|
|||||||
senitemEdge<senitemp>: // IEEE: part of event_expression
|
senitemEdge<senitemp>: // IEEE: part of event_expression
|
||||||
yPOSEDGE idClassSel { $$ = new AstSenItem($1,AstEdgeType::POSEDGE,$2); }
|
yPOSEDGE idClassSel { $$ = new AstSenItem($1,AstEdgeType::POSEDGE,$2); }
|
||||||
| yNEGEDGE idClassSel { $$ = new AstSenItem($1,AstEdgeType::NEGEDGE,$2); }
|
| yNEGEDGE idClassSel { $$ = new AstSenItem($1,AstEdgeType::NEGEDGE,$2); }
|
||||||
|
| yEDGE idClassSel { $$ = new AstSenItem($1,AstEdgeType::BOTHEDGE,$2); }
|
||||||
| yPOSEDGE '(' idClassSel ')' { $$ = new AstSenItem($1,AstEdgeType::POSEDGE,$3); }
|
| yPOSEDGE '(' idClassSel ')' { $$ = new AstSenItem($1,AstEdgeType::POSEDGE,$3); }
|
||||||
| yNEGEDGE '(' idClassSel ')' { $$ = new AstSenItem($1,AstEdgeType::NEGEDGE,$3); }
|
| yNEGEDGE '(' idClassSel ')' { $$ = new AstSenItem($1,AstEdgeType::NEGEDGE,$3); }
|
||||||
|
| yEDGE '(' idClassSel ')' { $$ = new AstSenItem($1,AstEdgeType::BOTHEDGE,$3); }
|
||||||
//UNSUP yIFF...
|
//UNSUP yIFF...
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user