Berger code based concurrent online self-testing of embedded processors

We propose an approach to detect the temporary faults induced by an environmental phenomenon called single event upset (SEU). Berger code based self-checking checkers provides an online detection of faults in digital circuits as well as in memory arrays. In this work, a concurrent Berger code based online self- testable architecture is proposed and integrated in 32-bit DLX reduced instruction set computer (RISC) processor on a single silicon chip. The proposed concurrent test methodology is implemented and verified for various arithmetic and logical operations of the DLX processor. The FPGA implementation of the proposed design shows that a meager increase in hardware utilization facilitates online self-testing to detect temporary faults.


Introduction
The transistor miniaturization and integration density in today's VLSI technology is increasing at the rate predicted by Moore's law and even at higher rates.Today's multi-processor system on-chip (MPSoC), network on-chip (NoC) and graphics processing unit (GPU) technologies with high level integration of processing elements/cores are offering either server-based or cloud-based massively parallel processing.These processors play an important role in accelerating the computational speed in massively high data involved applications such as artificial intelligence in automobiles, drones and video surveillances.The SoC technology allows the integration of one or more processing cores (processors), embedded memory IPs and input/output (I/O) peripherals.RISC based processors are the backbones of application specific embedded systems.RISC provides a platform wherein a smallset of instructions are made available for specific tasks so that the execution takes place at much higher speed i.e. even more than millions of instructions per second.
The SoC architectures also include analog and mixed signal interfaces (analog-to-digital and digital-to-analog converters) that provide the interface between analog data acquisition units and digital processors.According to a survey [1] , around 80% circuitry in SoCs is digital but 80% of faults occur in analog circuitry.Though the BIST techniques are basically developed for the detection of faults based on voltagelevel based testing in digital circuits, these techniques are further developed to incorporate parametric testing for self-testing of analog circuits as well.
Due to sub-micron miniaturization and high integration density of transistors, today's ICs are becoming more and more susceptible not only to manufacturing defects but also to the environmental disturbances such as single event upset (SEU).The SEU is a natural phenomenon wherein high energy particles like alpha and beta particles may fall onto the ICs and cause malfunctioning of the system due to the induction of temporary faults [2][3][4][5][6] .These faults are harder to detect during testing because these faults may not occur during test.On-line self-test methodologies available in many literatures are capable of detecting such types of temporary faults without system downtime.
This paper is organized as follows: Section 2 outlines the architecture and instruction format of the DLX RISC processor.The embedded processor testing methodologies are presented in Section 3. The proposed concurrent online selftest methodology is presented in Section 4. Section 5 discusses the experimental work presented in this paper.Finally, the concluding remarks are presented in Section 6.

DLX RISC processor architecture
The DLX is a 32-bit reduced instruction set computer (RISC) developed based on load-store and microprocessors without interleaving pipelining system (MIPS) architecture [7] .The DLX RISC processor is the simplest architecture (as shown in Fig. 1) used for academic purposes and is the basic architecture for commercially available RISC processors.The DLX architecture includes a register set of 32 registers each of size 32-bits wide and a 32-bit program counter (PC).The processor is based on a five-stage pipelining architecture.These pipeline stages are instruction fetch (IF), instruction decode (ID), execute (EX), memory access (MEM) and write back (WB).
During the IF stage, a 32-bit instruction will get fetched from the memory.The PC holds the address of the next instruction to be fetched (i) by incrementing PC by 4 in case of sequential execution and (ii) the branch target address predicted by the branch prediction logic.During the ID stage, the instruction decoder decodes the 32-bit instructions into various fields as given in Table 1 and determines the required operands and branching address.During the EXE stage, the arith-metic logic unit (ALU) performs the arithmetic and logical operations on the operands decoded/provided by the instruction decoder.During the MEM stage, the computed results will be written back to the data memory.The result will be written back into register during the WB stage.The MEM and WB cycles can be performed in a single clock cycle and hence the execution of an instruction can be completed in 4 clock cycles.
The ALU performs 32-bit integer and floating point (single and double precision) arithmetic operations and logical operations.All the instructions in DLX processors are 32bit long and can be divided into the following three classes according to the type of operation: R (register)-type, I (immediate)-type and J (jump)-type.In R-type instructions, three registers (two source registers and one destination) are specified in the instructions.In I-type instructions, one source register and 16-bit immediate operand (sign extended to 32-bit) are used.The J-type instructions consist of 6-bit opcode and 26-bit operand.The destination address is calculated using the 26-bit operand value.Table 1 summarizes the instruction format of the DLX processor.

Overview of embedded processor testing
The digital circuit testing techniques can be broadly classified into external testing and self-testing.The conventional method of testing the manufacturing defects in digital circuits is carried out using automatic test equipment (ATE) hardware.The quality test patterns are generated using algorithm based test pattern generation strategies as available in the related literatures and stored along with their expected responses in the ATE memory.
The hardware based self-testing (also known as built in self-test) of a processor facilitates the generation of test pat-terns using LFSR, application of the test patterns to the processor under test and the analysis of test responses for their functional correctness without the use of any external circuitry.The processor uses its internal resources such as the processor itself, the register file, instruction set, memory and other test support hardware.The major parameters to be considered while selecting the BIST strategy include: hardware overhead, test data generation and application time, performance degradation especially in critical paths in case of high performance devices and power consumption during self-testing.BIST capability is incorporated in a MIPS processor using a linear feedback shift register (LFSR), built-in logic block observer (BILBO) and concurrent BILBO (CBILBO) [8] .Various power saving techniques like weighted LFSR and dual speed LFSR have been presented to reduce the power consumption in the self-testable MIPS processor.The dynamic partial reconfiguration feature of FPGAs shall be utilized for self-testing of processor cores by dynamically reconfiguring the partial bit-files of the functional-mode processor and BIST-oriented processor onto the dynamic region of the FPGA [9] .
The software-based self-testing (SBST) [10][11][12][13][14][15] provides an alternative solution for the above mentioned limitations of hardware based self-testing methodology.In this methodo-  The SBST is based on Instruction Set Architecture (ISA) and the Register Transfer Language (RTL) description of the processor, and the test engineer need not have the complete details of gate-level netlist and structural fault model.The processor executes the test programs at its actual speed and hence the SBST is capable of providing at-speed test solutions unlike to hardware-based BIST.However, the SBST is capable of providing at-speed self-test solutions to the processor for functionality verification both at the manufacturing and/or field level; it cannot substitute the structure based test approaches like BIST and hence can be used to supplement the structural based test approaches to provide a more quality test.
Most of the BIST approaches (either hardware or software based) found in the literature are off-line or non-concurrent test approaches.In these approaches either the functionality of the processor is to be suspended or the processor is to be switched into idle mode during test i.e., the test is not carried out concurrently with its functional operation.In the concurrent on-line self-test approach, which is the main contribution of this paper, both the functional and test operations will be carried out simultaneously.Refs.[16, 17] have presented the implementation of self-checking register file and ALU using Berger code, no literature to the best knowledge of the authors is found in the direction of designing a selfchecking processor.Since the Berger code forms the least redundant on-line unidirectional error detecting code, this paper has proposed a methodology to design a self-testable processor by incorporating a self-checking capability using the Berger code for the DLX RISC processor.

Proposed online self-testable methodology
The major contribution for malfunctioning of digital circuits/systems in the field (while on operation) is due to the temporary (dynamic) faults.These faults may be caused by radiation and other hard environmental conditions.The SEU is the radiation-induced errors in microelectronic circuits that may change the behavior of dynamic circuits as well as memory devices.Since these faults are non-recurrent and harder to detect during a test using off-line BIST, on-line self-test methodologies are capable of detecting the temporary faults and are used to improve the reliability of the system.This paper presents the design of the Berger code based totally self-checking checkers (TSC) to detect both permanent stuck-at faults as well as temporary faults in the DLX RISC processor.Fig. 4 shows the generalized architecture for the proposed self-testable processor.

Totally self-checking checkers using berger code
Among all unidirectional error detecting (AUED) codes, the Berger code forms the least redundant and separable code [18,19] .The Berger code is available with two encoding schemes: B0 and B1.In the B0 encoding scheme of the Berger code used in this work, the check bits represent the binary equivalent of the number of zeros in the information bit sequence, I.In the B1 scheme of encoding, the check bits represent the 1's complement of the number of 1's in I.The number of check bits (k) for the information sequence of length n bits is evaluated using the inequality .The combinational circuit, C1 in Fig. 4 is a combinational circuit that produces the complement of the check bits, which is then fed to the 2-rail checker along with the k-check bits.The two rail-checker produces two complementary outputs f and g in the no fault case otherwise it produces identical values for f and g.

Combinational circuit, C1
A Berger code is said to be a maximal length Berger code has if n = (2 k − 1) otherwise it is a non-maximal length Berger code.The combinational circuit C1 as shown in Fig. 4 produces an output which is the binary equivalent of the number of 1's in the information sequence, I.In order to compute the check bits for the non-maximal length Berger code, we define a number m = I 0 mod (k + 1), where I 0 is the number of 0's in the sequence I.The Berger code check bits are the binary equivalent of m and its length is equal to [log 2 (k + 1)].

Two-rail checker
The two-rail checker as shown in Fig. 5(a), is a 1-out-of-2 code which receives two groups of inputs X = (x 1 , x 2 , …x n ) and Y = (y 1 , y 2 , …y n ) from the functional circuit and produces two outputs f and g that are complementary to each other.As long as y i = (x i ) | is satisfied, the outputs of the two-rail checker will be f = 0 and g = 1.The totally self-checking two-rail checker can be extended for any arbitrary pairs (x i y i and x i + 1 y i + 1 ) of inputs as given in the structure of Fig. 5(b).

Berger code predictions for ALU operations
The ALU is the heart of any processor and performs various arithmetic and logical operations.This section presents the predictions of the Berger code for various ALU operations.Consider two n-bit operands A = (a n , a n-1 , ….  Array Multiplier (Y = AB) The Berger code of the multiplier output

Experimental results and discussions
The Berger code based totally self-checking checker (TSC) logic is incorporated for various arithmetic and logical operations within the RTL description of the DLX RISC processor and simulated using Xilinx Vivado 2017.2.Two versions of the processor (i) standard DLX RISC architecture and (ii) TSC based Self-testable DLX RISC Processor are synthesized and implemented in 7-series Zynq FP-GA (xc7z020clg484-1).The device utilization reports and overall power consumption for the two designs is summarized in Table 2.The last column in the table shows the hardware/power overhead required for the design (2), which can be traded-off with its ability to facilitate on-line concurrent self-testing.

Conclusion
The Berger code provides a unidirectional error detecting capability of detecting single or multi-bit errors in a given information sequence.Berger code prediction for the various arithmetic and logical operations that are carried out by a processor ALU has been summarized in this paper.The Berger code based totally self-checking checker (TSC) combined with a two-rail checker provides a solution for the online detection of SEU induced temporary faults and soft errors.The work presented in this paper has demonstrated the concurrent self-testing capability of the DLX RISC processor.The implementation results obtained in this work    show that the concurrent built-in self-testing capability can be incorporated in the processor design with meager overheads in the hardware (LUTs) and marginally increased power consumption.
a 2 , a 1 ) and B = (b n , b n-1 , …. b 2 , b 1 ).Let A c and B c be the Berger code of A and B respectively.Addition (Y = A + B + c in ) The Berger code of the sum (Y c ) is computed as Y c = A c
where and C i, j are the carry generated by the full adder in the stage of the ith row and the jth column of the m-bit by n-bit array multiplier as shown in Fig.6(m = 4 and n = 4).Logical-AND (Y = A.B)The Berger code of the logical-AND output (Y c ) is computed as Y c = A c + B c − Z c where Z c represents the Berger code of (A|B).Logical-OR (Y = A|B)The Berger code of the logical-OR output (Y c ) is computed as Y c = A c + B c − Z c where Z c represents the Berger code of (A.B).Logical-Inverter (Y =A | ) The Berger code of the logical-Inverter output (Y c ) is computed as Y c = n − A c .Logical-XOR (Y = A^B) The Berger code of the logical-XOR output (Y c ) is computed as Y c = A c + B c − c + n where Z c represents the Berger code of (A.B).
Fig. 7 demonstrates the simulation waveform of the DLX processor.The 32-bit instruction Data_in = 0x04031040 is decoded as opcode = 01 (ADD operation), [R A ] = 0x01, [R B ] = 0x02.The result of the ADD operation is [R D ] = 0x03.Similarly, Data_in = 0x0C062900 is decoded as opcode = 03 (Logical-OR operation), [R A ] = 0x04, [R B ] = 0x05.The result of the logical-OR operation is [R D ] = 0x05.To demonstrate the self-checking capability of the implemented processor, faults are injected in the design during simulation.The Stuck-at 1 (SA1) fault is injected in the c in line by forcing c in = 1, which produced the output result as [R D ] = 0x04 as demonstrated in Fig. 8, instead of [R D ] = 0x03 for the same instruction Data_in = 0x04031040 shown in Fig. 7. Similarly, bit-flip of the 27th bit and the 28th bit of Data_in

Table 1 .
Instruction formats of DLX RISC

Table 2 .
Comparison of device utilization summary.