Файл: Digital design with CPLD applications and VHDL (R. Dueck, 2000).pdf
ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 13.06.2025
Просмотров: 8164
Скачиваний: 6
9.9 |
• |
Shift Register Counters |
441 |
||||||||||||||||||||||||
0 |
1 |
1 |
1 |
||||||||||||||||||||||||
Q3 |
Q2 |
Q1 |
Q0 |
||||||||||||||||||||||||
D |
Q |
D |
Q |
D |
Q |
D |
Q |
||||||||||||||||||||
Q |
Q |
Q |
Q |
||||||||||||||||||||||||
Clock |
|||||||||||||||||||||||||||
1 |
0 |
1 |
1 |
||||||||||||||||||||||||
D |
Q |
Q3 |
D |
Q |
Q2 |
D |
Q |
Q1 |
D |
Q |
Q0 |
||||||||||||||||
Q |
Q |
Q |
Q |
||||||||||||||||||||||||
Clock |
|||||||||||||||||||||||||||
1 |
1 |
0 |
1 |
||||||||||||||||||||||||
D |
Q |
Q3 |
D |
Q |
Q2 |
D |
Q |
Q1 |
D |
Q |
Q0 |
||||||||||||||||
Q |
Q |
Q |
Q |
||||||||||||||||||||||||
Clock |
|||||||||||||||||||||||||||
1 |
1 |
1 |
0 |
||||||||||||||||||||||||
D |
Q |
Q3 |
D |
Q |
Q2 |
D |
Q |
Q1 |
D |
Q |
Q0 |
||||||||||||||||
Q |
Q |
Q |
Q |
||||||||||||||||||||||||
Clock |
|||||||||||||||||||||||||||
0 |
1 |
1 |
1 |
||||||||||||||||||||||||
D |
Q |
Q3 |
D |
Q |
Q2 |
D |
Q |
Q1 |
D |
Q |
Q0 |
||||||||||||||||
Q |
Q |
Q |
Q |
||||||||||||||||||||||||
Clock
FIGURE 9.79
Circulating a 0 in a Ring Counter
9.9 • Shift Register Counters |
445 |
Table 9.18 Count Sequence of an 8-bit Johnson Counter
Q7Q6Q5Q4Q3Q2Q1Q0
00000000
10000000
11000000
11100000
11110000
11111000
11111100
11111110
11111111
01111111
00111111
00011111
00001111
00000111
00000011
00000001
Note that in the component file (jnsn_ct.vhd), the counter is cleared synchronously by the statement ( q <= (others => ‘0’);). Recall that the clause (others => ‘0’) can be used to set all bits of a signal aggregate to the value ‘0’. This is a simple way to clear a vector of unknown width without using a conversion function.
Table 9.18 shows the count sequence for the 8-bit Johnson counter.
The simulation of the Johnson counter, including one full cycle and a clear, is shown in Figure 9.83.
FIGURE 9.83
Example 9.19
Simulation of an 8-bit Johnson
Counter
Johnson Counter Modulus and Decoding
N O T E
The maximum modulus of a Johnson counter is 2n for a circuit with n flip-flops.
The Johnson counter represents a compromise between binary and ring counters, whose maximum moduli are, respectively, 2n and n for an n-bit counter.