aboutsummaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-13 14:01:42 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-13 14:01:42 +0200
commit9374ef29bf24c6a9223e7b6742e3debd66a66bf9 (patch)
tree3e189679d0e6b1184699c058f78533467202db91 /frontend
parent991cf1979baaf12d83dc50c223160879d08bdd3a (diff)
downloadnextpnr-9374ef29bf24c6a9223e7b6742e3debd66a66bf9.tar.gz
nextpnr-9374ef29bf24c6a9223e7b6742e3debd66a66bf9.tar.bz2
nextpnr-9374ef29bf24c6a9223e7b6742e3debd66a66bf9.zip
Fixing implementation of constants
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'frontend')
-rw-r--r--frontend/json/jsonparse.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/json/jsonparse.cc b/frontend/json/jsonparse.cc
index 79ee0a4d..23367aca 100644
--- a/frontend/json/jsonparse.cc
+++ b/frontend/json/jsonparse.cc
@@ -341,6 +341,8 @@ void json_import_cell_params(Design *design, string &modname, CellInfo *cell,
modname.c_str());
}
+static int const_net_idx = 0;
+
template <typename F>
void json_import_ports(Design *design, const string &modname,
const string &obj_name, const string &port_name,
@@ -466,7 +468,7 @@ void json_import_ports(Design *design, const string &modname,
//
// Constants always get their own new net
this_net = new NetInfo;
- this_net->name = net_id;
+ this_net->name = "$const_" + std::to_string(const_net_idx++);
const_input = (this_port.type == PORT_IN);
if (wire_node->data_string.compare(string("0")) == 0) {