From 9374ef29bf24c6a9223e7b6742e3debd66a66bf9 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 13 Jun 2018 14:01:42 +0200 Subject: Fixing implementation of constants Signed-off-by: David Shah --- frontend/json/jsonparse.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'frontend') 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 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) { -- cgit v1.2.3