Skip to content

Commit aa76412

Browse files
committed
bug fixed, used to check number of layouts instead of number of layers
1 parent 9cc02c3 commit aa76412

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

libs/libarchfpga/src/echo_arch.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,13 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
232232
}
233233

234234
fprintf(Echo, "\tInput Connect Block Switch Name Within a Same Die: %s\n", arch->ipin_cblock_switch_name[0].c_str());
235+
235236
//if there is more than one layer available, print the connection block switch name that is used for connection between two dice
236-
if (arch->grid_layouts.size() > 1) {
237-
fprintf(Echo, "\tInput Connect Block Switch Name Between Two Dice: %s\n", arch->ipin_cblock_switch_name[1].c_str());
237+
for(const auto& layout : arch->grid_layouts){
238+
int num_layers = (int)layout.layers.size();
239+
if(num_layers > 1){
240+
fprintf(Echo, "\tInput Connect Block Switch Name Between Two Dice: %s\n", arch->ipin_cblock_switch_name[1].c_str());
241+
}
238242
}
239243

240244
fprintf(Echo, "*************************************************\n\n");
@@ -287,9 +291,12 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
287291
fprintf(Echo, "\t\t\t\ttype unidir mux_name for within die connections: %s\n",
288292
arch->Switches[seg.arch_wire_switch].name.c_str());
289293
//if there is more than one layer available, print the segment switch name that is used for connection between two dice
290-
if (arch->grid_layouts.size() > 1) {
291-
fprintf(Echo, "\t\t\t\ttype unidir mux_name for between two dice connections: %s\n",
294+
for(const auto& layout : arch->grid_layouts){
295+
int num_layers = (int)layout.layers.size();
296+
if(num_layers > 1){
297+
fprintf(Echo, "\t\t\t\ttype unidir mux_name for between two dice connections: %s\n",
292298
arch->Switches[seg.arch_opin_between_dice_switch].name.c_str());
299+
}
293300
}
294301
} else { //Should be bidir
295302
fprintf(Echo, "\t\t\t\ttype bidir wire_switch %s arch_opin_switch %s\n",

0 commit comments

Comments
 (0)