Skip to content

Commit 69e0498

Browse files
committed
equivalent tiles: added documentation to read_arch_xml_arch.cpp
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent b71bed3 commit 69e0498

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ void XmlReadArch(const char *ArchFile, const bool timing_enabled,
302302
Next = get_single_child(architecture, "tiles", loc_data);
303303
ProcessTilesTags(Next, Types, *NumTypes, *arch, arch_def_fc, loc_data);
304304

305-
/* Process directs */
305+
/* Process directs */
306306
Next = get_single_child(architecture, "directlist", loc_data, OPTIONAL);
307307
if (Next) {
308308
ProcessDirects(Next, &(arch->Directs), &(arch->num_directs),
@@ -2816,7 +2816,24 @@ static void ProcessTilesTags(pugi::xml_node Node,
28162816
}
28172817
}
28182818

2819-
/* TODO Add documentation */
2819+
/* Processes the equivalent tiles defined in the XML arch definition
2820+
* <tiles>
2821+
* <tile name="LAB">
2822+
* <mode name="MLAB">
2823+
* <map .../>
2824+
* <map .../>
2825+
* <map .../>
2826+
* </mode>
2827+
* </tile>
2828+
* </tiles>
2829+
*
2830+
* In particular this function parses the `modes` (if they exist) of each tile
2831+
* and adds the equivalent tile information to the t_type_descriptor relative to
2832+
* the current tile.
2833+
* It populates the following t_type_descriptor members:
2834+
* - num_equivalent_tiles;
2835+
* - equivalent_tiles.
2836+
*/
28202837
static void ProcessTileExtraModes(pugi::xml_node Node,
28212838
t_type_descriptor *Type,
28222839
t_type_descriptor **Types,
@@ -2848,7 +2865,11 @@ static void ProcessTileExtraModes(pugi::xml_node Node,
28482865
}
28492866
}
28502867

2851-
/* TODO: Add documentation */
2868+
/* Processes the pin_mapping of each equivalent tile.
2869+
* It goes through each mode and populates the following t_type_descriptor memebrs:
2870+
* - equivalent_tile_pin_mapping;
2871+
* - equivalent_tile_inverse_pin_mapping.
2872+
*/
28522873
static void ProcessTileExtraModePinMapping(pugi::xml_node Node,
28532874
t_type_descriptor *Type,
28542875
t_type_descriptor *EquivalentType,

0 commit comments

Comments
 (0)