From c2f30e0de41d93ef7e6468ba7041c51c971c6a0c Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 13 May 2015 06:45:12 +0200 Subject: [PATCH] Added .barbuf support to abc BLIF parser --- passes/abc/blifparse.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/passes/abc/blifparse.cc b/passes/abc/blifparse.cc index db87eec4a..a69cfde19 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; -- 2.30.2