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