| 1 | = Resources = |
| 2 | |
| 3 | == Mwmr == |
| 4 | |
| 5 | multi reader fifos |
| 6 | |
| 7 | Special kind of fifos where any number of producers and readers may be "connected". This fifos provides the following features: |
| 8 | * Transfers are done in indivisible blocks of contiguous data |
| 9 | * Read/Write operations are done in packets of one or more blocks |
| 10 | * Blocks may be read/written in between of others, even in one write operation |
| 11 | * Blocks always arrive in order (even if not contiguous because of preceding point) |
| 12 | |
| 13 | [[Image(wiki:MwMr:mwmr.png)]] |
| 14 | |
| 15 | {{{ |
| 16 | fifo1 = Memr("first_fifo", |
| 17 | 4, # Width, in 32-bit words, this is block size |
| 18 | 64) # Depth, in number of blocks |
| 19 | }}} |
| 20 | |
| 21 | == Lock == |
| 22 | |
| 23 | Simple mutex, implemented through [wiki:SpinLock spin locks]. |
| 24 | |
| 25 | {{{ |
| 26 | lock1 = Lock("first_lock") |
| 27 | }}} |
| 28 | |
| 29 | == Barrier == |
| 30 | |
| 31 | Synchronization point between tasks. All tasks connected to a barrier must wait for it before going any further. |
| 32 | |
| 33 | {{{ |
| 34 | barr = Barrier("sync") |
| 35 | }}} |
| 36 | |
| 37 | == Memspace == |
| 38 | |
| 39 | Shared (or not) memory declaration, may be used to have global memory space shared between tasks. |
| 40 | |
| 41 | {{{ |
| 42 | memsp = Memspace("mem_name", 32768) |
| 43 | }}} |
| 44 | |
| 45 | == Const == |
| 46 | |
| 47 | Constant integer values. |
| 48 | |
| 49 | {{{ |
| 50 | cex = Const(1) |
| 51 | }}} |