-
Notifications
You must be signed in to change notification settings - Fork 427
Interposer tag #3266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interposer tag #3266
Changes from all commits
4ea84e9
bd53a1b
3459bbe
18193e9
1230745
6911986
7b887c3
6d3a21d
0298a69
b257a62
9542ce9
7fcb83e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
======== | ||
Grid Specification Types | ||
======== | ||
|
||
These types are used to capture user's intended grid specification, i.e., which tiles go where in the device. These specifications will be later turned into a flattened device grid according to the device's size. | ||
|
||
.. doxygenstruct:: t_grid_loc_spec | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_grid_loc_def | ||
:project: vpr | ||
:members: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _libarchfpga: | ||
|
||
LIBARCHFPGA | ||
======= | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
physical_types | ||
grid_types | ||
scatter_gather_types | ||
interposer_types |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
======== | ||
Interposer Types | ||
======== | ||
|
||
These types are used to store information about interposer based architectures. | ||
|
||
.. doxygenstruct:: t_interposer_cut_inf | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_interdie_wire_inf | ||
:project: vpr | ||
:members: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
======== | ||
Physical Types | ||
======== | ||
|
||
These types are used to capture user's intended architecture specification. | ||
|
||
.. doxygenstruct:: t_arch | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_arch_switch_inf | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_segment_inf | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_physical_tile_loc | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_sub_tile | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_layer_def | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_grid_def | ||
:project: vpr | ||
:members: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
======== | ||
Scatter-Gather Types | ||
======== | ||
|
||
These types store information about about scatter-gather routing patterns | ||
|
||
.. doxygenstruct:: t_scatter_gather_pattern | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_sg_link | ||
:project: vpr | ||
:members: | ||
|
||
.. doxygenstruct:: t_sg_location | ||
:project: vpr | ||
:members: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
#pragma once | ||
|
||
/** | ||
* @file grid_types.h | ||
* @brief FPGA grid layout data types | ||
*/ | ||
|
||
#include <string> | ||
#include <memory> | ||
|
||
// Forward declerations | ||
|
||
struct t_metadata_dict; | ||
|
||
/** | ||
* @brief Grid location specification | ||
* Each member is a formula evaluated in terms of 'W' (device width), | ||
* and 'H' (device height). Formulas can be evaluated using parse_formula() | ||
* from expr_eval.h. | ||
*/ | ||
struct t_grid_loc_spec { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should build these into the grid part of the VPR API documentation on the web. You'd need to edit some doxyfile for that, and add an overview at the top of this struct saying this is used to capture the user's specification of the architecture will eventually be turned into a flattened grid. |
||
std::string start_expr; ///<Starting position (inclusive) | ||
std::string end_expr; ///<Ending position (inclusive) | ||
|
||
std::string repeat_expr; ///<Distance between repeated region instances | ||
|
||
std::string incr_expr; ///<Distance between block instantiations with the region | ||
}; | ||
|
||
/** | ||
* @brief Definition of how to place physical logic block in the grid. | ||
* @details This defines a region of the grid to be set to a specific type | ||
* (provided its priority is high enough to override other blocks). | ||
* | ||
* The diagram below illustrates the layout specification. | ||
* | ||
* +----+ +----+ +----+ | ||
* | | | | | | | ||
* | | | | ... | | | ||
* | | | | | | | ||
* +----+ +----+ +----+ | ||
* | ||
* . . . | ||
* . . . | ||
* . . . | ||
* | ||
* +----+ +----+ +----+ | ||
* | | | | | | | ||
* | | | | ... | | | ||
* | | | | | | | ||
* +----+ +----+ +----+ | ||
* ^ | ||
* | | ||
* repeaty | | ||
* | | ||
* v (endx,endy) | ||
* +----+ +----+ +----+ | ||
* | | | | | | | ||
* | | | | ... | | | ||
* | | | | | | | ||
* +----+ +----+ +----+ | ||
* (startx,starty) | ||
* <--------------> | ||
* repeatx | ||
* | ||
* startx/endx and endx/endy define a rectangular region instance's dimensions. | ||
* The region instance is then repeated every repeatx/repeaty (if specified). | ||
* | ||
* Within a particular region instance a block of block_type is laid down every | ||
* incrx/incry units (if not specified defaults to block width/height): | ||
* | ||
* | ||
* * = an instance of block_type within the region | ||
* | ||
* +------------------------------+ | ||
* |* * * *| | ||
* | | | ||
* | | | ||
* | | | ||
* | | | ||
* | | | ||
* |* * * *| | ||
* ^ | | | ||
* | | | | ||
* incry | | | | ||
* | | | | ||
* v | | | ||
* |* * * *| | ||
* +------------------------------+ | ||
* | ||
* <-------> | ||
* incrx | ||
* | ||
* In the above diagram incrx = 10, and incry = 6 | ||
*/ | ||
struct t_grid_loc_def { | ||
t_grid_loc_def(std::string block_type_val, int priority_val) | ||
: block_type(std::move(block_type_val)) | ||
, priority(priority_val) | ||
, x{"0", "W-1", "max(w+1,W)", "w"} // Fill in x direction, no repeat, incr by block width | ||
, y{"0", "H-1", "max(h+1,H)", "h"} // Fill in y direction, no repeat, incr by block height | ||
{} | ||
|
||
std::string block_type; ///< The block type name | ||
|
||
int priority = 0; ///< Priority of the specification. In case of conflicting specifications the largest priority wins. | ||
|
||
t_grid_loc_spec x; ///< Horizontal location specification | ||
t_grid_loc_spec y; ///< Vertical location specification | ||
|
||
/** | ||
* @brief When 1 metadata tag is split among multiple t_grid_loc_def, one | ||
* t_grid_loc_def is arbitrarily chosen to own the metadata, and the other | ||
* t_grid_loc_def point to the owned version. | ||
* | ||
*/ | ||
std::unique_ptr<t_metadata_dict> owned_meta; | ||
|
||
/** | ||
* @brief Metadata for this location definition. This | ||
* metadata may be shared with multiple grid_locs | ||
* that come from a common definition. | ||
*/ | ||
t_metadata_dict* meta = nullptr; | ||
}; | ||
|
||
/** | ||
* @brief Enum for specfying if the architecture grid specification is for an auto sized device (variable size) | ||
* or a fixed size device. | ||
*/ | ||
enum class e_grid_def_type { | ||
AUTO, | ||
FIXED | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#pragma once | ||
|
||
/** | ||
* @file interposer_types.h | ||
* @brief This file contains types used for parsing interposer-related tags such as <interposer_cut> and <interdie_wire> | ||
* and converting that information into the device architecture-related data structures. | ||
* | ||
*/ | ||
|
||
#include <unordered_map> | ||
vaughnbetz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
#include <vector> | ||
#include <string> | ||
#include "grid_types.h" | ||
|
||
/** | ||
* @brief Enum for direction of an interposer cut. X means horizontal cut and Y means vertical cut. | ||
* | ||
*/ | ||
enum class e_interposer_cut_dim { | ||
vaughnbetz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
X, | ||
Y | ||
}; | ||
|
||
// Lookup table for converting between a character and an e_interposer_cut_dim | ||
inline const std::unordered_map<char, e_interposer_cut_dim> CHAR_INTERPOSER_DIM_MAP = { | ||
vaughnbetz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{'X', e_interposer_cut_dim::X}, | ||
{'x', e_interposer_cut_dim::X}, | ||
{'Y', e_interposer_cut_dim::Y}, | ||
{'y', e_interposer_cut_dim::Y}}; | ||
|
||
/** | ||
* @brief Struct containing information of interdire wires i.e. connections between the dies on an interposer | ||
* | ||
*/ | ||
struct t_interdie_wire_inf { | ||
std::string sg_name; ///< Name of the scatter-gather pattern to be used for the interdie connection | ||
std::string sg_link; ///< Name of the scatter-gather link to be used for the interdie connection | ||
/** | ||
* @brief | ||
* Contains starting and ending point (both inclusive) of scatter-gather instantiations and the increment/distance between the instantiations. | ||
* offset_definition.repeat_expr is not relevant for interdie wires and is not set to anything or used. | ||
* | ||
* Locations defined by this offset definition define the starting point or the gathering point of the SG pattern. The end or scatter point of the SG pattern is defined by the sg_link. | ||
*/ | ||
t_grid_loc_spec offset_definition; | ||
int num; ///< Number of scatter-gather instantiations per switchblock location | ||
}; | ||
|
||
/** | ||
* @brief Struct containing information of an interposer cut | ||
* | ||
*/ | ||
struct t_interposer_cut_inf { | ||
e_interposer_cut_dim dim; ///< Dimension or axis of interposer cut. | ||
int loc; ///< Location of the cut on the grid. Locations start from zero and cuts will happen above or to the right of the tiles at location=loc. | ||
std::vector<t_interdie_wire_inf> interdie_wires; ///< Connectivity specification between the two sides of the cut. | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the interposer cuts all layers? Should say that too. Or say it only supports 1 layer architectures for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure about what happens with 3D architectures and interposers. The idea I had was that each layer could have it's own independent cut lines to keep everything flexible. This might make physical sense for a 2 layer face-to-face stacked chip, but I'm not sure about that either.
Right now the code does independent cut lines for each layer, but I could change it if you think it wouldn't make physical sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with that. I'd mention that somewhere in the docs, unless it is super-obvious from its position in the various tags.