Changes between Version 133 and Version 134 of library_stdio


Ignore:
Timestamp:
Nov 25, 2015, 11:11:28 AM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v133 v134  
    132132
    133133
    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]
     134The 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 ) ===
     141This 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.
     142In the current implementation, the thread exit if there is no coprocessor of requested type in cluster[x,y].
     143The supported values for the caprice_type> argument are specified above (and actually defined in the mapping_info.h file).
     144In case of success, it returns the coprocessor characteristics in the <return_info> variable.
     145The <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]
    146146
    147147 === 2) void '''giet_coproc_channel_init'''( unsigned int channel , giet_coproc_channel_t*  desc ) ===
    148 This function initializes a TO_COPROC/FROM_COPROC communication channel. It uses the he following structure (defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file) to specify the channel parameters:
     148This function initializes a TO_COPROC/FROM_COPROC communication channel for the coprocessor allocated to the calling thread. The <channel> argument define the channel index (TO_COPROC channels use the smallest indexes). The <desc argument is a pointer on the structure containing the channel parameters (defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file).
    149149{{{
    150150typedef struct giet_coproc_channel
     
    153153    unsigned int  buffer_size;     // memory buffer size
    154154    unsigned int  buffer_vaddr;    // memory buffer virtual address
    155     unsigned int  mwmr_vaddr;      // MWMR descriptor virtual address
    156     unsigned int  lock_vaddr;      // lock for MWMR virtual address
     155    unsigned int  mwmr_vaddr;      // MWMR descriptor virtual address (for MWMR mode only)
     156    unsigned int  lock_vaddr;      // lock virtual address (for MWMR mode only)
    157157} giet_coproc_channel_t;
    158158}}}
    159  * '''channel''' communication channel index. TO_COPROC channels use the smallest indexes.
    160  * '''desc''' pointer on the giet_coproc_channel_t structure.
    161159
    162160 === 3) void '''giet_coproc_run'''( unsigned int coproc_reg_index ) ===