【Verilog】Gray Code Counter 格雷码计数器
Gray code counters (having one bit change per counter transition) are often used in FIFO design and digital communication.
Here I will show two styles gray code counter.
Style #1
First style gray code counter uses a single set of flip-flops as the Gray code register with accompanying Gray-tobinary conversion, binary increment, and binary-to-Gray conversion.

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

Style #2
A second Gray code counter style, the one described below, uses two sets of registers, one a binary counter and a second to capture a binary-to-Gray converted value. The intent of this Gray code counter style #2 is to utilize the binary carry structure, simplify the Gray-to-binary conversion; reduce combinational logic, and increase the upper frequency limit of the Gray code counter.

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

Reference:
1.Vijay A. Nebhrajani," Asynchronous FIFO Architectures" part2
2. Clifford E. Cummings, Sunburst Design, Inc " Simulation and Synthesis Techniques for Asynchronous
FIFO Design"
posted on 2009-11-03 11:01 Homography Matrix 阅读(7264) 评论(1) 收藏 举报