aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2019-02-21 14:27:32 -0800
committerEddie Hung <eddieh@ece.ubc.ca>2019-02-21 14:27:32 -0800
commit3307295488ee51db20f4a5d911221a1ebc3b8254 (patch)
treec3af99e2b8efaad1dca96e519de025411e96feb0
parent6ccaf250df044d935e86ed2fb5bda71e9b932773 (diff)
parentd3ba1f97193fe55a58fcddd4b3bbc5c5ba15eea2 (diff)
downloadyosys-3307295488ee51db20f4a5d911221a1ebc3b8254.tar.gz
yosys-3307295488ee51db20f4a5d911221a1ebc3b8254.tar.bz2
yosys-3307295488ee51db20f4a5d911221a1ebc3b8254.zip
Merge branch 'read_aiger' into xaig
-rw-r--r--Makefile1
-rw-r--r--frontends/aiger/aigerparse.cc9
-rw-r--r--passes/techmap/abc.cc2
3 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index db4bf7a8f..0c9a831cc 100644
--- a/Makefile
+++ b/Makefile
@@ -581,6 +581,7 @@ test: $(TARGETS) $(EXTRA_TARGETS)
+cd tests/sat && bash run-test.sh
+cd tests/svinterfaces && bash run-test.sh $(SEEDOPT)
+cd tests/opt && bash run-test.sh
+ +cd tests/aiger && bash run-test.sh
@echo ""
@echo " Passed \"make test\"."
@echo ""
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc
index 6fa77282e..45cacadb6 100644
--- a/frontends/aiger/aigerparse.cc
+++ b/frontends/aiger/aigerparse.cc
@@ -23,8 +23,11 @@
// http://fmv.jku.at/papers/Biere-FMV-TR-07-1.pdf
#ifdef _WIN32
+#include <libgen.h>
#include <stdlib.h>
#endif
+#include <array>
+
#include "kernel/yosys.h"
#include "kernel/sigtools.h"
#include "kernel/consteval.h"
@@ -583,7 +586,7 @@ void AigerReader::parse_aiger_ascii()
RTLIL::Wire *i2_wire = createWireIfNotExists(module, l3);
module->addAndGate(o_wire->name.str() + "$and", i1_wire, i2_wire, o_wire);
}
- std::getline(f, line);
+ std::getline(f, line); // Ignore up to start of next line
}
static unsigned parse_next_delta_literal(std::istream &f, unsigned ref)
@@ -779,7 +782,9 @@ struct AigerFrontend : public Frontend {
_splitpath(filename.c_str(), NULL /* drive */, NULL /* dir */, fname, NULL /* ext */)
module_name = fname;
#else
- module_name = RTLIL::escape_id(basename(filename.c_str()));
+ char* bn = strdup(filename.c_str());
+ module_name = RTLIL::escape_id(bn);
+ free(bn);
#endif
}
diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc
index b215b1ea4..d2d15a4a9 100644
--- a/passes/techmap/abc.cc
+++ b/passes/techmap/abc.cc
@@ -52,8 +52,6 @@
#include <cerrno>
#include <sstream>
#include <climits>
-#include <array>
-#include <functional>
#ifndef _WIN32
# include <unistd.h>