interchange: Fix compile warnings

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2021-09-28 09:54:17 +01:00
parent d89afc2aa6
commit 19afb07370
2 changed files with 9 additions and 6 deletions

View File

@ -29,6 +29,7 @@
NEXTPNR_NAMESPACE_BEGIN NEXTPNR_NAMESPACE_BEGIN
namespace {
enum ClusterWireNodeState enum ClusterWireNodeState
{ {
IN_SINK_SITE = 0, IN_SINK_SITE = 0,
@ -51,6 +52,7 @@ struct ClusterWireNode
int depth; int depth;
bool only_down; bool only_down;
}; };
} // namespace
static void handle_expansion_node(const Context *ctx, WireId prev_wire, PipId pip, ClusterWireNode curr_node, static void handle_expansion_node(const Context *ctx, WireId prev_wire, PipId pip, ClusterWireNode curr_node,
std::vector<ClusterWireNode> &nodes_to_expand, pool<BelId> &bels, std::vector<ClusterWireNode> &nodes_to_expand, pool<BelId> &bels,
@ -678,7 +680,7 @@ void Arch::prepare_macro_cluster(const ClusterPOD *cluster, uint32_t index)
for (auto &cell : macro_to_cells[ci->macro_parent]) for (auto &cell : macro_to_cells[ci->macro_parent])
for (auto &node : cluster->connection_graph) for (auto &node : cluster->connection_graph)
if (IdString(node.cell_type) == cell->type) if (IdString(node.cell_type) == cell->type)
if (node.idx != 0 && cell->name != ci->name || node.idx == 0 && cell->name == ci->name) { if ((node.idx != 0 && cell->name != ci->name) || (node.idx == 0 && cell->name == ci->name)) {
idx_to_cells[node.idx].insert(cell); idx_to_cells[node.idx].insert(cell);
} }
@ -712,7 +714,7 @@ void Arch::prepare_macro_cluster(const ClusterPOD *cluster, uint32_t index)
for (const auto &cell : arc.second) for (const auto &cell : arc.second)
possible_idx[cell].insert(arc.first); possible_idx[cell].insert(arc.first);
for (const auto arc : possible_idx) { for (const auto &arc : possible_idx) {
log_info("Possible idx %s:\n", arc.first->name.c_str(ctx)); log_info("Possible idx %s:\n", arc.first->name.c_str(ctx));
for (const auto idx : arc.second) for (const auto idx : arc.second)
log_info(" - %d\n", idx); log_info(" - %d\n", idx);
@ -743,7 +745,7 @@ void Arch::prepare_macro_cluster(const ClusterPOD *cluster, uint32_t index)
for (const auto &cell : arc.second) for (const auto &cell : arc.second)
possible_idx[cell].insert(arc.first); possible_idx[cell].insert(arc.first);
for (const auto arc : possible_idx) { for (const auto &arc : possible_idx) {
log_info("Possible idx %s:\n", arc.first->name.c_str(ctx)); log_info("Possible idx %s:\n", arc.first->name.c_str(ctx));
for (const auto idx : arc.second) for (const auto idx : arc.second)
log_info(" - %d\n", idx); log_info(" - %d\n", idx);
@ -809,7 +811,7 @@ void Arch::prepare_macro_cluster(const ClusterPOD *cluster, uint32_t index)
for (const auto &cell : arc.second) for (const auto &cell : arc.second)
possible_idx[cell].insert(arc.first); possible_idx[cell].insert(arc.first);
for (const auto arc : possible_idx) { for (const auto &arc : possible_idx) {
log_info("Possible idx %s:\n", arc.first->name.c_str(ctx)); log_info("Possible idx %s:\n", arc.first->name.c_str(ctx));
for (const auto idx : arc.second) for (const auto idx : arc.second)
log_info(" - %d\n", idx); log_info(" - %d\n", idx);
@ -831,7 +833,7 @@ void Arch::prepare_macro_cluster(const ClusterPOD *cluster, uint32_t index)
for (const auto &cell : arc.second) for (const auto &cell : arc.second)
possible_idx[cell].insert(arc.first); possible_idx[cell].insert(arc.first);
for (const auto arc : possible_idx) { for (const auto &arc : possible_idx) {
log_info("Possible idx %s:\n", arc.first->name.c_str(ctx)); log_info("Possible idx %s:\n", arc.first->name.c_str(ctx));
for (const auto idx : arc.second) for (const auto idx : arc.second)
log_info(" - %d\n", idx); log_info(" - %d\n", idx);

View File

@ -23,7 +23,7 @@
#include "util.h" #include "util.h"
NEXTPNR_NAMESPACE_BEGIN NEXTPNR_NAMESPACE_BEGIN
namespace {
// All legal routes involved at most 2 sites, the source site and the sink // All legal routes involved at most 2 sites, the source site and the sink
// site. The source site and sink sites may be the same, but that is not // site. The source site and sink sites may be the same, but that is not
// dedicated routing, that is intra site routing. // dedicated routing, that is intra site routing.
@ -51,6 +51,7 @@ struct WireNode
WireNodeState state; WireNodeState state;
int depth; int depth;
}; };
} // namespace
// Maximum depth that a dedicate interconnect is considered. // Maximum depth that a dedicate interconnect is considered.
// //