A chip UID generation system and method

The chip UID generation system and method utilizes a microcontroller and flash memory to generate target UIDs, solving the problems of high cost and long debugging cycle in existing chip UID generation technologies. It achieves highly reliable and stable UID generation and supports UID generation for multiple chip models.

CN117113444BActive Publication Date: 2026-11-17ZHEJIANG XINMAI SILICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310935006.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2026-11-17
Estimated Expiration
2043-07-27

AI Technical Summary

Technical Problem

Existing methods for generating chip UIDs are difficult, time-consuming, and costly to implement during the production and debugging phases. They also suffer from instability issues that can lead to test board oscillations and unstable battery power supply.

Method used

A chip UID generation system is adopted, including a chip to be programmed and a UID generation device. The target UID is generated by a microcontroller and flash memory, and the communication is connected through the serial interface of the FT test board. It supports the generation of UIDs for multiple chip models and has data verification and recovery mechanisms.

Benefits of technology

It shortens the debugging cycle of the FT testing phase, reduces testing costs, improves system reliability and stability, avoids data corruption caused by power outages, and supports UID generation for multiple chip models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117113444B_ABST
    Figure CN117113444B_ABST
Patent Text Reader

Abstract

This application discloses a chip UID generation system and method, relating to the field of integrated circuit testing technology. The system includes a chip to be programmed and a UID generation device communicatively connected to the chip. The UID generation device receives a UID acquisition command from the chip and writes UID information to the chip according to the command. This application defines a highly reliable system with robust data verification and recovery mechanisms, preventing flash data corruption caused by power outages during operation. It also supports the generation of UIDs for 16 different chip models simultaneously, eliminating the need to change the program for each chip tested. Furthermore, the entire UID generation process is self-controlled, requiring no support from FT testing vendors, thus saving significant debugging and development time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of integrated circuit testing technology, and in particular to a chip UID generation system and method. Background Technology

[0002] There are two main methods for generating the unique identifier (UID) of existing chips: One is to use a FT test bench with UID support, where the bench directly provides the corresponding UID information during chip testing. However, using this type of test equipment increases testing costs, and the bench needs to communicate with the chip under test, which also increases the difficulty and cycle of the production debugging phase. The second method involves attaching a real-time clock chip to the chip test board. The UID information is generated based on the current time during chip testing. This real-time clock chip requires battery power, which leads to many unstable factors. For example, during production debugging, the test board may experience significant vibrations, and unstable battery power can result in time loss. Furthermore, many defective chips under test may cause short circuits on the test board, send incorrect commands to the clock chip, and also easily lead to time loss. Summary of the Invention

[0003] This application provides a chip UID generation system, which aims to solve the problems of high difficulty, long cycle and high testing cost in the production and debugging stage of the existing chip UID generation method.

[0004] To achieve the above objectives, this application adopts the following technical solution:

[0005] This application discloses a chip UID generation system, including a chip to be programmed and a UID generation device communicatively connected to the chip to be programmed. The UID generation device is used to receive a UID acquisition command sent by the chip to be programmed and to write UID information to the chip to be programmed according to the UID acquisition command.

[0006] Preferably, the UID generation device includes a microcontroller and a flash memory connected to the microcontroller. The microcontroller is used to generate a target UID according to the UID acquisition command and store the target UID in the flash memory.

[0007] Preferably, the chip to be programmed is mounted on an FT test board and is connected to the UID generation device via the serial interface of the FT test board.

[0008] A chip UID generation method, applied to the aforementioned chip UID generation system, includes:

[0009] A starting UID is written into the UID generation device. When the UID generation device receives a UID acquisition command from the chip to be programmed, a target UID is generated based on the starting UID, and the target UID is written into the chip to be programmed according to the UID acquisition command.

[0010] Preferably, writing the initial UID into the UID generation device includes:

[0011] Erase the entire flash memory in the UID generation device to set all initial data in the flash memory to 0xff;

[0012] The flash memory is divided into n spaces, denoted as space 0, space 1, ..., space n-1, where space 0 and space 1 are used to record the UID storage address of each chip model, and the remaining spaces are used to store the UID.

[0013] The UID storage address recorded in space 0 is compared with 0xff, and the latest UID storage address is determined based on the comparison result.

[0014] The latest UID storage address is recorded in the corresponding positions of space 0 and space 1 respectively, and the number of UID data set before the starting UID is saved and backed up to the latest UID storage address.

[0015] Preferably, before comparing the UID storage address recorded in space 0 with the 0xff address and determining the latest UID storage address based on the comparison results, the method further includes:

[0016] Compare the data in space 0 with that in space 1. If they match, then traverse space 0; otherwise, erase the entire flash memory chip.

[0017] Preferably, determining the latest UID storage address based on the comparison result includes:

[0018] If the UID storage addresses recorded in space 0 are not all 0xff, determine the maximum value of the UID storage addresses recorded in space 0, and add the maximum value to the set value to obtain the latest UID storage address; otherwise, set space 2 to the latest UID storage address.

[0019] Preferably, the step of generating a target UID based on the initial UID and writing the target UID into the chip to be programmed according to the UID acquisition command includes:

[0020] Read and compare the UID storage address of the chip model to be programmed recorded in space 0 and space 1. If they match, obtain the two sets of first UID data that are saved and backed up according to the read UID storage address.

[0021] The first UID data is verified according to preset rules. If the verification is successful, the target UID is generated based on the first UID data.

[0022] Replace the minimum value in the first UID data saved and backed up in the flash memory with the target UID.

[0023] Preferably, the method further includes:

[0024] When the verification fails, the only data in the first UID data of each group that does not follow the increment rule is defined as erroneous data. The largest first UID in each group other than the erroneous data is incremented by 1 to obtain the correct first UID corresponding to the erroneous data, and the target UID is generated based on the correct first UID.

[0025] Preferably, the preset rules include: determining whether the number of the two sets of first UID data is the set number and increases sequentially in size order, and whether the two sets of first UID data are the same.

[0026] The present invention has the following beneficial effects:

[0027] This application boasts extremely high reliability and features a robust data verification and recovery mechanism, preventing flash data corruption caused by power outages during operation. It also supports the generation of UIDs for 16 different chip models, eliminating the need to replace the program every time a different chip is tested. Furthermore, the entire UID generation process is under our control, requiring no support from FT testing vendors, thus saving significant debugging and development time. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is a schematic diagram of a chip UID generation system implemented in this application;

[0030] Figure 2 This is a schematic diagram of the UID data storage arrangement in this application;

[0031] Figure 3 This is a flowchart of the process of writing the initial UID into this application;

[0032] Figure 4 This is a flowchart of the process for generating the target UID in this application. Detailed Implementation

[0033] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] The terms “first,” “second,” etc., used in the claims and description of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate. This is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion so that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0035] like Figure 1 As shown, this embodiment provides a chip UID generation system, which includes a chip to be programmed and a UID generation device communicatively connected to the chip to be programmed. The UID generation device is used to receive a UID acquisition command sent by the chip to be programmed and to write UID information to the chip to be programmed according to the UID acquisition command.

[0036] When writing UIDs to chips using existing FT test equipment with UID functionality, the UID rule scheme is usually submitted to a third-party company responsible for programming the equipment. After the third-party company completes the program, it is then debugged at the packaging and testing plant. This entire process typically takes two weeks or more. The chip UID generation system provided in this embodiment is not only simple in structure, containing only the chip to be programmed mounted on an FT test board and a UID generation device communicating with the chip, but also features a simpler structure. The FT test board primarily serves as a connector. Preferably, the chip to be programmed communicates with the UID generation device through a serial interface on the FT test board. The UID generation device consists of a microcontroller and a flash memory connected to the microcontroller. The 128Mbit capacity flash memory... Theoretically, the SH system can support over 100 million UID acquisitions, so its cost is negligible. Furthermore, when the flash memory's erase / write cycle is complete, the flash memory can be directly replaced. When the chip to be programmed sends a UID acquisition command to the UID generation device via a serial interface, the microcontroller receives the command, generates a target UID based on it, stores the target UID in the flash memory, and then returns it to the chip to be programmed via a serial port, thus completing the chip programming operation. Using this system to generate UIDs not only eliminates the need for a third-party company to write the program, shortening the entire cycle to two days, but also significantly reduces the debugging cycle and difficulty of the FT testing phase. Moreover, since it eliminates the need for FT testing equipment that supports UID functionality, it also reduces testing costs.

[0037] Based on the chip UID generation system described above, this embodiment also provides a chip UID generation method, including:

[0038] A starting UID is written into the UID generation device. When the UID generation device receives a UID acquisition command from the chip to be programmed, a target UID is generated based on the starting UID, and the target UID is written into the chip to be programmed according to the UID acquisition command.

[0039] This embodiment uses chip model 0 and initial UID 216 as an example to illustrate the UID generation method for this chip. First, the process of writing the initial UID by the UID generation device is described as follows:

[0040] Erase the entire flash memory in the UID generation device to set all initial data in the flash memory to 0xff;

[0041] The flash memory is divided into n spaces, denoted as space 0, space 1, ..., space n-1, where space 0 and space 1 are used to record the UID storage address of each chip model, and the remaining spaces are used to store the UID.

[0042] The UID storage address recorded in space 0 is compared with 0xff, and the latest UID storage address is determined based on the comparison result.

[0043] The latest UID storage address is recorded in the corresponding positions of space 0 and space 1 respectively, and the number of UID data set before the starting UID is saved and backed up to the latest UID storage address.

[0044] Step 1 involves erasing the entire flash memory, so that all initial data in the flash memory is 0xff, before allocating UID storage locations, such as... Figures 2-3 As shown, step 2 involves dividing the flash memory space into n equal parts, referred to as space 0, space 1, ..., space n-1, each space being 64KB in size. Spaces 0 and 1 are used to record the UID storage address of each chip model. The UID storage address is its storage location. This embodiment supports 16 chip models. Space 0 records the storage address of the UID of each of these 16 chip models, denoted as model 0, model 1, ..., model 15. The data in space 1 is a backup of the data in space 0, with each model occupying KB. The remaining n-2 spaces are used to store UID numbers. For example, space 2 stores the UID numbers of each chip model 0, namely 200, 201, ..., 215, and space 3 stores the UID numbers of each chip model 1, namely 100, 101, ..., 115. Each of these n-2 spaces contains a backup of the corresponding UID data. Each UID value occupies 4KB. Next, it checks if the data in space 0 and space 1 are completely consistent. If they are inconsistent, the entire flash memory is erased again, or the flash memory is determined to be damaged and replaced. If they are consistent, space 0 is traversed, and all recorded UID storage addresses (i.e., the current UID storage address) are compared with 0xff. If they are not completely consistent, the maximum value is found, and 128KB is added to this maximum value to obtain the latest UID storage address. If all values ​​are 0xff, it means that no storage address has been allocated in the flash memory, so space 2 is directly defined as the latest UID storage address, and it is recorded at the storage address corresponding to model 0 in space 0 and space 1. Step 3 involves saving the set number of data (16 data points, 200-215) before the starting UID to the latest UID storage address and backing it up in this latest UID storage address, i.e., saving these 16 data points twice. In this embodiment, the latest UID storage address is space 2.

[0045] Next, the process of generating the target UID will be explained as follows:

[0046] Read and compare the UID storage address of the chip model to be programmed recorded in space 0 and space 1. If they match, obtain the two sets of first UID data that are saved and backed up according to the read UID storage address.

[0047] The first UID data is verified according to preset rules. If the verification is successful, the target UID is generated based on the first UID data.

[0048] Replace the minimum value in the first UID data saved and backed up in the flash memory with the target UID.

[0049] The chip to be programmed sends a UID acquisition command to the UID generation device via a serial interface. Upon receiving the command, the UID generation device begins calculating the target UID based on the UIDs stored in the flash memory. Figure 4As shown, firstly, the UID storage addresses of the same model as the chip to be programmed are read from space 0 and space 1. In this embodiment, the chip model to be programmed is 0, so the UID storage addresses of model 0 recorded in space 0 and space 1 are obtained respectively, and it is determined whether the two addresses are consistent. If they are inconsistent, the operation of writing the starting UID is re-executed. If they are consistent, the two sets of 16 old UID data stored and backed up under the storage address are determined, which are the first UID data. In this embodiment, these are the two sets of data 200-215 stored in space 2. Then, these first UID data are verified according to preset rules, that is, it is determined whether there are 16 values ​​from the maximum to the minimum value in each set of first UID data and whether they are sequentially increasing in size, and whether the two sets of first UID data are completely identical. If they are not identical, data recovery is performed, that is, the 15 consecutively increasing values ​​in these 16 first UID data are found, and the remaining value is the erroneous data stored in the last storage. Because the UIDs in this embodiment conform to the sequentially increasing rule, the UID stored in the last storage must be the most significant among all the first UIDs. The largest value among these 16 data points, excluding the erroneous data, must be the data stored two weeks ago. Therefore, adding 1 to the largest value among these 16 data points, excluding the erroneous data, yields the correct UID value corresponding to the erroneous data. Adding 1 to this correct UID value gives the target UID. If they are completely identical, adding 1 to the largest value among these 16 first UID data points yields the target UID, which in this embodiment is 215 + 1 = 216. Then, the smallest value among the 16 first UID data points currently stored in the flash memory is replaced with the target UID, i.e., the 200 saved and backed up in space 2 is replaced with 216. Then, it is determined whether the isolated data and the written data are the same. If they are the same, the target UID is returned to the chip to be programmed through the serial interface so that it can complete the programming operation. If they are different, it means that the current UID storage space has reached the limit of the erase and write cycles, and new space needs to be reallocated. The specific process is the same as steps 2-3 of writing the starting UID, and the UID number of the latest UID storage address is changed.

[0050] The method provided in this embodiment has very high reliability. For example, a 128Mbit flash memory can theoretically support more than 100 million UID acquisitions. It also has a complete data verification and recovery mechanism, which can avoid flash data corruption caused by various power outages during operation. It also supports the generation of UIDs for 16 different chip models, so there is no need to change the program when testing different chips. In addition, the entire UID generation process is under our control and does not require support from FT testing manufacturers, which can save a lot of debugging and development time.

[0051] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions within the technical scope disclosed in the present invention should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating a chip UID, characterized in that, include: A starting UID is written into the UID generation device. The starting UID is an initial UID value that is pre-written into the UID generation device. When the UID generation device receives a UID acquisition command sent by the chip to be programmed, it generates a target UID based on the starting UID and writes the target UID into the chip to be programmed according to the UID acquisition command. The step of writing the initial UID into the UID generation device includes: Erase the entire flash memory in the UID generation device to set all initial data in the flash memory to 0xff; The flash memory is divided into n spaces, denoted as space 0, space 1, ..., space n-1, where space 0 and space 1 are used to record the UID storage address of each chip model, and the remaining spaces are used to store the UID. The UID storage address recorded in space 0 is compared with 0xff, and the latest UID storage address is determined according to the comparison result. This includes: when the UID storage addresses recorded in space 0 are not all 0xff, the maximum value of the UID storage address recorded in space 0 is determined, and the maximum value is added to the set value to obtain the latest UID storage address; otherwise, space 2 is set as the latest UID storage address. The latest UID storage address is recorded in the corresponding positions of space 0 and space 1 respectively, and a set number of UID data that are numerically smaller than the starting UID and consecutive to the starting UID are saved and backed up to the latest UID storage address. The step of generating a target UID based on the initial UID and writing the target UID into the chip to be programmed according to the UID acquisition command includes: Read and compare the UID storage address of the chip model to be programmed recorded in space 0 and space 1. If they match, obtain the two sets of first UID data that are saved and backed up according to the read UID storage address. The first UID data is validated according to preset rules. If the validation passes, the maximum value in the first UID data is incremented by 1 to obtain the target UID. If the validation fails, the only data in each group of first UID data that does not follow the incrementing rule is defined as erroneous data. The largest first UID in each group (excluding the erroneous data) is incremented by 1 to obtain the correct first UID corresponding to the erroneous data. The correct first UID is then incremented by 1 to obtain the target UID. The preset rules include: determining whether the number of first UID data in both groups is the preset number and increases sequentially in size order, and whether the two groups of first UID data are the same. Replace the minimum value in the first UID data saved and backed up in the flash memory with the target UID.

2. The chip UID generation method according to claim 1, characterized in that, Before comparing the UID storage address recorded in space 0 with 0xff and determining the latest UID storage address based on the comparison result, the process further includes: Compare the data in space 0 with that in space 1. If they match, then traverse space 0; otherwise, erase the entire flash memory chip.

3. A chip UID generation system, characterized in that, A chip UID generation method according to any one of claims 1-2 includes a chip to be programmed and a UID generation device communicatively connected to the chip to be programmed. The UID generation device is used to receive a UID acquisition command sent by the chip to be programmed and to write UID information to the chip to be programmed according to the UID acquisition command.

4. The chip UID generation system according to claim 1, characterized in that, The UID generation device includes a microcontroller and a flash memory connected to the microcontroller. The microcontroller is used to generate a target UID according to the UID acquisition command and store the target UID in the flash memory.

5. A chip UID generation system according to claim 4, characterized in that, The chip to be programmed is mounted on the FT test board and is connected to the UID generation device via the serial interface of the FT test board.

Citation Information

Patent Citations

  • Programming device, system and method

    CN104318949A

  • Chip serial number burning device and method

    CN113326051A