3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-05 06:45:46 +00:00

fmt: Extend string handling for SystemVerilog

This makes for a distinction between a string argument from a quoted
literal, and a string argument from a variable or other expression.
This commit is contained in:
Martin Povišer 2024-02-08 15:03:38 +01:00
parent 71235f9b48
commit 0635df4ee5
3 changed files with 28 additions and 6 deletions

View file

@ -771,8 +771,6 @@ struct AST_INTERNAL::ProcessGenerator
if (node->type == AST_CONSTANT && node->is_string) {
arg.type = VerilogFmtArg::STRING;
arg.str = node->bitsAsConst().decode_string();
// 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;