9 Replies Latest reply on Mar 29, 2018 12:07 PM by robin.johnston_2712096

    Is there a way to create a simple up/down counter that rolls over from FFFFFFFF->0?

    robin.johnston_2712096

      I feel as though I am missing something very obvious. I would really like a 32-bit up/down counter with the count "exposed" as a 32 bit bus that rolls over from 32'hFFFFFFFF -> 32'h00000000 and also from 32'h00000000 ->32'hFFFFFFFF.

       

      The closest thing I can find is the BasicCounter Component, but there is no up-down option for this component.

       

      I have tried coding my own in Verilog and it takes a huge amount of P-terms, so I am trying different work-arounds.

       

      I think I can create a custom UDB component that will exhibit the correct rollover behavior, but I don't think I can "expose" the Accumulator as a digital output. Is this assumption correct?

       

      Is there an easy option on the Counter Component that I am missing or misunderstanding?