added ports (not ports_directions) to jsonparse.cc
This commit is contained in:
parent
109287ee90
commit
d7bb30cc66
@ -34,7 +34,7 @@ extern bool check_all_nets_driven(Design *design);
|
|||||||
|
|
||||||
namespace JsonParser {
|
namespace JsonParser {
|
||||||
|
|
||||||
const bool json_debug = false;
|
const bool json_debug = true;
|
||||||
|
|
||||||
typedef std::string string;
|
typedef std::string string;
|
||||||
|
|
||||||
@ -566,13 +566,24 @@ void json_import_cell(Design *design, string modname, JsonNode *cell_node,
|
|||||||
// Both should contain dictionaries having the same keys.
|
// Both should contain dictionaries having the same keys.
|
||||||
//
|
//
|
||||||
|
|
||||||
JsonNode *pdir_node
|
JsonNode *pdir_node = NULL;
|
||||||
= cell_node->data_dict.at("port_directions");
|
if (cell_node->data_dict.count("port_directions") > 0) {
|
||||||
if (pdir_node->type != 'D')
|
|
||||||
log_error("JSON port_directions node of \'%s\' "
|
pdir_node = cell_node->data_dict.at("port_directions");
|
||||||
"in module \'%s\' is not a "
|
if (pdir_node->type != 'D')
|
||||||
"dictionary\n", cell->name.c_str(),
|
log_error("JSON port_directions node of \'%s\' "
|
||||||
modname.c_str());
|
"in module \'%s\' is not a "
|
||||||
|
"dictionary\n", cell->name.c_str(),
|
||||||
|
modname.c_str());
|
||||||
|
|
||||||
|
} else if (cell_node->data_dict.count("ports") > 0) {
|
||||||
|
pdir_node = cell_node->data_dict.at("ports");
|
||||||
|
if (pdir_node->type != 'D')
|
||||||
|
log_error("JSON ports node of \'%s\' "
|
||||||
|
"in module \'%s\' is not a "
|
||||||
|
"dictionary\n", cell->name.c_str(),
|
||||||
|
modname.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
JsonNode *connections
|
JsonNode *connections
|
||||||
= cell_node->data_dict.at("connections");
|
= cell_node->data_dict.at("connections");
|
||||||
|
Loading…
Reference in New Issue
Block a user