3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-09 17:31:59 +00:00

scratchpad.cc: Don't strip quotes

This commit is contained in:
Krystine Sherwin 2025-10-06 11:28:05 +13:00
parent 8ff55f184b
commit a685bab9e2
No known key found for this signature in database

View file

@ -89,7 +89,6 @@ struct ScratchpadPass : public Pass {
if (RTLIL::constpad.count(identifier))
log_error("scratchpad entry \"%s\" is a global constant\n", identifier);
string value = args[++argidx];
if (value.front() == '\"' && value.back() == '\"') value = value.substr(1, value.size() - 2);
design->scratchpad_set_string(identifier, value);
continue;
}
@ -116,7 +115,6 @@ struct ScratchpadPass : public Pass {
if (args[argidx] == "-assert" && argidx+2 < args.size()) {
string identifier = args[++argidx];
string expected = args[++argidx];
if (expected.front() == '\"' && expected.back() == '\"') expected = expected.substr(1, expected.size() - 2);
if (design->scratchpad.count(identifier) == 0)
log_error("scratchpad entry '%s' is not defined\n", identifier);
string value = design->scratchpad_get_string(identifier);