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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/21/05 12:47
Read: times


 
#99773 - Outlaw coding!
Responding to: ???'s previous message
Erik,

"5) anything timing dependent that is not interrupt based is outlawed. "


In the interests of having provable software, one should minimise interrupts where possible, even eliminate them as they provide asynchronous interruption to the program flow. To fully prove the code, one would need to test having an interrupt occur in each line of code to ensure the response is correct. This is, of course, time consuming. As you will agree, a system with no interrupt source is a lot easier to test than a system with 10 interrupt sources.

In my extensive experience and reading, suggesting that timing must be reliant on interrupts has no base. However, using timer hardware should be encouraged and why discourage a software delay where appropriate?

I was asked earlier this year by a young engineer given the task of doing a code review of code I wrote why I used in some instances NOP(); for some delays and a for loop in another. I explained that one loop of the for loops took quite a few cycles, so when I only wanted to use a couple of cycles for a delay, I used NOP(), for longer delays I used the for loop.

Misra makes no mention of this 'rule'! What standard are you working from that makes this assertion?

DoWhile Jones wrote a compeling article about the (ab)use of interrupts some time ago in circuit Cellar. Therac25 would have benefitted by avoiding interrupts!




List of 57 messages in thread
TopicAuthorDate
defensive coding how and why            01/01/70 00:00      
   What do you mean?            01/01/70 00:00      
      Elegant            01/01/70 00:00      
         Paradox?            01/01/70 00:00      
      clarification            01/01/70 00:00      
         Remember            01/01/70 00:00      
            Absolutely, and even then should be avoi            01/01/70 00:00      
            Absolutely, and even then should be avoi            01/01/70 00:00      
            extrodiaray?            01/01/70 00:00      
                extrodiaray?            01/01/70 00:00      
                  Goooooogle            01/01/70 00:00      
                     No, he does not            01/01/70 00:00      
                        proofreading            01/01/70 00:00      
                     Another challeneg            01/01/70 00:00      
                        another challenge            01/01/70 00:00      
               OK, I can not Spell            01/01/70 00:00      
                  this is my point            01/01/70 00:00      
                     I sure you could, But            01/01/70 00:00      
                        Really?            01/01/70 00:00      
                           professors and classes            01/01/70 00:00      
                           Really !            01/01/70 00:00      
                              Hmmm            01/01/70 00:00      
            defensive commenting            01/01/70 00:00      
         Don't know            01/01/70 00:00      
            Ok, let me get away from that word            01/01/70 00:00      
               Gotcha            01/01/70 00:00      
                  and I came to truly despise that word wh            01/01/70 00:00      
                     Just like driving            01/01/70 00:00      
            Elegant equals...            01/01/70 00:00      
               that it            01/01/70 00:00      
               Oh, how true...!            01/01/70 00:00      
                  It's never the author's problem            01/01/70 00:00      
                     I knew a person who told me about a real            01/01/70 00:00      
                        A blissful existence            01/01/70 00:00      
                  Your bugs versus my bugs (or vice versa)            01/01/70 00:00      
                     common wisdom has it that the average pr            01/01/70 00:00      
   One exception            01/01/70 00:00      
      exceptions            01/01/70 00:00      
         vice versa            01/01/70 00:00      
            what is obvious            01/01/70 00:00      
               your mileage may vary            01/01/70 00:00      
                  that is the very same            01/01/70 00:00      
                     competent            01/01/70 00:00      
                        please define "working"            01/01/70 00:00      
                           competent programming => working program            01/01/70 00:00      
   i'm new            01/01/70 00:00      
      if you move your eyeballs a bit to the l            01/01/70 00:00      
         Coding Bible            01/01/70 00:00      
            Precedence vs. explicitness            01/01/70 00:00      
   Outlaw coding!            01/01/70 00:00      
      a program it is, by definition, asynchro            01/01/70 00:00      
         Methinks the point was missed            01/01/70 00:00      
            "Easy?"            01/01/70 00:00      
            but we agree            01/01/70 00:00      
      VIPER?            01/01/70 00:00      
      What does "timing" mean?            01/01/70 00:00      
         excuse the foreigner, if he was not clea            01/01/70 00:00      

Back to Subject List