3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-08 10:25:19 +00:00

Merge pull request #694 from trcwm/dffmap_expr_fix

DFFLIBMAP: changed 'missing pin' error into a warning.
This commit is contained in:
Clifford Wolf 2018-11-06 12:21:05 +01:00 committed by GitHub
commit 7bd2144d03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,7 +101,16 @@ static bool parse_pin(LibertyAst *cell, LibertyAst *attr, std::string &pin_name,
if (child->id == "pin" && child->args.size() == 1 && child->args[0] == pin_name)
return true;
log_error("Malformed liberty file - cannot find pin '%s' in cell '%s'.\n", pin_name.c_str(), cell->args[0].c_str());
/* If we end up here, the pin specified in the attribute does not exist, which is an error,
or, the attribute contains an expression which we do not yet support.
For now, we'll simply produce a warning to let the user know something is up.
*/
if (pin_name.find_first_of("^*|&") == std::string::npos) {
log_warning("Malformed liberty file - cannot find pin '%s' in cell '%s' - skipping.\n", pin_name.c_str(), cell->args[0].c_str());
}
else {
log_warning("Found unsupported expression '%s' in pin attribute of cell '%s' - skipping.\n", pin_name.c_str(), cell->args[0].c_str());
}
return false;
}