Skip to content

Commit 35542cd

Browse files
authored
Merge pull request #3266 from verilog-to-routing/interposer_parsing
Interposer tag
2 parents 004339f + 7fcb83e commit 35542cd

22 files changed

+808
-152
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
========
2+
Grid Specification Types
3+
========
4+
5+
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.
6+
7+
.. doxygenstruct:: t_grid_loc_spec
8+
:project: vpr
9+
:members:
10+
11+
.. doxygenstruct:: t_grid_loc_def
12+
:project: vpr
13+
:members:
14+

doc/src/api/libarchfpga/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _libarchfpga:
2+
3+
LIBARCHFPGA
4+
=======
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
9+
physical_types
10+
grid_types
11+
scatter_gather_types
12+
interposer_types
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
========
2+
Interposer Types
3+
========
4+
5+
These types are used to store information about interposer based architectures.
6+
7+
.. doxygenstruct:: t_interposer_cut_inf
8+
:project: vpr
9+
:members:
10+
11+
.. doxygenstruct:: t_interdie_wire_inf
12+
:project: vpr
13+
:members:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
========
2+
Physical Types
3+
========
4+
5+
These types are used to capture user's intended architecture specification.
6+
7+
.. doxygenstruct:: t_arch
8+
:project: vpr
9+
:members:
10+
11+
.. doxygenstruct:: t_arch_switch_inf
12+
:project: vpr
13+
:members:
14+
15+
.. doxygenstruct:: t_segment_inf
16+
:project: vpr
17+
:members:
18+
19+
.. doxygenstruct:: t_physical_tile_loc
20+
:project: vpr
21+
:members:
22+
23+
.. doxygenstruct:: t_sub_tile
24+
:project: vpr
25+
:members:
26+
27+
.. doxygenstruct:: t_layer_def
28+
:project: vpr
29+
:members:
30+
31+
.. doxygenstruct:: t_grid_def
32+
:project: vpr
33+
:members:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
========
2+
Scatter-Gather Types
3+
========
4+
5+
These types store information about about scatter-gather routing patterns
6+
7+
.. doxygenstruct:: t_scatter_gather_pattern
8+
:project: vpr
9+
:members:
10+
11+
.. doxygenstruct:: t_sg_link
12+
:project: vpr
13+
:members:
14+
15+
.. doxygenstruct:: t_sg_location
16+
:project: vpr
17+
:members:

doc/src/arch/reference.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,32 @@ Grid Layout Example
581581
582582
Example FPGA grid
583583
584+
585+
.. arch:tag:: <interposer_cut dim=x|y loc="int"/>
586+
587+
:req_param dim: Dimension or axis of the cut. 'X' or 'x' means a horizontal cut while 'Y' or 'y' means a vertical cut.
588+
:req_param loc: Location of the cut. Cuts are done above or to the right of the tiles at coordinate 'loc'. For example a cut with dim=x and loc=0 would cut the vertical wires above tiles in the 0th row. Currently only integer values are supported.
589+
590+
.. note:: Interposers are experimental and are currently not supported by VPR and using the related tags will not actually result in any changes to the flow.
591+
Defines an interposer cut for modelling 2.5D interposer-based architectures. An interposer cut will cut all connections at location 'loc' along the axis 'dim' Leaving the two sides completely unconnected.
592+
To reconnect the two sides, this tag can have multiple <interdie_wire> tags as children to specify the connection between the two sides.
593+
594+
.. arch:tag:: <interdie_wire sg_name="string" sg_link="string" offset_start="expr" offset_end="expr" offset_increment="expr" num="int"/>
595+
596+
:req_param sg_name: Name of the scatter-gather pattern to be used for the interdie connection.
597+
:req_param sg_link: Name of the scatter-gather link to be used for the interdie connection.
598+
:req_param offset_start: Starting point of scatter-gather instantiations.
599+
:req_param offset_end: Ending point of scatter-gather instantiations
600+
:req_param offset_increment: Increment/distance between scatter-gather instantiations.
601+
:req_param num: Number of scatter-gather instantiations per switchblock location.
602+
603+
Defines the interdie wiring between the two sides of the cut. Connectivity is defined using scatter-gather patterns. Starting at 'offset_start' from location of the cut and moving by 'offset_increment' until we reach the location of 'offset_end' away from the cut, 'num' scatter-gather patterns defined by 'sg_name' and 'sg_link' will be instantiated.
604+
Note that these offset points always define the starting point of the scatter-gather pattern's sg_link. offset_start, offset_end and offset_increment can be integer values or expressions involving W and H (device width and height.)
605+
606+
.. figure:: scatter_gather_images/interposer_diagram.png
607+
608+
An example of how specifying interposers in VTR works. Connections between the two sides of a cut are first severed after which the two sides are reconnected using scatter_gather patterns. In this example the length of the sg_link wire used is 3. Note that there are 'num' of each pattern at each switchblock location.
609+
584610
.. _arch_device_info:
585611
586612
FPGA Device Information
181 KB
Loading

doc/src/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ For more specific documentation about VPR see :ref:`vpr`.
6464
api/vtrutil/index
6565
api/ezgl/index
6666
api/vprinternals/index
67+
api/libarchfpga/index
6768

6869
Indices and tables
6970
==================

libs/libarchfpga/src/echo_arch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
101101
//Layout
102102
fprintf(Echo, "*************************************************\n");
103103
for (const auto& grid_layout : arch->grid_layouts) {
104-
if (grid_layout.grid_type == GridDefType::AUTO) {
104+
if (grid_layout.grid_type == e_grid_def_type::AUTO) {
105105
fprintf(Echo, "Layout: '%s' Type: auto Aspect_Ratio: %f\n", grid_layout.name.c_str(), grid_layout.aspect_ratio);
106106
} else {
107-
VTR_ASSERT(grid_layout.grid_type == GridDefType::FIXED);
107+
VTR_ASSERT(grid_layout.grid_type == e_grid_def_type::FIXED);
108108
fprintf(Echo, "Layout: '%s' Type: fixed Width: %d Height %d\n", grid_layout.name.c_str(), grid_layout.width, grid_layout.height);
109109
}
110110
}

libs/libarchfpga/src/grid_types.h

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
#pragma once
2+
3+
/**
4+
* @file grid_types.h
5+
* @brief FPGA grid layout data types
6+
*/
7+
8+
#include <string>
9+
#include <memory>
10+
11+
// Forward declerations
12+
13+
struct t_metadata_dict;
14+
15+
/**
16+
* @brief Grid location specification
17+
* Each member is a formula evaluated in terms of 'W' (device width),
18+
* and 'H' (device height). Formulas can be evaluated using parse_formula()
19+
* from expr_eval.h.
20+
*/
21+
struct t_grid_loc_spec {
22+
std::string start_expr; ///<Starting position (inclusive)
23+
std::string end_expr; ///<Ending position (inclusive)
24+
25+
std::string repeat_expr; ///<Distance between repeated region instances
26+
27+
std::string incr_expr; ///<Distance between block instantiations with the region
28+
};
29+
30+
/**
31+
* @brief Definition of how to place physical logic block in the grid.
32+
* @details This defines a region of the grid to be set to a specific type
33+
* (provided its priority is high enough to override other blocks).
34+
*
35+
* The diagram below illustrates the layout specification.
36+
*
37+
* +----+ +----+ +----+
38+
* | | | | | |
39+
* | | | | ... | |
40+
* | | | | | |
41+
* +----+ +----+ +----+
42+
*
43+
* . . .
44+
* . . .
45+
* . . .
46+
*
47+
* +----+ +----+ +----+
48+
* | | | | | |
49+
* | | | | ... | |
50+
* | | | | | |
51+
* +----+ +----+ +----+
52+
* ^
53+
* |
54+
* repeaty |
55+
* |
56+
* v (endx,endy)
57+
* +----+ +----+ +----+
58+
* | | | | | |
59+
* | | | | ... | |
60+
* | | | | | |
61+
* +----+ +----+ +----+
62+
* (startx,starty)
63+
* <-------------->
64+
* repeatx
65+
*
66+
* startx/endx and endx/endy define a rectangular region instance's dimensions.
67+
* The region instance is then repeated every repeatx/repeaty (if specified).
68+
*
69+
* Within a particular region instance a block of block_type is laid down every
70+
* incrx/incry units (if not specified defaults to block width/height):
71+
*
72+
*
73+
* * = an instance of block_type within the region
74+
*
75+
* +------------------------------+
76+
* |* * * *|
77+
* | |
78+
* | |
79+
* | |
80+
* | |
81+
* | |
82+
* |* * * *|
83+
* ^ | |
84+
* | | |
85+
* incry | | |
86+
* | | |
87+
* v | |
88+
* |* * * *|
89+
* +------------------------------+
90+
*
91+
* <------->
92+
* incrx
93+
*
94+
* In the above diagram incrx = 10, and incry = 6
95+
*/
96+
struct t_grid_loc_def {
97+
t_grid_loc_def(std::string block_type_val, int priority_val)
98+
: block_type(std::move(block_type_val))
99+
, priority(priority_val)
100+
, x{"0", "W-1", "max(w+1,W)", "w"} // Fill in x direction, no repeat, incr by block width
101+
, y{"0", "H-1", "max(h+1,H)", "h"} // Fill in y direction, no repeat, incr by block height
102+
{}
103+
104+
std::string block_type; ///< The block type name
105+
106+
int priority = 0; ///< Priority of the specification. In case of conflicting specifications the largest priority wins.
107+
108+
t_grid_loc_spec x; ///< Horizontal location specification
109+
t_grid_loc_spec y; ///< Vertical location specification
110+
111+
/**
112+
* @brief When 1 metadata tag is split among multiple t_grid_loc_def, one
113+
* t_grid_loc_def is arbitrarily chosen to own the metadata, and the other
114+
* t_grid_loc_def point to the owned version.
115+
*
116+
*/
117+
std::unique_ptr<t_metadata_dict> owned_meta;
118+
119+
/**
120+
* @brief Metadata for this location definition. This
121+
* metadata may be shared with multiple grid_locs
122+
* that come from a common definition.
123+
*/
124+
t_metadata_dict* meta = nullptr;
125+
};
126+
127+
/**
128+
* @brief Enum for specfying if the architecture grid specification is for an auto sized device (variable size)
129+
* or a fixed size device.
130+
*/
131+
enum class e_grid_def_type {
132+
AUTO,
133+
FIXED
134+
};

0 commit comments

Comments
 (0)