From: Clifford Wolf Date: Wed, 13 May 2015 04:45:12 +0000 (+0200) Subject: Added .barbuf support to abc BLIF parser X-Git-Tag: yosys-0.6~293 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2f30e0de41d93ef7e6468ba7041c51c971c6a0c;p=yosys.git Added .barbuf support to abc BLIF parser --- 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;