Skip to content

Commit 2ef555f

Browse files
Merge branch 'master' into ingest_per_edge_delay
2 parents eac8bfc + e3380ce commit 2ef555f

Some content is hidden

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

41 files changed

+746
-805
lines changed

.github/workflows/stale.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: 'Close Stale Issues'
2+
on:
3+
schedule:
4+
# Run everyday at 1 PM UTC
5+
- cron: '0 13 * * *'
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v9
12+
with:
13+
# The message to be shown for stale issues
14+
stale-issue-message: 'This issue has been inactive for a year and has been marked as stale. It will be closed in 15 days if it continues to be stale. If you believe this is still an issue, please add a comment.'
15+
close-issue-message: 'This issue has been marked stale for 15 days and has been automatically closed.'
16+
# If you want to exempt an issue from being marked stale/deleted, label it as 'no-stale'
17+
exempt-issue-labels: 'no-stale'
18+
days-before-issue-stale: 365
19+
days-before-issue-close: 15
20+
# Start from the oldest issues
21+
ascending: true
22+
23+
# The configuration below can be used to allow the same behaviour with PRs.
24+
# Since we currently don't want to close old PRs, it is commented out but
25+
# left here in case we change our mind.
26+
27+
# stale-pr-message: 'This PR has been inactive for a year and has been marked as stale. It will be closed in 15 days if it continues to be stale. If you are still working on this PR, please add a comment.'
28+
# close-pr-message: 'This PR has been marked stale for 15 days and has been automatically closed.'
29+
# exempt-pr-labels: 'no-stale'
30+
# days-before-pr-stale: 365
31+
# days-before-pr-close: 15

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ This information helps us to quickly reproduce (and hopefully fix) the issue:
7777

7878
Tell us what version of VTR you are using (e.g. the output of `vpr --version`), which Operating System and compiler you are using, or any other relevant information about where or how you are building/running VTR.
7979

80-
Once you've gathered all the information [open an Issue](https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/new?template=bug_report.md) on our issue tracker.
80+
Once you've gathered all the information [open an Issue](https://github.com/verilog-to-routing/vtr-verilog-to-routing/issues/new?template=bug_report.md) on our issue tracker. Issues that do not have any activity for a year will be automatically marked as stale and will be closed after 15 days of being marked as stale.
8181

8282
If you know how to fix the issue, or already have it coded-up, please also consider [submitting the fix](#submitting-code-to-vtr).
8383
This is likely the fastest way to get bugs fixed!

libs/libarchfpga/src/cad_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct t_cluster_placement_primitive {
126126
t_pb_graph_node* pb_graph_node;
127127
bool valid;
128128
float base_cost; /* cost independent of current status of packing */
129-
float incremental_cost; /* cost dependant on current status of packing */
129+
float incremental_cost; /* cost dependent on current status of packing */
130130
};
131131

132132
#endif

libs/libarchfpga/src/device_grid.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ class DeviceGrid {
8080
inline int get_height_offset(const t_physical_tile_loc& tile_loc) const {
8181
return grid_[tile_loc.layer_num][tile_loc.x][tile_loc.y].height_offset;
8282
}
83+
///@brief Returns true if the given location is the root location (bottom left corner) of a tile.
84+
inline bool is_root_location(const t_physical_tile_loc& tile_loc) const {
85+
return get_width_offset(tile_loc) == 0 && get_height_offset(tile_loc) == 0;
86+
}
8387

8488
///@brief Returns a rectangle which represents the bounding box of the tile at the given location.
8589
inline vtr::Rect<int> get_tile_bb(const t_physical_tile_loc& tile_loc) const {

libs/libarchfpga/src/physical_types.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,13 @@ struct t_port_power {
540540
bool reverse_scaled; /* Scale by (1-prob) */
541541
};
542542

543-
//The type of Fc specification
543+
/**
544+
* @enum e_fc_type
545+
* @brief The type of Fc specification
546+
*/
544547
enum class e_fc_type {
545-
IN, //The fc specification for an input pin
546-
OUT //The fc specification for an output pin
548+
IN, /**< Fc specification for an input pin. */
549+
OUT /**< Fc specification for an output pin. */
547550
};
548551

549552
//The value type of the Fc specification
@@ -1562,6 +1565,7 @@ enum e_directionality {
15621565
UNI_DIRECTIONAL,
15631566
BI_DIRECTIONAL
15641567
};
1568+
15651569
/* X_AXIS: Data that describes an x-directed wire segment (CHANX) *
15661570
* Y_AXIS: Data that describes an y-directed wire segment (CHANY) *
15671571
* BOTH_AXIS: Data that can be applied to both x-directed and y-directed wire segment */

libs/librrgraph/src/base/check_rr_graph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ void check_rr_graph(const RRGraphView& rr_graph,
5353
const vtr::vector<RRIndexedDataId, t_rr_indexed_data>& rr_indexed_data,
5454
const DeviceGrid& grid,
5555
const t_chan_width& chan_width,
56-
const t_graph_type graph_type,
56+
const e_graph_type graph_type,
5757
bool is_flat) {
5858
e_route_type route_type = DETAILED;
59-
if (graph_type == GRAPH_GLOBAL) {
59+
if (graph_type == e_graph_type::GLOBAL) {
6060
route_type = GLOBAL;
6161
}
6262

libs/librrgraph/src/base/check_rr_graph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void check_rr_graph(const RRGraphView& rr_graph,
1010
const vtr::vector<RRIndexedDataId, t_rr_indexed_data>& rr_indexed_data,
1111
const DeviceGrid& grid,
1212
const t_chan_width& chan_width,
13-
const t_graph_type graph_type,
13+
const e_graph_type graph_type,
1414
bool is_flat);
1515

1616
void check_rr_node(const RRGraphView& rr_graph,

libs/librrgraph/src/base/get_parallel_segs.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include "get_parallel_segs.h"
22

3-
/*Gets t_segment_inf for parallel segments as defined by the user.
4-
*Segments that have BOTH_AXIS attribute value are always included in the returned vector.*/
53
std::vector<t_segment_inf> get_parallel_segs(const std::vector<t_segment_inf>& segment_inf,
64
t_unified_to_parallel_seg_index& seg_index_map,
75
enum e_parallel_axis parallel_axis) {

libs/librrgraph/src/base/get_parallel_segs.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44
#include "rr_graph_type.h"
55
#include "physical_types.h"
66

7+
/**
8+
* @brief Returns segments aligned with a given axis, including BOTH_AXIS segments.
9+
*
10+
* Filters the unified segment list (`segment_inf`) to include only segments matching
11+
* the specified `parallel_axis` or marked as `BOTH_AXIS`. Also populates `seg_index_map`
12+
* to map unified indices to axis-specific ones.
13+
*
14+
* @param segment_inf Unified list of all segments.
15+
* @param seg_index_map Map from unified to axis-specific segment indices.
16+
* @param parallel_axis Axis to filter segments by.
17+
* @return Filtered list of segments for the given axis.
18+
*/
719
std::vector<t_segment_inf> get_parallel_segs(const std::vector<t_segment_inf>& segment_inf,
820
t_unified_to_parallel_seg_index& seg_index_map,
921
enum e_parallel_axis parallel_axis);

libs/librrgraph/src/base/rr_graph_type.h

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,32 @@ enum e_route_type {
1919
DETAILED
2020
};
2121

22-
enum e_graph_type {
23-
GRAPH_GLOBAL, /* One node per channel with wire capacity > 1 and full connectivity */
24-
GRAPH_BIDIR, /* Detailed bidirectional graph */
25-
GRAPH_UNIDIR, /* Detailed unidir graph, untilable */
26-
/* RESEARCH TODO: Get this option debugged */
27-
GRAPH_UNIDIR_TILEABLE /* Detail unidir graph with wire groups multiples of 2*L */
22+
/**
23+
* @enum e_graph_type
24+
* @brief Represents the type of routing resource graph
25+
*/
26+
enum class e_graph_type {
27+
GLOBAL, ///< One node per channel with wire capacity > 1 and full connectivity
28+
BIDIR, ///< Detailed bidirectional routing graph
29+
UNIDIR, ///< Detailed unidirectional routing graph (non-tileable)
30+
UNIDIR_TILEABLE ///< Tileable unidirectional graph with wire groups in multiples of 2 * L (experimental)
2831
};
29-
typedef enum e_graph_type t_graph_type;
3032

31-
/* This map is used to get indices w.r.t segment_inf_x or segment_inf_y based on parallel_axis of a segment,
32-
* from indices w.r.t the **unified** segment vector, segment_inf in devices context which stores all segments
33-
* regardless of their axis. (see get_parallel_segs for more details)*/
33+
/**
34+
* @typedef t_unified_to_parallel_seg_index
35+
* @brief Maps indices from the unified segment list to axis-specific segment lists.
36+
*
37+
* This map is used to translate indices from the unified segment vector
38+
* (`segment_inf` in the device context, which contains all segments regardless of axis)
39+
* to axis-specific segment vectors (`segment_inf_x` or `segment_inf_y`), based on the
40+
* segment's parallel axis.
41+
*
42+
* Each entry maps a unified segment index to a pair containing:
43+
* - The index in the corresponding axis-specific segment vector
44+
* - The axis of the segment (X or Y)
45+
*
46+
* @see get_parallel_segs for more details.
47+
*/
3448
typedef std::unordered_multimap<size_t, std::pair<size_t, e_parallel_axis>> t_unified_to_parallel_seg_index;
3549

3650
#endif

0 commit comments

Comments
 (0)