Skip to content

Commit 19e337b

Browse files
rename ofs to offset & 4 --> e_side::num_2d_sides
1 parent f4b17f0 commit 19e337b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

vpr/src/route/rr_graph_generation/rr_graph.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,10 +1575,10 @@ static vtr::NdMatrix<std::vector<int>, 4> alloc_and_load_pin_to_track_map(const
15751575
// allocate 'result' matrix and initialize entries to UNDEFINED. also allocate and initialize matrix which will be used
15761576
// to index into the correct entries when loading up 'result'
15771577
auto result = vtr::NdMatrix<std::vector<int>, 4>({
1578-
size_t(tile_type->num_pins), //[0..num_pins-1]
1579-
size_t(tile_type->width), //[0..width-1]
1580-
size_t(tile_type->height), //[0..height-1]
1581-
4, //[0..sides-1]
1578+
size_t(tile_type->num_pins), // [0..num_pins-1]
1579+
size_t(tile_type->width), // [0..width-1]
1580+
size_t(tile_type->height), // [0..height-1]
1581+
size_t(e_side::NUM_2D_SIDES), // [0..sides-1]
15821582
});
15831583

15841584
// multiplier for unidirectional vs bidirectional architectures

vpr/src/route/rr_graph_generation/rr_graph2.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ void dump_track_to_pin_map(t_track_to_pin_lookup& track_to_pin_map,
657657
}
658658
}
659659

660-
bool is_sblock(const int chan, int wire_seg, const int sb_seg, const int track, const t_chan_seg_details* seg_details, const enum e_directionality directionality) {
660+
bool is_sblock(const int chan, int wire_seg, const int sb_seg, const int track, const t_chan_seg_details* seg_details, const e_directionality directionality) {
661661
int fac = 1;
662662
if (UNI_DIRECTIONAL == directionality) {
663663
fac = 2;
@@ -668,17 +668,17 @@ bool is_sblock(const int chan, int wire_seg, const int sb_seg, const int track,
668668
// Make sure they gave us correct start
669669
wire_seg = get_seg_start(seg_details, track, chan, wire_seg);
670670

671-
int ofs = sb_seg - wire_seg + 1; // Offset 0 is behind us, so add 1
671+
int offset = sb_seg - wire_seg + 1; // Offset 0 is behind us, so add 1
672672

673-
VTR_ASSERT(ofs >= 0);
674-
VTR_ASSERT(ofs < (length + 1));
673+
VTR_ASSERT(offset >= 0);
674+
VTR_ASSERT(offset < length + 1);
675675

676676
// If unidir segment that is going backwards, we need to flip the ofs
677-
if ((ofs % fac) > 0) {
678-
ofs = length - ofs;
677+
if (offset % fac > 0) {
678+
offset = length - offset;
679679
}
680680

681-
return seg_details[track].sb(ofs);
681+
return seg_details[track].sb(offset);
682682
}
683683

684684
t_sblock_pattern alloc_sblock_pattern_lookup(const DeviceGrid& grid,

vpr/src/route/rr_graph_generation/rr_graph2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ bool is_sblock(const int chan,
6262
const int sb_seg,
6363
const int track,
6464
const t_chan_seg_details* seg_details,
65-
const enum e_directionality directionality);
65+
const e_directionality directionality);
6666

6767
/**
6868
* @brief Identifies and labels all mux endpoints at a given channel segment coordinate.

0 commit comments

Comments
 (0)