aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/alumacc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'passes/techmap/alumacc.cc')
-rw-r--r--passes/techmap/alumacc.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/passes/techmap/alumacc.cc b/passes/techmap/alumacc.cc
index dcffed94d..9f6dd02d0 100644
--- a/passes/techmap/alumacc.cc
+++ b/passes/techmap/alumacc.cc
@@ -2,11 +2,11 @@
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2012 Clifford Wolf <clifford@clifford.at>
- *
+ *
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@@ -40,7 +40,7 @@ struct AlumaccWorker
{
std::vector<RTLIL::Cell*> cells;
RTLIL::SigSpec a, b, c, y;
- std::vector<std::tuple<bool, bool, bool, bool, RTLIL::SigSpec>> cmp;
+ std::vector<tuple<bool, bool, bool, bool, RTLIL::SigSpec>> cmp;
bool is_signed, invert_b;
RTLIL::Cell *alu_cell;
@@ -98,9 +98,9 @@ struct AlumaccWorker
}
};
- std::map<RTLIL::SigBit, int> bit_users;
- std::map<RTLIL::SigSpec, maccnode_t*> sig_macc;
- std::map<RTLIL::SigSig, std::set<alunode_t*>> sig_alu;
+ dict<RTLIL::SigBit, int> bit_users;
+ dict<RTLIL::SigSpec, maccnode_t*> sig_macc;
+ dict<RTLIL::SigSig, pool<alunode_t*, hash_ptr_ops>> sig_alu;
int macc_counter, alu_counter;
AlumaccWorker(RTLIL::Module *module) : module(module), sigmap(module)
@@ -138,7 +138,7 @@ struct AlumaccWorker
n->users = 0;
for (auto bit : n->y)
- n->users = std::max(n->users, bit_users.at(bit) - 1);
+ n->users = max(n->users, bit_users.at(bit) - 1);
if (cell->type.in("$pos", "$neg"))
{
@@ -215,7 +215,7 @@ struct AlumaccWorker
{
while (1)
{
- std::set<maccnode_t*> delete_nodes;
+ pool<maccnode_t*, hash_ptr_ops> delete_nodes;
for (auto &it : sig_macc)
{
@@ -267,7 +267,7 @@ struct AlumaccWorker
void macc_to_alu()
{
- std::set<maccnode_t*> delete_nodes;
+ pool<maccnode_t*, hash_ptr_ops> delete_nodes;
for (auto &it : sig_macc)
{
@@ -409,7 +409,7 @@ struct AlumaccWorker
n->a = A;
n->b = B;
n->c = RTLIL::S1;
- n->y = module->addWire(NEW_ID, std::max(GetSize(A), GetSize(B)));
+ n->y = module->addWire(NEW_ID, max(GetSize(A), GetSize(B)));
n->is_signed = is_signed;
n->invert_b = true;
sig_alu[RTLIL::SigSig(A, B)].insert(n);
@@ -544,7 +544,7 @@ struct AlumaccPass : public Pass {
}
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
{
- log_header("Executing ALUMACC pass (create $alu and $macc cells).\n");
+ log_header(design, "Executing ALUMACC pass (create $alu and $macc cells).\n");
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++) {
@@ -563,5 +563,5 @@ struct AlumaccPass : public Pass {
}
}
} AlumaccPass;
-
+
PRIVATE_NAMESPACE_END