Skip to content

Commit 623673b

Browse files
author
amin1377
committed
merge conflict with origin/master
2 parents 2e9425a + c012f19 commit 623673b

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

libs/libarchfpga/src/arch_util.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
611611
copy->num_clock_pins = pb_type->num_clock_pins;
612612
copy->num_input_pins = pb_type->num_input_pins;
613613
copy->num_output_pins = pb_type->num_output_pins;
614+
copy->num_pins = pb_type->num_pins;
614615
copy->num_pb = 1;
615616

616617
/* Power */
@@ -630,6 +631,8 @@ void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
630631
copy->ports[i].name = vtr::strdup(pb_type->ports[i].name);
631632
copy->ports[i].port_class = vtr::strdup(pb_type->ports[i].port_class);
632633
copy->ports[i].port_index_by_type = pb_type->ports[i].port_index_by_type;
634+
copy->ports[i].index = pb_type->ports[i].index;
635+
copy->ports[i].absolute_first_pin_index = pb_type->ports[i].absolute_first_pin_index;
633636

634637
copy->ports[i].port_power = (t_port_power*)vtr::calloc(1,
635638
sizeof(t_port_power));

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3407,9 +3407,9 @@ static void ProcessSubTiles(pugi::xml_node Node,
34073407
SubTile.num_phy_pins = pin_counts.total() * capacity;
34083408

34093409
/* Assign pin counts to the Physical Tile Type */
3410-
PhysicalTileType->num_input_pins += pin_counts.input;
3411-
PhysicalTileType->num_output_pins += pin_counts.output;
3412-
PhysicalTileType->num_clock_pins += pin_counts.clock;
3410+
PhysicalTileType->num_input_pins += capacity * pin_counts.input;
3411+
PhysicalTileType->num_output_pins += capacity * pin_counts.output;
3412+
PhysicalTileType->num_clock_pins += capacity * pin_counts.clock;
34133413
PhysicalTileType->num_pins += capacity * pin_counts.total();
34143414
PhysicalTileType->num_inst_pins += pin_counts.total();
34153415

vpr/src/draw/draw.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ static void initial_setup_NO_PICTURE_to_ROUTING(ezgl::application* app,
442442
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(search_type), "Net Name");
443443
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(search_type),
444444
"RR Node ID");
445+
gtk_combo_box_set_active((GtkComboBox*)search_type, 0); // default set to Block ID which has an index 0
445446

446447
button_for_toggle_nets();
447448
button_for_net_max_fanout();

vpr/src/draw/search_bar.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ void search_and_highlight(GtkWidget* /*widget*/, ezgl::application* app) {
5858

5959
GObject* combo_box = (GObject*)app->get_object("SearchType");
6060
gchar* type = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo_box));
61+
//Checking that a type is selected
62+
if (type && type[0] == '\0') {
63+
warning_dialog_box("Please select a search type");
64+
app->refresh_drawing();
65+
return;
66+
}
67+
6168
std::string search_type(type);
6269

6370
// reset

vpr/src/power/power_callibrate.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ float power_usage_mux_for_callibration(int num_inputs, float transistor_size) {
329329
float* dens;
330330
float* prob;
331331

332-
dens = (float*)vtr::malloc(num_inputs * sizeof(float));
333-
prob = (float*)vtr::malloc(num_inputs * sizeof(float));
332+
dens = new float[num_inputs];
333+
prob = new float[num_inputs];
334334
for (int i = 0; i < num_inputs; i++) {
335335
dens[i] = 2;
336336
prob[i] = 0.5;
@@ -340,8 +340,8 @@ float power_usage_mux_for_callibration(int num_inputs, float transistor_size) {
340340
power_get_mux_arch(num_inputs, transistor_size), prob, dens, 0,
341341
false, power_callib_period);
342342

343-
free(dens);
344-
free(prob);
343+
delete[] dens;
344+
delete[] prob;
345345

346346
return power_sum_usage(&power_usage);
347347
}
@@ -356,7 +356,7 @@ float power_usage_lut_for_callibration(int num_inputs, float transistor_size) {
356356
/* Initialize an SRAM pattern that guarantees the outputs toggle with
357357
* every input toggle.
358358
*/
359-
SRAM_bits = (char*)vtr::malloc(((1 << lut_size) + 1) * sizeof(char));
359+
SRAM_bits = new char[((1 << lut_size) + 1)];
360360
for (int i = 1; i <= lut_size; i++) {
361361
if (i == 1) {
362362
SRAM_bits[0] = '1';
@@ -369,18 +369,18 @@ float power_usage_lut_for_callibration(int num_inputs, float transistor_size) {
369369
SRAM_bits[1 << i] = '\0';
370370
}
371371

372-
dens = (float*)vtr::malloc(lut_size * sizeof(float));
373-
prob = (float*)vtr::malloc(lut_size * sizeof(float));
372+
dens = new float[lut_size];
373+
prob = new float[lut_size];
374374
for (int i = 0; i < lut_size; i++) {
375375
dens[i] = 1;
376376
prob[i] = 0.5;
377377
}
378378
power_usage_lut(&power_usage, lut_size, transistor_size, SRAM_bits, prob,
379379
dens, power_callib_period);
380380

381-
free(SRAM_bits);
382-
free(dens);
383-
free(prob);
381+
delete[] SRAM_bits;
382+
delete[] dens;
383+
delete[] prob;
384384

385385
return power_sum_usage(&power_usage);
386386
}

0 commit comments

Comments
 (0)