Error-detecting counters have been proposed as parts of fault-tolerant finite state machines that could be implemented in field-programmable gate arrays (FPGAs) and application-specific integrated circuits that perform sequential logic functions. The use of error-detecting counters would complement the fault-tolerant coding schemes described in "Fault-Tolerant Coding for State Machines" (NPO-41050), in this issue on page 55. Counters are often used in state machines in cases in which it is necessary to represent large numbers of states and/or to count clock cycles between certain states. To ensure reliability, it is necessary to ensure that the counters are as free of faults as are the other parts of the state machines.
A primary source of an erroneous count is a single-event upset (SEU — a radiation-induced change in the bit in one flip-flop) in a counter circuit. A counter according to the proposal would be able to detect SEUs, provided that (1) only one SEU occurs during a given count and (2) one SEU induces only one change in a count. The one-SEU condition can be satisfied with high probability if the level of radiation is low enough, and the probability that one SEU would induce multiple count changes is very small.
In one conventional approach, counter circuitry is duplicated to enable detection of an error. That approach entails the use of about twice as much logic circuitry as that of the simple counter. The approach now proposed entails less circuitry.
The basic idea of the proposal is to monitor the count for monotonicity; that is, to determine whether the main counter has counted strictly upward in binary arithmetic in increments of one least-significant bit. Instead of duplicate or triplicate counters, there would be (1) a main counter, (2) a small auxiliary counter, and (3) circuitry that would examine bits in the main and auxiliary counts to determine whether monotonicity has been violated. The verification of monotonicity could involve encoding of counts by several schemes (including, possibly, the coding schemes of the cited prior NASA Tech Briefs article) that are characterized by various degrees of complexity and afford various degrees of fault tolerance. What all these schemes have in common is that (1) detection of an inconsistency between the main and auxiliary counts would be deemed to signify a violation of monotonicity in one of the counts and (2) assuming that at most only one SEU occurred, the inconsistency would remain until completion of the counts.
Assuming that no more than one SEU could occur during a count, it would not be necessary to verify monotonicity on each clock cycle; instead, it would suffice to verify monotonicity only when the count reached critical values (these could be values at which outputs are affected). If the count has not reached a critical value legitimately (if it has skipped or repeated values), then the circuitry for detecting violation of monotonicity would flag the value reached as being in error. Then other parts of the state machine would take the corrective action appropriate for the error.
This work was done by Gary Burke of Caltech for NASA's Jet Propulsion Laboratory.
This Brief includes a Technical Support Package (TSP).

Error-Detecting Counters for FPGA and ASIC State Machines
(reference NPO-43350) is currently available for download from the TSP library.
Don't have an account?
Overview
The document titled "Error-Detecting Counters for FPGA and ASIC State Machines" from NASA's Jet Propulsion Laboratory discusses the importance of reliable counter mechanisms in the context of state machines used in Field Programmable Gate Arrays (FPGAs) and Application-Specific Integrated Circuits (ASICs). It highlights the challenges posed by Single Event Upsets (SEUs), which can cause bit flips in counters, potentially leading to erroneous state transitions and operational failures.
The document explains that counters are often employed alongside state machines to manage sequences of operations, particularly when large delays between states are necessary. While binary counters are efficient due to their straightforward counting mechanism, they lack inherent protection against SEUs. If an SEU occurs, it can disrupt the counting process, either by causing the count to regress or advance incorrectly, which can have serious consequences in critical applications.
To mitigate these risks, the document outlines several protection methods. One approach is to duplicate or triplicate the counter, which allows for error detection and correction but at the cost of increased logic resource usage. A more efficient solution proposed involves checking the monotonicity of the count. This method assumes that only a low number of SEU events will occur and suggests that checks should be performed when the count reaches critical values, ensuring that the count progresses correctly without skipping or repeating values.
Additionally, the document emphasizes the use of Hamming encoding techniques, specifically Hamming 2 (H2) and Hamming 3 (H3), to enhance the reliability of state machines. These encoding methods help in detecting and correcting errors, thereby improving the overall robustness of the system.
The document serves as a technical support package, providing insights into the design and implementation of error-detecting counters in aerospace applications, while also suggesting broader technological and commercial applications. It underscores the significance of developing reliable systems in environments susceptible to radiation-induced errors, ensuring that critical operations can be performed safely and effectively.
In summary, the document presents a comprehensive overview of strategies for enhancing the reliability of counters in FPGA and ASIC state machines, addressing the challenges posed by SEUs and proposing effective solutions to ensure operational integrity.

