fraig
commit
a7b6abff50
|
@ -1,7 +1,7 @@
|
|||
# powerful heightened yielded Logic Synthesis (phyLS)
|
||||
|
||||
phyLS is based on the [mockturtle](https://github.com/lsils/mockturtle), it can optimize different logics attributes.
|
||||
Currently, it supports AIG, MIG, XAG, and XMG based optimization.
|
||||
phyLS is based on the [mockturtle](https://github.com/lsils/mockturtle) and the [abc](https://github.com/berkeley-abc/abc), it can optimize different logics attributes.
|
||||
Currently, it supports mockturtle format(AIG, MIG, XAG, XMG) and abc format(AIG,GIA) based optimization.
|
||||
|
||||
[Read the documentation here.](https://phyls.readthedocs.io/en/latest/)
|
||||
|
||||
|
|
|
@ -27,13 +27,17 @@ using namespace mockturtle;
|
|||
|
||||
namespace alice {
|
||||
|
||||
class reduction_command : public command {
|
||||
class fr_command : public command {
|
||||
public:
|
||||
explicit reduction_command(const environment::ptr& env)
|
||||
explicit fr_command(const environment::ptr& env)
|
||||
: command(env, "functional reduction [default = AIG]") {
|
||||
add_flag("--mig, -m", "functional reduction for MIG");
|
||||
add_flag("--xag, -g", "functional reduction for XAG");
|
||||
add_flag("--xmg, -x", "functional reduction for XMG");
|
||||
add_option("--tfi_node, -n", max_tfi_node,
|
||||
"Maximum number of nodes in the TFI to be compared");
|
||||
add_flag("--saturation, -s",
|
||||
"repeat until no further improvement can be found");
|
||||
add_flag("--verbose, -v", "print the information");
|
||||
}
|
||||
|
||||
|
@ -42,31 +46,40 @@ class reduction_command : public command {
|
|||
clock_t begin, end;
|
||||
double totalTime;
|
||||
|
||||
functional_reduction_params ps;
|
||||
ps.max_TFI_nodes = max_tfi_node;
|
||||
if (is_set("saturation")) ps.saturation = true;
|
||||
|
||||
if (is_set("verbose")) {
|
||||
ps.verbose = true;
|
||||
ps.progress = true;
|
||||
}
|
||||
|
||||
begin = clock();
|
||||
if (is_set("mig")) {
|
||||
auto mig = store<mig_network>().current();
|
||||
functional_reduction(mig);
|
||||
functional_reduction(mig, ps);
|
||||
mig = cleanup_dangling(mig);
|
||||
phyLS::print_stats(mig);
|
||||
store<mig_network>().extend();
|
||||
store<mig_network>().current() = mig;
|
||||
} else if (is_set("xmg")) {
|
||||
auto xmg = store<xmg_network>().current();
|
||||
functional_reduction(xmg);
|
||||
functional_reduction(xmg, ps);
|
||||
xmg = cleanup_dangling(xmg);
|
||||
phyLS::print_stats(xmg);
|
||||
store<xmg_network>().extend();
|
||||
store<xmg_network>().current() = xmg;
|
||||
} else if (is_set("xag")) {
|
||||
auto xag = store<xag_network>().current();
|
||||
functional_reduction(xag);
|
||||
functional_reduction(xag, ps);
|
||||
xag = cleanup_dangling(xag);
|
||||
phyLS::print_stats(xag);
|
||||
store<xag_network>().extend();
|
||||
store<xag_network>().current() = xag;
|
||||
} else {
|
||||
auto aig = store<aig_network>().current();
|
||||
functional_reduction(aig);
|
||||
functional_reduction(aig, ps);
|
||||
aig = cleanup_dangling(aig);
|
||||
phyLS::print_stats(aig);
|
||||
store<aig_network>().extend();
|
||||
|
@ -80,9 +93,10 @@ class reduction_command : public command {
|
|||
}
|
||||
|
||||
private:
|
||||
int max_tfi_node = 500;
|
||||
};
|
||||
|
||||
ALICE_ADD_COMMAND(reduction, "Synthesis")
|
||||
ALICE_ADD_COMMAND(fr, "Synthesis")
|
||||
|
||||
} // namespace alice
|
||||
|
||||
|
|
Loading…
Reference in New Issue