aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZipCPU <dgisselq@ieee.org>2018-06-06 07:49:35 -0400
committerZipCPU <dgisselq@ieee.org>2018-06-06 07:49:35 -0400
commit2e6d0b752ab2d269f822bfd3ea029b100ecf4233 (patch)
treeda3cb5c0b30e5683b2919538328f0c22ae384095
parentbd08f9e698269764d9e06052470d4a699f69f951 (diff)
downloadnextpnr-2e6d0b752ab2d269f822bfd3ea029b100ecf4233.tar.gz
nextpnr-2e6d0b752ab2d269f822bfd3ea029b100ecf4233.tar.bz2
nextpnr-2e6d0b752ab2d269f822bfd3ea029b100ecf4233.zip
Removed erroneous BEL assignment in JSON parser
-rw-r--r--common/design.h6
-rw-r--r--frontend/json/jsonparse.cc13
2 files changed, 12 insertions, 7 deletions
diff --git a/common/design.h b/common/design.h
index 3e4091c3..564d5ce5 100644
--- a/common/design.h
+++ b/common/design.h
@@ -108,7 +108,7 @@ struct CellInfo
BelId bel;
// cell_port -> bel_pin
- dict<IdString, IdString> pins;
+ dict<IdString, IdString> pins;
};
struct Design
@@ -119,8 +119,8 @@ struct Design
// ...
}
- dict<IdString, NetInfo*> nets;
- dict<IdString, CellInfo*> cells;
+ dict<IdString, NetInfo*> nets;
+ dict<IdString, CellInfo*> cells;
};
#endif
diff --git a/frontend/json/jsonparse.cc b/frontend/json/jsonparse.cc
index 9e8aecbe..0ccf70f3 100644
--- a/frontend/json/jsonparse.cc
+++ b/frontend/json/jsonparse.cc
@@ -305,7 +305,8 @@ log_info("Processing modname = %s\n", modname.c_str());
CellInfo *cell = new CellInfo;
cell->name = cell_parent->data_dict_keys[cellid];
- cell->bel = design->chip.getBelByName(cell_type->data_string);
+ cell->type = cell_type;
+ // No BEL assignment here/yet
log_info(" Processing %s $ %s\n", modname.c_str(), cell->name.c_str());
param_node = here->data_dict.at("parameters");
@@ -429,15 +430,18 @@ log_info("Examining port %s, node %s\n", key.c_str(),
this_net = new NetInfo;
this_net->name = "" + net_id;
design->nets[net_id] = this_net;
+ this_net->driver.cell = NULL;
+ this_net->driver.port = "";
} else
this_net = design->nets[net_id];
port_ref.cell = cell;
port_ref.port = port_info.name;
- if (port_info.type != PORT_IN)
+ if (port_info.type != PORT_IN) {
+ assert(this_net->driver->cell == NULL);
this_net->driver = port_ref;
- else
+ } else
this_net->users.push_back(port_ref);
}
@@ -485,7 +489,8 @@ int main(int argc, char **argv) {
chip_args.type = ChipArgs::LP384;
Design *design = new Design(chip_args);
- std::string fname = "../../ice40/blinky.json";
+ // std::string fname = "../../ice40/blinky.json";
+ std::string fname = "/home/dan/work/rnd/opencores/icozip/trunk/rtl/icozip/icozip.json";
std::istream *f = new std::ifstream(fname);
parser->execute(f, fname, design);