json: Fix inputs directly driving inouts
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
cadbf42054
commit
997a66791e
@ -230,7 +230,7 @@ class SAPlacer
|
|||||||
|
|
||||||
double upper = 0.6, lower = 0.4;
|
double upper = 0.6, lower = 0.4;
|
||||||
|
|
||||||
if (curr_metric < 0.95 * avg_metric) {
|
if (curr_metric < 0.95 * avg_metric && curr_metric > 0) {
|
||||||
avg_metric = 0.8 * avg_metric + 0.2 * curr_metric;
|
avg_metric = 0.8 * avg_metric + 0.2 * curr_metric;
|
||||||
} else {
|
} else {
|
||||||
if (Raccept >= 0.8) {
|
if (Raccept >= 0.8) {
|
||||||
|
@ -758,11 +758,26 @@ void json_import(Context *ctx, string modname, JsonNode *node)
|
|||||||
|
|
||||||
// N.B. ports must be imported after cells for tristate behaviour
|
// N.B. ports must be imported after cells for tristate behaviour
|
||||||
// to be correct
|
// to be correct
|
||||||
// Loop through all ports
|
// Loop through all ports, first non-tristate then tristate to handle
|
||||||
|
// interconnected ports correctly
|
||||||
for (int portid = 0; portid < GetSize(ports_parent->data_dict_keys); portid++) {
|
for (int portid = 0; portid < GetSize(ports_parent->data_dict_keys); portid++) {
|
||||||
JsonNode *here;
|
JsonNode *here;
|
||||||
|
|
||||||
here = ports_parent->data_dict.at(ports_parent->data_dict_keys[portid]);
|
here = ports_parent->data_dict.at(ports_parent->data_dict_keys[portid]);
|
||||||
|
JsonNode *dir_node = here->data_dict.at("direction");
|
||||||
|
NPNR_ASSERT(dir_node->type == 'S');
|
||||||
|
if (dir_node->data_string == "inout")
|
||||||
|
continue;
|
||||||
|
json_import_toplevel_port(ctx, modname, netids, ports_parent->data_dict_keys[portid], here);
|
||||||
|
}
|
||||||
|
for (int portid = 0; portid < GetSize(ports_parent->data_dict_keys); portid++) {
|
||||||
|
JsonNode *here;
|
||||||
|
|
||||||
|
here = ports_parent->data_dict.at(ports_parent->data_dict_keys[portid]);
|
||||||
|
JsonNode *dir_node = here->data_dict.at("direction");
|
||||||
|
NPNR_ASSERT(dir_node->type == 'S');
|
||||||
|
if (dir_node->data_string != "inout")
|
||||||
|
continue;
|
||||||
json_import_toplevel_port(ctx, modname, netids, ports_parent->data_dict_keys[portid], here);
|
json_import_toplevel_port(ctx, modname, netids, ports_parent->data_dict_keys[portid], here);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
tests
2
tests
@ -1 +1 @@
|
|||||||
Subproject commit ee3ff3c4bdce20c47bd6c35a2f7430497b283807
|
Subproject commit f29dcbe187b517d01964b1074eb7ff0b90849eed
|
Loading…
Reference in New Issue
Block a user