Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…rilog-to-routing into enable_simple_place_delay_matrix
  • Loading branch information
amin1377 committed Jul 2, 2024
2 parents 31b8261 + e7ec219 commit e4f6f4f
Show file tree
Hide file tree
Showing 51 changed files with 1,218 additions and 877 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ tags
.idea
cmake-build-debug
cmake-build-release
/.metadata/
/.metadata/
1 change: 1 addition & 0 deletions doc/src/api/vprinternals/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ VPR INTERNALS
vpr_ui
draw_files
vpr_noc
vpr_router
31 changes: 31 additions & 0 deletions doc/src/api/vprinternals/router_heap.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
==============
Router Heap
==============

t_heap
----------
.. doxygenstruct:: t_heap
:project: vpr
:members:

HeapInterface
----------
.. doxygenclass:: HeapInterface
:project: vpr
:members:

HeapStorage
----------
.. doxygenclass:: HeapStorage
:project: vpr
:members:

KAryHeap
----------
.. doxygenclass:: KAryHeap
:project: vpr

FourAryHeap
----------
.. doxygenclass:: FourAryHeap
:project: vpr
10 changes: 10 additions & 0 deletions doc/src/api/vprinternals/vpr_router.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _router:

=======
VPR Router
=======

.. toctree::
:maxdepth: 1

router_heap
2 changes: 1 addition & 1 deletion libs/libarchfpga/src/arch_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const char* get_arch_file_name() {
return arch_file_name;
}

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

if (inst_port.size() == 1) {
Expand Down
2 changes: 1 addition & 1 deletion libs/libarchfpga/src/arch_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class InstPort {
static constexpr int UNSPECIFIED = -1;

InstPort() = default;
InstPort(std::string str);
InstPort(const std::string& str);
std::string instance_name() const { return instance_.name; }
std::string port_name() const { return port_.name; }

Expand Down
30 changes: 14 additions & 16 deletions libs/libarchfpga/src/read_xml_arch_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
t_sub_tile* SubTile,
t_physical_tile_type* PhysicalTileType,
t_logical_block_type* LogicalBlockType,
std::string site_name,
const std::string& site_name,
const pugiutil::loc_data& loc_data);
static void ProcessPinLocations(pugi::xml_node Locations,
t_physical_tile_type* PhysicalTileType,
Expand Down Expand Up @@ -369,7 +369,7 @@ static bool attribute_to_bool(const pugi::xml_node node,

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

e_side string_to_side(const std::string& side_str);
static e_side string_to_side(const std::string& side_str);

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

if (Parent.name() == "input"s || Parent.name() == "clock"s) {
expected_attributes.push_back("is_non_clock_global");
expected_attributes.emplace_back("is_non_clock_global");
}
}

Expand Down Expand Up @@ -2815,7 +2815,7 @@ static void ProcessDevice(pugi::xml_node Node, t_arch* arch, t_default_fc_spec&
//<connection_block> tag
Cur = get_single_child(Node, "connection_block", loc_data);
expect_only_attributes(Cur, {"input_switch_name", "input_inter_die_switch_name"}, loc_data);
arch->ipin_cblock_switch_name.push_back(get_attribute(Cur, "input_switch_name", loc_data).as_string());
arch->ipin_cblock_switch_name.emplace_back(get_attribute(Cur, "input_switch_name", loc_data).as_string());
std::string inter_die_conn = get_attribute(Cur, "input_inter_die_switch_name", loc_data, ReqOpt::OPTIONAL).as_string("");
if (inter_die_conn != "") {
arch->ipin_cblock_switch_name.push_back(inter_die_conn);
Expand Down Expand Up @@ -3212,7 +3212,7 @@ static void ProcessEquivalentSiteCustomConnection(pugi::xml_node Parent,
t_sub_tile* SubTile,
t_physical_tile_type* PhysicalTileType,
t_logical_block_type* LogicalBlockType,
std::string site_name,
const std::string& site_name,
const pugiutil::loc_data& loc_data) {
pugi::xml_node CurDirect;

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

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

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

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

//Bidir requires the following tags
expected_subtags.push_back("wire_switch");
expected_subtags.push_back("opin_switch");
expected_subtags.emplace_back("wire_switch");
expected_subtags.emplace_back("opin_switch");
}

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

//Unidir requires the following tags
expected_subtags.push_back("mux");
expected_subtags.push_back("mux_inter_die");
expected_subtags.emplace_back("mux");
expected_subtags.emplace_back("mux_inter_die");
}

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

Node = Node.next_sibling(Node.name());
}

return;
}

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

e_side string_to_side(const std::string& side_str) {
static e_side string_to_side(const std::string& side_str) {
e_side side = NUM_SIDES;
if (side_str.empty()) {
side = NUM_SIDES;
Expand Down
6 changes: 3 additions & 3 deletions utils/route_diag/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ static void do_one_route(const Netlist<>& net_list,
segment_inf,
is_flat);

ConnectionRouter<BinaryHeap> router(
device_ctx.grid,
*router_lookahead,
ConnectionRouter<FourAryHeap> router(
device_ctx.grid,
*router_lookahead,
device_ctx.rr_graph.rr_nodes(),
&device_ctx.rr_graph,
device_ctx.rr_rc_data,
Expand Down
Loading

0 comments on commit e4f6f4f

Please sign in to comment.