Skip to content

Commit e4f6f4f

Browse files
committed
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-verilog-to-routing into enable_simple_place_delay_matrix
2 parents 31b8261 + e7ec219 commit e4f6f4f

File tree

51 files changed

+1218
-877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1218
-877
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ tags
153153
.idea
154154
cmake-build-debug
155155
cmake-build-release
156-
/.metadata/
156+
/.metadata/

doc/src/api/vprinternals/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ VPR INTERNALS
1010
vpr_ui
1111
draw_files
1212
vpr_noc
13+
vpr_router
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
==============
2+
Router Heap
3+
==============
4+
5+
t_heap
6+
----------
7+
.. doxygenstruct:: t_heap
8+
:project: vpr
9+
:members:
10+
11+
HeapInterface
12+
----------
13+
.. doxygenclass:: HeapInterface
14+
:project: vpr
15+
:members:
16+
17+
HeapStorage
18+
----------
19+
.. doxygenclass:: HeapStorage
20+
:project: vpr
21+
:members:
22+
23+
KAryHeap
24+
----------
25+
.. doxygenclass:: KAryHeap
26+
:project: vpr
27+
28+
FourAryHeap
29+
----------
30+
.. doxygenclass:: FourAryHeap
31+
:project: vpr
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _router:
2+
3+
=======
4+
VPR Router
5+
=======
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
10+
router_heap

libs/libarchfpga/src/arch_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const char* get_arch_file_name() {
3535
return arch_file_name;
3636
}
3737

38-
InstPort::InstPort(std::string str) {
38+
InstPort::InstPort(const std::string& str) {
3939
std::vector<std::string> inst_port = vtr::split(str, ".");
4040

4141
if (inst_port.size() == 1) {

libs/libarchfpga/src/arch_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class InstPort {
2222
static constexpr int UNSPECIFIED = -1;
2323

2424
InstPort() = default;
25-
InstPort(std::string str);
25+
InstPort(const std::string& str);
2626
std::string instance_name() const { return instance_.name; }
2727
std::string port_name() const { return port_.name; }
2828

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
163163
t_sub_tile* SubTile,
164164
t_physical_tile_type* PhysicalTileType,
165165
t_logical_block_type* LogicalBlockType,
166-
std::string site_name,
166+
const std::string& site_name,
167167
const pugiutil::loc_data& loc_data);
168168
static void ProcessPinLocations(pugi::xml_node Locations,
169169
t_physical_tile_type* PhysicalTileType,
@@ -369,7 +369,7 @@ static bool attribute_to_bool(const pugi::xml_node node,
369369

370370
static int find_switch_by_name(const t_arch& arch, const std::string& switch_name);
371371

372-
e_side string_to_side(const std::string& side_str);
372+
static e_side string_to_side(const std::string& side_str);
373373

374374
template<typename T>
375375
static T* get_type_by_name(const char* type_name, std::vector<T>& types);
@@ -1551,10 +1551,10 @@ static void ProcessPb_TypePort_Power(pugi::xml_node Parent, t_port* port, e_powe
15511551
static void ProcessPb_TypePort(pugi::xml_node Parent, t_port* port, e_power_estimation_method power_method, const bool is_root_pb_type, const pugiutil::loc_data& loc_data) {
15521552
std::vector<std::string> expected_attributes = {"name", "num_pins", "port_class"};
15531553
if (is_root_pb_type) {
1554-
expected_attributes.push_back("equivalent");
1554+
expected_attributes.emplace_back("equivalent");
15551555

15561556
if (Parent.name() == "input"s || Parent.name() == "clock"s) {
1557-
expected_attributes.push_back("is_non_clock_global");
1557+
expected_attributes.emplace_back("is_non_clock_global");
15581558
}
15591559
}
15601560

@@ -2815,7 +2815,7 @@ static void ProcessDevice(pugi::xml_node Node, t_arch* arch, t_default_fc_spec&
28152815
//<connection_block> tag
28162816
Cur = get_single_child(Node, "connection_block", loc_data);
28172817
expect_only_attributes(Cur, {"input_switch_name", "input_inter_die_switch_name"}, loc_data);
2818-
arch->ipin_cblock_switch_name.push_back(get_attribute(Cur, "input_switch_name", loc_data).as_string());
2818+
arch->ipin_cblock_switch_name.emplace_back(get_attribute(Cur, "input_switch_name", loc_data).as_string());
28192819
std::string inter_die_conn = get_attribute(Cur, "input_inter_die_switch_name", loc_data, ReqOpt::OPTIONAL).as_string("");
28202820
if (inter_die_conn != "") {
28212821
arch->ipin_cblock_switch_name.push_back(inter_die_conn);
@@ -3212,7 +3212,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
32123212
t_sub_tile* SubTile,
32133213
t_physical_tile_type* PhysicalTileType,
32143214
t_logical_block_type* LogicalBlockType,
3215-
std::string site_name,
3215+
const std::string& site_name,
32163216
const pugiutil::loc_data& loc_data) {
32173217
pugi::xml_node CurDirect;
32183218

@@ -3395,7 +3395,7 @@ static void ProcessPinLocations(pugi::xml_node Locations,
33953395
for (int h = 0; h < PhysicalTileType->height; ++h) {
33963396
for (e_side side : {TOP, RIGHT, BOTTOM, LEFT}) {
33973397
for (const auto& token : pin_locs->assignments[sub_tile_index][w][h][l][side]) {
3398-
InstPort inst_port(token.c_str());
3398+
InstPort inst_port(token);
33993399

34003400
//A pin specification should contain only the block name, and not any instance count information
34013401
if (inst_port.instance_low_index() != InstPort::UNSPECIFIED || inst_port.instance_high_index() != InstPort::UNSPECIFIED) {
@@ -3746,8 +3746,8 @@ static void ProcessSegments(pugi::xml_node Parent,
37463746

37473747
if (!Segs[i].longline) {
37483748
//Long line doesn't accpet <sb> or <cb> since it assumes full population
3749-
expected_subtags.push_back("sb");
3750-
expected_subtags.push_back("cb");
3749+
expected_subtags.emplace_back("sb");
3750+
expected_subtags.emplace_back("cb");
37513751
}
37523752

37533753
/* Get the type */
@@ -3756,16 +3756,16 @@ static void ProcessSegments(pugi::xml_node Parent,
37563756
Segs[i].directionality = BI_DIRECTIONAL;
37573757

37583758
//Bidir requires the following tags
3759-
expected_subtags.push_back("wire_switch");
3760-
expected_subtags.push_back("opin_switch");
3759+
expected_subtags.emplace_back("wire_switch");
3760+
expected_subtags.emplace_back("opin_switch");
37613761
}
37623762

37633763
else if (0 == strcmp(tmp, "unidir")) {
37643764
Segs[i].directionality = UNI_DIRECTIONAL;
37653765

37663766
//Unidir requires the following tags
3767-
expected_subtags.push_back("mux");
3768-
expected_subtags.push_back("mux_inter_die");
3767+
expected_subtags.emplace_back("mux");
3768+
expected_subtags.emplace_back("mux_inter_die");
37693769
}
37703770

37713771
else {
@@ -3951,8 +3951,6 @@ static void ProcessSwitchblocks(pugi::xml_node Parent, t_arch* arch, const pugiu
39513951

39523952
Node = Node.next_sibling(Node.name());
39533953
}
3954-
3955-
return;
39563954
}
39573955

39583956
static void ProcessCB_SB(pugi::xml_node Node, std::vector<bool>& list, const pugiutil::loc_data& loc_data) {
@@ -4713,7 +4711,7 @@ static int find_switch_by_name(const t_arch& arch, const std::string& switch_nam
47134711
return OPEN;
47144712
}
47154713

4716-
e_side string_to_side(const std::string& side_str) {
4714+
static e_side string_to_side(const std::string& side_str) {
47174715
e_side side = NUM_SIDES;
47184716
if (side_str.empty()) {
47194717
side = NUM_SIDES;

utils/route_diag/src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ static void do_one_route(const Netlist<>& net_list,
103103
segment_inf,
104104
is_flat);
105105

106-
ConnectionRouter<BinaryHeap> router(
107-
device_ctx.grid,
108-
*router_lookahead,
106+
ConnectionRouter<FourAryHeap> router(
107+
device_ctx.grid,
108+
*router_lookahead,
109109
device_ctx.rr_graph.rr_nodes(),
110110
&device_ctx.rr_graph,
111111
device_ctx.rr_rc_data,

0 commit comments

Comments
 (0)