diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-05-13 06:45:12 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-05-13 06:45:12 +0200 |
commit | c2f30e0de41d93ef7e6468ba7041c51c971c6a0c (patch) | |
tree | 68525fb61a7bdde3a5b807748aba0e89b0af752b /passes/abc | |
parent | dae00e1d8301aae25f3432ca12995c9a3b380679 (diff) | |
download | yosys-c2f30e0de41d93ef7e6468ba7041c51c971c6a0c.tar.gz yosys-c2f30e0de41d93ef7e6468ba7041c51c971c6a0c.tar.bz2 yosys-c2f30e0de41d93ef7e6468ba7041c51c971c6a0c.zip |
Added .barbuf support to abc BLIF parser
Diffstat (limited to 'passes/abc')
-rw-r--r-- | passes/abc/blifparse.cc | 20 |
1 files changed, 20 insertions, 0 deletions
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; |