Changes between Version 64 and Version 65 of library_stdio


Ignore:
Timestamp:
Apr 11, 2015, 11:53:19 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v64 v65  
    6363The list of currently  supported coprocessors and their characteristics are defined below:
    6464||  coproc_type               ||     Function                             ||nb_to_coproc || nb_from_coproc || nb_config  || nb_status || 
    65 || COPROC_TYPE_GCD ||   Greater Common Divider      ||    2                 ||          1               ||       1         ||       0        ||
    66 || COPROC_TYPE_DCT  ||   Discrete Cosinus Transform ||    1                 ||          1               ||        1        ||        0       ||
    67 || COPROC_TYPE_CPY  ||   Memory Copy                      ||    1                 ||          1               ||        1        ||       0        ||     
     65|| MWR_COPROC_GCD ||   Greater Common Divider      ||    2                 ||          1               ||       1         ||       0        ||
     66|| MWR_COPROC_DCT  ||   Discrete Cosinus Transform ||    1                 ||          1               ||        1        ||        0       ||
     67|| MWR_COPROC_CPY  ||   Memory Copy                      ||    1                 ||          1               ||        1        ||       0        ||     
    6868
    6969 === 1) void '''giet_coproc_alloc'''( unsigned int   coproc_type,  unsigned int*  coproc_key,  unsigned int* coproc_info ) ===
    70 This function allocates a private coprocessor to the calling task, taking a lock to grant exclusive ownership.
     70This function allocates a private coprocessor to the calling task, taking a lock to grant exclusive ownership, and register the key in the task context.
    7171In the current implementation, the task exit if there is no coprocessor of requested type in the same cluster as the calling task.
    72 In case of success, it returns the coprocessor characteristics in the '''coproc_info''' and '''cluster_xy''' variables.
    73  * '''coproc_type''' : see supported types above
    74  * '''coproc_key''' (return value) : identifier for coprocessor access
     72In case of success, it returns an access key and the coprocessor characteristics in the '''coproc_info''' and '''coproc_key''' variables.
     73 * '''coproc_type''' : see supported types above.
     74 * '''coproc_key''' (return value) : identifier for coprocessor access.
    7575 * '''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]
    76 
    7776
    7877 === 2) void '''giet_coproc_release'''( unsigned int  coproc_key ) ===
    7978 This function releases the coprocessor allocated to the calling task.
    80  * '''cluster_xy''' cluster coordinates
    81 
    82  === 3) void '''giet_coproc_channel_init'''( unsigned int  cluster_xy,  unsigned int channel,  giet_coproc_channel_t*  desc ) ===
     79 * '''coproc_key''' : coprocessor identifier.
     80
     81 === 3) void '''giet_coproc_channel_init'''( unsigned int  coproc_key,  unsigned int channel,  giet_coproc_channel_t*  desc ) ===
    8382This function initializes a communication channel. It uses the he following structure (defined in the [source:soft/giet_vm/giet_libs/stdio.h stdio.h] file) to specicy the channel parameters:
    8483{{{
     
    9291} giet_coproc_channel_t;
    9392}}}
    94  * '''cluster_xy''' cluster coordinates
    95  * '''channel''' communication channel index
    96  * '''desc''' pointer on the giet_coproc_channel_t structure
    97 
    98  === 4) void '''giet_coproc_channel_start'''( unsigned int  cluster_xy,  unsigned int    channel ) ===
    99 This function activates one communication channel for coprocessor in cluster_xy.
    100  * '''cluster_xy''' cluster coordinates
    101  * '''channel''' communication channel index
    102 
    103  === 5) void '''giet_coproc_channel_stop'''( unsigned int  cluster_xy,   unsigned int  channel ) ===
    104 This function desactivates one communication channel for coprocessor in cluster_xy.
    105  * '''cluster_xy''' cluster coordinates
    106  * '''channel''' communication channel index
    107 
    108  === 6) void '''giet_coproc_channel_completed'''( unsigned int cluster_xy ,  unsigned int channel  , unsigned int* status ) ===
     93 * '''coproc_key''' : coprocessor identifier.
     94 * '''channel''' communication channel index. TO_COPROC channels use the smallest indexes.
     95 * '''desc''' pointer on the giet_coproc_channel_t structure.
     96
     97 === 4) void '''giet_coproc_start'''( unsigned int  coproc_key ) ===
     98This function activates the communication channels and the allocated coprocessor.
     99 * '''coproc_key''' : coprocessor identifier.
     100
     101 === 5) void '''giet_coproc_stop'''( unsigned int  coproc_key ) ===
     102This function desactivates the communication channels and the allocated coprocessor.
     103 * '''coproc_key''' : coprocessor identifier.
     104
     105 === 6) void '''giet_coproc_completed'''(  unsigned int coproc_key  ) ===
    109106This blocking function can be used to synchronize a software task with an hardware coprocessor running in DMA_NO_IRQ mode.
    110 It polls the status register for a given channel, and returns only when the transfer is completed.
    111 This function exit in case of bus error (illegal memory buffer address) in case of bus error.
    112  * '''cluster_xy''' cluster coordinates.
    113  * '''channel''' communication channel index.
    114 
    115  === 7) void '''giet_coproc_register_set'''( unsigned int cluster_xy ,  unsigned int reg_index ,  unsigned int value ) ===
    116 This function set a new value in a coprocessor specific register.
    117  * '''cluster_xy''' : cluster coordinates.
    118  * '''reg_index''' : register index.
    119  * '''value''' : value to be written.
    120 
    121  === 8) void '''giet_coproc_register_get'''( unsigned int cluster_xy ,  unsigned int reg_index ,  unsigned int* buffer ) ===
    122 This function writes the value contained in a coprocessor specific register into an user buffer.
    123  * '''cluster_xy''' : cluster coordinates.
    124  * '''reg_index''' : register index.
    125  * '''buffer''' : pointer on the user buffer.
     107It polls the status register of all communication channels, and returns only when all transfers are completed.
     108This function exit when one status register indicates a  bus error (illegal memory access).
     109 * '''coproc_key''' : coprocessor identifier.
     110
    126111
    127112 ==  __TTY related system calls__ ==
     
    315300This function takes as input a virtual address (''ptr'' argument), and returns through the ''px,py'' arguments the coordinates of the cluster containing the physical address associated to ''ptr''. In case of error (unmapped virtual address), it makes a giet_exit(). 
    316301
    317