R
rickman
I typically use down counters that are loaded with an initial value
and output a flag when reaching zero. Sometimes the tools use the
carry chain and other times they don't. I seem to recall that this
was discussed here a few months ago and someone posted a function or
other VHDL code that would produce a carry chain every time. I
typically use a MOD operator for the counter, but the code I saw used
an integer for the count and subtracted one in the conditional of an
IF, then used the same expression in the counter assignment if the
result was not less than zero. It appears that this was optimized to
share the same logic for both expressions.
I can't find this thread. Anyone remember it and some keywords that
would let me find it? There may be something wrong with Google
groups. I search on "counter carry chain" and it finds *NO*
results.
Rick
and output a flag when reaching zero. Sometimes the tools use the
carry chain and other times they don't. I seem to recall that this
was discussed here a few months ago and someone posted a function or
other VHDL code that would produce a carry chain every time. I
typically use a MOD operator for the counter, but the code I saw used
an integer for the count and subtracted one in the conditional of an
IF, then used the same expression in the counter assignment if the
result was not less than zero. It appears that this was optimized to
share the same logic for both expressions.
I can't find this thread. Anyone remember it and some keywords that
would let me find it? There may be something wrong with Google
groups. I search on "counter carry chain" and it finds *NO*
results.
Rick