XC3000 | XC4000E | XC4000X | XC5200 | XC9000 | Spartan | SpartanXL | Spartan2 | Virtex |
---|---|---|---|---|---|---|---|---|
Macro | Macro | Macro | Macro | Macro | Macro | Macro | N/A | N/A |
X74_160 is a 4-stage, 4-bit, synchronous, loadable, resettable, cascadable, binary-coded decimal (BCD) counter. The active-Low asynchronous clear (CLR), when Low, overrides all other inputs and resets the data (QD, QC, QB, QA) and ripple carry-out (RCO) outputs Low. When the active-Low load enable input (LOAD) is Low and CLR is High, parallel clock enable (ENP), and trickle clock enable (ENT) are overridden and data on inputs A, B, C, and D are loaded into the counter during the Low-to-High clock transition. The data outputs (QD, QC, QB, QA) increment when ENP, ENT LOAD, and CLR are High during the Low-to-High clock transition. The counter ignores clock transitions when ENP or ENT are Low and LOAD is High. RCO is High when QD, QA, and ENT are High and QC and QB are Low.
Inputs | Outputs | ||||||
---|---|---|---|---|---|---|---|
CLR | LOAD | ENP | ENT | D - A | CK | QD - QA | RCO |
0 | X | X | X | X | X | 0 | 0 |
1 | 0 | X | X | D - A | d - a | RCO | |
1 | 1 | 0 | X | X | X | No Chg | RCO |
1 | 1 | X | 0 | X | X | No Chg | 0 |
1 | 1 | 1 | 1 | X | Inc | RCO | |
RCO = (QD!QC!QBQAENT) d - a = state of referenced input one set-up time prior to active clock transition |
The carry-lookahead design allows cascading of large counters without extra gating. Both ENT and ENP must be High to count. ENT is fed forward to enable RCO, which produces a High output pulse with the approximate duration of the QA output. The following figure illustrates a carry-lookahead design.
The RCO output of the first stage of the ripple carry is connected to the ENP input of the second stage and all subsequent stages. The RCO output of the second stage and all subsequent stages is connected to the ENT input of the next stage. The ENT of the second stage is always enabled/tied to VCC. CE is always connected to the ENT input of the first stage. This cascading method allows the first stage of the ripple carry to be built as a prescaler. In other words, the first stage is built to count very fast.
The counter recovers from any of six possible illegal states and returns to a normal count sequence within two clock cycles.