int main (void) { // Sync with the monitor. mk_mon_sync(); // Enable stack checking. start_stack_check(); begin_use(); end_use(); mk_mon_debug_info(0x00444D41);//start of DMA_counters //print the dma_counters according to the following order here mk_mon_debug_info(to_core1); mk_mon_debug_info(to_core2); mk_mon_debug_info(to_core3); mk_mon_debug_info(to_core4); mk_mon_debug_info(to_DDR); mk_mon_debug_info(from_core1); mk_mon_debug_info(from_core2); mk_mon_debug_info(from_core3); mk_mon_debug_info(from_core4); mk_mon_debug_info(from_DDR); mk_mon_debug_info(0xFF444D41);//end of DMA_counters // Signal the monitor we are done. mk_mon_debug_tile_finished(); return 0; }
int main (void) { // Sync with the monitor. mk_mon_sync(); // Enable stack checking. start_stack_check(); /* 2. Benchmarking stuff (to measure usage of communication memory) */ { bench_mark_fill_pattern_to_cmem(); } /* End of Benchmarking stuff before starting decoding */ /* 2. Only benchmark related shared variables, (also includes variables for receiving start and sending stop signal) */ volatile unsigned int *mb3_end = (unsigned int*)(mb3_cmemout0_BASEADDR + mb3_cmemout0_SIZE - 2*sizeof(unsigned int)); volatile unsigned int *mb3_start = (unsigned int*)(mb3_cmemin0_BASEADDR + mb3_cmemin0_SIZE - sizeof(unsigned int)); int num_of_dma = 0; /* End of sync variables */ /* 3. Wait for start signal from MB1 */ *mb3_start = 0; while(*((volatile int*)mb3_start) != 1); /* 4. All code pertaining to jpeg decoder below this line */ { /* Call your application function here */ tile_main(); } /* End of the jpeg decoder function -*"No code pertaining to decoder beyond this line apart from sending end of job flags to MB1 and benchmarking stuff "*- */ /* 5. Signal MB1 that work is finished in MB3 */ *mb3_end = 1; DMA_SEND_BLOCKING((unsigned int*)(mb1_cmemin3_pt_REMOTEADDR + mb1_cmemin3_SIZE - 2*sizeof(unsigned int)), mb3_end, 1, (void *)(mb3_dma1_BASEADDR),DMA_flag); //core 3 finish flag /* 11. Code to compute number of DMA channels used in MB1 */ switch(DMA_flag) { case(0X00) : num_of_dma = 0; break; case(0X0F) : num_of_dma = 1; break; case(0XF0) : num_of_dma = 1; break; case(0XFF) : num_of_dma = 2; break; default: num_of_dma = -1; } /* 6. Benchmarking display code starts here */ mk_mon_error(0XB2, num_of_dma); // Displays the total number of DMA send and receive calls performed in MB3 mk_mon_error(0XB3, bench_mark_measure_cmem_usage()); // Displays the size of communication memory used by MB3 mk_mon_error(0XB4, bench_dyna_mem_size); // Displays the size of dynamic memory used by MB3 mk_mon_debug_tile_finished(); return 0; }
int main (void) { // Sync with the monitor. mk_mon_sync(); // Enable stack checking. start_stack_check(); begin_use(); JpegToBmp(); end_use(); // Signal the monitor we are done. mk_mon_debug_tile_finished(); return 0; }
int main (void) { // Sync with the monitor. mk_mon_sync(); // Enable stack checking. start_stack_check(); jpeg_dec_main(); // Signal the monitor we are done. mk_mon_debug_tile_finished(); return 0; }
int main (void) { // Sync with the monitor. mk_mon_sync(); // Enable stack checking. start_stack_check(); // /* begin_use(); int output = JpegToBmp(); mk_mon_debug_info(output); // Signal the monitor we are done. end_use(); // */ mk_mon_debug_tile_finished(); return 0; }
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; }
int main (void) { // Sync with the monitor. start_stack_check(); paint_stack(); benchmark_cmem_pattern(); mk_mon_sync(); mask_DDR(); begin_use(); JpegToBmp(); end_use(); count_stack(); benchmark_malloc_max_usage(); benchmark_malloc_num_mallocs(); benchmark_malloc_num_malloc_free(); benchmark_cmem_usage(); readback_DDR(); // only need to be put in 1 core print_DDR_usage(); // only need to be put in 1 core mk_mon_debug_info(0x00444D41);//start of DMA_counters //print the dma_counters according to the following order here mk_mon_debug_info(to_core1); mk_mon_debug_info(to_core2); mk_mon_debug_info(to_core3); mk_mon_debug_info(to_core4); mk_mon_debug_info(to_DDR); mk_mon_debug_info(from_core1); mk_mon_debug_info(from_core2); mk_mon_debug_info(from_core3); mk_mon_debug_info(from_core4); mk_mon_debug_info(from_DDR); mk_mon_debug_info(0xFF444D41);//end of DMA_counters // Signal the monitor we are done. mk_mon_debug_tile_finished(); return 0; }