Skip to content

Commit c8ab8bf

Browse files
mkurc-antacomodi
authored andcommitted
Added reading LUT elements from FPGA interchange
Signed-off-by: Maciej Kurc <[email protected]>
1 parent 4cfd197 commit c8ab8bf

File tree

5 files changed

+326
-89
lines changed

5 files changed

+326
-89
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,20 @@ struct t_lut_bel {
17431743

17441744
std::vector<std::string> input_pins;
17451745
std::string output_pin;
1746+
1747+
bool operator==(const t_lut_bel& other) const {
1748+
return name == other.name && input_pins == other.input_pins && output_pin == other.output_pin;
1749+
}
1750+
};
1751+
1752+
struct t_lut_element {
1753+
std::string site_type;
1754+
int width;
1755+
std::vector<t_lut_bel> lut_bels;
1756+
1757+
bool operator==(const t_lut_element& other) const {
1758+
return site_type == other.site_type && width == other.width && lut_bels == other.lut_bels;
1759+
}
17461760
};
17471761

17481762
/* Detailed routing architecture */
@@ -1795,7 +1809,7 @@ struct t_arch {
17951809

17961810
// Luts
17971811
std::vector<t_lut_cell> lut_cells;
1798-
std::vector<t_lut_bel> lut_bels;
1812+
std::unordered_map<std::string, std::vector<t_lut_element>> lut_elements;
17991813

18001814
//The name of the switch used for the input connection block (i.e. to
18011815
//connect routing tracks to block pins).

0 commit comments

Comments
 (0)