VHDL: Gray Counter



This example describes an 8-bit Gray-code counter design in VHDL. The Gray code outputs differ in only one bit for every two successive values.

Figure 1. Gray counter top-level diagram.

Download the files used in this example:

The use of this design is governed by, and subject to, the terms and conditions of the Intel® Design Example License Agreement.

Table 1. Gray Counter Port Listing

Port Name Type Description
clk Input Clock input
reset Input Reset input
enable Input Enable input
gray_count[7:0] Output 8-bit data output