Skip to content

Commit 83f8bfe

Browse files
authored
Merge branch 'master' into openfpga
2 parents 9dc2a45 + 3b74db5 commit 83f8bfe

File tree

304 files changed

+115041
-12279
lines changed

Some content is hidden

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

304 files changed

+115041
-12279
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,52 +139,68 @@ jobs:
139139
{
140140
name: 'Basic',
141141
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on',
142-
suite: 'vtr_reg_basic'
142+
suite: 'vtr_reg_basic',
143+
extra_pkgs: ""
144+
},
145+
{
146+
name: 'Basic with highest assertion level',
147+
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=4 -DWITH_BLIFEXPLORER=on',
148+
suite: 'vtr_reg_basic',
149+
extra_pkgs: ""
143150
},
144151
{
145152
name: 'Basic_odin',
146153
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
147-
suite: 'vtr_reg_basic_odin'
154+
suite: 'vtr_reg_basic_odin',
155+
extra_pkgs: ""
148156
},
149157
{
150158
name: 'Basic with NO_GRAPHICS',
151159
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off',
152-
suite: 'vtr_reg_basic'
160+
suite: 'vtr_reg_basic',
161+
extra_pkgs: ""
153162
},
154163
{
155164
name: 'Basic with NO_SERVER',
156165
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=on -DVPR_USE_SERVER=off',
157-
suite: 'vtr_reg_basic'
166+
suite: 'vtr_reg_basic',
167+
extra_pkgs: ""
158168
},
159169
{
160170
name: 'Basic with CAPNPROTO disabled',
161171
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_CAPNPROTO=off',
162-
suite: 'vtr_reg_basic'
172+
suite: 'vtr_reg_basic',
173+
extra_pkgs: ""
163174
},
164175
{
165176
name: 'Basic with VTR_ENABLE_DEBUG_LOGGING',
166177
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on',
167-
suite: 'vtr_reg_basic'
178+
suite: 'vtr_reg_basic',
179+
extra_pkgs: ""
168180
},
169181
{
170182
name: 'Basic_odin with VTR_ENABLE_DEBUG_LOGGING',
171183
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
172-
suite: 'vtr_reg_basic_odin'
184+
suite: 'vtr_reg_basic_odin',
185+
extra_pkgs: ""
173186
},
174187
{
175188
name: 'Strong',
176189
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on',
177-
suite: 'vtr_reg_strong'
190+
suite: 'vtr_reg_strong',
191+
extra_pkgs: "libeigen3-dev"
178192
},
179193
{
180194
name: 'Strong_odin',
181195
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
182-
suite: 'vtr_reg_strong_odin'
196+
suite: 'vtr_reg_strong_odin',
197+
extra_pkgs: ""
183198
},
184199
{
185200
name: 'Valgrind Memory',
186201
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_ODIN=on',
187-
suite: 'vtr_reg_valgrind_small'
202+
suite: 'vtr_reg_valgrind_small',
203+
extra_pkgs: ""
188204
}
189205
]
190206
name: 'R: ${{ matrix.name }}'
@@ -193,10 +209,17 @@ jobs:
193209
- uses: actions/setup-python@v5
194210
with:
195211
python-version: 3.10.10
212+
196213
- uses: actions/checkout@v4
197214
with:
198215
submodules: 'true'
199-
- run: ./.github/scripts/install_dependencies.sh
216+
217+
- name: Install dependencies
218+
run: ./.github/scripts/install_dependencies.sh
219+
220+
- name: Install external libraries
221+
run: sudo apt install -y ${{ matrix.extra_pkgs }}
222+
if: ${{ matrix.extra_pkgs }}
200223

201224
- uses: hendrikmuhs/[email protected]
202225

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ tags
144144
#
145145
.vscode
146146
.history
147+
.cache
147148
#eclipse project
148149
.project
149150

@@ -153,4 +154,4 @@ tags
153154
.idea
154155
cmake-build-debug
155156
cmake-build-release
156-
/.metadata/
157+
/.metadata/

doc/src/api/vpr/rr_graph.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RRGraphView
77

88
.. doxygenfile:: rr_graph_view.h
99
:project: librrgraph
10-
:sections: detaileddescription
10+
:sections: briefdescription detaileddescription func prototype user-defined public-func
1111

1212
.. doxygenclass:: RRGraphView
1313
:project: librrgraph
@@ -18,7 +18,7 @@ RRGraphBuilder
1818

1919
.. doxygenfile:: rr_graph_builder.h
2020
:project: librrgraph
21-
:sections: detaileddescription
21+
:sections: briefdescription detaileddescription func prototype user-defined public-func
2222

2323
.. doxygenclass:: RRGraphBuilder
2424
:project: librrgraph
@@ -29,7 +29,7 @@ RRSpatialLookup
2929

3030
.. doxygenfile:: rr_spatial_lookup.h
3131
:project: librrgraph
32-
:sections: detaileddescription
32+
:sections: briefdescription detaileddescription func prototype user-defined public-func
3333

3434
.. doxygenclass:: RRSpatialLookup
3535
:project: librrgraph

doc/src/arch/reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ The valid tags within the ``<layout>`` tag are:
158158

159159
.. note:: At most one ``<auto_layout>`` can be specified.
160160

161+
.. _fixed_arch_grid_layout:
162+
161163
.. arch:tag:: <fixed_layout name="string" width="int" height="int">
162164
163165
:req_param name:

doc/src/vpr/command_line_usage.rst

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,23 @@ VPR runs all stages of (pack, place, route, and analysis) if none of :option:`--
8282

8383
**Default:** ``off``
8484

85+
.. option:: --analytical_place
86+
87+
Run the analytical placement flow.
88+
This flows uses an integrated packing and placement algorithm which uses information from the primitive level to improve clustering and placement;
89+
as such, the :option:`--pack` and :option:`--place` options should not be set when this option is set.
90+
This flow requires that the device has a fixed size and some of the primitive blocks are fixed somewhere on the device grid.
91+
92+
.. seealso:: See :ref:`Fixed FPGA Grid Layout <fixed_arch_grid_layout>` and :option:`--device` for how to fix the device size.
93+
94+
.. seealso:: See :ref:`VPR Placement Constraints <placement_constraints>` for how to fix primitive blocks in a design to the device grid.
95+
96+
.. warning::
97+
98+
This analytical placement flow is experimental and under active development.
99+
100+
**Default:** ``off``
101+
85102
.. option:: --route
86103

87104
Run routing stage
@@ -979,15 +996,16 @@ The following options are only valid when the placement engine is in timing-driv
979996

980997
**Default:** ``8.0``
981998

982-
.. option:: --place_delay_model {delta, delta_override}
999+
.. option:: --place_delay_model {simple, delta, delta_override}
9831000

9841001
Controls how the timing-driven placer estimates delays.
9851002

986-
* ``delta`` The router is used to profile delay from various locations in the grid for various differences in position
1003+
* ``simple`` The placement delay estimator is built from the router lookahead. This takes less CPU time to build and it and still as accurate as the ``delta` model.
1004+
* ``delta`` The router is used to profile delay from various locations in the grid for various differences in position.
9871005
* ``delta_override`` Like ``delta`` but also includes special overrides to ensure effects of direct connects between blocks are accounted for.
9881006
This is potentially more accurate but is more complex and depending on the architecture (e.g. number of direct connects) may increase place run-time.
9891007

990-
**Default:** ``delta``
1008+
**Default:** ``simple``
9911009

9921010
.. option:: --place_delay_model_reducer {min, max, median, arithmean, geomean}
9931011

@@ -1292,6 +1310,13 @@ VPR uses a negotiated congestion algorithm (based on Pathfinder) to perform rout
12921310
* `swns` - setup Worst Negative Slack (sWNS) [ns]
12931311
* `stns` - Setup Total Negative Slack (sTNS) [ns]
12941312

1313+
.. option:: --route_verbosity <int>
1314+
1315+
Controls the verbosity of routing output.
1316+
High values produce more detailed output, which can be useful for debugging or understanding the routing process.
1317+
1318+
**Default**: ``1``
1319+
12951320
.. _timing_driven_router_options:
12961321

12971322
Timing-Driven Router Options

libs/EXTERNAL/libcatch2

Submodule libcatch2 updated 86 files

libs/libarchfpga/src/parse_switchblocks.cpp

Lines changed: 71 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ static void parse_comma_separated_wire_points(const char* ch, std::vector<t_wire
6565
/* Parses the number of connections type */
6666
static void parse_num_conns(std::string num_conns, t_wireconn_inf& wireconn);
6767

68+
/* Set connection from_side and to_side for custom switch block pattern*/
69+
static void set_switch_func_type(SB_Side_Connection& conn, const char* func_type);
70+
6871
/* parse switch_override in wireconn */
6972
static void parse_switch_override(const char* switch_override, t_wireconn_inf& wireconn, const t_arch_switch_inf* switches, int num_switches);
7073

@@ -269,6 +272,70 @@ static void parse_num_conns(std::string num_conns, t_wireconn_inf& wireconn) {
269272
wireconn.num_conns_formula = num_conns;
270273
}
271274

275+
//set sides for a specific conn for custom switch block pattern
276+
static void set_switch_func_type(SB_Side_Connection& conn, const char* func_type) {
277+
if (0 == strcmp(func_type, "lt")) {
278+
conn.set_sides(LEFT, TOP);
279+
} else if (0 == strcmp(func_type, "lr")) {
280+
conn.set_sides(LEFT, RIGHT);
281+
} else if (0 == strcmp(func_type, "lb")) {
282+
conn.set_sides(LEFT, BOTTOM);
283+
} else if (0 == strcmp(func_type, "la")) {
284+
conn.set_sides(LEFT, ABOVE);
285+
} else if (0 == strcmp(func_type, "lu")) {
286+
conn.set_sides(LEFT, UNDER);
287+
} else if (0 == strcmp(func_type, "tl")) {
288+
conn.set_sides(TOP, LEFT);
289+
} else if (0 == strcmp(func_type, "tb")) {
290+
conn.set_sides(TOP, BOTTOM);
291+
} else if (0 == strcmp(func_type, "tr")) {
292+
conn.set_sides(TOP, RIGHT);
293+
} else if (0 == strcmp(func_type, "ta")) {
294+
conn.set_sides(TOP, ABOVE);
295+
} else if (0 == strcmp(func_type, "tu")) {
296+
conn.set_sides(TOP, UNDER);
297+
} else if (0 == strcmp(func_type, "rt")) {
298+
conn.set_sides(RIGHT, TOP);
299+
} else if (0 == strcmp(func_type, "rl")) {
300+
conn.set_sides(RIGHT, LEFT);
301+
} else if (0 == strcmp(func_type, "rb")) {
302+
conn.set_sides(RIGHT, BOTTOM);
303+
} else if (0 == strcmp(func_type, "ra")) {
304+
conn.set_sides(RIGHT, ABOVE);
305+
} else if (0 == strcmp(func_type, "ru")) {
306+
conn.set_sides(RIGHT, UNDER);
307+
} else if (0 == strcmp(func_type, "bl")) {
308+
conn.set_sides(BOTTOM, LEFT);
309+
} else if (0 == strcmp(func_type, "bt")) {
310+
conn.set_sides(BOTTOM, TOP);
311+
} else if (0 == strcmp(func_type, "br")) {
312+
conn.set_sides(BOTTOM, RIGHT);
313+
} else if (0 == strcmp(func_type, "ba")) {
314+
conn.set_sides(BOTTOM, ABOVE);
315+
} else if (0 == strcmp(func_type, "bu")) {
316+
conn.set_sides(BOTTOM, UNDER);
317+
} else if (0 == strcmp(func_type, "al")) {
318+
conn.set_sides(ABOVE, LEFT);
319+
} else if (0 == strcmp(func_type, "at")) {
320+
conn.set_sides(ABOVE, TOP);
321+
} else if (0 == strcmp(func_type, "ar")) {
322+
conn.set_sides(ABOVE, RIGHT);
323+
} else if (0 == strcmp(func_type, "ab")) {
324+
conn.set_sides(ABOVE, BOTTOM);
325+
} else if (0 == strcmp(func_type, "ul")) {
326+
conn.set_sides(UNDER, LEFT);
327+
} else if (0 == strcmp(func_type, "ut")) {
328+
conn.set_sides(UNDER, TOP);
329+
} else if (0 == strcmp(func_type, "ur")) {
330+
conn.set_sides(UNDER, RIGHT);
331+
} else if (0 == strcmp(func_type, "ub")) {
332+
conn.set_sides(UNDER, BOTTOM);
333+
} else {
334+
/* unknown permutation function */
335+
archfpga_throw(__FILE__, __LINE__, "Unknown permutation function specified: %s\n", func_type);
336+
}
337+
}
338+
272339
/* Loads permutation funcs specified under Node into t_switchblock_inf. Node should be
273340
* <switchfuncs> */
274341
void read_sb_switchfuncs(pugi::xml_node Node, t_switchblock_inf* sb, const pugiutil::loc_data& loc_data) {
@@ -300,34 +367,8 @@ void read_sb_switchfuncs(pugi::xml_node Node, t_switchblock_inf* sb, const pugiu
300367
func_formula = get_attribute(SubElem, "formula", loc_data).as_string(nullptr);
301368

302369
/* go through all the possible cases of func_type */
303-
if (0 == strcmp(func_type, "lt")) {
304-
conn.set_sides(LEFT, TOP);
305-
} else if (0 == strcmp(func_type, "lr")) {
306-
conn.set_sides(LEFT, RIGHT);
307-
} else if (0 == strcmp(func_type, "lb")) {
308-
conn.set_sides(LEFT, BOTTOM);
309-
} else if (0 == strcmp(func_type, "tl")) {
310-
conn.set_sides(TOP, LEFT);
311-
} else if (0 == strcmp(func_type, "tb")) {
312-
conn.set_sides(TOP, BOTTOM);
313-
} else if (0 == strcmp(func_type, "tr")) {
314-
conn.set_sides(TOP, RIGHT);
315-
} else if (0 == strcmp(func_type, "rt")) {
316-
conn.set_sides(RIGHT, TOP);
317-
} else if (0 == strcmp(func_type, "rl")) {
318-
conn.set_sides(RIGHT, LEFT);
319-
} else if (0 == strcmp(func_type, "rb")) {
320-
conn.set_sides(RIGHT, BOTTOM);
321-
} else if (0 == strcmp(func_type, "bl")) {
322-
conn.set_sides(BOTTOM, LEFT);
323-
} else if (0 == strcmp(func_type, "bt")) {
324-
conn.set_sides(BOTTOM, TOP);
325-
} else if (0 == strcmp(func_type, "br")) {
326-
conn.set_sides(BOTTOM, RIGHT);
327-
} else {
328-
/* unknown permutation function */
329-
archfpga_throw(__FILE__, __LINE__, "Unknown permutation function specified: %s\n", func_type);
330-
}
370+
set_switch_func_type(conn, func_type);
371+
331372
func_ptr = &(sb->permutation_map[conn]);
332373

333374
/* Here we load the specified switch function(s) */
@@ -404,8 +445,8 @@ static void check_bidir_switchblock(const t_permutation_map* permutation_map) {
404445
SB_Side_Connection conn;
405446

406447
/* iterate over all combinations of from_side -> to side */
407-
for (e_side from_side : {TOP, RIGHT, BOTTOM, LEFT}) {
408-
for (e_side to_side : {TOP, RIGHT, BOTTOM, LEFT}) {
448+
for (e_side from_side : TOTAL_2D_SIDES) {
449+
for (e_side to_side : TOTAL_2D_SIDES) {
409450
/* can't connect a switchblock side to itself */
410451
if (from_side == to_side) {
411452
continue;

libs/libarchfpga/src/physical_types.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,17 @@ enum e_side : unsigned char {
179179
RIGHT = 1,
180180
BOTTOM = 2,
181181
LEFT = 3,
182-
NUM_SIDES
182+
NUM_2D_SIDES = 4,
183+
ABOVE = 5,
184+
UNDER = 7,
185+
NUM_3D_SIDES = 6,
183186
};
184-
constexpr std::array<e_side, NUM_SIDES> SIDES = {{TOP, RIGHT, BOTTOM, LEFT}}; //Set of all side orientations
185-
constexpr std::array<const char*, NUM_SIDES> SIDE_STRING = {{"TOP", "RIGHT", "BOTTOM", "LEFT"}}; //String versions of side orientations
187+
188+
constexpr std::array<e_side, NUM_2D_SIDES> TOTAL_2D_SIDES = {{TOP, RIGHT, BOTTOM, LEFT}}; //Set of all side orientations
189+
constexpr std::array<const char*, NUM_2D_SIDES> TOTAL_2D_SIDE_STRINGS = {{"TOP", "RIGHT", "BOTTOM", "LEFT"}}; //String versions of side orientations
190+
191+
constexpr std::array<e_side, NUM_3D_SIDES> TOTAL_3D_SIDES = {{TOP, RIGHT, BOTTOM, LEFT, ABOVE, UNDER}}; //Set of all side orientations including different layers
192+
constexpr std::array<const char*, NUM_3D_SIDES> TOTAL_3D_SIDE_STRINGS = {{"TOP", "RIGHT", "BOTTOM", "LEFT", "ABOVE", "UNDER"}}; //String versions of side orientations including different layers
186193

187194
/* pin location distributions */
188195
enum class e_pin_location_distr {
@@ -825,10 +832,11 @@ struct t_physical_pin {
825832

826833
/**
827834
* @brief Describes The location of a physical tile
828-
* @param layer_num The die number of the physical tile. If the FPGA only has one die, or the physical tile is located
829-
* on the base die, layer_num is equal to zero. If it is one the die above base die, it is one, etc.
830835
* @param x The x location of the physical tile on the given die
831836
* @param y The y location of the physical tile on the given die
837+
* @param layer_num The die number of the physical tile. If the FPGA only has one die, or the physical tile is located
838+
* on the base die, layer_num is equal to zero. If the physical tile is location on the die immediately
839+
* above the base die, the layer_num is 1 and so on.
832840
*/
833841
struct t_physical_tile_loc {
834842
int x = OPEN;
@@ -1288,7 +1296,6 @@ class t_pb_graph_node {
12881296
int total_pb_pins; /* only valid for top-level */
12891297

12901298
void* temp_scratch_pad; /* temporary data, useful for keeping track of things when traversing data structure */
1291-
t_cluster_placement_primitive* cluster_placement_primitive; /* pointer to indexing structure useful during packing stage */
12921299

12931300
int* input_pin_class_size; /* Stores the number of pins that belong to a particular input pin class */
12941301
int num_input_pin_class; /* number of input pin classes that this pb_graph_node has */
@@ -1978,10 +1985,12 @@ struct t_router {
19781985

19791986
/** A value representing the approximate horizontal position on the FPGA device where the router
19801987
* tile is located*/
1981-
double device_x_position = -1;
1988+
float device_x_position = -1;
19821989
/** A value representing the approximate vertical position on the FPGA device where the router
19831990
* tile is located*/
1984-
double device_y_position = -1;
1991+
float device_y_position = -1;
1992+
/** A value representing the exact layer in the FPGA device where the router tile is located.*/
1993+
int device_layer_position = -1;
19851994

19861995
/** A list of router ids that are connected to the current router*/
19871996
std::vector<int> connection_list;

0 commit comments

Comments
 (0)