3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-28 00:48:46 +00:00

Small naming fixes to remove sig_ prefix

This commit is contained in:
Akash Levy 2024-12-17 10:48:28 -08:00
parent 0757e27683
commit 2d105fc2c3
2 changed files with 7 additions and 7 deletions

View file

@ -1014,12 +1014,12 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons
RTLIL::SigBit a = sig_a[i]; RTLIL::SigBit a = sig_a[i];
if (b == ((bi ^ ci) ? State::S1 : State::S0)) { if (b == ((bi ^ ci) ? State::S1 : State::S0)) {
module->connect(sig_y[i], a); module->connect(sig_y[i], a);
module->connect(sig_x[i], ci ? module->Not(NEW_ID2_SUFFIX("sig_x_inv"), a, false, cell->get_src_attribute()).as_bit() : a); // SILIMATE: Improve the naming module->connect(sig_x[i], ci ? module->Not(NEW_ID2_SUFFIX("x_inv"), a, false, cell->get_src_attribute()).as_bit() : a); // SILIMATE: Improve the naming
module->connect(sig_co[i], ci ? State::S1 : State::S0); module->connect(sig_co[i], ci ? State::S1 : State::S0);
} }
else if (a == (ci ? State::S1 : State::S0)) { else if (a == (ci ? State::S1 : State::S0)) {
module->connect(sig_y[i], bi ? module->Not(NEW_ID2_SUFFIX("sig_y_inv"), b, false, cell->get_src_attribute()).as_bit() : b); // SILIMATE: Improve the naming module->connect(sig_y[i], bi ? module->Not(NEW_ID2_SUFFIX("y_inv"), b, false, cell->get_src_attribute()).as_bit() : b); // SILIMATE: Improve the naming
module->connect(sig_x[i], (bi ^ ci) ? module->Not(NEW_ID2_SUFFIX("sig_x_inv"), b, false, cell->get_src_attribute()).as_bit() : b); // SILIMATE: Improve the naming module->connect(sig_x[i], (bi ^ ci) ? module->Not(NEW_ID2_SUFFIX("x_inv"), b, false, cell->get_src_attribute()).as_bit() : b); // SILIMATE: Improve the naming
module->connect(sig_co[i], ci ? State::S1 : State::S0); module->connect(sig_co[i], ci ? State::S1 : State::S0);
} }
else else
@ -1436,7 +1436,7 @@ skip_fine_alu:
/* sub, b is 0 */ /* sub, b is 0 */
RTLIL::SigSpec a = cell->getPort(ID::A); RTLIL::SigSpec a = cell->getPort(ID::A);
a.extend_u0(y_width, is_signed); a.extend_u0(y_width, is_signed);
module->connect(cell->getPort(ID::X), module->Not(NEW_ID2_SUFFIX("sig_ci_inv"), a, false, cell->get_src_attribute())); // SILIMATE: Improve the naming module->connect(cell->getPort(ID::X), module->Not(NEW_ID2_SUFFIX("ci_inv"), a, false, cell->get_src_attribute())); // SILIMATE: Improve the naming
module->connect(cell->getPort(ID::CO), RTLIL::Const(State::S1, y_width)); module->connect(cell->getPort(ID::CO), RTLIL::Const(State::S1, y_width));
} else { } else {
/* add */ /* add */

View file

@ -114,7 +114,7 @@ void simplemap_reduce(RTLIL::Module *module, RTLIL::Cell *cell)
while (sig_a.size() > 1) while (sig_a.size() > 1)
{ {
RTLIL::SigSpec sig_t = module->addWire(NEW_ID2_SUFFIX("sig_t"), sig_a.size() / 2); // SILIMATE: Improve the naming RTLIL::SigSpec sig_t = module->addWire(NEW_ID2_SUFFIX("t"), sig_a.size() / 2); // SILIMATE: Improve the naming
for (int i = 0; i < sig_a.size(); i += 2) for (int i = 0; i < sig_a.size(); i += 2)
{ {
@ -135,7 +135,7 @@ void simplemap_reduce(RTLIL::Module *module, RTLIL::Cell *cell)
} }
if (cell->type == ID($reduce_xnor)) { if (cell->type == ID($reduce_xnor)) {
RTLIL::SigSpec sig_t = module->addWire(NEW_ID2_SUFFIX("sig_t")); // SILIMATE: Improve the naming RTLIL::SigSpec sig_t = module->addWire(NEW_ID2_SUFFIX("t")); // SILIMATE: Improve the naming
RTLIL::Cell *gate = module->addCell(NEW_ID2, ID($_NOT_)); // SILIMATE: Improve the naming RTLIL::Cell *gate = module->addCell(NEW_ID2, ID($_NOT_)); // SILIMATE: Improve the naming
gate->attributes = cell->attributes; gate->attributes = cell->attributes;
gate->setPort(ID::A, sig_a); gate->setPort(ID::A, sig_a);
@ -155,7 +155,7 @@ static void logic_reduce(RTLIL::Module *module, RTLIL::SigSpec &sig, RTLIL::Cell
{ {
while (sig.size() > 1) while (sig.size() > 1)
{ {
RTLIL::SigSpec sig_t = module->addWire(NEW_ID2_SUFFIX("sig_t"), sig.size() / 2); // SILIMATE: Improve the naming RTLIL::SigSpec sig_t = module->addWire(NEW_ID2_SUFFIX("t"), sig.size() / 2); // SILIMATE: Improve the naming
for (int i = 0; i < sig.size(); i += 2) for (int i = 0; i < sig.size(); i += 2)
{ {