Skip to content

Commit b27a746

Browse files
committed
lint, constant for "Internal Switch"
1 parent 0cd06c2 commit b27a746

File tree

7 files changed

+5
-12
lines changed

7 files changed

+5
-12
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,9 @@ constexpr std::array<const char*, size_t(SwitchType::NUM_SWITCH_TYPES)> SWITCH_T
16601660
*/
16611661
constexpr const char* VPR_DELAYLESS_SWITCH_NAME = "__vpr_delayless_switch__";
16621662

1663+
/* Internal switch: used by the flat router */
1664+
constexpr const char* VPR_INTERNAL_SWITCH_NAME = "Internal Switch";
1665+
16631666
enum class BufferSize {
16641667
AUTO,
16651668
ABSOLUTE

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
526526
bool found_arch_name = false;
527527
std::string string_name = std::string(name);
528528
// The string name has the format of "Internal Switch/delay". So, I have to use compare to specify the portion I want to be compared.
529-
bool is_internal_sw = string_name.compare(0, 15, "Internal Switch") == 0;
529+
bool is_internal_sw = string_name.compare(0, 15, VPR_INTERNAL_SWITCH_NAME) == 0;
530530
for (const auto& arch_sw_inf: arch_switch_inf_) {
531531
if (string_name == arch_sw_inf.name || is_internal_sw) {
532532
found_arch_name = true;

utils/fasm/src/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ int main(int argc, const char **argv) {
9292
sync_netlists_to_routing((const Netlist<>&) g_vpr_ctx.clustering().clb_nlist,
9393
g_vpr_ctx.device(),
9494
g_vpr_ctx.mutable_atom(),
95-
g_vpr_ctx.atom().lookup,
9695
g_vpr_ctx.mutable_clustering(),
9796
g_vpr_ctx.placement(),
98-
g_vpr_ctx.routing(),
9997
vpr_setup.PackerOpts.pack_verbosity > 2);
10098
}
10199
}

utils/fasm/test/test_fasm.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,8 @@ TEST_CASE("fasm_integration_test", "[fasm]") {
335335
sync_netlists_to_routing((const Netlist<>&) g_vpr_ctx.clustering().clb_nlist,
336336
g_vpr_ctx.device(),
337337
g_vpr_ctx.mutable_atom(),
338-
g_vpr_ctx.atom().lookup,
339338
g_vpr_ctx.mutable_clustering(),
340339
g_vpr_ctx.placement(),
341-
g_vpr_ctx.routing(),
342340
vpr_setup.PackerOpts.pack_verbosity > 2);
343341
}
344342
}

vpr/src/pack/post_routing_pb_pin_fixup.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ static std::vector<e_side> find_physical_tile_pin_side(t_physical_tile_type_ptr
4848
* - if the net id does not match, we update the clustering context
4949
*******************************************************************/
5050
static void update_cluster_pin_with_post_routing_results(const Netlist<>& net_list,
51-
const AtomContext& atom_ctx,
5251
const DeviceContext& device_ctx,
5352
ClusteringContext& clustering_ctx,
5453
const vtr::vector<RRNodeId, ClusterNetId>& rr_node_nets,
@@ -1037,10 +1036,8 @@ static void update_cluster_routing_traces_with_post_routing_results(AtomContext&
10371036
void sync_netlists_to_routing(const Netlist<>& net_list,
10381037
const DeviceContext& device_ctx,
10391038
AtomContext& atom_ctx,
1040-
const AtomLookup& atom_look_up,
10411039
ClusteringContext& clustering_ctx,
10421040
const PlacementContext& placement_ctx,
1043-
const RoutingContext& routing_ctx,
10441041
const bool& verbose) {
10451042
vtr::ScopedStartFinishTimer timer("Synchronize the packed netlist to routing optimization");
10461043

@@ -1069,7 +1066,6 @@ void sync_netlists_to_routing(const Netlist<>& net_list,
10691066

10701067
if (seen_block_ids.insert(clb_blk_id).second) {
10711068
update_cluster_pin_with_post_routing_results(net_list,
1072-
atom_ctx,
10731069
device_ctx,
10741070
clustering_ctx,
10751071
rr_node_nets,

vpr/src/pack/post_routing_pb_pin_fixup.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
void sync_netlists_to_routing(const Netlist<>& net_list,
1313
const DeviceContext& device_ctx,
1414
AtomContext& atom_ctx,
15-
const AtomLookup& atom_lookup,
1615
ClusteringContext& clustering_ctx,
1716
const PlacementContext& placement_ctx,
18-
const RoutingContext& routing_ctx,
1917
const bool& verbose);
2018

2119
#endif

vpr/src/util/vpr_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2465,7 +2465,7 @@ t_arch_switch_inf create_internal_arch_sw(float delay) {
24652465
arch_switch_inf.set_type(SwitchType::MUX);
24662466
std::ostringstream stream_obj;
24672467
stream_obj << delay << std::scientific;
2468-
arch_switch_inf.name = ("Internal Switch/" + stream_obj.str());
2468+
arch_switch_inf.name = (std::string(VPR_INTERNAL_SWITCH_NAME) + "/" + stream_obj.str());
24692469
arch_switch_inf.R = 0.;
24702470
arch_switch_inf.Cin = 0.;
24712471
arch_switch_inf.Cout = 0;

0 commit comments

Comments
 (0)