Skip to content

Commit

Permalink
Reduce printing
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Oct 24, 2023
1 parent 5a73ebf commit 54c3044
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ bool minimise_run(int target_length, bool *failed_by_malloc,
}
}

log_info("before sort %u", routes_count);
log_debug("before sort %u", routes_count);
for (uint i = 0; i < routes_count; i++) {
log_info("%u", routes[i]);
log_debug("%u", routes[i]);
}

sort_routes();
Expand All @@ -364,12 +364,12 @@ bool minimise_run(int target_length, bool *failed_by_malloc,
return false;
}

log_info("after sort %u", routes_count);
log_debug("after sort %u", routes_count);
for (uint i = 0; i < routes_count; i++) {
log_info("%u", routes[i]);
log_debug("%u", routes[i]);
}

log_info("do sort_table by route %u", table_size);
log_debug("do sort_table by route %u", table_size);
tc[T2_LOAD] = 0xFFFFFFFF;
tc[T2_CONTROL] = 0x83;
sort_table();
Expand All @@ -388,14 +388,14 @@ bool minimise_run(int target_length, bool *failed_by_malloc,
while (left <= max_index) {
int right = left;
uint32_t left_route = routing_table_get_entry(left)->route;
log_info("A %u %u %u %u", left, max_index, right, left_route);
log_debug("A %u %u %u %u", left, max_index, right, left_route);
while ((right < table_size - 1) &&
routing_table_get_entry(right+1)->route ==
left_route) {
right++;
}
remaining_index = right + 1;
log_info("compress %u %u", left, right);
log_debug("compress %u %u", left, right);
tc[T2_LOAD] = 0xFFFFFFFF;
tc[T2_CONTROL] = 0x83;
compress_by_route(left, right);
Expand All @@ -417,6 +417,7 @@ bool minimise_run(int target_length, bool *failed_by_malloc,
left = right + 1;
}

log_debug("done %u %u", table_size, write_index);

//for (uint i = 0; i < write_index; i++) {
// entry_t *entry1 = routing_table_get_entry(i);
Expand Down
3 changes: 2 additions & 1 deletion c_common/models/compressors/src/simple/simple_compressor.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ void compress_start(UNUSED uint unused0, UNUSED uint unused1) {

// Free the block of SDRAM used to load the routing table.
log_debug("free sdram blocks which held router tables");
FREE((void *) header);

// set the failed flag and exit
malloc_extras_terminate(EXIT_FAIL);
Expand All @@ -100,7 +101,7 @@ bool standalone(void) {
//! \brief the main entrance.
void c_main(void) {
log_debug("%u bytes of free DTCM", sark_heap_max(sark.heap, 0));
malloc_extras_turn_on_print();
malloc_extras_turn_off_print();

// kick-start the process
spin1_schedule_callback(compress_start, 0, 0, 3);
Expand Down

0 comments on commit 54c3044

Please sign in to comment.