A memory test system and method integrated within a chip
By integrating test modules and test path matrices within the chip, and combining them with JTAG serial and parallel test submodules, the flexibility and scalability issues of on-chip memory testing are resolved, enabling efficient memory testing.
Patent Information
- Application Number
- CN202611037150.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies suffer from insufficient flexibility, poor scalability, high pin resource consumption, and low testing efficiency when testing embedded non-volatile memories within chips.
A memory testing system integrated into a chip is designed, including a test module, a test path matrix, a JTAG serial test submodule and a parallel test submodule, as well as an interface conversion module. Through a parameterized instruction processing unit and a test mode selection signal, flexible test signal routing and conversion are achieved, supporting both JTAG serial and parallel dual test modes.
It has achieved a highly modular and parameterized test system that can adapt to different quantities or types of memory, taking into account both configuration flexibility and high-speed batch testing requirements, and is suitable for memory testing of system-on-a-chip.
Smart Images

Figure CN123178172A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of integrated circuit technology, and in particular to a memory testing system and method integrated inside a chip. Background Technology
[0002] As the integration level of System-on-a-Chip (SoC) continues to increase, embedded non-volatile memories (such as FLASH) and one-time programmable elements (such as FUSE) are often integrated within the chip. These storage elements are typically used to store chip configuration information, security keys, or core firmware, and their correct functionality directly affects the overall performance, reliability, and security of the chip. Therefore, effective, reliable, and cost-effective testing of these critical modules within the chip is essential.
[0003] Traditional testing methods mainly have the following limitations: One approach is to perform testing via boundary scan interfaces such as JTAG. This method utilizes standard test protocols to access the chip's internal registers, enabling a certain degree of test control. However, its data transfer rate is limited, resulting in excessively long testing times and low efficiency when dealing with large-volume read / write tests of large-capacity memories such as FLASH.
[0004] Secondly, a built-in self-test (BIST) approach is adopted. This approach embeds the test logic within the chip, enabling it to autonomously generate test stimuli and analyze responses. However, BIST circuits are typically designed for specific memory types, resulting in significant area overhead. Furthermore, their fixed test algorithms lack flexibility and are difficult to adapt to the diverse testing needs of different application scenarios.
[0005] Third, the memory interface can be accessed directly via dedicated test pins. This approach brings the memory interface signals directly to external chip pins, allowing them to be driven directly by external testing equipment. While this method enables high-speed testing, it requires a significant amount of valuable chip pin resources, increasing packaging costs. Furthermore, these dedicated pins are typically inaccessible after chip packaging, making post-packaging testing difficult.
[0006] Therefore, how to provide a highly integrated, flexible, controllable, easily expandable, and non-overly resource-intensive chip internal memory testing solution has become an urgent problem to be solved in this field. Summary of the Invention
[0007] The purpose of this invention is to provide a memory testing system and method integrated inside a chip, so as to solve the problems of insufficient flexibility, poor scalability, large pin resource occupation and low testing efficiency in the existing technology for testing embedded non-volatile memory inside a chip.
[0008] To address the aforementioned technical problems, this invention provides a memory testing system integrated within a chip, comprising: The test module is integrated inside the chip. The test path matrix consists of multiple data selection units and is connected between the test module, multiple external pins of the chip, and at least one non-volatile memory interface inside the chip. The test module includes at least one JTAG serial test submodule and / or at least one parallel test submodule, as well as an interface conversion module; The interface conversion module is used to convert signals from the JTAG serial test submodule and / or the parallel test submodule into test stimulus signals that conform to the target non-volatile memory interface specification. The test path matrix is configured to, in response to a test mode selection signal, route the test signals generated by the test module to designated external pins and the non-volatile memory interface in test mode, and route the signals of the original functional modules inside the chip to the corresponding external pins and memory interface in normal operation mode; wherein... The test mode selection signal is an externally input test mode enable signal; the selection terminal of each data selection unit in the test path matrix is connected to the selection signal output by the interface conversion module.
[0009] In one implementation, the JTAG serial test submodule and / or the parallel test submodule include multiple parameterized instruction processing units; Each parameterized instruction processing unit has preset parameter values that are different from those of other parameterized instruction processing units, and is configured to match input data with its own preset parameter values, and when a match is successful, parse the input data and output the corresponding test signal.
[0010] In one embodiment, the parameterization instruction processing unit includes: The shift / latch unit is used to shift or latch the input data to form the data to be matched. The instruction matching unit is used to compare the data to be matched with the preset parameter value to determine whether they match. The signal output unit is used to parse and latch the corresponding single-type test signal from the input data during matching determination; wherein, The single type of test signal is one of the following: clock signal, read / write control signal, address signal, write data signal, and read data signal.
[0011] In one implementation, when the parameterized instruction processing unit is applied to the JTAG serial test submodule, the shift / latch unit is a shift unit used to shift the serially input bit stream into multi-bit parallel data as the data to be matched. When the parameterized instruction processing unit is applied to the parallel test submodule, the shift / latch unit is a latch unit used to directly latch the instruction address of the parallel input as the data to be matched.
[0012] In one embodiment, the JTAG serial test submodule further includes a graphics code decoding unit; The graphic code decoding unit is configured to: shift and latch the identification code sequence input from the JTAG serial interface, perform an equality comparison between the latched identification code sequence and a preset identification graphic code, and output an enable signal to activate the JTAG serial test submodule and enable it to enter the command receiving state when the comparison result is consistent.
[0013] In one embodiment, the test module further includes a reset processing unit, which includes cascaded triggers for asynchronously setting and synchronously releasing the input asynchronous reset signal, and outputting a synchronous reset signal to the JTAG serial test submodule and / or the parallel test submodule.
[0014] In one embodiment, the interface conversion module includes a clock management unit configured to select an external auxiliary clock or a clock signal contained within the test instruction as the test clock according to the test instruction, and provide it to the target non-volatile memory.
[0015] In one implementation, the system supports at least one of the following test modes: In the first mode, only the JTAG serial test submodule is enabled to test at least one non-volatile memory; In the second mode, at least one of the parallel test submodules is enabled to independently test a corresponding non-volatile memory. The third mode simultaneously enables at least two of the aforementioned parallel test submodules to perform parallel testing on the corresponding at least two non-volatile memories.
[0016] The present invention also provides a memory testing method, applied to the above-mentioned memory testing system, comprising the following steps: Activate the test mode to switch the external pins to the test signal path connected to the test module via the test path matrix; Depending on the testing requirements, the JTAG serial test submodule and / or the parallel test submodule may be selectively activated. The activated test submodule uses a parameterized instruction processing unit with preset parameter values to match the input instructions. When any parameterized instruction processing unit matches the corresponding instruction, the parameterized instruction processing unit parses the subsequent input data and outputs the corresponding memory excitation signal; After the memory excitation signal is converted into a signal that conforms to the target memory interface specification by the interface conversion module, the test operation is performed and the returned data is read. When the JTAG serial test submodule is selected to be activated, the method further includes: The identification code sequence input from the JTAG serial interface is verified by an equality comparison using a graphic code decoding unit. Only after successful verification should the JTAG serial test submodule be put into an instruction-receiving state before sending test instructions.
[0017] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the memory testing method described above.
[0018] This invention provides a memory testing system and method integrated within a chip. Through a highly modular and parameterized decoding unit design, the testing system is easily expandable to adapt to different numbers or types of memories. It also supports JTAG serial and parallel dual testing modes, taking into account both configuration flexibility and high-speed batch testing requirements. It is suitable for system-on-chip testing containing one or more types of non-volatile memories. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the integration of an integrated FLASH and FUSE test module in a chip, as provided in an embodiment of the present invention.
[0020] Figure 2 yes Figure 1 Detailed block diagram of the serial test module.
[0021] Figure 3 yes Figure 2 The state transition diagram of the main state machine of the serial test module.
[0022] Figure 4 yes Figure 2 The state transition diagram of the serial test module.
[0023] Figure 5 This is a flowchart illustrating the operation of the serial test module performing FUSE testing in an embodiment of the present invention.
[0024] Figure 6This is a flowchart illustrating the operation of the serial test module performing FLASH testing in an embodiment of the present invention.
[0025] Figure 7 This is a timing diagram of the JTAG port of the serial test module in this embodiment of the invention.
[0026] Figure 8 yes Figure 1 Detailed block diagram of the parallel testing module.
[0027] Figure 9 This is a flowchart illustrating the operation of the parallel testing module performing FLASH testing in an embodiment of the present invention.
[0028] Figure 10 This is a timing diagram of a custom parallel port of the parallel test module in an embodiment of the present invention.
[0029] Figure 11 yes Figure 1 Detailed structural block diagram of the interface conversion module.
[0030] Figure 12 This is a diagram illustrating the working status of the FLASH and FUSE test modules under different test modes in this embodiment of the invention, specifically the serial test module and the parallel test module. Detailed Implementation
[0031] The following detailed description, in conjunction with the accompanying drawings and specific embodiments, provides a further detailed account of the memory testing system and method integrated within a chip proposed in this invention. The advantages and features of this invention will become clearer from the following description. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of this invention.
[0032] like Figure 1 As shown, in this embodiment, the FLASH and FUSE test modules are integrated inside the chip under test. This test module is denoted as S100, and it is connected to the external pins of the chip and the internal functional modules of the chip through a test path matrix composed of multiple data selectors, and is used to establish test signal paths in the test state.
[0033] In this embodiment, the test path matrix is composed of data selectors S105 to S110. Each data selector switches the corresponding signal path between the test mode and the normal operation mode. The selection control is completed by the SEL signal output by the test module S100.
[0034] The data selector S105 is configured to correspond to the GPIO pin. In test mode, the data selector S105 connects the JTAG interface signal from the test module S100 to the GPIO pin; in normal operation mode, it connects the signal output from the chip's internal functional module to the GPIO. Specifically, the "1" terminal of the data selector S105 is connected to the JTAG interface signal of the test module S100, the "0" terminal is connected to the signal output from the chip's internal functional module to the GPIO, and its selection terminal is connected to the SEL signal. When SEL is high, the GPIO is connected to the JTAG interface signal of the test module S100; when SEL is low, the GPIO is connected to the chip's internal functional signal.
[0035] The data selector S106 is also used for switching the function of GPIO pins. In test mode, it connects the parallel interface 1 signal of the test module S100 to the GPIO. In normal operation mode, it connects the signal output from the original functional module inside the chip to the GPIO. The "1" terminal of the data selector S106 is connected to the parallel interface 1 signal, and the "0" terminal is connected to the original functional signal inside the chip. Its selection terminal is also connected to the SEL signal. As the SEL signal level changes, the GPIO switches between the two types of signals.
[0036] The configuration of data selector S107 is similar to that of S106, corresponding to the parallel interface 2 signal of test module S100. In test mode, GPIO is connected to the parallel interface 2 signal; in normal operation mode, GPIO is connected to the output signal of the chip's internal functional module. The "1", "0", and select terminals of data selector S107 are connected to the parallel interface 2 signal, the chip's internal functional signal, and the SEL signal, respectively.
[0037] Data selector S108 is configured in the FUSE interface path. In this embodiment, data selector S108 connects the FUSE interface signal of test module S100 to the FUSE in test mode, and connects the original internal output signal of the chip to the FUSE in normal operation mode. The "1" terminal of data selector S108 is connected to the FUSE interface signal of test module S100, the "0" terminal is connected to the original internal FUSE output signal of the chip, and the selection terminal is connected to the SEL signal.
[0038] Data selector S109 is located in the FLASH1 interface path. In test mode, the FLASH1 interface is connected to the FLASH1 interface signal of test module S100; in normal operation mode, the FLASH1 interface is connected to the original output signal to FLASH1 inside the chip. The "1" terminal of data selector S109 is connected to the FLASH1 interface signal of test module S100, and the "0" terminal is connected to the original FLASH1 output signal inside the chip. Its selection terminal is also controlled by the SEL signal.
[0039] Data selector S110 is located in the FLASH2 interface path, and its operation is the same as that of data selector S109. In test mode, the FLASH2 interface is connected to the FLASH2 interface signal of test module S100; in normal operation mode, the FLASH2 interface is connected to the signal originally output to FLASH2 inside the chip. The "1" terminal of data selector S110 is connected to the FLASH2 interface signal of test module S100, the "0" terminal is connected to the original FLASH2 output signal inside the chip, and its selection terminal is connected to the SEL signal.
[0040] With the cooperation of the data selectors S105 to S110, in this embodiment, the signal paths of related interfaces such as GPIO, FUSE, FLASH1 and FLASH2 can be switched between the test mode and the normal operation mode, so as to realize the test module S100 to test the FLASH and FUSE without changing the original functional structure inside the chip.
[0041] In this embodiment, the test module S100 is set as the core unit of the chip's internal test logic, establishing test signal paths with external test equipment and the chip's internal FLASH and FUSE interfaces. Figure 1 As shown, the test module S100 includes a serial test module S101, a parallel test module S102, a parallel test module S103, and an interface conversion module S104. Each module works together in the test mode.
[0042] The serial test module S101 is connected to external test equipment via a standard JTAG interface, which includes TCK, TMS, TDI, TDO, and TRST signals. In this embodiment, the serial test module S101 performs shifting, latching, and decoding processing on the serial bit stream input by TDI, generates corresponding control and data signals based on the decoding results, and outputs them to the interface conversion module S104. Specifically, the serial test module S101 outputs the following signals to the interface conversion module S104: FUSE address signal o_fuse_s1_reg[11:0], FUSE control signal o_fuse_s2_reg[3:0], FLASH clock source selection signal o_fsexe_reg[7:0], FLASH address signal o_fsadr_reg[21:0], FLASH write data o_fsdout_reg[143:0], FLASH control signal o_fsconf_reg[14:0], FLASH block selection signal o_msl_reg[7:0], master state machine status signal next_state[5:0], and module reset signal synchronization signal TRST_syn. Simultaneously, the serial test module S101 also receives FUSE return data i_fuse_dout[7:0] and FLASH return data i_fsdout[143:0] from the interface conversion module S104, and outputs the corresponding return data to the external test device via the TDO signal. When executing instructions related to reading FUSE return data or FLASH return data, the serial test module S101 further generates the TDO output enable signal TDO_en.
[0043] The parallel test module S102 communicates with external test equipment through parallel interface 1, which includes CLK_L, CSB_L, RW_L, ADSL_L, FLD_L[7:0], and RDREG_L[7:0] signals, and implements module reset control through the FLT_ENn signal. In this embodiment, the parallel test module S102 decodes the parallel instructions received from FLD_L[7:0], generates corresponding FLASH control and data signals based on the decoding results, and outputs them to the interface conversion module S104. The specific output signals include the FLASH clock source selection signal l_o_fexe_reg[7:0], the FLASH address signals l_o_fadr_reg0[7:0] and l_o_fadr_reg1[7:0], the FLASH write data l_o_fdin[143:0], and the FLASH control signals l_o_frd_reg[7:0], l_o_fconf_reg[7:0], l_o_fpe_reg[7:0], and l_o_fss_reg[7:0]. Simultaneously, the parallel test module S102 outputs the FLASH data l_fdout[143:0] returned by the interface conversion module S104 to the external test device via RDREG_L[7:0]. In this parallel interface, CSB_L is a data valid indicator signal, which indicates that the input data is valid when it is low; RW_L is a read / write control signal, which indicates a write operation when it is low and a read operation when it is high; ADSL_L is used to distinguish between address and data, which indicates that the current input is address information when it is low and that the current input is data content when it is high.
[0044] The parallel test module S103 communicates with external test equipment through parallel interface 2. Its interface signals include CLK_R, CSB_R, RW_R, ADSL_R, FLD_R[7:0] and RDREG_R[7:0], and the module reset control is implemented through the FLT_ENn signal. After decoding the instructions received from FLD_R[7:0], the parallel test module S103 outputs the FLASH clock source selection signal r_o_fexe_reg[7:0], FLASH address signals r_o_fadr_reg0[7:0] and r_o_fadr_reg1[7:0], FLASH write data r_o_fdin[143:0], and FLASH control signals r_o_frd_reg[7:0], r_o_fconf_reg[7:0], r_o_fpe_reg[7:0] and r_o_fss_reg[7:0] to the interface conversion module S104. Meanwhile, the parallel test module S103 outputs the FLASH data r_fdout[143:0] returned by the interface conversion module S104 to the external test device through RDREG_R[7:0]. In this parallel interface, CSBR is used to indicate data validity; a low level indicates that the input data is valid. RWR is a read / write control signal; a low level indicates a write operation, and a high level indicates a read operation. ADSLR is an address and data indication signal; a low level indicates that the current input is address information, and a high level indicates that the current input is data content.
[0045] In this embodiment, the interface conversion module S104 is used to uniformly receive and process control signals and data signals from the serial test module S101, parallel test module S102, and parallel test module S103. It also receives the test mode enable signal FLT_ENn and the auxiliary clock signal CLK_AUX from GPIO. Based on different test sources and control signals, the interface conversion module S104 converts the received signals into signal formats conforming to the FLASH and FUSE physical layer interface specifications, and routes the converted signals to the corresponding FLASH1, FLASH2, or FUSE interface. Simultaneously, the interface conversion module S104 also generates selection signals SEL for controlling data selectors S105-S110, and an enable signal SFLAG for indicating the serial test mode, to cooperate with the test path matrix to complete signal switching and routing under test modes.
[0046] In this embodiment, the detailed internal structure of the serial test module S101 is as follows: Figure 2As shown, it is used to parse and process the serial bit stream input via the JTAG interface in test mode. The serial test module S101 includes a reset processing unit S200, a master state machine S201, an identification code shifting unit S202, a slave state machine S203, an instruction bit counting unit S204, an instruction shifting unit S205, an FSDIN instruction processing unit S206, an FSCONF instruction processing unit S207, an FSADR instruction processing unit S208, an FSEXE instruction processing unit S209, an MSL instruction processing unit S210, a FUSE_S1 instruction processing unit S211, a FUSE_S2 instruction processing unit S212, an FSDOUT instruction processing unit S213, a FUSE_S3 instruction processing unit S214, an output enable unit S215, and an instruction output data selector S216. Each unit works collaboratively according to a predetermined timing and state relationship during the serial test.
[0047] The structure of the reset processing unit S200 is as follows: Figure 2 The block diagram S220 is shown. In this embodiment, the reset processing unit S200 consists of an inverter and two cascaded flip-flops. The inverter inverts the input reset signal TRST and connects the inverted signal to the low-active reset terminals of the two flip-flops respectively. The input terminal D of the first-stage flip-flop is fixed at a high level, and its output terminal Q is connected to the input terminal D of the second-stage flip-flop; the output terminal Q of the second-stage flip-flop outputs the synchronous reset signal TRST_syn. The clock terminals of both flip-flops are connected to TCK. Through this structure, asynchronous setting and synchronous release of the reset signal are achieved in this embodiment, thereby avoiding the metastability problems that may be introduced when the reset signal directly acts on the sequential logic, and ensuring the stability of the module state.
[0048] The master state machine S201 is used to perform overall parsing of the serial input bit stream and control the test enable process. Its state transition relationships are as follows: Figure 3 As shown. In this embodiment, the main state machine S201 is initialized to the TEST_RESET state after power-on or reset; when a high level is detected in TMS, the state transitions to the IDLE state; subsequently, when a low level is detected in TMS, it enters the CK state. In the CK state, the main state machine S201 compares the parallel data en_reg[79:0] provided by the identification code shifting unit S202. When it is completely consistent with the preset graphic code SP_FT_EN, the identification is determined to be successful, and the state transitions to the OK state. In the absence of a system reset, the main state machine S201 remains in the OK state. Figure 2 As shown, the current state of the master state machine S201 is indicated by the signal next_state[5:0].
[0049] The identification code shifting unit S202 operates while the main state machine S201 is in the CK state. In this embodiment, under the control of the clock signal TCK, the identification code shifting unit S202 sequentially shifts the serial input bit stream from TDI to the left and latches it to form parallel data en_reg[79:0], and provides this parallel data to the main state machine S201 for identification code matching judgment.
[0050] Slave state machine S203 begins operation after master state machine S201 has entered the OK state, and is used to parse subsequent input instructions and their corresponding content. The state transition relationships of slave state machine S203 are as follows: Figure 4 As shown. In this embodiment, the slave state machine S203 is initialized to the INS_RST state after power-on or reset; when the master state machine S201 is detected to be in the OK state and TMS is high, it transitions to the INS_CAP state; subsequently, when TMS is low, it enters the INS_UP state and begins to receive instructions in the input bit stream and the instruction content that follows. When the count value cnt[2:0] of the instruction bit counting unit S204 reaches a predetermined value (e.g., 5), it indicates that an instruction has been received, and the slave state machine S203 transitions to the INS_OK state. During the INS_OK state, the received serial bit stream is regarded as the instruction content of the current instruction; when TMS is detected to be high again, it indicates that the instruction content transmission is over, and the slave state machine S203 returns to the INS_RST state. Figure 2 As shown, the state of state machine S203 is indicated by the signal next_state_in[5:0].
[0051] The instruction bit counting unit S204 works in conjunction with the slave state machine S203. In this embodiment, the instruction bit counting unit S204 clears its count when the slave state machine S203 is in the INS_RST state, and starts counting the number of received instruction bits during the INS_UP state. Its count value cnt[2:0] represents the number of instruction bits currently received, and the count result is provided to the slave state machine S203 for state judgment.
[0052] The instruction shift unit S205 operates when the slave state machine S203 is in the INS_UP state. Under the control of the clock signal TCK, it performs left shift processing on the serial bit stream input by TDI to form a parallel instruction signal ins[4:0], and keeps the parallel instruction signal unchanged after the slave state machine S203 enters the INS_OK state.
[0053] In this embodiment, the FSDIN instruction processing unit S206, FSCONF instruction processing unit S207, FSADR instruction processing unit S208, FSEXE instruction processing unit S209, MSL instruction processing unit S210, FUSE_S1 instruction processing unit S211, and FUSE_S2 instruction processing unit S212 all employ the following... Figure 2 The same structure is shown in block diagram S218. This structure includes a left shift unit, multiple data selectors, a check unit, and two-stage flip-flops. Under the control of clock TCK, the left shift unit performs left shift processing on the serial bit stream input by TDI, generating parallel data and sending it to the data selector; the data selector controls the shift result to be latched when the corresponding instruction is satisfied and the state is INS_OK, based on the parallel instruction signal ins[4:0] and the state next_state_in[5:0] of state machine S203; the check unit controls the synchronous output of parallel data when the instruction is completed and enters the INS_RESET state. With this structure, in this embodiment, each instruction processing unit can shift and latch the instruction content as parallel data when the corresponding instruction is valid, and can output a stable instruction content signal to the interface conversion module after the instruction content is received.
[0054] The structure of the FSDOUT instruction processing unit S213 is as follows: Figure 2 The block diagram S218 is shown. In this embodiment, when the slave state machine S203 is in the INS_UP state, the FSDOUT instruction processing unit S213 latches the FLASH return data i_fsdout[143:0] into the internal flip-flop and outputs it as fsdout_reg[143:0]. When the parallel instruction signal ins[4:0] indicates the FSDOUT instruction, fsdout_reg[143:0] is sent to the left shift unit and shifted left sequentially under the control of the clock TCK. During the period when the slave state machine S203 is in the INS_OK state, the FLASH return data is shifted out sequentially.
[0055] The structure of the FUSE_S3 instruction processing unit S214 is as follows: Figure 2 The block diagram S219 is shown. In this embodiment, when the slave state machine S203 is in the INS_UP state, the return data i_fuse_dout[7:0] of FUSE is latched as fuse_s3_reg[7:0]; when the parallel instruction signal ins[4:0] is FUSE_S3, the parallel data is sent to the left shift unit and shifted left bit by bit under the control of the clock TCK, and shifted out sequentially during the period when the slave state machine S203 is in the INS_OK state.
[0056] The output enable unit S215 is used to generate the pin enable signal TDO_en for TDO. In this embodiment, the output enable unit S215 receives the state signal next_state_in[5:0], the clock signal TCK, and the synchronization reset signal TRST_syn from the slave state machine S203. When the slave state machine S203 is in the INS_OK state, the output TDO_en is high.
[0057] The selection signal of the instruction output data selector S216 is the parallel instruction signal ins[4:0]. Its input terminals are connected to the highest bit of the output signal of each instruction processing unit, including fsdin_reg
[143] , fsconf_reg
[14] , fsadr_reg
[21] , fuse_s1_reg
[11] , fuse_s2_reg[3], fsexe_reg[7], msl_reg[7], fsdout_reg
[143] , and fuse_s3_reg[7]. When the parallel instruction signal ins[4:0] indicates the corresponding instruction, the highest bit of the corresponding signal is routed to the next stage flip-flop and output to TDO on the falling edge of the clock.
[0058] Figure 7 The diagram illustrates the JTAG timing relationship of the serial test module S101 and the state changes of the master state machine S201 (labeled FSM1 in the diagram) and the slave state machine S203 (labeled FSM2 in the diagram). During time period T1, the reset signal TRSTB is low, and the relevant JTAG signals are in a state that has no effect on the test. At this time, FSM1 is in the TEST_RESET state, and FSM2 is in the INS_RST state. During time period T2, the reset is released, and FSM1 transitions to the IDLE state. During time period T3, the identification code is input via TDI, and FSM1 enters the CK state. During time period T4, the identification code transmission ends, and FSM1 transitions to the OK state, while FSM2 transitions to the INS_CAP state. During time periods T5 and T6, instructions and their contents are sent sequentially, and FSM2 enters the INS_UP and INS_OK states respectively. In subsequent time periods, the transmission process of each instruction and its contents follows the same timing relationship.
[0059] See Figure 5 In this embodiment, when performing the FUSE test, the serial test module S101 completes operations such as setting the FUSE address, configuring control signals, and reading return data according to the process shown in the figure; see reference Figure 6During FLASH testing, the serial test module S101 sequentially completes operations such as target FLASH selection, clock source setting, address configuration, data writing, control signal configuration, and return data reading. In this embodiment, the FUSE test process and the FLASH test process can be performed alternately in the same serial test mode to adapt to different test requirements.
[0060] See Figure 8 In this embodiment, parallel test modules S102 and S103 employ the same parallel test module structure. This parallel test module is used in test mode to interact with external test equipment via a parallel interface to perform configuration, write, and read operations on the FLASH memory.
[0061] like Figure 8 As shown, the parallel test module mainly includes: address processing unit S503, reset processing unit S504, FSS instruction processing unit S505, FRD instruction processing unit S506, FPE instruction processing unit S507, FCONF instruction processing unit S508, FEXE instruction processing unit S509, FADR0 instruction processing unit S510, FADR1 instruction processing unit S511, FDIN0 to FDIN17 instruction processing units S512, FLD enable unit S513, and parallel port output processing unit S514.
[0062] The structure of the reset processing unit S504 is as follows: Figure 8 The block diagram S502 shows the reset processing unit. This unit consists of an inverter and two cascaded flip-flops. The input signal FLT_ENn is inverted and then connected to the low-active reset terminals of the two flip-flops. The output of the first-stage flip-flop serves as the input of the second-stage flip-flop, which ultimately outputs the synchronous reset signal fsrstb_syn. Both flip-flops operate under the control of the clock CLK, thus achieving asynchronous reset and synchronous release in this embodiment. This avoids introducing metastability due to the direct action of the reset signal, ensuring the stability of the parallel test module during reset and operation switching.
[0063] The structure of the address processing unit S503 is as follows: Figure 8 The block diagram S500 is shown in the figure. This address processing unit is used to latch the current instruction address during the parallel interface write operation. It judges the status of CSB, RW and ADSL through combinational logic. When the write instruction condition is met, it latches the instruction on the parallel bus FLD[7:0] as addr_reg[7:0] for use by the subsequent instruction processing unit.
[0064] The FSS instruction processing unit S505, FRD instruction processing unit S506, FPE instruction processing unit S507, FCONF instruction processing unit S508, FEXE instruction processing unit S509, FADR0 instruction processing unit S510, FADR1 instruction processing unit S511, and FDIN0 to FDIN17 instruction processing units S512 all employ the following... Figure 8 The block diagram S501 shown illustrates a general structure. This general structure includes combinational logic, a data selector, and flip-flops. Each instruction processing unit configures different parameters PAR to correspond to different instructions. When it detects that addr_reg[7:0] matches its own parameters and the states of CSB, RW, and ADSL meet the write operation conditions, it latches the data on the parallel interface into the corresponding register output. In this embodiment, the parameters PAR of each instruction processing unit only need to be different; there is no fixed value requirement. It should be noted that using the general structure of block diagram S501 and setting the parameters PAR to other values to extend the instruction types is also within the scope of this embodiment.
[0065] The FLD enable unit S513 is used to generate an output enable signal for the FLD pin during parallel read operations. When CSB is low and RW is high, the output FLD_oe is high to indicate that the parallel bus has entered the read data state.
[0066] The parallel output processing unit S514 is used to output instruction content or FLASH return data to external test equipment during parallel read operations. This unit consists of two-stage data selectors, combinational logic units, and flip-flops. First, it selects the output of the corresponding instruction processing unit or FLASH return data fdout[143:0] according to addr_reg[7:0]. When the read conditions are met, it is output to RDREG[7:0] of the parallel interface after being synchronized by the clock CLK to complete the parallel data read.
[0067] See Figure 10 This shows the typical parallel port timing of the parallel test module. During time period T1, all control signals are in an inactive state, and the signal level has no effect on the test; time periods T2 and T3 correspond to the complete write instruction and write instruction content, which can be executed continuously to configure the instruction and its content; time periods T4 and T5 correspond to the process of reading instruction content, and the return data of the corresponding register or FLASH can be obtained from RDREG[7:0] through this timing.
[0068] See Figure 9The flowchart illustrates the typical operation process (steps S600-S608) of the parallel test module performing FLASH testing. The write operation to the FLASH is achieved by sequentially configuring the clock source, scanning address, writing data, and control signals. After writing is complete, the data returned by the FLASH is read by reconfiguring the address and read control signals. The steps in the above process can be executed cyclically according to the FLASH address space until all addresses are covered; this is also within the scope of the implementation method of this embodiment.
[0069] See Figure 11 , Figure 11 The internal structure of the interface conversion unit S104 is shown in detail. In this embodiment, the interface conversion unit S104 is used to select, convert, and route FLASH-related signals between the serial test module and the parallel test module. It mainly includes: a GPIO multiplexing selection signal generation unit S700, a serial module enable signal generation unit S701, a serial module FLASH selection signal generation unit S702, a FUSE signal routing unit S703, a FLASH clock signal generation unit S703, a FLASH input data generation unit S704, a FLASH address generation unit S705, a FLASH return data routing unit S706, and a FLASH control signal generation unit S707.
[0070] The GPIO multiplexing selection signal generation unit S700 receives FLT_ENn as input and outputs the selection signal SEL from data selectors S105 to S110. In this embodiment, this unit inverts the FLT_ENn signal to generate the selection signal SEL, thereby enabling the switching of the corresponding GPIO multiplexing path.
[0071] The input signal of the serial module enable signal generation unit S701 is the state signal next_state[5:0] of the serial test module main state machine S201, and the output signal is... Figure 1 The port signal SFLAG is shown. In this embodiment, when the main state machine S201 is in the OK state, the serial module enable signal generation unit S701 sets SFLAG to a high level to indicate that the graphic code recognition of the serial test module is correct; in other states, SFLAG remains at a low level.
[0072] The input signal of the serial module FLASH selection signal generation unit S702 is o_msl_reg[7:0] of the serial test module, and its output signal is the selection signal RLSEL of the data selector in the FLASH return data routing unit S706. In this embodiment, this unit is used to select the corresponding return data from multiple FLASH return data paths and route it to the serial test module.
[0073] The FUSE signal routing unit S703 is responsible for generating the FUSE address and control signals, and routing the FUSE return signal to the serial test module. In this embodiment, the o_fuse_s1_reg[11:0] signal is connected to the FUSE address bus, the o_fuse_s2_reg[11:0] signal is connected to the FUSE control signal bus, and the FUSE return signal fuse_dout[7:0] is routed to i_fuse_dout[7:0].
[0074] The FLASH clock signal generation unit S704 is used to generate the clock signals l_ft_clock and r_ft_clock for FLASH1 and FLASH2. In this embodiment, the FLASH clock signal generation unit S703 selects to output the external clock CLK_AUX or the CLOCK signal in the serial-parallel instruction to FLASH1 and FLASH2 according to the control signal. Specifically, units 1, 2, and 3 in the FUSE signal routing unit S703 are all synchronization units, which are used to synchronize CLKSEL in l_o_fexe_reg[7:0], CLKSEL in o_fsexe_reg[7:0], and CLKSEL in r_o_fexe_reg[7:0] to the CLK_AUX clock domain, respectively; units 4, 5, and 6 are all clock gating units, whose enable terminals E are connected to the output terminals of the aforementioned corresponding synchronization units, and whose clock terminals are connected to CLK_AUX. When the corresponding CLKSEL is 1, the external clock CLK_AUX is output to the FLASH clock; when the corresponding CLKSEL is 0, the CLOCK signal in the corresponding register is output to the FLASH clock.
[0075] The FLASH input data generation unit S705 consists of two data selectors. In this embodiment, when SFLAG is 1, the FLASH input data of the serial test module is simultaneously routed to the input data signals of FLASH1 and FLASH2; when SFLAG is 0, the FLASH input data of the parallel test module S102 and the parallel test module S103 are routed to FLASH1 and FLASH2 respectively.
[0076] The FLASH address generation unit S706 also consists of two data selectors. In this embodiment, when SFLAG is 1, the FLASH address data of the serial test module S101 is simultaneously routed to the address signals of FLASH1 and FLASH2; when SFLAG is 0, the FLASH address data of the parallel test module S102 and the parallel test module S103 are routed to FLASH1 and FLASH2 respectively.
[0077] The FLASH return data routing unit S707 is used to connect the return data of FLASH1 and FLASH2 to the FLASH return data signals of the parallel test modules S102 and S103, and includes a data selector. In this embodiment, when RLSEL is 0, the return data of FLASH1 is routed to the FLASH return data signal of the serial test module S101; when RLSEL is 1, the return data of FLASH2 is routed to the FLASH return data signal of the serial test module S101.
[0078] The FLASH control signal generation unit S708 consists of two data selectors. In this embodiment, when SFLAG is 1, the FLASH control signal of the serial test module S101 is simultaneously routed to FLASH1 and FLASH2; when SFLAG is 0, the FLASH control signals of the parallel test module S102 and the parallel test module S103 are routed to FLASH1 and FLASH2 respectively.
[0079] See Figure 12 , Figure 12 This embodiment illustrates four test modes for the test module. In test mode 1, only the serial test module operates, and any FLASH and FUSE are tested via the JTAG interface according to... Figure 5 and Figure 6 The test is performed according to the steps shown. In test mode 2, only the parallel test module S102 operates, and the test is conducted through its parallel interface according to... Figure 9 The process shown tests FLASH1. In test mode 3, only the parallel test module S103 operates, and tests are performed through its parallel interface according to... Figure 9 The process shown tests FLASH2. In test mode 4, parallel test module S102 and parallel test module S103 work simultaneously, and each uses its own parallel interface to perform tests according to the specified procedures. Figure 9 The process shown tests both FLASH1 and FLASH2 simultaneously.
[0080] The above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims.
Claims
1. A memory testing system integrated within a chip, characterized in that, include: The test module is integrated inside the chip. The test path matrix consists of multiple data selection units and is connected between the test module, multiple external pins of the chip, and at least one non-volatile memory interface inside the chip. The test module includes at least one JTAG serial test submodule and / or at least one parallel test submodule, as well as an interface conversion module; The interface conversion module is used to convert signals from the JTAG serial test submodule and / or the parallel test submodule into test stimulus signals that conform to the target non-volatile memory interface specification. The test path matrix is configured to, in response to a test mode selection signal, route the test signals generated by the test module to designated external pins and the non-volatile memory interface in test mode, and route the signals of the original functional modules inside the chip to the corresponding external pins and memory interface in normal operation mode; wherein... The test mode selection signal is an externally input test mode enable signal; the selection terminal of each data selection unit in the test path matrix is connected to the selection signal output by the interface conversion module.
2. The memory testing system integrated within a chip as described in claim 1, characterized in that, The JTAG serial test submodule and / or the parallel test submodule include multiple parameterized instruction processing units; Each parameterized instruction processing unit has preset parameter values that are different from those of other parameterized instruction processing units, and is configured to match input data with its own preset parameter values, and when a match is successful, parse the input data and output the corresponding test signal.
3. The memory testing system integrated within a chip as described in claim 2, characterized in that, The parameterization instruction processing unit includes: The shift / latch unit is used to shift or latch the input data to form the data to be matched. The instruction matching unit is used to compare the data to be matched with the preset parameter value to determine whether they match. The signal output unit is used to parse and latch the corresponding single-type test signal from the input data during matching determination; wherein, The single type of test signal is one of the following: clock signal, read / write control signal, address signal, write data signal, and read data signal.
4. The memory testing system integrated within a chip as described in claim 3, characterized in that, When the parameterized instruction processing unit is applied to the JTAG serial test submodule, the shift / latch unit is a shift unit used to shift the serially input bit stream into multi-bit parallel data as the data to be matched; When the parameterized instruction processing unit is applied to the parallel test submodule, the shift / latch unit is a latch unit used to directly latch the instruction address of the parallel input as the data to be matched.
5. The memory testing system integrated within a chip as described in claim 1, characterized in that, The JTAG serial test submodule also includes a graphics code decoding unit; The graphic code decoding unit is configured to: shift and latch the identification code sequence input from the JTAG serial interface, perform an equality comparison between the latched identification code sequence and a preset identification graphic code, and output an enable signal to activate the JTAG serial test submodule and enable it to enter the command receiving state when the comparison result is consistent.
6. The memory testing system integrated within a chip as described in claim 1, characterized in that, The test module further includes a reset processing unit, which includes cascaded flip-flops for asynchronously setting and synchronously releasing the input asynchronous reset signal, and outputting a synchronous reset signal to the JTAG serial test submodule and / or the parallel test submodule.
7. The memory testing system integrated within a chip as described in claim 1, characterized in that, The interface conversion module includes a clock management unit, which is configured to select an external auxiliary clock or a clock signal contained in the test instruction as the test clock according to the test instruction, and provide it to the target non-volatile memory.
8. The memory testing system integrated within a chip as described in claim 1, characterized in that, The system supports at least one of the following test modes: In the first mode, only the JTAG serial test submodule is enabled to test at least one non-volatile memory; In the second mode, at least one of the parallel test submodules is enabled to independently test a corresponding non-volatile memory. The third mode simultaneously enables at least two of the aforementioned parallel test submodules to perform parallel testing on the corresponding at least two non-volatile memories.
9. A memory testing method, applied to the memory testing system as described in any one of claims 1-8, characterized in that, Includes the following steps: Activate the test mode to switch the external pins to the test signal path connected to the test module via the test path matrix; Depending on the testing requirements, the JTAG serial test submodule and / or the parallel test submodule may be selectively activated. The activated test submodule uses a parameterized instruction processing unit with preset parameter values to match the input instructions. When any parameterized instruction processing unit matches the corresponding instruction, the parameterized instruction processing unit parses the subsequent input data and outputs the corresponding memory excitation signal; After the memory excitation signal is converted into a signal that conforms to the target memory interface specification by the interface conversion module, the test operation is performed and the returned data is read. When the JTAG serial test submodule is selected to be activated, the method further includes: The identification code sequence input from the JTAG serial interface is verified by an equality comparison using a graphic code decoding unit. Only after successful verification should the JTAG serial test submodule be put into an instruction-receiving state before sending test instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the memory testing method as described in claim 9 is implemented.
