summaryrefslogtreecommitdiff
path: root/passes/abc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-05-13 06:45:12 +0200
committerClifford Wolf <clifford@clifford.at>2015-05-13 06:45:12 +0200
commitc2f30e0de41d93ef7e6468ba7041c51c971c6a0c (patch)
tree68525fb61a7bdde3a5b807748aba0e89b0af752b /passes/abc
parentdae00e1d8301aae25f3432ca12995c9a3b380679 (diff)
Added .barbuf support to abc BLIF parser
Diffstat (limited to 'passes/abc')
-rw-r--r--passes/abc/blifparse.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/passes/abc/blifparse.cc b/passes/abc/blifparse.cc
index db87eec4..a69cfde1 100644
--- a/passes/abc/blifparse.cc
+++ b/passes/abc/blifparse.cc
@@ -144,6 +144,26 @@ RTLIL::Design *abc_parse_blif(FILE *f, std::string dff_name)
continue;
}
+ if (!strcmp(cmd, ".barbuf"))
+ {
+ char *p = strtok(NULL, " \t\r\n");
+ if (p == NULL)
+ goto error;
+
+ char *q = strtok(NULL, " \t\r\n");
+ if (q == NULL)
+ goto error;
+
+ if (module->wires_.count(RTLIL::escape_id(p)) == 0)
+ module->addWire(RTLIL::escape_id(p));
+
+ if (module->wires_.count(RTLIL::escape_id(q)) == 0)
+ module->addWire(RTLIL::escape_id(q));
+
+ module->connect(module->wires_.at(RTLIL::escape_id(q)), module->wires_.at(RTLIL::escape_id(p)));
+ continue;
+ }
+
if (!strcmp(cmd, ".names"))
{
char *p;