Changeset 708 for soft/giet_vm/applications/coproc/coproc.c
- Timestamp:
- Oct 1, 2015, 4:09:25 PM (9 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/coproc/coproc.c
r707 r708 1 1 /////////////////////////////////////////////////////////////////////////////////////// 2 // file : main.c (for coproc application)2 // file : coproc.c 3 3 // date : avril 2015 4 4 // author : Alain Greiner 5 5 /////////////////////////////////////////////////////////////////////////////////////// 6 6 // This file describes the single thread "coproc" application. 7 // It uses the embedded GCD (Greater Common Divider) coprocessor to make8 // t he GCD computation between two vectors of 32 bits integers.7 // It uses the GCD (Greater Common Divider) hardware coprocessor 8 // to make the GCD computation between two vectors of 32 bits integers. 9 9 // The vectors size is defined by the VECTOR_SIZE parameter. 10 10 /////////////////////////////////////////////////////////////////////////////////////// … … 18 18 #define DMA_MODE MODE_DMA_IRQ 19 19 20 #define VERBOSE120 #define VERBOSE 1 21 21 22 22 // Memory buffers for coprocessor … … 59 59 unsigned int nb_config = (coproc_info>>16) & 0xFF; 60 60 unsigned int nb_status = (coproc_info>>24) & 0xFF; 61 giet_ assert( ((nb_to_coproc == 2) &&62 (nb_from_coproc == 1) &&63 (nb_config == 1) &&64 (nb_status == 0) ) ,65 "wrong GCD coprocessor interface" );61 giet_pthread_assert( ((nb_to_coproc == 2) && 62 (nb_from_coproc == 1) && 63 (nb_config == 1) && 64 (nb_status == 0) ) , 65 "wrong GCD coprocessor interface" ); 66 66 67 if ( VERBOSE ) 67 #if VERBOSE 68 68 giet_tty_printf("\n*** get GCD coprocessor at cycle %d\n", giet_proctime() ); 69 #endif 69 70 70 71 //////////////////////// initializes channel for OPA … … 89 90 giet_coproc_channel_init( 2 , &res_desc ); 90 91 91 if ( VERBOSE ) 92 #if VERBOSE 92 93 giet_tty_printf("\n*** channels initialized at cycle %d\n", giet_proctime() ); 94 #endif 93 95 94 96 /////////////////////// starts communication channels 95 97 giet_coproc_run( 0 ); 96 98 97 if ( VERBOSE ) 99 #if VERBOSE 98 100 giet_tty_printf("\n*** start GCD coprocessor at cycle %d\n", giet_proctime() ); 101 #endif 99 102 100 103 /////////////////////// wait coprocessor completion … … 104 107 } 105 108 106 if ( VERBOSE ) 109 #if VERBOSE 107 110 giet_tty_printf("\n*** GCD computation completed at cycle %d\n", giet_proctime() ); 111 #endif 108 112 109 113 // display result … … 117 121 giet_coproc_release( 0 ); 118 122 119 giet_ exit("completed");123 giet_pthread_exit("completed"); 120 124 121 125 } // end main
Note: See TracChangeset
for help on using the changeset viewer.