/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to NOTES

  • Committer: Suren A. Chilingaryan
  • Date: 2011-12-08 02:47:23 UTC
  • Revision ID: csa@dside.dyndns.org-20111208024723-ym9uf3uoll6ym2a9
new event architecture, first trial

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
                        error should be returned)
158
158
ignore packets:         autoterminate each buffer, depends on engine 
159
159
                        configuration
160
 
autogrow:               automatic memory allocation, only through streaming
 
160
 
 
161
 To handle differnt cases, the value returned by callback function instructs
 
162
the DMA library how long to wait for the next data to appear before timing 
 
163
out. The following variants are possible:
 
164
terminate:              just bail out
 
165
check:                  no timeout, just check if there is data, otherwise 
 
166
                        terminate
 
167
timeout:                standard DMA timeout, normaly used while receiving
 
168
                        fragments of packet: in this case it is expected 
 
169
                        that device has already prepared data and only
 
170
                        the performance of DMA engine limits transfer speed
 
171
wait:                   wait until the data is prepared by the device, this
 
172
                        timeout is specified as argument to the dma_stream
 
173
                        function (standard DMA timeout is used by default)
161
174
 
162
175
                        first |  new_pkt  | bufer 
163
176
                        --------------------------      
164
 
standard                wait  | term      | wait  
165
 
multiple packets        wait  | check     | wait        - DMA_READ_FLAG_MULTIPACKET     
166
 
waiting multipacket     wait  | wait      | wait        - DMA_READ_FLAG_WAIT
167
 
exact                   wait  | wait/term | wait        - limited by size parameter
168
 
ignore packets          wait  | check     | check       - just autoterminated
169
 
autogrow                                                
 
177
standard                wait  | term      | timeout  
 
178
multiple packets        wait  | check     | timeout     - DMA_READ_FLAG_MULTIPACKET     
 
179
waiting multipacket     wait  | wait      | timeout     - DMA_READ_FLAG_WAIT
 
180
exact                   wait  | wait/term | timeout     - limited by size parameter
 
181
ignore packets          wait  | wait/check| wait/check  - just autoterminated
170
182
 
171
183
Shall we do a special handling in case of overflow?
172
184
    
 
185
 
 
186
Buffering
 
187
=========
 
188
 The DMA addresses are limited to 32 bits (~4GB for everything). This means we 
 
189
 can't really use DMA pages are sole buffers. Therefore,
 
190
 1. In streaming mode a second thread will be spawned copying the data from the
 
191
    DMA pages into the allocated buffers. On duration expiration this thread
 
192
    will be stopped but processing will continue until all copyied data is 
 
193
    passed to the callbacks.
 
194
 2. In synchronous mode, a single event will be extracted from the the DMA
 
195
    memory.
 
196
 
 
197
 - Actually, we can make another in-module buffering. But this hopefully can
 
198
 be avoided.
 
199
 
 
200
 
173
201
Register Access Synchronization
174
202
===============================
175
203
 We need to serialize access to the registers by the different running