mirror of https://github.com/YosysHQ/yosys.git
Updated ABC
This commit is contained in:
parent
cd9e8741a7
commit
a123941618
2
Makefile
2
Makefile
|
@ -37,7 +37,7 @@ OBJS = kernel/version_$(GIT_REV).o
|
||||||
# is just a symlink to your actual ABC working directory, as 'make mrproper'
|
# is just a symlink to your actual ABC working directory, as 'make mrproper'
|
||||||
# will remove the 'abc' directory and you do not want to accidentally
|
# will remove the 'abc' directory and you do not want to accidentally
|
||||||
# delete your work on ABC..
|
# delete your work on ABC..
|
||||||
ABCREV = d7d412483aa9
|
ABCREV = 2058c8ccea68
|
||||||
ABCPULL = 1
|
ABCPULL = 1
|
||||||
|
|
||||||
-include Makefile.conf
|
-include Makefile.conf
|
||||||
|
|
|
@ -640,9 +640,32 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
|
||||||
f = popen(buffer.c_str(), "r");
|
f = popen(buffer.c_str(), "r");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
log_error("Opening pipe to `%s' for reading failed: %s\n", buffer.c_str(), strerror(errno));
|
log_error("Opening pipe to `%s' for reading failed: %s\n", buffer.c_str(), strerror(errno));
|
||||||
|
#if 0
|
||||||
char logbuf[1024];
|
char logbuf[1024];
|
||||||
while (fgets(logbuf, 1024, f) != NULL)
|
while (fgets(logbuf, 1024, f) != NULL)
|
||||||
log("ABC: %s", logbuf);
|
log("ABC: %s", logbuf);
|
||||||
|
#else
|
||||||
|
bool got_cr = false;
|
||||||
|
std::string linebuf;
|
||||||
|
char logbuf[1024];
|
||||||
|
while (fgets(logbuf, 1024, f) != NULL)
|
||||||
|
for (char *p = logbuf; *p; p++) {
|
||||||
|
if (*p == '\r') {
|
||||||
|
got_cr = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (*p == '\n') {
|
||||||
|
log("ABC: %s\n", linebuf.c_str());
|
||||||
|
got_cr = false, linebuf.clear();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (got_cr)
|
||||||
|
got_cr = false, linebuf.clear();
|
||||||
|
linebuf += *p;
|
||||||
|
}
|
||||||
|
if (!linebuf.empty())
|
||||||
|
log("ABC: %s\n", linebuf.c_str());
|
||||||
|
#endif
|
||||||
errno = 0;
|
errno = 0;
|
||||||
int ret = pclose(f);
|
int ret = pclose(f);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
Loading…
Reference in New Issue