ecp5: Fix handling of custom DEL_VALUE

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-11-18 22:03:11 +00:00
parent f28186bb1b
commit c3d4117a21

View File

@ -2022,7 +2022,8 @@ class Ecp5Packer
iol->params[ctx->id("DELAY.DEL_VALUE")] =
lookup_delay(str_or_default(ci->params, ctx->id("DEL_MODE"), "USER_DEFINED"));
if (ci->params.count(ctx->id("DEL_VALUE")) &&
std::string(ci->params.at(ctx->id("DEL_VALUE")).as_string()).substr(0, 5) != "DELAY")
(!ci->params.at(ctx->id("DEL_VALUE")).is_string ||
std::string(ci->params.at(ctx->id("DEL_VALUE")).as_string()).substr(0, 5) != "DELAY"))
iol->params[ctx->id("DELAY.DEL_VALUE")] = ci->params.at(ctx->id("DEL_VALUE"));
if (ci->ports.count(id_LOADN))
replace_port(ci, id_LOADN, iol, id_LOADN);