In all kinds of SCM application system , Whether the memory is normal or not , It is directly related to the normal operation of the system . In order to improve the reliability of the system , It is necessary to test the reliability of the system . Through the test, we can find and solve the problem of system damage caused by memory failure . Focus on selling all kinds of memory chip supplier, Yingshang microelectronics introduces the commonly used MCU system RAM The test method , And in MARCH-G Based on the algorithm, an improved method with low power consumption is proposed . It has low test power consumption , High fault coverage .
RAM The test method
Method 1: A test system is given ram Methods , The method is to check in two steps , Send... To the entire data area successively #00H and #FFH, Then read out the comparison , If it is not the same , It means something is wrong .
Method 2: In the method 1 in , It doesn't completely check out RAM Error of , To proceed RAM A standard algorithm for detection MARCH-G It is analyzed and introduced ,MARCH-G The main test process of the algorithm :
First step , Initialize the memory. All memory units are “0”;
The second step , Read first initialization of each unit in the order of increasing address “0” And write “1” The operation of the value ;
The third step , Read each unit first in descending order “1”, Post write “0”, read “0” The operation of .
MARCH-G The algorithm can provide excellent fault coverage . But it takes a lot of testing time .MARCH-G The algorithm needs to traverse the whole address space 3 Time . Let the address line be n root , be CPU Need for RAM visit 6*2 Time .
Based on Gray code scanning MARCH How to improve
The characteristics of gray code and low power application analysis are given , Gray code as a code, its adjacent two codes have only one bit different , The single hop test sequence composed of gray code can significantly reduce the dynamic power consumption of the circuit under test . Therefore, this paper presents a gray code scanning based MARCH How to improve , The details are as follows :
march-G When the algorithm accesses the memory, the address signal increases or decreases according to the general binary code , For example, the address line has 4 root , The addressing is based on 0000,0001,0010,0011,0100,0101,0110,0111,1000,1001,1010,1011,1100,1101,1111 Increasing or decreasing in reverse order , So it's a linear addressing ; This addressing method does not consider the impact of address sequence on the internal dynamic power consumption of the memory . Here we use gray code instead of binary code as address signal , For example, the address line has 4 root , The addressing is based on 0000,0001,0011,0010,0100,0101,0111,0110,1100,1101,1111,1110,1000,1001,1011,1010 The order of change is positive or negative , In this way, addressing the memory belongs to the non-linear addressing mode , The test process based on Gray code scanning is as follows :
First step , Write all memory units of the memory to... According to the positive order change of gray code address “0”;
The second step , Read each unit according to the change of gray code address in reverse order “0” And write “1” The operation of the value ;
The third step , Read each unit according to the change of gray code address in positive order “1” The operation of . Let the address line be n root , be CPU Need for RAM visit 4*2n Time .
and MARCH-G Compared with this method, the algorithm can provide the same fault coverage , At the same time, the test time required is reduced by a third , When testing RAM The internal dynamic power consumption is reduced 80% about , Therefore, the ratio of MARCH-G The algorithm has more advantages .
This paper introduces the single chip microcomputer system RAM The general method of testing , And in the original MARCH-G Based on the algorithm, an improved gray code scanning algorithm is proposed RAM Fault test method . It has the advantages of short diagnosis time , The test power consumption is low , So it has high application value .