mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-03 09:50:24 +00:00
73%
This commit is contained in:
parent
4c9f68216a
commit
eeb15ea2a2
17 changed files with 121 additions and 38 deletions
|
@ -42,7 +42,8 @@ struct OptMergeWorker
|
|||
CellTypes ct;
|
||||
int total_count;
|
||||
|
||||
static void sort_pmux_conn(dict<RTLIL::IdString, RTLIL::SigSpec> &conn)
|
||||
template <typename SmellsLikeDict>
|
||||
static void sort_pmux_conn(SmellsLikeDict &conn)
|
||||
{
|
||||
SigSpec sig_s = conn.at(ID::S);
|
||||
SigSpec sig_b = conn.at(ID::B);
|
||||
|
@ -82,7 +83,8 @@ struct OptMergeWorker
|
|||
vector<string> hash_conn_strings;
|
||||
std::string hash_string = cell->type.str() + "\n";
|
||||
|
||||
const dict<RTLIL::IdString, RTLIL::SigSpec> *conn = &cell->connections();
|
||||
auto tmp = cell->connections_.as_dict();
|
||||
dict<RTLIL::IdString, RTLIL::SigSpec>* conn = &tmp;
|
||||
dict<RTLIL::IdString, RTLIL::SigSpec> alt_conn;
|
||||
|
||||
if (cell->type.in(ID($and), ID($or), ID($xor), ID($xnor), ID($add), ID($mul),
|
||||
|
@ -140,7 +142,7 @@ struct OptMergeWorker
|
|||
hash_conn_strings.push_back(s + "\n");
|
||||
}
|
||||
|
||||
for (auto &&it : cell->parameters)
|
||||
for (auto it : cell->parameters)
|
||||
hash_conn_strings.push_back("P " + it.first.str() + "=" + it.second.as_string() + "\n");
|
||||
|
||||
std::sort(hash_conn_strings.begin(), hash_conn_strings.end());
|
||||
|
|
|
@ -481,11 +481,11 @@ struct ShareWorker
|
|||
return true;
|
||||
}
|
||||
|
||||
for (auto &it : c1->parameters)
|
||||
for (auto it : c1->parameters)
|
||||
if (c2->parameters.count(it.first) == 0 || c2->parameters.at(it.first) != it.second)
|
||||
return false;
|
||||
|
||||
for (auto &it : c2->parameters)
|
||||
for (auto it : c2->parameters)
|
||||
if (c1->parameters.count(it.first) == 0 || c1->parameters.at(it.first) != it.second)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue