Changes between Version 134 and Version 135 of library_stdio


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

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v134 v135  
    121121   - In '''MODE_DMA_NO_IRQ''', the ''giet_coproc_run()'' system call returns after coprocessor activation, and the user application must use the blocking ''giet_coproc_completed()'' system call that directly scan the channels registers to detect  completion, report errors, and reset the channels.
    122122
    123 '''WARNING''': For a given coprocessor, all channels must be running in the same mode.
    124 
    125 '''WARNING''' : For all channels, the memory buffer base address and size  must be multiple of the hardware burst size.
    126 
    127123The VCI transactions corresponding to different TO_COPROC / FROM_COPROC channels are interleaved and parallelized on the VCI network.
    128124
    129 Besides the TO_COPROC/FROM_COPROC communication channels, the '''vci_mwmr_dma''' component support up to 16 coprocessor-specific configuration/status registers.
     125Besides the TO_COPROC/FROM_COPROC communication channels, the '''vci_mwmr_dma''' component support up to 16 coprocessor-specific '''configuration''' or '''status''' registers.
    130126 * The '''configuration''' registers are Read and Write.
    131127 * The '''status''' registers are Read only.
     128
     129'''WARNING''': For a given coprocessor, all channels must be running in the same mode.
     130
     131'''WARNING''' : For all channels, the memory buffer base address and size  must be multiple of the hardware burst size.
     132
     133'''WARNING''': All coprocessors must have at least one '''configuration''' register : writing a non zero value in the '''configuration''' register with offset = 0 activates the coprocessor; writing a zero value deactivates the coprocessor.
    132134
    133135
     
    138140||  MWMR_SUTYPE_CPY    ||    Memory Copy                      ||    1                 ||          1               ||        1        ||       0        ||     
    139141
    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).
     142 === 1) void '''giet_coproc_alloc'''( unsigned int cluster_xy , unsigned int   coproc_type , unsigned int* return_info ) ===
     143This function allocates a private coprocessor of type <coproc_type>, located in cluster identified by the <cluster_xy> arguments. It takes the lock granting exclusive ownership to the calling application.
     144In the current implementation, the calling thread exit if there is no coprocessor of requested type in cluster[x,y].
     145The supported values for the <coproc_type> argument are specified above (and actually defined in the mapping_info.h file).
    144146In case of success, it returns the coprocessor characteristics in the <return_info> variable.
    145147The <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]
    146148
    147  === 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 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).
     149 === 2) void '''giet_coproc_release'''( unsigned int cluster_xy , unsigned int coproc_type ) ===
     150 This function releases the lock granting exclusive access to the coprocessor identified by the <cluster_xy> and <coproc_type> arguments, after coprocessor and channels deactivation.
     151
     152 === 3) void '''giet_coproc_channel_init'''( unsigned int cluster_xy , unsigned int coproc_type , unsigned int channel , giet_coproc_channel_t*  desc ) ===
     153This function initializes a TO_COPROC/FROM_COPROC communication channel for the coprocessor identified by the <cluster_xy> and <coproc_type> arguments. 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 ( actually defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file).
    149154{{{
    150155typedef struct giet_coproc_channel
     
    158163}}}
    159164
    160  === 3) void '''giet_coproc_run'''( unsigned int coproc_reg_index ) ===
    161 This function activates all communication channels and the allocated coprocessor itself.
    162  * '''coproc_reg_index''' : coprocessor configuration register index to be written for coprocessor activation.
    163 
    164  === 4) void '''giet_coproc_completed'''( ) ===
    165 This blocking function can be used to synchronize a software thread with an hardware coprocessor running in DMA_NO_IRQ mode.
     165 === 4) void '''giet_coproc_run'''( unsigned int cluster_xy , unsigned int coproc_type ) ===
     166This function activates all communication channels and the allocated coprocessor itself in the cluster identified by the <x,y> arguments.
     167
     168 === 5) void '''giet_coproc_completed'''( unsigned int cluster_xy , unsigned int cluster_xy ) ===
     169This blocking function can be used to synchronize a software thread with an hardware coprocessor identified by the <x,y> arguments, and running in DMA_NO_IRQ mode.
    166170It polls the status register of all communication channels, and returns only when all transfers are completed.
    167171This function exit when at least one channel status register indicates a  bus error (illegal memory access).
    168 
    169  === 5) void '''giet_coproc_release'''( unsigned int coproc_reg_index ) ===
    170  This function releases the coprocessor allocated to the calling thread, after deactivation.
    171  * '''coproc_reg_index''' : coprocessor configuration register index to be written for coprocessor deactivation.
    172172
    173173