mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 02:45:52 +00:00
fmt: %t/$time support
This commit is contained in:
parent
52dc397a50
commit
c382d7d3ac
7 changed files with 133 additions and 26 deletions
|
@ -748,6 +748,11 @@ struct AST_INTERNAL::ProcessGenerator
|
|||
// and in case this will be used as an argument...
|
||||
arg.sig = node->bitsAsConst();
|
||||
arg.signed_ = false;
|
||||
} else if (node->type == AST_IDENTIFIER && node->str == "$time") {
|
||||
arg.type = VerilogFmtArg::TIME;
|
||||
} else if (node->type == AST_IDENTIFIER && node->str == "$realtime") {
|
||||
arg.type = VerilogFmtArg::TIME;
|
||||
arg.realtime = true;
|
||||
} else {
|
||||
arg.type = VerilogFmtArg::INTEGER;
|
||||
arg.sig = node->genRTLIL();
|
||||
|
|
|
@ -386,7 +386,7 @@ and|nand|or|nor|xor|xnor|not|buf|bufif0|bufif1|notif0|notif1 {
|
|||
supply0 { return TOK_SUPPLY0; }
|
||||
supply1 { return TOK_SUPPLY1; }
|
||||
|
||||
"$"(display[bho]?|write[bho]?|strobe|monitor|time|stop|finish|dumpfile|dumpvars|dumpon|dumpoff|dumpall) {
|
||||
"$"(display[bho]?|write[bho]?|strobe|monitor|time|realtime|stop|finish|dumpfile|dumpvars|dumpon|dumpoff|dumpall) {
|
||||
yylval->string = new std::string(yytext);
|
||||
return TOK_ID;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue