mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-21 05:13:40 +00:00
Renamed $_INV_ cell type to $_NOT_
This commit is contained in:
parent
bf486002d9
commit
f092b50148
19 changed files with 47 additions and 47 deletions
|
@ -130,7 +130,7 @@ static void extract_cell(RTLIL::Cell *cell, bool keepff)
|
|||
return;
|
||||
}
|
||||
|
||||
if (cell->type == "$_INV_")
|
||||
if (cell->type == "$_NOT_")
|
||||
{
|
||||
RTLIL::SigSpec sig_a = cell->getPort("\\A");
|
||||
RTLIL::SigSpec sig_y = cell->getPort("\\Y");
|
||||
|
@ -733,7 +733,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
|
|||
continue;
|
||||
}
|
||||
if (c->type == "\\INV") {
|
||||
RTLIL::Cell *cell = module->addCell(remap_name(c->name), "$_INV_");
|
||||
RTLIL::Cell *cell = module->addCell(remap_name(c->name), "$_NOT_");
|
||||
cell->setPort("\\A", RTLIL::SigSpec(module->wires_[remap_name(c->getPort("\\A").as_wire()->name)]));
|
||||
cell->setPort("\\Y", RTLIL::SigSpec(module->wires_[remap_name(c->getPort("\\Y").as_wire()->name)]));
|
||||
design->select(module, cell);
|
||||
|
|
|
@ -209,7 +209,7 @@ static void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bo
|
|||
|
||||
for (auto cell : module->cells())
|
||||
if (design->selected(module, cell) && cell->type[0] == '$') {
|
||||
if ((cell->type == "$_INV_" || cell->type == "$not" || cell->type == "$logic_not") &&
|
||||
if ((cell->type == "$_NOT_" || cell->type == "$not" || cell->type == "$logic_not") &&
|
||||
cell->getPort("\\A").size() == 1 && cell->getPort("\\Y").size() == 1)
|
||||
invert_map[assign_map(cell->getPort("\\Y"))] = assign_map(cell->getPort("\\A"));
|
||||
if (ct_combinational.cell_known(cell->type))
|
||||
|
@ -371,9 +371,9 @@ static void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bo
|
|||
}
|
||||
}
|
||||
|
||||
if ((cell->type == "$_INV_" || cell->type == "$not" || cell->type == "$logic_not") && cell->getPort("\\Y").size() == 1 &&
|
||||
if ((cell->type == "$_NOT_" || cell->type == "$not" || cell->type == "$logic_not") && cell->getPort("\\Y").size() == 1 &&
|
||||
invert_map.count(assign_map(cell->getPort("\\A"))) != 0) {
|
||||
cover_list("opt.opt_const.invert.double", "$_INV_", "$not", "$logic_not", cell->type.str());
|
||||
cover_list("opt.opt_const.invert.double", "$_NOT_", "$not", "$logic_not", cell->type.str());
|
||||
replace_cell(assign_map, module, cell, "double_invert", "\\Y", invert_map.at(assign_map(cell->getPort("\\A"))));
|
||||
goto next_cell;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ static void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bo
|
|||
goto next_cell;
|
||||
}
|
||||
|
||||
if (cell->type == "$_INV_") {
|
||||
if (cell->type == "$_NOT_") {
|
||||
RTLIL::SigSpec input = cell->getPort("\\A");
|
||||
assign_map.apply(input);
|
||||
if (input.match("1")) ACTION_DO_Y(0);
|
||||
|
@ -463,7 +463,7 @@ static void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bo
|
|||
if (input.match("01 ")) ACTION_DO("\\Y", input.extract(0, 1));
|
||||
if (input.match("10 ")) {
|
||||
cover("opt.opt_const.mux_to_inv");
|
||||
cell->type = "$_INV_";
|
||||
cell->type = "$_NOT_";
|
||||
cell->setPort("\\A", input.extract(0, 1));
|
||||
cell->unsetPort("\\B");
|
||||
cell->unsetPort("\\S");
|
||||
|
@ -648,7 +648,7 @@ static void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bo
|
|||
cell->parameters.erase("\\WIDTH");
|
||||
cell->type = "$not";
|
||||
} else
|
||||
cell->type = "$_INV_";
|
||||
cell->type = "$_NOT_";
|
||||
OPT_DID_SOMETHING = true;
|
||||
did_something = true;
|
||||
goto next_cell;
|
||||
|
|
|
@ -623,7 +623,7 @@ struct FreduceWorker
|
|||
batches.push_back(outputs);
|
||||
bits_full_total += outputs.size();
|
||||
}
|
||||
if (inv_mode && it.second->type == "$_INV_")
|
||||
if (inv_mode && it.second->type == "$_NOT_")
|
||||
inv_pairs.insert(std::pair<RTLIL::SigBit, RTLIL::SigBit>(sigmap(it.second->getPort("\\A")), sigmap(it.second->getPort("\\Y"))));
|
||||
}
|
||||
|
||||
|
@ -718,7 +718,7 @@ struct FreduceWorker
|
|||
{
|
||||
inv_sig = module->addWire(NEW_ID);
|
||||
|
||||
RTLIL::Cell *inv_cell = module->addCell(NEW_ID, "$_INV_");
|
||||
RTLIL::Cell *inv_cell = module->addCell(NEW_ID, "$_NOT_");
|
||||
inv_cell->setPort("\\A", grp[0].bit);
|
||||
inv_cell->setPort("\\Y", inv_sig);
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ static void dfflibmap(RTLIL::Design *design, RTLIL::Module *module)
|
|||
} else
|
||||
if ('a' <= port.second && port.second <= 'z') {
|
||||
sig = cell_connections[std::string("\\") + char(port.second - ('a' - 'A'))];
|
||||
sig = module->InvGate(NEW_ID, sig);
|
||||
sig = module->NotGate(NEW_ID, sig);
|
||||
} else
|
||||
if (port.second == '0' || port.second == '1') {
|
||||
sig = RTLIL::SigSpec(port.second == '0' ? 0 : 1, 1);
|
||||
|
|
|
@ -34,7 +34,7 @@ static void simplemap_not(RTLIL::Module *module, RTLIL::Cell *cell)
|
|||
sig_a.extend(SIZE(sig_y), cell->parameters.at("\\A_SIGNED").as_bool());
|
||||
|
||||
for (int i = 0; i < SIZE(sig_y); i++) {
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_INV_");
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_NOT_");
|
||||
gate->setPort("\\A", sig_a[i]);
|
||||
gate->setPort("\\Y", sig_y[i]);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ static void simplemap_bitop(RTLIL::Module *module, RTLIL::Cell *cell)
|
|||
RTLIL::SigSpec sig_t = module->addWire(NEW_ID, SIZE(sig_y));
|
||||
|
||||
for (int i = 0; i < SIZE(sig_y); i++) {
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_INV_");
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_NOT_");
|
||||
gate->setPort("\\A", sig_t[i]);
|
||||
gate->setPort("\\Y", sig_y[i]);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ static void simplemap_reduce(RTLIL::Module *module, RTLIL::Cell *cell)
|
|||
|
||||
if (cell->type == "$reduce_xnor") {
|
||||
RTLIL::SigSpec sig_t = module->addWire(NEW_ID);
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_INV_");
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_NOT_");
|
||||
gate->setPort("\\A", sig_a);
|
||||
gate->setPort("\\Y", sig_t);
|
||||
last_output_cell = gate;
|
||||
|
@ -207,7 +207,7 @@ static void simplemap_lognot(RTLIL::Module *module, RTLIL::Cell *cell)
|
|||
sig_y = sig_y.extract(0, 1);
|
||||
}
|
||||
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_INV_");
|
||||
RTLIL::Cell *gate = module->addCell(NEW_ID, "$_NOT_");
|
||||
gate->setPort("\\A", sig_a);
|
||||
gate->setPort("\\Y", sig_y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue