aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-02-15 17:36:08 +0100
committerClifford Wolf <clifford@clifford.at>2018-02-15 17:36:08 +0100
commit2c95dfcb5bbce7f5b19d36d8d5d1258f48aaedcf (patch)
treeec4587899d6194876cce39ecfe079f54d109658c /frontends
parentc1abd3b02cab235334342f3520e2535eb74c5792 (diff)
downloadyosys-2c95dfcb5bbce7f5b19d36d8d5d1258f48aaedcf.tar.gz
yosys-2c95dfcb5bbce7f5b19d36d8d5d1258f48aaedcf.tar.bz2
yosys-2c95dfcb5bbce7f5b19d36d8d5d1258f48aaedcf.zip
Improve handling of "bus" pins in liberty front-end (some files use bus.pin.direction)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'frontends')
-rw-r--r--frontends/liberty/liberty.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/frontends/liberty/liberty.cc b/frontends/liberty/liberty.cc
index 5458c60ea..af80c2921 100644
--- a/frontends/liberty/liberty.cc
+++ b/frontends/liberty/liberty.cc
@@ -582,6 +582,12 @@ struct LibertyFrontend : public Frontend {
LibertyAst *dir = node->find("direction");
+ if (dir == nullptr) {
+ LibertyAst *pin = node->find("pin");
+ if (pin != nullptr)
+ dir = pin->find("direction");
+ }
+
if (!dir || (dir->value != "input" && dir->value != "output" && dir->value != "inout" && dir->value != "internal"))
log_error("Missing or invalid direction for bus %s on cell %s.\n", node->args.at(0).c_str(), log_id(module->name));