Skip to content

Commit fdeb013

Browse files
committed
2 parents 7ef33f1 + 78b4555 commit fdeb013

File tree

194 files changed

+12282
-7538
lines changed

Some content is hidden

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

194 files changed

+12282
-7538
lines changed

doc/src/Images/Overall_view.png

-125 KB
Loading
27 KB
Loading

doc/src/arch/reference.rst

Lines changed: 88 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,12 @@ Grid Layout Example
582582
Example FPGA grid
583583
584584
585-
.. arch:tag:: <interposer_cut dim=x|y loc="int"/>
585+
.. arch:tag:: <interposer_cut x="int" y="int"/>
586586
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.
587+
:opt_param x: Specifies the x-coordinate of a vertical interposer cut.
588+
:opt_param y: Specifies the y-coordinate of a horizontal interposer cut.
589+
590+
.. note:: Exactly one of the ``x`` or ``y`` attributes must be specified.
589591
590592
.. 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.
591593
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.
@@ -2363,6 +2365,8 @@ Direct Inter-block Connections
23632365
The content within the ``<directlist>`` tag consists of a group of ``<direct>`` tags.
23642366
The ``<direct>`` tag and its contents are described below.
23652367

2368+
.. note:: ``from_pin`` and ``to_pin`` only support big endian! For example, ``clb.out[8:0]``
2369+
23662370
.. arch:tag:: <direct name="string" from_pin="string" to_pin="string" x_offset="int" y_offset="int" z_offset="int" switch_name="string" from_side="{left|right|top|bottom}" to_side="{left|right|top|bottom}"/>
23672371
23682372
:req_param name: is a unique alphanumeric string to name the connection.
@@ -2382,12 +2386,89 @@ The ``<direct>`` tag and its contents are described below.
23822386
The ``from_side`` and ``to_side`` options can usually be left unspecified.
23832387
However they can be used to explicitly control how direct connections to physically equivalent pins (which may appear on multiple sides) are handled.
23842388

2385-
**Example:**
2386-
Consider a carry chain where the ``cout`` of each CLB drives the ``cin`` of the CLB immediately below it, using the delay-less switch one would enter the following:
2389+
**Example: Inter-tile connection**
2390+
Consider a carry chain where the ``cout`` of each CLB drives the ``cin`` of the CLB immediately below it, using the delay-less switch one would enter the following:
23872391

2388-
.. code-block:: xml
2392+
.. code-block:: xml
2393+
2394+
<direct name="adder_carry" from_pin="clb.cout" to_pin="clb.cin" x_offset="0" y_offset="-1" z_offset="0"/>
2395+
2396+
**Example: Inner-tile feedback**
2397+
2398+
Consider a feedback connection where the ``out`` of each CLB drives the ``in`` of the CLB in the same location, using the connection block switch one would enter the following:
2399+
2400+
.. code-block:: xml
2401+
2402+
<direct name="feedback" from_pin="clb.out" to_pin="clb.in" x_offset="0" y_offset="0" z_offset="0" switch_name="cb_mux"/>
2403+
2404+
**Example: Cross-sub-tile connection**
2405+
2406+
In this example, a tile ``cim8_1k`` is defined, under which there are two types of sub-tiles:
2407+
2408+
- ``mult_8``: the first sub-tile
2409+
- ``memory``: the second, and the third sub-tile
2410+
2411+
.. code-block:: xml
2412+
2413+
<tile name="cim8_1k" height="2" area="396000">
2414+
<sub_tile name="mult_8" capacity="1">
2415+
<equivalent_sites>
2416+
<site pb_type="mult_8" pin_mapping="direct"/>
2417+
</equivalent_sites>
2418+
<input name="a" num_pins="8"/>
2419+
<input name="b" num_pins="8"/>
2420+
<output name="out" num_pins="16"/>
2421+
<fc in_type="frac" in_val="0.15" out_type="frac" out_val="0.10">
2422+
<fc_override port_name="out" fc_type="frac" fc_val="0"/>
2423+
</fc>
2424+
<pinlocations pattern="custom">
2425+
<loc side="left"/>
2426+
<loc side="top"/>
2427+
<loc side="right" yoffset="0">mult_8.a[0:2] mult_8.b[0:2] mult_8.out[0:5]</loc>
2428+
<loc side="right" yoffset="1">mult_8.a[3:5] mult_8.b[3:5] mult_8.out[6:10]</loc>
2429+
<loc side="bottom">mult_8.a[6:7] mult_8.b[6:7] mult_8.out[11:15]</loc>
2430+
</pinlocations>
2431+
</sub_tile>
2432+
<sub_tile name="memory" capacity="2">
2433+
<equivalent_sites>
2434+
<site pb_type="memory"/>
2435+
</equivalent_sites>
2436+
<input name="waddr" num_pins="7"/>
2437+
<input name="raddr" num_pins="7"/>
2438+
<input name="data_in" num_pins="8"/>
2439+
<input name="wen" num_pins="1"/>
2440+
<input name="ren" num_pins="1"/>
2441+
<output name="data_out" num_pins="8"/>
2442+
<clock name="clk" num_pins="1"/>
2443+
<fc in_type="frac" in_val="0.15" out_type="frac" out_val="0.10">
2444+
<fc_override port_name="clk" fc_type="frac" fc_val="0"/>
2445+
<fc_override port_name="data_in" fc_type="frac" fc_val="0"/>
2446+
</fc>
2447+
<pinlocations pattern="custom">
2448+
<loc side="left" yoffset="0">memory.clk memory.waddr[0:0] memory.raddr[0:0] memory.data_in[0:0] memory.data_out[0:0]</loc>
2449+
<loc side="left" yoffset="1">memory.waddr[1:1] memory.raddr[1:1] memory.data_in[1:1] memory.data_out[1:1]</loc>
2450+
<loc side="top" yoffset="1">memory.waddr[2:2] memory.raddr[2:2] memory.data_in[2:2] memory.data_out[2:2] memory.waddr[3:3] memory.raddr[3:3] memory.data_in[3:3] memory.data_out[3:3]</loc>
2451+
<loc side="right" yoffset="0">memory.waddr[4:4] memory.raddr[4:4] memory.data_in[4:4] memory.data_out[4:4]</loc>
2452+
<loc side="right" yoffset="1">memory.waddr[5:5] memory.raddr[5:5] memory.data_in[5:5] memory.data_out[5:5]</loc>
2453+
<loc side="bottom" yoffset="0">memory.wen memory.waddr[6:6] memory.raddr[6:6] memory.data_in[6:6] memory.data_out[6:6] memory.ren memory.data_in[7:7] memory.data_out[7:7]</loc>
2454+
</pinlocations>
2455+
</sub_tile>
2456+
</tile>
2457+
2458+
As shown in :numref:`fig_example_subtile_direct_connection`, consider a connection where the ``out`` of a sub tile ``mult_8`` of tile ``cim8_1k`` drives the ``data_in`` of the sub tile ``memory`` of tile ``cim8_1k`` with an offset, using the delayless switch one would enter the following:
2459+
2460+
.. code-block:: xml
2461+
2462+
<direct name="cim_direct0" from_pin="cim8_1k.out[7:0]" to_pin="cim8_1k.data_in[7:0]" x_offset="0" y_offset="0" z_offset="1"/>
2463+
<direct name="cim_direct1" from_pin="cim8_1k.out[15:8]" to_pin="cim8_1k.data_in[7:0]" x_offset="0" y_offset="0" z_offset="2"/>
2464+
2465+
.. _fig_example_subtile_direct_connection:
2466+
2467+
.. figure:: ./example_subtile_direct_connection.png
2468+
:width: 60%
2469+
:alt: Example of direct connections across sub-tiles
23892470

2390-
<direct name="adder_carry" from_pin="clb.cout" to_pin="clb.cin" x_offset="0" y_offset="-1" z_offset="0"/>
2471+
Example of direct connections across sub-tiles
23912472

23922473
.. _custom_switch_blocks:
23932474

doc/src/vpr/graphics.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ Manual Moves
308308

309309
The manual moves feature allows the user to specify the next move in placement. If the move is legal, blocks are swapped and the new move is shown on the architecture.
310310

311+
.. _fig-misc-tab:
311312
.. figure:: ../Images/manual_move.png
312313
:align: center
313314
:width: 25%
@@ -335,3 +336,15 @@ If the manual move is legal, the cost summary window will display the delta cost
335336

336337
The user can Accept or Reject the manual move based on the values provided. If accepted the block's new location is shown.
337338

339+
Pause Button
340+
------------
341+
342+
The pause button allows the user to temporarily stop the program during placement or routing.
343+
When clicked during the placement stage, the program will pause at the next temperature update.
344+
When clicked during the routing stage, it will pause at the next router iteration.
345+
346+
The button can be pressed at any time while the program is running. To enable the feature, click the **Pause** button under the **Misc.** tab (see :ref:`fig-misc-tab`).
347+
Once the program reaches the next temperature update or router iteration after the button is pressed, it will automatically pause.
348+
349+
After the program has paused, clicking **Next Step** allows the user to resume execution from the point where the program was paused.
350+
This can be continuing from the current temperature in placement or from the current router iteration in routing.

doc/src/vtr/get_vtr.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ How to Cite
99
Citations are important in academia, as they ensure contributors receive credit for their efforts.
1010
Therefore please use the following paper as a general citation whenever you use VTR:
1111

12-
M. A. Elgammal, A. Mohaghegh, S. G. Shahrouz, F. Mahmoudi, F. Koşar, K. Talaei, J. Fife, D. Khadivi, K. E. Murray, A. Boutros, K.B. Kent, J. Goeders, V. Betz "VTR 9: Open-Source CAD for Fabric and Beyond FPGA Architecture Exploration" ACM TRETS, 2025
12+
M. A. Elgammal, A. Mohaghegh, S. G. Shahrouz, F. Mahmoudi, F. Koşar, K. Talaei, J. Fife, D. Khadivi, K. E. Murray, A. Boutros, K.B. Kent, J. Goeders, V. Betz "VTR 9: Open-Source CAD for Fabric and Beyond FPGA Architecture Exploration" ACM TRETS, Vol. 13, No. 3, Sept. 2025, pp. 1 - 53.
1313

1414
Bibtex:
1515

@@ -19,6 +19,10 @@ Bibtex:
1919
title={VTR 9: Open-Source CAD for Fabric and Beyond FPGA Architecture Exploration},
2020
author={Elgammal, Mohamed A. and Mohaghegh, Amin and Shahrouz, Soheil G. and Mahmoudi, Fatemehsadat and Kosar, Fahrican and Talaei, Kimia and Fife, Joshua and Khadivi, Daniel and Murray, Kevin and Boutros, Andrew and Kent, Kenneth B. and Goeders, Jeff and Betz, Vaughn},
2121
journal={ACM Trans. Reconfigurable Technol. Syst.},
22+
issue_date = {September 2025},
23+
volume = {18},
24+
number = {3},
25+
numpages = {53},
2226
year={2025}
2327
}
2428

libs/libarchfpga/src/device_grid.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22

33
#include <utility>
44

5-
DeviceGrid::DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid)
6-
: name_(std::move(grid_name))
7-
, grid_(std::move(grid)) {
5+
DeviceGrid::DeviceGrid(std::string_view grid_name,
6+
vtr::NdMatrix<t_grid_tile, 3> grid,
7+
std::vector<std::vector<int>>&& horizontal_interposer_cuts,
8+
std::vector<std::vector<int>>&& vertical_interposer_cuts)
9+
: name_(grid_name)
10+
, grid_(std::move(grid))
11+
, horizontal_interposer_cuts_(std::move(horizontal_interposer_cuts))
12+
, vertical_interposer_cuts_(std::move(vertical_interposer_cuts)) {
813
count_instances();
914
}
1015

11-
DeviceGrid::DeviceGrid(std::string grid_name,
16+
DeviceGrid::DeviceGrid(std::string_view grid_name,
1217
vtr::NdMatrix<t_grid_tile, 3> grid,
13-
std::vector<t_logical_block_type_ptr> limiting_res)
14-
: DeviceGrid(std::move(grid_name), std::move(grid)) {
18+
std::vector<t_logical_block_type_ptr> limiting_res,
19+
std::vector<std::vector<int>>&& horizontal_interposer_cuts,
20+
std::vector<std::vector<int>>&& vertical_interposer_cuts)
21+
: DeviceGrid(grid_name, std::move(grid), std::move(horizontal_interposer_cuts), std::move(vertical_interposer_cuts)) {
1522
limiting_resources_ = std::move(limiting_res);
1623
}
1724

libs/libarchfpga/src/device_grid.h

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@ struct t_grid_tile {
2626
class DeviceGrid {
2727
public:
2828
DeviceGrid() = default;
29-
DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid);
30-
DeviceGrid(std::string grid_name, vtr::NdMatrix<t_grid_tile, 3> grid, std::vector<t_logical_block_type_ptr> limiting_res);
29+
DeviceGrid(std::string_view grid_name,
30+
vtr::NdMatrix<t_grid_tile, 3> grid,
31+
std::vector<std::vector<int>>&& horizontal_interposer_cuts,
32+
std::vector<std::vector<int>>&& vertical_interposer_cuts);
33+
34+
DeviceGrid(std::string_view grid_name,
35+
vtr::NdMatrix<t_grid_tile, 3> grid,
36+
std::vector<t_logical_block_type_ptr> limiting_res,
37+
std::vector<std::vector<int>>&& horizontal_interposer_cuts,
38+
std::vector<std::vector<int>>&& vertical_interposer_cuts);
3139

3240
const std::string& name() const { return name_; }
3341

@@ -63,7 +71,7 @@ class DeviceGrid {
6371
* @brief Returns the block types which limits the device size (may be empty if
6472
* resource limits were not considered when selecting the device).
6573
*/
66-
std::vector<t_logical_block_type_ptr> limiting_resources() const { return limiting_resources_; }
74+
const std::vector<t_logical_block_type_ptr>& limiting_resources() const { return limiting_resources_; }
6775

6876
///@brief Return the t_physical_tile_type_ptr at the specified location
6977
inline t_physical_tile_type_ptr get_physical_type(const t_physical_tile_loc& tile_loc) const {
@@ -189,15 +197,31 @@ class DeviceGrid {
189197
return &grid_.get(n);
190198
}
191199

200+
/// Returns the list of horizontal interposer cut locations for each layer,
201+
/// i.e. y value of the tile row just below each cut
202+
/// Accessed as [layer][cut_idx]
203+
inline const std::vector<std::vector<int>>& get_horizontal_interposer_cuts() const {
204+
return horizontal_interposer_cuts_;
205+
}
206+
207+
/// Returns the list of vertical interposer cut locations for each layer,
208+
/// i.e. x value of the tile column just to the left each cut
209+
/// Accessed as [layer][cut_idx]
210+
inline const std::vector<std::vector<int>>& get_vertical_interposer_cuts() const {
211+
return vertical_interposer_cuts_;
212+
}
213+
192214
private:
193-
///@brief count_instances() counts the number of each tile type on each layer and store it in instance_counts_. It is called in the constructor.
215+
/// @brief Counts the number of each tile type on each layer and store it in instance_counts_.
216+
/// It is called in the constructor.
194217
void count_instances();
195218

196219
std::string name_;
197220

198221
/**
199222
* @brief grid_ is a 3D matrix that represents the grid of the FPGA chip.
200-
* @note The first dimension is the layer number (grid_[0] corresponds to the bottom layer), the second dimension is the x coordinate, and the third dimension is the y coordinate.
223+
* @note The first dimension is the layer number (grid_[0] corresponds to the bottom layer),
224+
* the second dimension is the x coordinate, and the third dimension is the y coordinate.
201225
* @note Note that vtr::Matrix operator[] returns and intermediate type
202226
* @note which can be used for indexing in the second dimension, allowing
203227
* @note traditional 2-d indexing to be used
@@ -208,4 +232,13 @@ class DeviceGrid {
208232
std::vector<std::map<t_physical_tile_type_ptr, size_t>> instance_counts_; /* [layer_num][physical_tile_type_ptr] */
209233

210234
std::vector<t_logical_block_type_ptr> limiting_resources_;
235+
236+
/// Horizontal interposer cut locations in each layer,
237+
/// i.e. y value of the tile row just below each cut
238+
/// Accessed as [layer][cut_idx]
239+
std::vector<std::vector<int>> horizontal_interposer_cuts_;
240+
/// Vertical interposer cut location in each layer,
241+
/// i.e. x value of the tile column just to the left each cut
242+
/// Accessed as [layer][cut_idx]
243+
std::vector<std::vector<int>> vertical_interposer_cuts_;
211244
};

libs/libarchfpga/src/interposer_types.h

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,20 @@
44
* @file interposer_types.h
55
* @brief This file contains types used for parsing interposer-related tags such as <interposer_cut> and <interdie_wire>
66
* and converting that information into the device architecture-related data structures.
7-
*
87
*/
98

10-
#include <unordered_map>
119
#include <vector>
1210
#include <string>
1311
#include "grid_types.h"
1412

15-
/**
16-
* @brief Enum for direction of an interposer cut. X means horizontal cut and Y means vertical cut.
17-
*
18-
*/
19-
enum class e_interposer_cut_dim {
20-
X,
21-
Y
13+
/// @brief Enum for direction of an interposer cut.
14+
enum class e_interposer_cut_type {
15+
HORZ,
16+
VERT
2217
};
2318

24-
// Lookup table for converting between a character and an e_interposer_cut_dim
25-
inline const std::unordered_map<char, e_interposer_cut_dim> CHAR_INTERPOSER_DIM_MAP = {
26-
{'X', e_interposer_cut_dim::X},
27-
{'x', e_interposer_cut_dim::X},
28-
{'Y', e_interposer_cut_dim::Y},
29-
{'y', e_interposer_cut_dim::Y}};
30-
3119
/**
3220
* @brief Struct containing information of interdire wires i.e. connections between the dies on an interposer
33-
*
3421
*/
3522
struct t_interdie_wire_inf {
3623
std::string sg_name; ///< Name of the scatter-gather pattern to be used for the interdie connection
@@ -40,18 +27,18 @@ struct t_interdie_wire_inf {
4027
* Contains starting and ending point (both inclusive) of scatter-gather instantiations and the increment/distance between the instantiations.
4128
* offset_definition.repeat_expr is not relevant for interdie wires and is not set to anything or used.
4229
*
43-
* 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.
30+
* Locations defined by this offset definition define the starting point or the gathering point of the SG pattern.
31+
* The end or scatter point of the SG pattern is defined by the sg_link.
4432
*/
4533
t_grid_loc_spec offset_definition;
4634
int num; ///< Number of scatter-gather instantiations per switchblock location
4735
};
4836

4937
/**
5038
* @brief Struct containing information of an interposer cut
51-
*
5239
*/
5340
struct t_interposer_cut_inf {
54-
e_interposer_cut_dim dim; ///< Dimension or axis of interposer cut.
41+
e_interposer_cut_type dim; ///< Axis of interposer cut location. The cut is perpendicular to this axis. This specifies the dimension of `loc`.
5542
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.
5643
std::vector<t_interdie_wire_inf> interdie_wires; ///< Connectivity specification between the two sides of the cut.
5744
};

libs/libarchfpga/src/physical_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ enum e_power_estimation_method_ {
241241
POWER_METHOD_SPECIFY_SIZES, /* Transistor-level, user-specified buffers/wires */
242242
POWER_METHOD_TOGGLE_PINS, /* Dynamic: Energy per pin toggle, Static: Absolute */
243243
POWER_METHOD_C_INTERNAL, /* Dynamic: Equiv. Internal capacitance, Static: Absolute */
244-
POWER_METHOD_ABSOLUTE /* Dynamic: Aboslute, Static: Absolute */
244+
POWER_METHOD_ABSOLUTE /* Dynamic: Absolute, Static: Absolute */
245245
};
246246
typedef enum e_power_estimation_method_ e_power_estimation_method;
247247
typedef enum e_power_estimation_method_ t_power_estimation_method;

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2661,7 +2661,8 @@ static void process_block_type_locs(t_grid_def& grid_def,
26612661

26622662
t_interposer_cut_inf interposer_cut = parse_interposer_cut_tag(loc_spec_tag, loc_data);
26632663

2664-
if ((interposer_cut.dim == e_interposer_cut_dim::X && interposer_cut.loc >= grid_def.height) || (interposer_cut.dim == e_interposer_cut_dim::Y && interposer_cut.loc >= grid_def.width)) {
2664+
if ((interposer_cut.dim == e_interposer_cut_type::VERT && interposer_cut.loc >= grid_def.width)
2665+
|| (interposer_cut.dim == e_interposer_cut_type::HORZ && interposer_cut.loc >= grid_def.height)) {
26652666
archfpga_throw(loc_data.filename_c_str(), loc_data.line(loc_spec_tag), "Interposer cut dimensions are outside of device bounds");
26662667
}
26672668

0 commit comments

Comments
 (0)