aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-16 18:12:46 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-16 18:12:46 +0200
commitb171a4c1bce1146c890f8238a723a277c8dc2efb (patch)
treea481277e7e719cad99581063273c9267e6a76ded
parent5057935722edca26b13cb3a158a443d16a6445da (diff)
downloadyosys-b171a4c1bce1146c890f8238a723a277c8dc2efb.tar.gz
yosys-b171a4c1bce1146c890f8238a723a277c8dc2efb.tar.bz2
yosys-b171a4c1bce1146c890f8238a723a277c8dc2efb.zip
Added "inout" ports support to read_liberty
-rw-r--r--frontends/liberty/liberty.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/frontends/liberty/liberty.cc b/frontends/liberty/liberty.cc
index 398e7a30e..e7af93720 100644
--- a/frontends/liberty/liberty.cc
+++ b/frontends/liberty/liberty.cc
@@ -537,7 +537,7 @@ struct LibertyFrontend : public Frontend {
for (auto node : cell->children)
if (node->id == "pin" && node->args.size() == 1) {
LibertyAst *dir = node->find("direction");
- if (!dir || (dir->value != "input" && dir->value != "output" && dir->value != "internal"))
+ if (!dir || (dir->value != "input" && dir->value != "output" && dir->value != "inout" && dir->value != "internal"))
{
if (!flag_ignore_miss_dir)
{
@@ -570,6 +570,11 @@ struct LibertyFrontend : public Frontend {
RTLIL::Wire *wire = module->wires.at(RTLIL::escape_id(node->args.at(0)));
+ if (dir && dir->value == "inout") {
+ wire->port_input = true;
+ wire->port_output = true;
+ }
+
if (dir && dir->value == "input") {
wire->port_input = true;
continue;