void end_use() { measure_end_timer = hw_tifu_systimer_get(); measure_diff_timer = measure_end_timer - measure_begin_timer; if(measure_diff_timer > 68) { measure_diff_timer -= 68; } else { measure_diff_timer = 0; } mk_mon_debug_info(0xBE000007 + mk_get_tile_id()); mk_mon_debug_info(HI_64(measure_diff_timer)); mk_mon_debug_info(LO_64(measure_diff_timer)); }
int main (void) { // Sync with the monitor. mk_mon_sync(); TIME t1,t2,diff; // Enable stack checking. start_stack_check(); clear_frame_buffer(); t1 = hw_tifu_systimer_get(); /*Initalize the C-Heap communication*/ /* FBlock is used as token for communication between Core1 & Core2 */ unsigned int token_size = sizeof(FBlock); /* FIFO can store 6 tokens. */ unsigned int fifo_size = 1; /*Init FiFo*/ cheap_init_fifo(producer, consumer, token_size, fifo_size, (unsigned int)producer_data, (unsigned int) consumer_data, mb1_dma1_BASEADDR, mb1_cmemout1_BASEADDR, mb2_dma1_BASEADDR, mb2_cmemout1_BASEADDR); /* signal to core 2 that the FIFO is initialized and can be read from. */ *fifo_sync_data = 1; hw_dma_send_addr((void *)fifo_sync, (int*)fifo_sync_data, sizeof(int),(void *)mb1_dma1_BASEADDR); jpeg_dec_main(); t2 = hw_tifu_systimer_get(); diff = t2 - t1; mk_mon_debug_info(LO_64(diff)); mk_mon_debug_info(0XFDDE); // Signal the monitor we are done. mk_mon_debug_tile_finished(); return 0; }