1313struct t_metadata_dict ;
1414
1515/* *
16- * @brief Grid location specification
16+ * @brief Grid location specification, used to capture user's intended architecture specification.
17+ * will be later turned into a flattened device grid according to the device's size.
1718 * Each member is a formula evaluated in terms of 'W' (device width),
1819 * and 'H' (device height). Formulas can be evaluated using parse_formula()
1920 * from expr_eval.h.
2021 */
2122struct t_grid_loc_spec {
22- std::string start_expr; // Starting position (inclusive)
23- std::string end_expr; // Ending position (inclusive)
23+ std::string start_expr; // /< Starting position (inclusive)
24+ std::string end_expr; // /< Ending position (inclusive)
2425
25- std::string repeat_expr; // Distance between repeated
26- // region instances
26+ std::string repeat_expr; // /<Distance between repeated region instances
2727
28- std::string incr_expr; // Distance between block instantiations
29- // with the region
28+ std::string incr_expr; // /<Distance between block instantiations with the region
3029};
3130
32- /* Definition of how to place physical logic block in the grid.
33-
34- */
35-
3631/* *
3732 * @brief Definition of how to place physical logic block in the grid.
3833 * @details This defines a region of the grid to be set to a specific type
@@ -69,7 +64,7 @@ struct t_grid_loc_spec {
6964 * <-------------->
7065 * repeatx
7166 *
72- * startx/endx and endx/endy define a rectangular region instances dimensions.
67+ * startx/endx and endx/endy define a rectangular region instance's dimensions.
7368 * The region instance is then repeated every repeatx/repeaty (if specified).
7469 *
7570 * Within a particular region instance a block of block_type is laid down every
@@ -103,29 +98,38 @@ struct t_grid_loc_def {
10398 t_grid_loc_def (std::string block_type_val, int priority_val)
10499 : block_type(std::move(block_type_val))
105100 , priority(priority_val)
106- , x{" 0" , " W-1" , " max(w+1,W)" , " w" } // Fill in x direction, no repeat, incr by block width
107- , y{" 0" , " H-1" , " max(h+1,H)" , " h" } // Fill in y direction, no repeat, incr by block height
101+ , x{" 0" , " W-1" , " max(w+1,W)" , " w" } // Fill in x direction, no repeat, incr by block width
102+ , y{" 0" , " H-1" , " max(h+1,H)" , " h" } // Fill in y direction, no repeat, incr by block height
108103 {}
109104
110- std::string block_type; // The block type name
105+ std::string block_type; // /< The block type name
111106
112- int priority = 0 ; // Priority of the specification.
113- // In case of conflicting specifications
114- // the largest priority wins.
107+ int priority = 0 ; // /< Priority of the specification. In case of conflicting specifications the largest priority wins.
115108
116- t_grid_loc_spec x; // Horizontal location specification
117- t_grid_loc_spec y; // Vertical location specification
109+ t_grid_loc_spec x; // /< Horizontal location specification
110+ t_grid_loc_spec y; // /< Vertical location specification
118111
119- // When 1 metadata tag is split among multiple t_grid_loc_def, one
120- // t_grid_loc_def is arbitrarily chosen to own the metadata, and the other
121- // t_grid_loc_def point to the owned version.
112+ /* *
113+ * @brief When 1 metadata tag is split among multiple t_grid_loc_def, one
114+ * t_grid_loc_def is arbitrarily chosen to own the metadata, and the other
115+ * t_grid_loc_def point to the owned version.
116+ *
117+ */
122118 std::unique_ptr<t_metadata_dict> owned_meta;
123- t_metadata_dict* meta = nullptr ; // Metadata for this location definition. This
124- // metadata may be shared with multiple grid_locs
125- // that come from a common definition.
119+
120+ /* *
121+ * @brief Metadata for this location definition. This
122+ * metadata may be shared with multiple grid_locs
123+ * that come from a common definition.
124+ */
125+ t_metadata_dict* meta = nullptr ;
126126};
127127
128- enum class GridDefType {
128+ /* *
129+ * @brief Enum for specfying if the architecture grid specification is for an auto sized device (variable size)
130+ * or a fixed size device.
131+ */
132+ enum class e_grid_def_type {
129133 AUTO,
130134 FIXED
131135};
0 commit comments