Skip to content

Commit 6b21d55

Browse files
arch.Directs to arch.directs
1 parent 284699c commit 6b21d55

File tree

11 files changed

+39
-38
lines changed

11 files changed

+39
-38
lines changed

doc/src/arch/reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,8 +2337,8 @@ The ``<direct>`` tag and its contents are described below.
23372337
:req_param y_offset: The y location of the receiving CLB relative to the driving CLB.
23382338
:req_param z_offset: The z location of the receiving CLB relative to the driving CLB.
23392339
:opt_param switch_name: [Optional, defaults to delay-less switch if not specified] The name of the ``<switch>`` from ``<switchlist>`` to be used for this direct connection.
2340-
:opt_param from_side: The associated from_pin's block size (must be one of ``left``, ``right``, ``top``, ``bottom`` or left unspecified)
2341-
:opt_param to_side: The associated to_pin's block size (must be one of ``left``, ``right``, ``top``, ``bottom`` or left unspecified)
2340+
:opt_param from_side: The associated from_pin's block side (must be one of ``left``, ``right``, ``top``, ``bottom`` or left unspecified)
2341+
:opt_param to_side: The associated to_pin's block side (must be one of ``left``, ``right``, ``top``, ``bottom`` or left unspecified)
23422342

23432343
Describes a dedicated connection between two complex block pins that skips general interconnect.
23442344
This is useful for describing structures such as carry chains as well as adjacent neighbour connections.

libs/libarchfpga/src/arch_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void free_arch(t_arch* arch) {
156156

157157
vtr::release_memory(arch->switches);
158158

159-
vtr::release_memory(arch->Directs);
159+
vtr::release_memory(arch->directs);
160160

161161
vtr::free(arch->architecture_id);
162162

libs/libarchfpga/src/echo_arch.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,13 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
332332
//Direct List
333333
fprintf(Echo, "*************************************************\n");
334334
fprintf(Echo, "Direct List:\n");
335-
for (i = 0; i < (int)arch->Directs.size(); i++) {
335+
for (i = 0; i < (int)arch->directs.size(); i++) {
336336
fprintf(Echo, "\tDirect[%d]: name %s from_pin %s to_pin %s\n", i + 1,
337-
arch->Directs[i].name.c_str(), arch->Directs[i].from_pin.c_str(),
338-
arch->Directs[i].to_pin.c_str());
337+
arch->directs[i].name.c_str(), arch->directs[i].from_pin.c_str(),
338+
arch->directs[i].to_pin.c_str());
339339
fprintf(Echo, "\t\t\t\t x_offset %d y_offset %d z_offset %d\n",
340-
arch->Directs[i].x_offset, arch->Directs[i].y_offset,
341-
arch->Directs[i].sub_tile_offset);
340+
arch->directs[i].x_offset, arch->directs[i].y_offset,
341+
arch->directs[i].sub_tile_offset);
342342
}
343343
fprintf(Echo, "*************************************************\n\n");
344344

libs/libarchfpga/src/physical_types.h

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,31 +1836,30 @@ struct t_rr_switch_inf {
18361836
SwitchType type_ = SwitchType::INVALID;
18371837
};
18381838

1839-
/* Lists all the important information about a direct chain connection. *
1840-
* [0 .. det_routing_arch.num_direct] *
1841-
* name: Name of this direct chain connection *
1842-
* from_pin: The type of the pin that drives this chain connection *
1843-
* In the format of <block_name>.<pin_name> *
1844-
* to_pin: The type of pin that is driven by this chain connection *
1845-
* In the format of <block_name>.<pin_name> *
1846-
* x_offset: The x offset from the source to the sink of this connection *
1847-
* y_offset: The y offset from the source to the sink of this connection *
1848-
* z_offset: The z offset from the source to the sink of this connection *
1849-
* switch_type: The index into the switch list for the switch used by this *
1850-
* direct *
1851-
* line: The line number in the .arch file that specifies this *
1852-
* particular placement macro. *
1839+
/**
1840+
* @struct t_direct_inf
1841+
* @brief Lists all the important information about a direct chain connection.
18531842
*/
18541843
struct t_direct_inf {
1844+
/// Name of this direct chain connection
18551845
std::string name;
1846+
/// The type of the pin that drives this chain connection in the format of <block_name>.<pin_name>
18561847
std::string from_pin;
1848+
/// The type of pin that is driven by this chain connection in the format of <block_name>.<pin_name>
18571849
std::string to_pin;
1850+
/// The x offset from the source to the sink of this connection
18581851
int x_offset;
1852+
/// The y offset from the source to the sink of this connection
18591853
int y_offset;
1854+
/// The subtile offset from the source to the sink of this connection
18601855
int sub_tile_offset;
1856+
/// The index into the switch list for the switch used by this direct
18611857
int switch_type;
1858+
/// The associated from_pin’s block side
18621859
e_side from_side;
1860+
/// The associated to_pin’s block side
18631861
e_side to_side;
1862+
/// The line number in the architecture file that specifies this particular placement macro.
18641863
int line;
18651864
};
18661865

@@ -2061,7 +2060,9 @@ struct t_arch {
20612060
std::vector<t_segment_inf> Segments;
20622061

20632062
std::vector<t_arch_switch_inf> switches;
2064-
std::vector<t_direct_inf> Directs;
2063+
2064+
/// Contains information about all direct chain connections in the architecture
2065+
std::vector<t_direct_inf> directs;
20652066

20662067
t_model* models = nullptr;
20672068
t_model* model_library = nullptr;

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ void XmlReadArch(const char* ArchFile,
477477
/* Process directs */
478478
Next = get_single_child(architecture, "directlist", loc_data, ReqOpt::OPTIONAL);
479479
if (Next) {
480-
arch->Directs = ProcessDirects(Next, arch->switches, loc_data);
480+
arch->directs = ProcessDirects(Next, arch->switches, loc_data);
481481
}
482482

483483
/* Process Clock Networks */

utils/route_diag/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ int main(int argc, const char **argv) {
332332
vpr_setup.RouterOpts,
333333
&vpr_setup.RoutingArch,
334334
vpr_setup.Segments,
335-
Arch.Directs,
335+
Arch.directs,
336336
is_flat);
337337

338338
if(route_options.profile_source) {

vpr/src/analytical_place/full_legalizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class APClusterPlacer {
9090
// FIXME: This was stolen from place/place.cpp
9191
// it used a static method, just taking what I think I will need.
9292
auto& blk_loc_registry = g_vpr_ctx.mutable_placement().mutable_blk_loc_registry();
93-
const auto& directs = g_vpr_ctx.device().arch->Directs;
93+
const auto& directs = g_vpr_ctx.device().arch->directs;
9494

9595
init_placement_context(blk_loc_registry, directs);
9696

vpr/src/base/place_and_route.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
190190
arch->Chans,
191191
det_routing_arch,
192192
segment_inf,
193-
arch->Directs,
193+
arch->directs,
194194
false);
195195
}
196196
success = route(router_net_list,
@@ -202,7 +202,7 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
202202
timing_info,
203203
delay_calc,
204204
arch->Chans,
205-
arch->Directs,
205+
arch->directs,
206206
(attempt_count == 0) ? ScreenUpdatePriority::MAJOR : ScreenUpdatePriority::MINOR,
207207
is_flat);
208208

@@ -328,7 +328,7 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
328328
placer_opts.place_chan_width = current;
329329
try_place(placement_net_list, placer_opts, annealing_sched, router_opts, analysis_opts, noc_opts,
330330
arch->Chans, det_routing_arch, segment_inf,
331-
arch->Directs,
331+
arch->directs,
332332
false);
333333
}
334334

@@ -342,7 +342,7 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
342342
timing_info,
343343
delay_calc,
344344
arch->Chans,
345-
arch->Directs,
345+
arch->directs,
346346
ScreenUpdatePriority::MINOR,
347347
is_flat);
348348

@@ -384,7 +384,7 @@ int binary_search_place_and_route(const Netlist<>& placement_net_list,
384384
det_routing_arch,
385385
segment_inf,
386386
router_opts,
387-
arch->Directs,
387+
arch->directs,
388388
&warnings,
389389
is_flat);
390390

vpr/src/base/vpr_api.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ void vpr_place(const Netlist<>& net_list, t_vpr_setup& vpr_setup, const t_arch&
837837
arch.Chans,
838838
&vpr_setup.RoutingArch,
839839
vpr_setup.Segments,
840-
arch.Directs,
840+
arch.directs,
841841
is_flat);
842842

843843
auto& filename_opts = vpr_setup.FileNameOpts;
@@ -860,7 +860,7 @@ void vpr_load_placement(t_vpr_setup& vpr_setup, const t_arch& arch) {
860860
const auto& filename_opts = vpr_setup.FileNameOpts;
861861

862862
//Initialize placement data structures, which will be filled when loading placement
863-
init_placement_context(blk_loc_registry, arch.Directs);
863+
init_placement_context(blk_loc_registry, arch.directs);
864864

865865
//Load an existing placement from a file
866866
place_ctx.placement_id = read_place(filename_opts.NetFile.c_str(), filename_opts.PlaceFile.c_str(),
@@ -1034,7 +1034,7 @@ RouteStatus vpr_route_fixed_W(const Netlist<>& net_list,
10341034
timing_info,
10351035
delay_calc,
10361036
arch.Chans,
1037-
arch.Directs,
1037+
arch.directs,
10381038
ScreenUpdatePriority::MAJOR,
10391039
is_flat);
10401040

@@ -1134,7 +1134,7 @@ void vpr_create_rr_graph(t_vpr_setup& vpr_setup, const t_arch& arch, int chan_wi
11341134
det_routing_arch,
11351135
vpr_setup.Segments,
11361136
router_opts,
1137-
arch.Directs,
1137+
arch.directs,
11381138
&warnings,
11391139
is_flat);
11401140
//Initialize drawing, now that we have an RR graph

vpr/src/place/timing_place_lookup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,8 +1219,8 @@ void OverrideDelayModel::compute_override_delay_model(
12191219

12201220
//Look at all the direct connections that exist, and add overrides to delay model
12211221
auto& device_ctx = g_vpr_ctx.device();
1222-
for (int idirect = 0; idirect < (int)device_ctx.arch->Directs.size(); ++idirect) {
1223-
const t_direct_inf* direct = &device_ctx.arch->Directs[idirect];
1222+
for (int idirect = 0; idirect < (int)device_ctx.arch->directs.size(); ++idirect) {
1223+
const t_direct_inf* direct = &device_ctx.arch->directs[idirect];
12241224

12251225
InstPort from_port = parse_inst_port(direct->from_pin);
12261226
InstPort to_port = parse_inst_port(direct->to_pin);

0 commit comments

Comments
 (0)