A 3-bit counter whose output steps through the Gray code sequence
000→001→011→010→110→111→101→100→000… advancing when en is high.
Synchronous reset to 000.
| Port | Dir | Width | Meaning |
|---|---|---|---|
| clk, rst, en | in | 1 | clock, sync reset, enable |
| q | out | 3 | Gray-coded count |
Hint: keep a binary counter internally and output bin ^ (bin >> 1) —
or update the Gray value directly if you're feeling brave.
Refresher: the Gray code tool.