Skip to content

Commit a7b8546

Browse files
committed
Merge branch 'master' of github.com:verilog-to-routing/vtr-verilog-to-routing into openfpga
2 parents 6a4f0ca + e7ec219 commit a7b8546

File tree

64 files changed

+3960
-3333
lines changed

Some content is hidden

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

64 files changed

+3960
-3333
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
@@ -168,7 +168,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
168168
t_sub_tile* SubTile,
169169
t_physical_tile_type* PhysicalTileType,
170170
t_logical_block_type* LogicalBlockType,
171-
std::string site_name,
171+
const std::string& site_name,
172172
const pugiutil::loc_data& loc_data);
173173
static void ProcessPinLocations(pugi::xml_node Locations,
174174
t_physical_tile_type* PhysicalTileType,
@@ -374,7 +374,7 @@ static bool attribute_to_bool(const pugi::xml_node node,
374374

375375
static int find_switch_by_name(const t_arch& arch, const std::string& switch_name);
376376

377-
e_side string_to_side(const std::string& side_str);
377+
static e_side string_to_side(const std::string& side_str);
378378

379379
template<typename T>
380380
static T* get_type_by_name(const char* type_name, std::vector<T>& types);
@@ -1668,10 +1668,10 @@ static void ProcessPb_TypePort_Power(pugi::xml_node Parent, t_port* port, e_powe
16681668
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) {
16691669
std::vector<std::string> expected_attributes = {"name", "num_pins", "port_class"};
16701670
if (is_root_pb_type) {
1671-
expected_attributes.push_back("equivalent");
1671+
expected_attributes.emplace_back("equivalent");
16721672

16731673
if (Parent.name() == "input"s || Parent.name() == "clock"s) {
1674-
expected_attributes.push_back("is_non_clock_global");
1674+
expected_attributes.emplace_back("is_non_clock_global");
16751675
}
16761676
}
16771677

@@ -2939,7 +2939,7 @@ static void ProcessDevice(pugi::xml_node Node, t_arch* arch, t_default_fc_spec&
29392939
//<connection_block> tag
29402940
Cur = get_single_child(Node, "connection_block", loc_data);
29412941
expect_only_attributes(Cur, {"input_switch_name", "input_inter_die_switch_name"}, loc_data);
2942-
arch->ipin_cblock_switch_name.push_back(get_attribute(Cur, "input_switch_name", loc_data).as_string());
2942+
arch->ipin_cblock_switch_name.emplace_back(get_attribute(Cur, "input_switch_name", loc_data).as_string());
29432943
std::string inter_die_conn = get_attribute(Cur, "input_inter_die_switch_name", loc_data, ReqOpt::OPTIONAL).as_string("");
29442944
if (inter_die_conn != "") {
29452945
arch->ipin_cblock_switch_name.push_back(inter_die_conn);
@@ -3359,7 +3359,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
33593359
t_sub_tile* SubTile,
33603360
t_physical_tile_type* PhysicalTileType,
33613361
t_logical_block_type* LogicalBlockType,
3362-
std::string site_name,
3362+
const std::string& site_name,
33633363
const pugiutil::loc_data& loc_data) {
33643364
pugi::xml_node CurDirect;
33653365

@@ -3542,7 +3542,7 @@ static void ProcessPinLocations(pugi::xml_node Locations,
35423542
for (int h = 0; h < PhysicalTileType->height; ++h) {
35433543
for (e_side side : {TOP, RIGHT, BOTTOM, LEFT}) {
35443544
for (const auto& token : pin_locs->assignments[sub_tile_index][w][h][l][side]) {
3545-
InstPort inst_port(token.c_str());
3545+
InstPort inst_port(token);
35463546

35473547
//A pin specification should contain only the block name, and not any instance count information
35483548
//A pin specification may contain instance count, but should be in the range of capacity
@@ -3909,8 +3909,8 @@ static void ProcessSegments(pugi::xml_node Parent,
39093909

39103910
if (!Segs[i].longline) {
39113911
//Long line doesn't accpet <sb> or <cb> since it assumes full population
3912-
expected_subtags.push_back("sb");
3913-
expected_subtags.push_back("cb");
3912+
expected_subtags.emplace_back("sb");
3913+
expected_subtags.emplace_back("cb");
39143914
}
39153915

39163916
/* Get the type */
@@ -3919,16 +3919,16 @@ static void ProcessSegments(pugi::xml_node Parent,
39193919
Segs[i].directionality = BI_DIRECTIONAL;
39203920

39213921
//Bidir requires the following tags
3922-
expected_subtags.push_back("wire_switch");
3923-
expected_subtags.push_back("opin_switch");
3922+
expected_subtags.emplace_back("wire_switch");
3923+
expected_subtags.emplace_back("opin_switch");
39243924
}
39253925

39263926
else if (0 == strcmp(tmp, "unidir")) {
39273927
Segs[i].directionality = UNI_DIRECTIONAL;
39283928

39293929
//Unidir requires the following tags
3930-
expected_subtags.push_back("mux");
3931-
expected_subtags.push_back("mux_inter_die");
3930+
expected_subtags.emplace_back("mux");
3931+
expected_subtags.emplace_back("mux_inter_die");
39323932
}
39333933

39343934
else {
@@ -4114,8 +4114,6 @@ static void ProcessSwitchblocks(pugi::xml_node Parent, t_arch* arch, const pugiu
41144114

41154115
Node = Node.next_sibling(Node.name());
41164116
}
4117-
4118-
return;
41194117
}
41204118

41214119
static void ProcessCB_SB(pugi::xml_node Node, std::vector<bool>& list, const pugiutil::loc_data& loc_data) {
@@ -4876,7 +4874,7 @@ static int find_switch_by_name(const t_arch& arch, const std::string& switch_nam
48764874
return OPEN;
48774875
}
48784876

4879-
e_side string_to_side(const std::string& side_str) {
4877+
static e_side string_to_side(const std::string& side_str) {
48804878
e_side side = NUM_SIDES;
48814879
if (side_str.empty()) {
48824880
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)