aboutsummaryrefslogtreecommitdiffstats
path: root/libs/ezsat
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-08-15 14:40:26 +0200
committerClifford Wolf <clifford@clifford.at>2013-08-15 14:40:26 +0200
commit457dc09cdc3546d70eb347d35ad28ffca1621f7d (patch)
tree81129b260db30c397e908d994fc8b37dd503815f /libs/ezsat
parent2f3da54f269fac5dab4b03eec80182c534f8c28f (diff)
downloadyosys-457dc09cdc3546d70eb347d35ad28ffca1621f7d.tar.gz
yosys-457dc09cdc3546d70eb347d35ad28ffca1621f7d.tar.bz2
yosys-457dc09cdc3546d70eb347d35ad28ffca1621f7d.zip
Added ezsat api for creation of anonymous vectors
Diffstat (limited to 'libs/ezsat')
-rw-r--r--libs/ezsat/ezsat.cc8
-rw-r--r--libs/ezsat/ezsat.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/libs/ezsat/ezsat.cc b/libs/ezsat/ezsat.cc
index 4258fb6fe..27e74e010 100644
--- a/libs/ezsat/ezsat.cc
+++ b/libs/ezsat/ezsat.cc
@@ -667,6 +667,14 @@ std::vector<int> ezSAT::vec_const_unsigned(uint64_t value, int bits)
return vec;
}
+std::vector<int> ezSAT::vec_var(int bits)
+{
+ std::vector<int> vec;
+ for (int i = 0; i < bits; i++)
+ vec.push_back(literal());
+ return vec;
+}
+
std::vector<int> ezSAT::vec_var(std::string name, int bits)
{
std::vector<int> vec;
diff --git a/libs/ezsat/ezsat.h b/libs/ezsat/ezsat.h
index 4a6a72785..3fb5fcaf6 100644
--- a/libs/ezsat/ezsat.h
+++ b/libs/ezsat/ezsat.h
@@ -208,6 +208,7 @@ public:
std::vector<int> vec_const_signed(int64_t value, int bits);
std::vector<int> vec_const_unsigned(uint64_t value, int bits);
+ std::vector<int> vec_var(int bits);
std::vector<int> vec_var(std::string name, int bits);
std::vector<int> vec_cast(const std::vector<int> &vec1, int toBits, bool signExtend = false);