3 | | Srl API is your gateway to the [wiki:DsxResource "system resources"]. |
| 3 | The Srl API is an abstraction layer that provides the software programmer |
| 4 | an easy acces to several [wiki:DsxResource "communication and synchronisation resources"]. |
| 5 | |
| 6 | Thanks to the Srl (System Ressource Layer) API, the same code can be compiled and executed |
| 7 | on several platforms such as |
| 8 | * a Linux/Posix workstation |
| 9 | * an MP-SoC architecture running the Mutek OS. |
| 10 | |
| 11 | The code of the tasks is supposed to be written in C. |
| 12 | |
| 13 | == Mwmr Communication Channels == |
| 14 | |
| 15 | * {{{srl_mwmr_t channel = GET_ARG(port_name)}}} defines a local variable associated to a MWMR channel acces port. The {{{port_name}}} argument corresponds to the port name defined in the task model defined in the DSX/L description. |
| 16 | |
| 17 | * {{{srl_mwmr_read(channel, local_buffer, size)}}} reads {{{size}}} 32-bit words from the MWMR channel to the local buffer. The {{{local_buffer}}} argument is a {{{void*}}}. The {{{size}}} argument must be a multiple of the channel width. |
| 18 | |
| 19 | * {{{srl_mwmr_write(channel, local_buffer, size)}}} writes {{{size}}} 32-bit words from the local buffer to the MWMR channel. The {{{local_buffer}}} argument is a {{{void*}}}. The {{{size}}} argument must be a multiple of the channel width. |
| 20 | |
| 21 | == Locks == |
| 22 | |
| 23 | * {{{srl_lock_lock( lock )}}} takes a lock, waiting if necessary |
| 24 | * {{{srl_lock_unlock( lock )}}} releases the lock |
| 25 | |
| 26 | == Barriers == |
| 27 | |
| 28 | * {{{srl_barrier_wait( barrier )}}} waits for a barrier-global synchronization |
25 | | == Mwmr Communication Channels == |
26 | | |
27 | | * {{{srl_mwmr_t channel = GET_ARG(port_name)}}} defines a local variable associated to a MWMR channel acces port. The {{{port_name}}} argument corresponds to the port name defined in the task model defined in the DSX description. |
28 | | |
29 | | * {{{srl_mwmr_read(channel, local_buffer, size)}}} reads {{{size}}} 32-bit words from the MWMR channel to the local buffer. The {{{local_buffer}}} argument is a {{{void*}}}. The {{{size}}} argument must be a multiple of the channel width. |
30 | | |
31 | | * {{{srl_mwmr_write(channel, local_buffer, size)}}} writes {{{size}}} 32-bit words from the local buffer to the MWMR channel. The {{{local_buffer}}} argument is a {{{void*}}}. The {{{size}}} argument must be a multiple of the channel width. |
32 | | |
33 | | == Locks == |
34 | | |
35 | | * {{{srl_lock_lock( lock )}}} takes a lock, waiting if necessary |
36 | | * {{{srl_lock_unlock( lock )}}} releases the lock |
37 | | |
38 | | == Barriers == |
39 | | |
40 | | * {{{srl_barrier_wait( barrier )}}} waits for a barrier-global synchronization |
41 | | |