Changes between Version 64 and Version 65 of library_stdio
- Timestamp:
- Apr 11, 2015, 11:53:19 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_stdio
v64 v65 63 63 The list of currently supported coprocessors and their characteristics are defined below: 64 64 || 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 || 68 68 69 69 === 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 .70 This function allocates a private coprocessor to the calling task, taking a lock to grant exclusive ownership, and register the key in the task context. 71 71 In 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 72 In 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. 75 75 * '''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 77 76 78 77 === 2) void '''giet_coproc_release'''( unsigned int coproc_key ) === 79 78 This function releases the coprocessor allocated to the calling task. 80 * '''c luster_xy''' cluster coordinates81 82 === 3) void '''giet_coproc_channel_init'''( unsigned int c luster_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 ) === 83 82 This 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: 84 83 {{{ … … 92 91 } giet_coproc_channel_t; 93 92 }}} 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 ) === 98 This 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 ) === 102 This 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 ) === 109 106 This 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. 107 It polls the status register of all communication channels, and returns only when all transfers are completed. 108 This function exit when one status register indicates a bus error (illegal memory access). 109 * '''coproc_key''' : coprocessor identifier. 110 126 111 127 112 == __TTY related system calls__ == … … 315 300 This 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(). 316 301 317