Chip initialization data storage method and chip initialization method

By storing SOC chip initialization data in an external EEPROM and using the I2C protocol, the flexibility problem of data storage for complex SOC chip initialization is solved, achieving efficient data transmission and configuration, and improving the chip's ability to adapt to different application scenarios.

CN116049090BActive Publication Date: 2024-11-26成都星拓微电子科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211725125.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2024-11-26
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Existing technologies struggle to flexibly store and configure initialization data for complex SOC chips, especially when dealing with firmware updates for both continuous and non-continuous registers, resulting in insufficient flexibility for chips to adapt to different application scenarios.

Method used

The chip initialization data is stored in an external EEPROM, using a specific data structure and communication protocol (I2C), including a total information sequence, a single discontinuous register configuration information sequence, and a contiguous address space configuration information sequence. The internal module parses and configures the data to the chip module.

Benefits of technology

Differentiated storage simplifies data transmission and configuration processes, reduces system complexity, saves storage space and transmission time, and improves the chip's flexibility to adapt to various applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049090B_ABST
    Figure CN116049090B_ABST
Patent Text Reader

Abstract

The present invention discloses a chip initialization data storage method and a chip initialization method, wherein the chip initialization data storage method comprises: storing chip initialization data in an external memory, wherein the external memory is connected to the chip for communication, wherein the data structure comprises a total information sequence, a single discontinuous register configuration information sequence, a continuous address space configuration information sequence and an end mark. The present invention can realize differential storage, has a simple structure and reduces hardware overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data storage, and in particular to a chip initialization data storage method and a chip initialization method. Background Art

[0002] For a SOC (System On Chip) chip, there are various application scenarios. For different application scenarios, the chip needs to be configured differently to adapt to different application scenarios. Generally, these configurations are performed after the chip is powered on and before it starts working normally. We call this chip initialization.

[0003] For a complex SOC chip, there will be many module registers that need to be configured, and some modules' firmware need to be updated. The storage addresses of registers are either continuous or discontinuous, and the firmware is generally stored in a certain memory, which is continuous. How to store this data and then configure this data into the chip when the chip is powered on is an urgent problem to be solved. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects of the prior art and provide a chip initialization data storage method and a chip initialization method, which can store data more flexibly and differentially.

[0005] The object of the present invention is achieved through the following technical solutions:

[0006] A chip initialization data storage method, the method comprising:

[0007] The chip initialization data is stored in an external memory which is in communication connection with the chip, and the data structure of the data includes a total information sequence, a single discontinuous register configuration information sequence, a continuous address space configuration information sequence and an end mark.

[0008] Furthermore, the total information sequence includes total information of data in the external memory.

[0009] Furthermore, the total information of the data includes an initialization mark, user-defined information, control information and a check code.

[0010] Furthermore, the initialization mark includes a sequence type and user-defined information.

[0011] Furthermore, the control information includes the total number of bytes of valid data.

[0012] Furthermore, the single discontinuous register configuration information sequence includes sequence type, address information and data information.

[0013] Furthermore, the continuous address space configuration information sequence includes a sequence type, a start address, a data length and a data field.

[0014] Furthermore, the external memory includes an electrically erasable programmable read-only memory.

[0015] On the other hand, the present invention also provides a chip initialization method, the method comprising:

[0016] Each time the chip is powered on and reset is released, the data stored by any of the aforementioned chip initialization data storage methods is read;

[0017] Configure data into various modules of the chip.

[0018] Furthermore, the chip is connected to the external memory through the I2C communication protocol via a data reading module disposed inside the chip. The data reading module reads the data in the external memory and parses the data according to a preset data format, and writes the parsed data into a register of a corresponding peripheral device or a static random access memory until all the data are read and the chip initialization is completed;

[0019] When reading the continuous address space configuration information sequence, other addresses except the start address are automatically generated inside the chip.

[0020] The beneficial effects of the present invention are:

[0021] (1) The present invention stores data in an external memory, which can realize differentiated storage. That is, for different application scenarios, it is only necessary to burn different configuration data into the external memory without modifying the chip, so that one chip can be adapted to multiple applications.

[0022] (2) In the present invention, data is transmitted between the external memory and the main chip via the I2C protocol, the communication protocol is simple, and the system complexity is low.

[0023] (3) In the present invention, one address of a single discontinuous register configuration information sequence corresponds to one data, and there are no other redundant bytes. Data storage is simple and efficient, and hardware parsing is convenient.

[0024] (4) In the continuous address space configuration information sequence of the present invention, one address corresponds to multiple data. For registers or memories that configure continuous address spaces, this data structure is very efficient. Since only the first address needs to be stored, the remaining addresses can be automatically generated inside the chip, which can save storage space of the external memory; when reading data from the external memory, since the address field does not need to be read every time, transmission time can be saved, and faster transmission can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1This is a system architecture diagram of a SOC chip with an external memory provided by an embodiment of the present invention;

[0026] Figure 2 It is a schematic diagram of the chip initialization method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0028] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.

[0029] For a complex SOC chip, there will be many module registers that need to be configured, and some modules' firmware need to be updated. The storage addresses of registers are either continuous or discontinuous, and the firmware is generally stored in a certain memory, which is continuous. How to store this data and then configure this data into the chip when the chip is powered on is an urgent problem to be solved.

[0030] In order to solve the above technical problems, the following embodiments of a chip initialization data storage method and a chip initialization method of the present invention are proposed.

[0031] Example 1

[0032] Taking the SOC chip as an example, in order to store data more flexibly and differentially, this embodiment proposes to store the data in an EEPROM chip (EEPROM: Electrically Erasable Programmable Read Only Memory).

[0033] Reference Figure 1 ,like Figure 1 The figure shows a system architecture diagram of a SOC chip with an external memory provided by this embodiment. Inside the chip, the AHB bus is used to connect various modules. Inside the chip, ini_blk (initial block) is used as a data reading module, which is specifically used to read data from the EEPROM and configure it to various modules of the chip through the AHB bus.

[0034] In this embodiment, the data stored in the EEPROM chip is encoded and stored in the following format: 1. Information sequence

[0035] The Information sequence has a fixed length of 4 DWords and is 4X4 bytes. Table 1 shows the format of the Information sequence in this embodiment:

[0036]

[0037] Table 1 Information sequence format The format of S0-code is shown in Table 2:

[0038]

[0039] Table 2 S0-code format

[0040] Among them, Cpu boot: means that after processing the eeprom data, the CPU reset needs to be evacuated;

[0041] Crc_en: Indicates that CRC check is to be performed on the entire data.

[0042] Length: indicates the total number of bytes of valid data in the entire eeprom.

[0043] The format of a single Dword initialization sequence S1 is shown in Table 3:

[0044]

[0045]

[0046] Table 3 Format of sequence S1

[0047] Where Code=00b indicates the type of sequence S1, Addr indicates the address, and Data indicates the data. The format of the Burst Dword initialization sequence S2 is shown in Table 4:

[0048]

[0049]

[0050] Table 4 Format of sequence S2

[0051] Among them, Code=01b indicates the type of sequence S2, Addr indicates the address, length indicates the data length, and Data indicates the data.

[0052] The end mark initialization sequence S3 is shown in Table 5:

[0053]

[0054] Table 5 Format of end mark sequence S3

[0055] In the data structure defined above, the information sequence stores the total information of the data in the EEPROM, S1 and S2 store specific configuration information, and S3 is the end mark.

[0056] The code of S1 sequence = 2'b00 is used to configure a single non-continuous register, so its data structure only contains address and data; there can be multiple S1 sequences in EEPROM;

[0057] The code of S2 sequence = 2'b01 is used to configure a continuous address space, such as SRAM, which is allocated to a continuous address space. Therefore, S2 sequence contains the starting address, data length, data field (the data field is composed of multiple 32-bit data, the specific number is specified by the data length field). There can be multiple S2 sequences in EEPROM.

[0058] The chip initialization data storage method provided in this embodiment stores data in EEPROM, which can realize differentiated storage, that is, different application scenarios only need to burn different configuration data into EEPROM, without modifying the chip, so that one chip can adapt to multiple applications. Data is transmitted between EEPROM and the main chip through the I2C protocol, the communication protocol is simple, and the system complexity is low. In a single discontinuous register configuration information sequence, one address corresponds to one data, and there are no other redundant bytes. The data storage is simple and efficient, which is convenient for hardware parsing. In a continuous address space configuration information sequence, one address corresponds to multiple data. For registers or memories that configure continuous address spaces, this data structure is very efficient. Since only the first address needs to be stored, the remaining addresses can be automatically generated inside the chip, which can save the storage space of EEPROM; when reading data from EEPROM, since the address field does not need to be read every time, the transmission time can be saved and faster transmission can be achieved.

[0059] Example 2

[0060] This embodiment provides a chip initialization method, which is implemented based on the chip initialization data storage method provided in the above embodiment.

[0061] Reference Figure 2 ,like Figure 2 FIG. 1 is a schematic diagram of a chip initialization method provided in this embodiment, and the method specifically includes the following steps:

[0062] Step 1: Read the stored data every time the chip is powered on and reset is released.

[0063] Specifically, the chip is connected to the external memory through the I2C communication protocol via the ini_blk module located inside the chip. The ini_blk module reads the data in the EEPROM byte by byte, and then parses the data according to the aforementioned data format.

[0064] Step 2: Configure the data into each module of the chip.

[0065] Specifically, the chip writes the parsed data to the register of the corresponding peripheral or static random access memory through the bus until all the data are read and the chip initialization is completed.

[0066] It should be noted that when reading the continuous address space configuration information sequence, other addresses except the start address are automatically generated inside the chip.

[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A chip initialization data storage method, characterized in that: The method comprises: Storing chip initialization data in an external memory, the external memory being communicatively connected to the chip, the data structure of the data comprising a total information sequence, a single discontinuous register configuration information sequence, a continuous address space configuration information sequence and an end mark; The total information sequence includes the total information of the data in the external memory, and the total information of the data includes an initialization mark, user-defined information, control information and a check code; The single discontinuous register configuration information sequence includes sequence type, address information and data information; The continuous address space configuration information sequence includes a sequence type, a start address, a data length and a data field; One address of the single discontinuous register configuration information sequence corresponds to one data, and one address of the continuous address space configuration information sequence corresponds to multiple data; When the chip initialization data is read, the data is parsed according to the data structure, and required data is obtained from the single discontinuous register configuration information sequence, and required data is obtained from the continuous address space configuration information sequence.

2. The chip initialization data storage method according to claim 1, characterized in that: The initialization mark includes a sequence type and user-defined information.

3. The chip initialization data storage method according to claim 1, characterized in that: The control information includes the total number of bytes of valid data.

4. The chip initialization data storage method according to claim 1, characterized in that: The external memory includes an electrically erasable programmable read-only memory.

5. A chip initialization method, characterized in that: The method comprises: Each time the chip is powered on and reset is released, the data stored in the chip initialization data storage method according to any one of claims 1 to 4 is read; Configure data into various modules of the chip.

6. The chip initialization method according to claim 5, characterized in that: The chip is connected to the external memory through the I2C communication protocol via a data reading module located inside the chip. The data reading module reads the data in the external memory and parses the data according to a preset data format, and writes the parsed data to the register of the corresponding peripheral device or the static random access memory until all the data are read and the chip initialization is completed; When reading the continuous address space configuration information sequence, other addresses except the start address are automatically generated inside the chip.