2 Replies Latest reply on Aug 4, 2015 8:54 AM by user_14586677

    Combinational Loop

    user_517963414

      Hello,

         

      during the design process PSoC produced a warning that I created a combinational loop. After searching for this term I understand what it is but not why it is a problem.

         

      I uploaded a project for the specific problem. There are two inputs (resistive pull-down) und two outputs. If one of the inputs goes high, the corresponding output should go high as well, if the other input is low. If one input and therefor one output is high and the second input goes high as well, the output should stay the same.

         

      To break the loop you could add a D-FlipFlop into the loop but I don't understand why this should improve the behavior?

         

      Are there any problems that could occure I currently don't think about?

         

       

         

      Best regards.

        • 1. Re: Combinational Loop
          user_1377889

          When you set up a truth table for your in- and outputs you may see that there are some indeterministic states which could lead to oscillation.

             

          An analys of your equation delivers that there are no oscillating states:

             

          Q = (A & !B) | (A & Q)

             

          A    B    Qn   Qn+1
          0    0    0    0
          0    1    0    0
          1    0    0    1*
          1    1    0    0
          0    0    1    0*
          0    1    1    0*
          1    0    1    1
          1    1    1    1

             

          * indicates change in output Qn+1

             

          Each state with an output change leads to a state with the same output value, so it is stable.

             

           

             

          Bob

          • 2. Re: Combinational Loop
            user_14586677

            I see the feedback condition, odd though does not look latching because of the AND.

               

             

               

            Try a clocked LUT, that would force it to be registered and sampled.

               

             

               

            Regards, Dana.