From: Clifford Wolf Date: Thu, 15 Aug 2013 12:40:26 +0000 (+0200) Subject: Added ezsat api for creation of anonymous vectors X-Git-Tag: yosys-0.2.0~502 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=457dc09cdc3546d70eb347d35ad28ffca1621f7d;p=yosys.git Added ezsat api for creation of anonymous vectors --- 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 ezSAT::vec_const_unsigned(uint64_t value, int bits) return vec; } +std::vector ezSAT::vec_var(int bits) +{ + std::vector vec; + for (int i = 0; i < bits; i++) + vec.push_back(literal()); + return vec; +} + std::vector ezSAT::vec_var(std::string name, int bits) { std::vector 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 vec_const_signed(int64_t value, int bits); std::vector vec_const_unsigned(uint64_t value, int bits); + std::vector vec_var(int bits); std::vector vec_var(std::string name, int bits); std::vector vec_cast(const std::vector &vec1, int toBits, bool signExtend = false);