diff options
-rw-r--r-- | ice40/pack.cc | 3 | ||||
-rw-r--r-- | json/jsonparse.cc | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc index 54e6dad2..dd9fba27 100644 --- a/ice40/pack.cc +++ b/ice40/pack.cc @@ -275,6 +275,9 @@ static void pack_constants(Context *ctx) if (gnd_used) { ctx->cells[gnd_cell->name] = gnd_cell; ctx->nets[gnd_net->name] = gnd_net; + } else { + delete gnd_net; + delete gnd_cell; } // Vcc cell always inserted for now, as it may be needed during carry legalisation (TODO: trim later if actually // never used?) diff --git a/json/jsonparse.cc b/json/jsonparse.cc index 463efdd2..824ce15e 100644 --- a/json/jsonparse.cc +++ b/json/jsonparse.cc @@ -236,6 +236,7 @@ NetInfo *ground_net(Context *ctx, NetInfo *net) cell->ports[port_info.name] = port_info; + ctx->cells[cell->name] = cell; return net; } @@ -259,6 +260,7 @@ NetInfo *vcc_net(Context *ctx, NetInfo *net) cell->ports[port_info.name] = port_info; + ctx->cells[cell->name] = cell; return net; } |