Removes unnecessary argument
This commit is contained in:
parent
bbe9ea9d65
commit
6c0b4443d5
@ -628,7 +628,7 @@ static void pack_nonlut_ffs(Context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Merge a net into a constant net
|
// Merge a net into a constant net
|
||||||
static void set_net_constant(const Context *ctx, NetInfo *orig, NetInfo *constnet, bool constval)
|
static void set_net_constant(const Context *ctx, NetInfo *orig, NetInfo *constnet)
|
||||||
{
|
{
|
||||||
orig->driver.cell = nullptr;
|
orig->driver.cell = nullptr;
|
||||||
for (auto user : orig->users) {
|
for (auto user : orig->users) {
|
||||||
@ -637,7 +637,7 @@ static void set_net_constant(const Context *ctx, NetInfo *orig, NetInfo *constne
|
|||||||
if (ctx->verbose)
|
if (ctx->verbose)
|
||||||
log_info("%s user %s\n", ctx->nameOf(orig), ctx->nameOf(uc));
|
log_info("%s user %s\n", ctx->nameOf(orig), ctx->nameOf(uc));
|
||||||
|
|
||||||
if ((is_lut(ctx, uc)) && (user.port.str(ctx).at(0) == 'I') && !constval) {
|
if (is_lut(ctx, uc) && (user.port.str(ctx).at(0) == 'I')) {
|
||||||
auto it_param = uc->params.find(id_INIT);
|
auto it_param = uc->params.find(id_INIT);
|
||||||
if (it_param == uc->params.end())
|
if (it_param == uc->params.end())
|
||||||
log_error("No initialization for lut found.\n");
|
log_error("No initialization for lut found.\n");
|
||||||
@ -711,13 +711,13 @@ static void pack_constants(Context *ctx)
|
|||||||
NetInfo *ni = net.second.get();
|
NetInfo *ni = net.second.get();
|
||||||
if (ni->driver.cell != nullptr && ni->driver.cell->type == id_GND) {
|
if (ni->driver.cell != nullptr && ni->driver.cell->type == id_GND) {
|
||||||
IdString drv_cell = ni->driver.cell->name;
|
IdString drv_cell = ni->driver.cell->name;
|
||||||
set_net_constant(ctx, ni, gnd_net.get(), false);
|
set_net_constant(ctx, ni, gnd_net.get());
|
||||||
gnd_used = true;
|
gnd_used = true;
|
||||||
dead_nets.push_back(net.first);
|
dead_nets.push_back(net.first);
|
||||||
ctx->cells.erase(drv_cell);
|
ctx->cells.erase(drv_cell);
|
||||||
} else if (ni->driver.cell != nullptr && ni->driver.cell->type == id_VCC) {
|
} else if (ni->driver.cell != nullptr && ni->driver.cell->type == id_VCC) {
|
||||||
IdString drv_cell = ni->driver.cell->name;
|
IdString drv_cell = ni->driver.cell->name;
|
||||||
set_net_constant(ctx, ni, vcc_net.get(), false);
|
set_net_constant(ctx, ni, vcc_net.get());
|
||||||
dead_nets.push_back(net.first);
|
dead_nets.push_back(net.first);
|
||||||
ctx->cells.erase(drv_cell);
|
ctx->cells.erase(drv_cell);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user