27 lines
561 B
C++
27 lines
561 B
C++
#include <lorina/aiger.hpp>
|
|
#include <mockturtle/mockturtle.hpp>
|
|
|
|
int main() {
|
|
mockturtle::mig_network mig;
|
|
|
|
std::vector<mockturtle::signal<mockturtle::mig_network>> a;
|
|
std::vector<mockturtle::signal<mockturtle::mig_network>> b;
|
|
|
|
for (unsigned i = 0; i < 8; i++) {
|
|
a.push_back(mig.create_pi());
|
|
b.push_back(mig.create_pi());
|
|
}
|
|
|
|
auto out = mockturtle::carry_ripple_multiplier(mig, a, b);
|
|
|
|
for (unsigned i = 0; i < out.size(); i++) {
|
|
mig.create_po(out[i]);
|
|
}
|
|
|
|
// output
|
|
mockturtle::write_verilog(mig, "mig.v");
|
|
|
|
return 0;
|
|
}
|
|
|