aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/pack.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-12 13:40:22 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-12 13:40:22 +0200
commit031d8e811f9ce00f0c72e697789f991834d1f8f2 (patch)
treee6a3f541ea8550d4f6649492eb0b7913fa3e19af /ice40/pack.cc
parent67a5cedbe30f681fd3c5c52ed8552abcc7583a45 (diff)
downloadnextpnr-031d8e811f9ce00f0c72e697789f991834d1f8f2.tar.gz
nextpnr-031d8e811f9ce00f0c72e697789f991834d1f8f2.tar.bz2
nextpnr-031d8e811f9ce00f0c72e697789f991834d1f8f2.zip
ice40: Adding a placement validity checker
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/pack.cc')
-rw-r--r--ice40/pack.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index eb783f2f..ff421c17 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -90,13 +90,12 @@ static void pack_nonlut_ffs(Design *design)
}
// Pack constants (simple implementation)
-static void pack_constants(Design *design) {
- CellInfo *gnd_cell = create_ice_cell(design, "ICESTORM_LC",
- "$PACKER_GND");
+static void pack_constants(Design *design)
+{
+ CellInfo *gnd_cell = create_ice_cell(design, "ICESTORM_LC", "$PACKER_GND");
gnd_cell->attrs["LUT_INIT"] = "0";
- CellInfo *vcc_cell = create_ice_cell(design, "ICESTORM_LC",
- "$PACKER_VCC");
+ CellInfo *vcc_cell = create_ice_cell(design, "ICESTORM_LC", "$PACKER_VCC");
vcc_cell->attrs["LUT_INIT"] = "1";
for (auto net : design->nets) {
@@ -105,7 +104,8 @@ static void pack_constants(Design *design) {
ni->driver.cell = gnd_cell;
ni->driver.port = "O";
design->cells[gnd_cell->name] = gnd_cell;
- } else if (ni->driver.cell != nullptr && ni->driver.cell->type == "VCC") {
+ } else if (ni->driver.cell != nullptr &&
+ ni->driver.cell->type == "VCC") {
ni->driver.cell = vcc_cell;
ni->driver.port = "O";
design->cells[vcc_cell->name] = vcc_cell;