Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/27/07 13:28
Read: times


 
#148789 - Beauty contest !
Responding to: ???'s previous message
Tsuneo Chinzei said:
I don't think ring (cyclic) buffer is more beautiful than other buffering methods.


To my knowledge the cyclic buffer is the only one that can easily handle streams of data. If it is designed in the right way the buffering can be done in a way that the interrupts can fill it "concurrently" while the main code is reading it.

Actually the double buffer is just a two slot ring buffer with (usually) more than one byte "word" lenght.

During my career I have designed and implemented a horde of protocols. The cyclic buffer seems to be the one that is flexible enough to be adaptable to almost any protocol.

In protocol engines (state engines) one usually has several layers on top of each other. The architectural beauty is here the fact that the cyclic buffer is an atomic buffer - You can get one byte out of it - or not. Other kind of buffers tend to bring structural complexity to this layer - and that is not a thing I would call beautiful.


List of 34 messages in thread
TopicAuthorDate
Having problem on using interrupt            01/01/70 00:00      
   Answers            01/01/70 00:00      
      not so fast, Cristoph and to Ragu            01/01/70 00:00      
         Serial comm is slow.            01/01/70 00:00      
            if you read the OP            01/01/70 00:00      
               good interupts            01/01/70 00:00      
                  AAAAAARGH            01/01/70 00:00      
                     not AAAAAAAARGH            01/01/70 00:00      
                        OH YES            01/01/70 00:00      
                           do You ever avoid "non-debuggable"?            01/01/70 00:00      
                              always            01/01/70 00:00      
                                 nice            01/01/70 00:00      
                                    a trick for "long ISRs" better than a RTOS            01/01/70 00:00      
         Buffered RX            01/01/70 00:00      
            not much difference            01/01/70 00:00      
               You are right            01/01/70 00:00      
   Sucess with interrupts            01/01/70 00:00      
      Isn't it too short?            01/01/70 00:00      
         the reason for circular buffers            01/01/70 00:00      
            Worst case, instead of average            01/01/70 00:00      
               absolutely, just worst case is not as bad            01/01/70 00:00      
                  single, double and ring buffer            01/01/70 00:00      
                     single, double and ring buffer app dependent            01/01/70 00:00      
         and some more reasons to use (circular) buffers            01/01/70 00:00      
            buffer overflow error            01/01/70 00:00      
               Buffer overflow handling            01/01/70 00:00      
                  Buffering options            01/01/70 00:00      
                     Beauty contest !            01/01/70 00:00      
                        flexible is the best?            01/01/70 00:00      
                        Simplicity is always better            01/01/70 00:00      
                           simple is another word for            01/01/70 00:00      
                              Where is the borderline to stumble on            01/01/70 00:00      
                                 Copper Oxide            01/01/70 00:00      
               please exclude me from the 'we'            01/01/70 00:00      

Back to Subject List