Skip to content

Commit c684d89

Browse files
add doxygen comments
1 parent d1f989e commit c684d89

File tree

4 files changed

+43
-16
lines changed

4 files changed

+43
-16
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,22 +1532,21 @@ struct t_pb_graph_pin_power {
15321532
/* FPGA Routing architecture */
15331533
/*************************************************************************************************/
15341534

1535-
/* Description of routing channel distribution across the FPGA, only available for global routing
1536-
* Width is standard dev. for Gaussian. xpeak is where peak *
1537-
* occurs. dc is the dc offset for Gaussian and pulse waveforms. */
1535+
/// @brief Description of routing channel distribution across the FPGA, only available for global routing
15381536
enum class e_stat {
15391537
UNIFORM,
15401538
GAUSSIAN,
15411539
PULSE,
15421540
DELTA
15431541
};
15441542

1543+
/// @brief Parameters describing a channel distribution.
15451544
struct t_chan {
1546-
e_stat type;
1547-
float peak;
1548-
float width;
1549-
float xpeak;
1550-
float dc;
1545+
e_stat type; ///< Distribution type
1546+
float peak; ///< Peak value
1547+
float width; ///< Standard deviation (Gaussian)
1548+
float xpeak; ///< Peak location (Gaussian)
1549+
float dc; ///< DC offset (Gaussian, pulse)
15511550
};
15521551

15531552
/* chan_x_dist: Describes the x-directed channel width distribution. *
@@ -1754,13 +1753,14 @@ struct t_hash_segment_inf {
17541753
}
17551754
};
17561755

1756+
/// @brief Enumerates switch types used in the FPGA architecture and RR graph.
17571757
enum class e_switch_type {
1758-
MUX = 0, //A configurable (buffered) mux (single-driver)
1759-
TRISTATE, //A configurable tristate-able buffer (multi-driver)
1760-
PASS_GATE, //A configurable pass transistor switch (multi-driver)
1761-
SHORT, //A non-configurable electrically shorted connection (multi-driver)
1762-
BUFFER, //A non-configurable non-tristate-able buffer (uni-driver)
1763-
INVALID, //Unspecified, usually an error
1758+
MUX = 0, ///< A configurable (buffered) mux (single-driver)
1759+
TRISTATE, ///< A configurable tristate-able buffer (multi-driver)
1760+
PASS_GATE, ///< A configurable pass transistor switch (multi-driver)
1761+
SHORT, ///< A non-configurable electrically shorted connection (multi-driver)
1762+
BUFFER, ///< A non-configurable non-tristate-able buffer (uni-driver)
1763+
INVALID, ///< Unspecified, usually an error
17641764
NUM_SWITCH_TYPES
17651765
};
17661766

vpr/src/route/rr_graph_generation/rr_graph_switch_utils.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11

22
#pragma once
33

4+
/**
5+
* @file
6+
* @brief Utilities for creating and initializing rr_switch structures from architecture switches.
7+
*
8+
* This header defines functions that translate high-level architecture switch
9+
* descriptions (`t_arch_switch_inf`) into detailed rr_switch items used in RR graph.
10+
* These functions:
11+
* - Copy and resolve switch electrical parameters into `t_rr_switch_inf`.
12+
* - Expand architecture switches into fanin-specific rr_switch variants.
13+
* - Provide mappings from (arch_switch, fanin) --> rr_switch index.
14+
*
15+
* They are invoked during RR graph construction to allocate, initialize,
16+
* and remap all switch information.
17+
*/
18+
419
#include <map>
520
#include <vector>
621

vpr/src/route/rr_graph_generation/rr_graph_tile_nodes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void add_classes_rr_graph(RRGraphBuilder& rr_graph_builder,
1212
const std::vector<int>& class_num_vec,
1313
const t_physical_tile_loc& root_loc,
1414
t_physical_tile_type_ptr physical_type) {
15-
auto& mutable_device_ctx = g_vpr_ctx.mutable_device();
15+
DeviceContext& mutable_device_ctx = g_vpr_ctx.mutable_device();
1616

1717
for (int class_num : class_num_vec) {
1818
e_pin_type class_type = get_class_type_from_class_physical_num(physical_type, class_num);
@@ -106,7 +106,7 @@ void connect_src_sink_to_pins(RRGraphBuilder& rr_graph_builder,
106106
bool switches_remapped) {
107107
for (int class_num : class_num_vec) {
108108
const std::vector<int>& pin_list = get_pin_list_from_class_physical_num(physical_type_ptr, class_num);
109-
auto class_type = get_class_type_from_class_physical_num(physical_type_ptr, class_num);
109+
e_pin_type class_type = get_class_type_from_class_physical_num(physical_type_ptr, class_num);
110110
RRNodeId class_rr_node_id = get_class_rr_node_id(rr_graph_builder.node_lookup(), physical_type_ptr, tile_loc, class_num);
111111
VTR_ASSERT(class_rr_node_id != RRNodeId::INVALID());
112112
for (int pin_num : pin_list) {

vpr/src/route/rr_graph_generation/rr_graph_tile_nodes.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11

22
#pragma once
33

4+
/**
5+
* @file
6+
* @brief Functions for creating RR graph nodes for tile classes and pins.
7+
*
8+
* This header declares utilities used during RR graph construction:
9+
* - Adds SOURCE and SINK nodes for within a tile.
10+
* - Adds OPIN and IPIN nodes for physical pins of a tile.
11+
* - Provides connections between source/sinks and pins using delayless switches.
12+
*/
13+
414
#include <vector>
515
#include "physical_types.h"
616
#include "rr_edge.h"
717

818
class RRGraphBuilder;
919

20+
/// @brief Create SOURCE and SINK nodes for each class in a tile and set their properties.
1021
void add_classes_rr_graph(RRGraphBuilder& rr_graph_builder,
1122
const std::vector<int>& class_num_vec,
1223
const t_physical_tile_loc& root_loc,
1324
t_physical_tile_type_ptr physical_type);
1425

26+
/// @brief Create OPIN and IPIN nodes for each pin in a tile and set their properties.
1527
void add_pins_rr_graph(RRGraphBuilder& rr_graph_builder,
1628
const std::vector<int>& pin_num_vec,
1729
const t_physical_tile_loc& root_loc,

0 commit comments

Comments
 (0)