Gray Code FIFO Pointers for Non-Power-of-Two Even Counts
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional asynchronous FIFOs face synchronization challenges due to different clock domains, leading to incorrect pointer comparisons, especially with binary code counters, and Gray code solutions break down for non-power-of-two counts, restricting FIFO designs to power-of-two depths which is wasteful in terms of memory size.
Innovation Solution
An even count encoding device using a first circuit to identify a first portion and a second circuit to determine a second portion of entries from a Gray code table, concatenating them to form an output table with a sequence of non-power-of-two even count integers where the difference between adjacent integers is one bit position, enabling efficient cross-clock domain synchronization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If Gray code is used for cross-clock domain synchronization, then synchronization reliability is improved, but the solution breaks down for non-power-of-two counts
Solution Approach 1:
The patent modifies the traditional Gray code sequence by changing the parameters of the coding scheme itself. It uses a modified Gray code sequence that wraps around correctly for non-power-of-two counts while maintaining the single-bit transition property. This is achieved by adjusting the encoding parameters to accommodate arbitrary count values, thereby resolving the contradiction between reliability and adaptability.
Solution Approach 2:
The patent introduces dynamic adjustment mechanisms that allow the Gray code sequence to adapt its behavior based on the actual count value. The modified sequence dynamically handles wrap-around conditions for non-power-of-two counts, enabling the system to maintain synchronization reliability across varying FIFO depths without being restricted to power-of-two values.
2Device complexity
If FIFO depth is restricted to power-of-two values, then Gray code synchronization is simplified, but memory size efficiency deteriorates
Solution Approach 1:
The patent changes the fundamental parameter of FIFO depth from being restricted to power-of-two values to accepting arbitrary values. By modifying the Gray code sequence parameters to handle non-power-of-two counts, the system eliminates the need to round up memory allocation to the next power-of-two, thereby improving memory efficiency without significantly increasing synchronization complexity.
3Ease of manufacture
If conventional binary code counters are used, then counting functionality is simple, but cross-clock domain comparison accuracy deteriorates
Solution Approach 1:
The patent introduces Gray code as an intermediary encoding scheme between the binary counters and the comparison logic. This intermediary representation maintains the simplicity of counter implementation while eliminating the multi-bit transition problem, ensuring that only one bit changes between consecutive counts. This single-bit transition property guarantees accurate cross-clock domain pointer comparison, resolving the contradiction between implementation simplicity and comparison accuracy.
Data Source
AI summary
An apparatus and a method for enhancing digital processing implementation using non-power-of-two even count Gray coding are disclosed. The even count encoding device includes a first circuit, a second circuit, and a coding circuit. The first circuit, in one embodiment, is configured to identify a first portion of entries in a table in response to an input number. The second circuit is capable of determining a second portion of entries in the table in response to the input number, wherein the number of the first portion of entries and the number of the second portion of the entries are substantially the same. The coding circuit is operable to concatenate the second portion of the entries to the first portion of the entries to form an output table, which includes a sequence of even count integers wherein the difference between two adjacent integers is one bit position.


