aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/dfflibmap.cc
diff options
context:
space:
mode:
authorNiels Moseley <n.a.moseley@moseleyinstrumnets.com>2018-11-06 12:11:52 +0100
committerNiels Moseley <n.a.moseley@moseleyinstrumnets.com>2018-11-06 12:11:52 +0100
commitcfc9b9147c3d737781f197a825b019584c2695a5 (patch)
treeb16d3daf4bfc6a97d9cef5cc1380e175ffa122b2 /passes/techmap/dfflibmap.cc
parentf6c4485a3ac315fbed76f1a2e1f22df7afb36886 (diff)
downloadyosys-cfc9b9147c3d737781f197a825b019584c2695a5.tar.gz
yosys-cfc9b9147c3d737781f197a825b019584c2695a5.tar.bz2
yosys-cfc9b9147c3d737781f197a825b019584c2695a5.zip
DFFLIBMAP: changed 'missing pin' error into a warning with additional reason/info.
Diffstat (limited to 'passes/techmap/dfflibmap.cc')
-rw-r--r--passes/techmap/dfflibmap.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/passes/techmap/dfflibmap.cc b/passes/techmap/dfflibmap.cc
index 421073485..b0528d473 100644
--- a/passes/techmap/dfflibmap.cc
+++ b/passes/techmap/dfflibmap.cc
@@ -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;
}