Changes between Version 11 and Version 12 of library_mwmr
- Timestamp:
- Nov 12, 2014, 10:56:05 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_mwmr
v11 v12 18 18 WARNING (iii) The channel must be declared in a non cacheable segment, if the platform does not provide hardware cache coherence. 19 19 20 == __Initialisation Function__==20 == Initialisation Function == 21 21 22 22 === void '''mwmr_init'''( mwmr_channel_t* mwmr, unsigned int width, unsigned int items ) === … … 27 27 It must be called by one single task. 28 28 29 == __ Blocking Access Functions__==29 == Blocking Access Functions == 30 30 31 31 The ''mwmr_read()'' and ''mwmr_write()'' functions are blocking functions, that return only when the requested transfer is completed. … … 34 34 This function transfer (nitems * width) 32 bits words from a task private buffer to the MWMR channel. 35 35 * '''mwmr''' : MWMR channel virtual base address. 36 * '''buffer''' : virtual base address of local buffer. 36 37 * '''nitems''' : number of items to be transfered. 37 * '''buffer''' : virtual base address of local buffer.38 38 It takes the lock for exclusive access before testing the channel state. If there is not enough space in mwmr channel to write nitems, it writes as many items as possible, releases the lock, and retry after a random delay. 39 39 … … 41 41 This function transfer (nitems * width) 32 bits words from the MWMR channel to a task private buffer. 42 42 * '''mwmr''' : MWMR channel virtual base address. 43 * '''buffer''' : virtual base address of local buffer. 43 44 * '''nitems''' : number of items to be transfered. 44 * '''buffer''' : virtual base address of local buffer.45 45 It takes the lock for exclusive access before testing the channel state. If there is not enough space in mwmr channel to write nitems, it writes as many items as possible, releases the lock, and retry after a random delay. 46 46 47 47 48 == __Non Blocking Access Functions__==48 == Non Blocking Access Functions == 49 49 50 50 The ''nb_mwmr_read()'' and ''nb_mwmr_write()'' functions are non-blocking functions. … … 53 53 This function request to transfer (nitems * width) 32 bits words from a task private buffer tot he MWMR channel. 54 54 * '''mwmr''' : MWMR channel virtual base address. 55 * '''buffer''' : virtual base address of local buffer. 55 56 * '''nitems''' : number of items to be transfered. 56 * '''buffer''' : virtual base address of local buffer.57 57 It takes the lock for exclusive access before testing the channel state. If there is not enough free space in the channel, it transfer as many items as possible, releases the lock, and returns the number of actually transfered items (it can be 0). 58 58 … … 60 60 This function request to transfer (nitems * width) 32 bits words from the MWMR channel to a task private buffer. 61 61 * '''mwmr''' : MWMR channel virtual base address. 62 * '''buffer''' : virtual base address of local buffer. 62 63 * '''nitems''' : number of items to be transfered. 63 * '''buffer''' : virtual base address of local buffer.64 64 It takes the lock for exclusive access before testing the channel state. If there is not enough data in the channel, it transfer as many items as possible, releases the lock, and returns the number of actually transfered items (it can be 0). 65 65