134 | | The list of currently supported coprocessors and their characteristics are defined below: |
135 | | || Name || type || Function || nb_to_coproc || nb_from_coproc || nb_config || nb_status || |
136 | | || GCD || 0 || Greater Common Divider || 2 || 1 || 1 || 0 || |
137 | | || DCT || 1 || Discrete Cosinus Transform || 1 || 1 || 1 || 0 || |
138 | | || CPY || 2 || Memory Copy || 1 || 1 || 1 || 0 || |
139 | | |
140 | | === 1) void '''giet_coproc_alloc'''( unsigned int coproc_type , unsigned int* coproc_info ) === |
141 | | This function allocates a private coprocessor to the calling thread, taking a lock to grant exclusive ownership, and register the coprocessor coordinates in the thread context. |
142 | | In the current implementation, the thread exit if there is no coprocessor of requested type in the same cluster as the calling thread. |
143 | | In case of success, it returns the coprocessor characteristics in the '''coproc_info''' variable. |
144 | | * '''coproc_type''' : see supported types above. |
145 | | * '''coproc_info''' (return value) : nb_to_coprocs = info[7:0] / nb_from_coproc = info[15:8] / nb_config = info[23:16] / nb_status = info[31:24] |
| 134 | The list of currently supported coprocessors and their characteristics are defined below : |
| 135 | || coproc_ type || Function || nb_to_coproc || nb_from_coproc || nb_config || nb_status || |
| 136 | || MWR_SUBTYPE_GCD || Greater Common Divider || 2 || 1 || 1 || 0 || |
| 137 | || MWR_SUBTYPE_DCT || Discrete Cosinus Transform || 1 || 1 || 1 || 0 || |
| 138 | || MWMR_SUTYPE_CPY || Memory Copy || 1 || 1 || 1 || 0 || |
| 139 | |
| 140 | === 1) void '''giet_coproc_alloc'''( unsigned int x , unsigned int y , unsigned int coproc_type , unsigned int* return_info ) === |
| 141 | This function allocates a private coprocessor of type <coproc_type>, from the cluster identified by the <x,y> arguments. It takes the lock granting exclusive ownership, and register the coprocessor coordinates in the calling thread context. |
| 142 | In the current implementation, the thread exit if there is no coprocessor of requested type in cluster[x,y]. |
| 143 | The supported values for the caprice_type> argument are specified above (and actually defined in the mapping_info.h file). |
| 144 | In case of success, it returns the coprocessor characteristics in the <return_info> variable. |
| 145 | The <return_info> is structured in 4 fields : nb_to_coprocs = info[7:0] / nb_from_coproc = info[15:8] / nb_config = info[23:16] / nb_status = info[31:24] |