3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-31 00:13:18 +00:00

fmt: %t/$time support

This commit is contained in:
Charlotte 2023-06-28 11:51:20 +10:00 committed by Marcelina Kościelnicka
parent 52dc397a50
commit c382d7d3ac
7 changed files with 133 additions and 26 deletions

View file

@ -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();