-
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
Conversation
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.
Suggest doxygen comments right away ...
Syntax of the interposer tag looks good. You'll need to add documentation for it. Make sure you explain that the offset etc. defines the start points of the sg_links (they always go towards the interposer, even if bidirectional). |
5920582
to
5b4046f
Compare
5b4046f
to
47ec730
Compare
I think the code is ready for review now! @vaughnbetz @soheilshahrouz |
doc/src/arch/reference.rst
Outdated
.. arch:tag:: <interposer_cut dim=x|y loc="int"/> | ||
:req_param dim: Dimension or axis of the cut. 'X' or 'x' means a horizontal cut while 'Y' or 'y' means a vertical cut. | ||
:req_param loc: Location of the cut. Currently only absolute positions are supported. |
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.
Can this be an equation, or does it have to be a number? Should say ...
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.
Or maybe that's what absolute positions means?
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.
Yes, it was absolute versus relative [to device height/width] position, as in numbers only. Changed the comment to say "integer values" instead.
.. figure:: scatter_gather_images/interposer_diagram.png | ||
An example of how specifying interposers in VTR works. Connections between the two sides of a cut are first severed. The two sides are then reconnected using scatter_gather patterns. Note that there are 'num' of each pattern at each switchblock locations. | ||
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 think the figure should show the die-crossing wires at each x location, since that's what would happen.
- On the figure or in the text, say the length of the sg_link wire in this case is 3.
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.
*/ | ||
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 |
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.
Give an example for this one. If the interposer cut is at y = 13, is the cut above or below the tiles with coordinate y = 13?
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 | ||
int offset_start; ///< Starting point of scatter-gather instantiations |
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 think you can beef up these comments a bit. If the interposer cut is at y = 13, is an offset of 0 for an upward going sg_link a switch block / wire start point at y = 13? For a downward going wire with a cut at y = 13, is an offset of 0 a sg_link wire start point at y = 14?
Are the start and end points inclusive (I think they are, but you should say that).
This commit adds parsing logic for defining interposer-based architectures.
4527776
to
1230745
Compare
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 suggest a few more commenting updates, and it would be good to get the grid_def data structure in the online documentation (maybe as another item in the grid tab).
Or, maybe we should put the architecture file capturing structs (grid_def and interposer) in a new Doxygen tab for architecture constructs?
libs/libarchfpga/src/grid_types.h
Outdated
* <--------------> | ||
* repeatx | ||
* | ||
* startx/endx and endx/endy define a rectangular region instances dimensions. |
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.
instances -> instance's
libs/libarchfpga/src/grid_types.h
Outdated
|
||
std::string block_type; //The block type name | ||
|
||
int priority = 0; //Priority of the specification. |
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.
Make these member comments Doxygen format
* 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 comment
The 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.
libs/libarchfpga/src/grid_types.h
Outdated
// that come from a common definition. | ||
}; | ||
|
||
enum class GridDefType { |
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.
Add Doxygen comment.
|
||
struct t_layer_def { | ||
std::vector<t_grid_loc_def> loc_defs; //The list of block location definitions for this layer specification | ||
std::vector<t_grid_loc_def> loc_defs; ///< List of block location definitions for this layer specification |
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.
It would be good to make an overall Doxygen comment for what this struct is intended for.
Added the requested changes. For now, I added the doxygen documentation for the grid structs in the grid tab of VPR, but it might be useful to have a LibArchFPGA specific tab. Unfortunately much of LibArchFPGA is not Doxygen documented so it won't be much of a tab. |
Is there a test for parsing this new tag? |
I like the idea of a libarchfpga tab, even if it is currently sparse. Could you add that? @soheilshahrouz is also right that you should add a parsing test. |
ccf22b6
to
7f108d2
Compare
Added a test and also a libarchfpga tab to docs. The added tab is pretty sparse at the moment, but I think fixing that would go beyond the scope of this PR. |
7f108d2
to
d8dce13
Compare
d8dce13
to
b257a62
Compare
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.
Looks good, but I have two minor nits about the high-level doxygen comments. If you fix those, it's good to merge.
Physical Types | ||
======== | ||
|
||
These types are used to capture user's intended architecture specification and will be later turned into a flattened device grid according to the device's size. |
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.
This comment isn't right ; this goes with the grid defs, but not the physical types.
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 used the grid defs page as a template for the other pages and forgot to change this one's description. Fixed it now.
Scatter-Gather Types | ||
======== | ||
|
||
These types store information about about scatter-gather patterns |
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.
about scatter-gather routing patterns (I'd add the word routing).
This PR contains an initial proposal for a new interposer tag. To define an interposer cut, you would add an <interposer_cut dim=x|y loc=val> tag under a
<layout>
tag that defines the location of the cut and the axis of the cut. This tag would then have multiple <interdie_wire> children specifying the connections between the two sides of the cut-line.Example:
Note that in this example we have 3 different switchblock locations and 3*50=150 sg patterns would be instantiated.