Skip to content

Commit 759e7aa

Browse files
authored
Merge pull request #3305 from verilog-to-routing/temp_add_interposer_wires
Add interposer wires
2 parents 78b4555 + 5598d9e commit 759e7aa

Some content is hidden

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

50 files changed

+717
-325
lines changed

libs/libarchfpga/src/grid_types.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <string>
99
#include <memory>
1010

11-
// Forward declerations
11+
// Forward declarations
1212

1313
struct t_metadata_dict;
1414

@@ -112,7 +112,6 @@ struct t_grid_loc_def {
112112
* @brief When 1 metadata tag is split among multiple t_grid_loc_def, one
113113
* t_grid_loc_def is arbitrarily chosen to own the metadata, and the other
114114
* t_grid_loc_def point to the owned version.
115-
*
116115
*/
117116
std::unique_ptr<t_metadata_dict> owned_meta;
118117

@@ -125,7 +124,7 @@ struct t_grid_loc_def {
125124
};
126125

127126
/**
128-
* @brief Enum for specfying if the architecture grid specification is for an auto sized device (variable size)
127+
* @brief Enum for specifying if the architecture grid specification is for an auto sized device (variable size)
129128
* or a fixed size device.
130129
*/
131130
enum class e_grid_def_type {

libs/libarchfpga/src/physical_types.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "arch_types.h"
33
#include "vtr_math.h"
44
#include "vtr_util.h"
5+
#include "vtr_assert.h"
56

67
#include "arch_util.h"
78

@@ -408,3 +409,13 @@ const t_physical_tile_port* t_sub_tile::get_port_by_pin(int pin) const {
408409

409410
return nullptr;
410411
}
412+
413+
const t_grid_def& t_arch::grid_layout() const {
414+
for (const t_grid_def& layout : grid_layouts) {
415+
if (layout.name == device_layout) {
416+
return layout;
417+
}
418+
}
419+
VTR_ASSERT_SAFE_MSG(false, "Device layout not found.");
420+
return grid_layouts.front(); // unreachable, keeps compiler happy
421+
}

libs/libarchfpga/src/physical_types.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,11 @@ struct t_arch {
20672067
// types of connections requires a different switch, all names should correspond to a switch in Switches.
20682068
std::vector<std::string> ipin_cblock_switch_name;
20692069

2070-
std::vector<t_grid_def> grid_layouts; //Set of potential device layouts
2070+
/// Set of potential device layouts
2071+
std::vector<t_grid_def> grid_layouts;
2072+
2073+
/// @brief Returns the grid layout specified by the --device command-line option.
2074+
const t_grid_def& grid_layout() const;
20712075

20722076
// the layout that is chosen to be used with command line options
20732077
// It is used to generate custom SB for a specific locations within the device

libs/libarchfpga/src/scatter_gather_types.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ enum class e_scatter_gather_type {
1414
};
1515

1616
/**
17-
* @brief Struct containing information of an <sg_location> tag. An <sg_location> tag instantiates the scatter-gather pattern in some switchblock locations around the device.
17+
* @brief Struct containing information of an <sg_location> tag.
18+
* An <sg_location> tag instantiates the scatter-gather pattern in some switchblock locations within the device.
19+
* `region` is only valid if type == e_sb_location::E_XY_SPECIFIED.
1820
*/
1921
struct t_sg_location {
2022
e_sb_location type; ///< Type of locations that the pattern is instantiated at.
23+
t_specified_loc region; ///< Specification of the region where gather is applied
2124
int num; ///< Number of scatter-gather pattern instantiations per location.
2225
std::string sg_link_name; ///< Name of scatter-gather link to be used.
2326
};
2427

2528
/**
26-
* @brief Struct containing information of a <sg_link> tag. This tag describes how and where the scatter (fanout) happens relative to the gather (fanin).
27-
*
29+
* @brief Struct containing information of a <sg_link> tag.
30+
* This tag describes how and where the scatter (fanout) happens relative to the gather (fanin).
2831
*/
2932
struct t_sg_link {
3033
std::string name; ///< Name of the sg_link.

libs/libarchfpga/src/switchblock_types.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ inline const std::unordered_map<std::string, e_sb_location> SB_LOCATION_STRING_M
8181
{"FRINGE", e_sb_location::E_FRINGE},
8282
{"XY_SPECIFIED", e_sb_location::E_XY_SPECIFIED}};
8383

84-
/**
85-
* @brief Describes regions that a specific switch block specifications should be applied to
86-
*/
84+
/// @brief Describes regions that a specific switch block specifications should be applied to
8785
struct t_sb_loc_spec {
8886
int start = -1;
8987
int repeat = -1;
@@ -97,8 +95,8 @@ struct t_sb_loc_spec {
9795
class SBSideConnection {
9896
public:
9997
// Specify the two SB sides that form a connection
100-
enum e_side from_side = TOP;
101-
enum e_side to_side = TOP;
98+
e_side from_side = TOP;
99+
e_side to_side = TOP;
102100

103101
void set_sides(enum e_side from, enum e_side to) {
104102
from_side = from;

libs/librrgraph/src/base/check_rr_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ void check_rr_node(const RRGraphView& rr_graph,
556556
float C = rr_graph.node_C(rr_node);
557557
float R = rr_graph.node_R(rr_node);
558558

559-
if (rr_type == e_rr_type::CHANX || rr_type == e_rr_type::CHANY) {
559+
if (rr_type == e_rr_type::CHANX || rr_type == e_rr_type::CHANY || rr_type == e_rr_type::CHANZ) {
560560
if (C < 0. || R < 0.) {
561561
VPR_ERROR(VPR_ERROR_ROUTE,
562562
"in check_rr_node: node %d of type %d has R = %g and C = %g.\n", inode, rr_type, R, C);

libs/librrgraph/src/base/rr_rc_data.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ t_rr_rc_data::t_rr_rc_data(float Rval, float Cval) noexcept
44
: R(Rval)
55
, C(Cval) {}
66

7-
short find_create_rr_rc_data(const float R, const float C, std::vector<t_rr_rc_data>& rr_rc_data) {
7+
NodeRCIndex find_create_rr_rc_data(const float R, const float C, std::vector<t_rr_rc_data>& rr_rc_data) {
88

99
auto match = [&](const t_rr_rc_data& val) {
1010
return val.R == R
1111
&& val.C == C;
1212
};
1313

14-
//Just a linear search for now
14+
// Just a linear search for now
1515
auto itr = std::find_if(rr_rc_data.begin(),
1616
rr_rc_data.end(),
1717
match);
1818

1919
if (itr == rr_rc_data.end()) {
20-
//Not found -> create it
20+
// Not found -> create it
2121
rr_rc_data.emplace_back(R, C);
2222

23-
itr = --rr_rc_data.end(); //Iterator to inserted value
23+
itr = --rr_rc_data.end(); // Iterator to inserted value
2424
}
2525

26-
return std::distance(rr_rc_data.begin(), itr);
26+
return NodeRCIndex(std::distance(rr_rc_data.begin(), itr));
2727
}

libs/librrgraph/src/base/rr_rc_data.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
*
1111
* The returned indicies index into DeviceContext.rr_rc_data.
1212
*/
13-
short find_create_rr_rc_data(const float R, const float C, std::vector<t_rr_rc_data>& rr_rc_data);
13+
NodeRCIndex find_create_rr_rc_data(const float R, const float C, std::vector<t_rr_rc_data>& rr_rc_data);

libs/librrgraph/src/io/rr_graph_uxsdcxx_serializer.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,8 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
806806
inline int init_node_timing(int& inode, float C, float R) final {
807807
auto node = (*rr_nodes_)[inode];
808808
RRNodeId node_id = node.id();
809-
rr_graph_builder_->set_node_rc_index(node_id, NodeRCIndex(find_create_rr_rc_data(R, C, *rr_rc_data_)));
809+
const NodeRCIndex rc_index = find_create_rr_rc_data(R, C, *rr_rc_data_);
810+
rr_graph_builder_->set_node_rc_index(node_id, rc_index);
810811
return inode;
811812
}
812813
inline void finish_node_timing(int& /*inode*/) final {}
@@ -934,7 +935,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
934935
type);
935936
}
936937

937-
rr_graph_builder_->set_node_rc_index(node_id, NodeRCIndex(find_create_rr_rc_data(0, 0, *rr_rc_data_)));
938+
rr_graph_builder_->set_node_rc_index(node_id, find_create_rr_rc_data(0, 0, *rr_rc_data_));
938939

939940
return id;
940941
}

libs/libvtrutil/src/vtr_expr_eval.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
/** global variables **/
1010

11-
/** bp_state_globals is a variable that holds a member of type BreakpointState. This member is altered by the breakpoint class, the placer, and router and holds the most updated values for variables that can trigger breakpoints (e.g move_num, temp_num etc.) **/
11+
/// Holds a member of type BreakpointState.
12+
/// This member is altered by the breakpoint class, the placer, and router and holds the most updated values for variables that can trigger breakpoints (e.g move_num, temp_num etc.) **/
1213
BreakpointStateGlobals bp_state_globals;
1314

1415
namespace vtr {

0 commit comments

Comments
 (0)