I am needing to use multiple counters in my design. They are count limited (because I'm counting rows of pixels) and is incremented by an enable (that is tied to a active high signal that is high for the first clock cycle a pixel is available). The only problem in using this is that the first time through the counter is always 1 shorter than the times following. Is there a way to set the binary counter in system generator to start at a different value? I want to tell it to start at my max value that way when it sees the first pixel it will be rolling over back to 1.
The counter block is based on the CoreGen LogiCore Binary Counter core which operates the saem way. The initial value can be set to something other than 0 the reset or rollover value is still 0.
Instead, you can use the load and reset ports to reset the clock at a certain value and immediately load a new value into the counter. I don't think this can occur on one clock cycle with this block. If this is required you may need to build your own counter with an accumulator block and some external logic.