Micro log management methods, semiconductor devices and computer-readable storage media
By configuring an independent micro log storage module and atomic writing method in the embedded system of semiconductor devices, the problems of wasted micro log data storage resources and high read/write latency are solved, achieving storage resource savings and improved read/write speed in high-frequency data writing scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HUAXIN SEMICON EQUIP TECH CO LTD
- Filing Date
- 2026-05-29
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies for storing micro log data in semiconductor devices suffer from wasted storage resources and high read/write latency, especially in high-frequency data writing scenarios. Traditional large database-oriented solutions cannot meet the reliability and real-time requirements of micro log data.
In the embedded system, an independent micro log storage module is configured in the subsystem. Each module contains multiple storage slots. The logical address of the storage slot is determined by an index variable. Data is written or cached in the blank slot and the non-blank slot is erased to realize data storage. Atomic write method is used to ensure data reliability.
It achieves storage resource savings and improved read/write speed in high-frequency data writing scenarios, is suitable for micro log data management in semiconductor devices, and improves the reliability and real-time performance of data writing.
Smart Images

Figure CN122309219A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic digital data processing technology, specifically to a micro log management method, a semiconductor device, and a computer-readable storage medium. Background Technology
[0002] Embedded systems in semiconductor devices require log data storage during operation to quickly locate faults in the event of anomalies. Log data can be categorized into large-capacity log data and micro-log data based on its size. Large-capacity log data involves a large amount of data written, requires significant node storage space, and has complex management logic. Micro-log data involves a smaller amount of data written, but is written more frequently, and has higher requirements for reliability and real-time performance. To accommodate large-capacity log data storage, semiconductor devices typically employ a large-database-oriented solution that heavily relies on storage, memory, and file systems. However, for micro-log data storage, this approach suffers from wasted storage resources and high read / write latency. Summary of the Invention
[0003] This application provides a micro log management method, a semiconductor device, and a computer-readable storage medium, aiming to provide a storage solution for micro log data.
[0004] The first aspect of this application provides a micro-log management method applied to an embedded system of a semiconductor device. The embedded system includes several subsystems, each subsystem being configured with an independent micro-log storage module, and each micro-log storage module including multiple storage slots. The method includes: acquiring target micro-log data of a target subsystem, wherein the amount of the target micro-log data is less than or equal to the total capacity of all storage slots in the target micro-log storage module; determining a target storage slot in the target micro-log storage module based on an assigned target index variable, the target index variable indicating the logical address of the storage slot where data is to be written; writing the target micro-log data to the target storage slot if the target storage slot is empty; and caching the target micro-log data if the target storage slot is not empty, performing an erase operation on the target storage slot, and writing the cached target micro-log data to the target storage slot.
[0005] It is understandable that for micro log data, the storage of micro log data can be achieved by configuring a micro log storage module in the subsystem of the embedded system. This method consumes less storage resources, has a faster read and write speed, and is suitable for high-frequency data writing scenarios.
[0006] A second aspect of this application provides a semiconductor device including a memory and a processor, which implements the micro log management method provided in the first aspect when the processor executes computer instructions stored in the memory.
[0007] A third aspect of this application provides a computer-readable storage medium storing computer instructions thereon, which implements the micro log management method provided in the first aspect when a processor executes the computer instructions.
[0008] A fourth aspect of this application provides a computer program product including computer instructions that, when executed by a processor, implement the micro log management method provided in the first aspect.
[0009] It is understood that the beneficial effects of the semiconductor device provided in the second aspect of the embodiments of this application, the computer-readable storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are substantially the same as the beneficial effects of the micro log management method provided in the first aspect, and will not be repeated here. Attached Figure Description
[0010] Figure 1 This is a schematic diagram illustrating an application scenario for a semiconductor device.
[0011] Figure 2 This is a system block diagram of a semiconductor device for storing micro-log data, provided in one embodiment.
[0012] Figure 3 This is a flowchart of a micro log management method provided in one embodiment.
[0013] Figure 4 This is a schematic diagram of a format for micro log data stored in a storage slot, provided in one embodiment.
[0014] Figure 5 This is a flowchart of a micro log management method provided in another embodiment.
[0015] Figure 6 This is a schematic diagram of the structure of a miniature log management device provided in one embodiment.
[0016] Figure 7 This is a schematic diagram of the structure of a semiconductor device provided in one embodiment. Detailed Implementation
[0017] In the description of the embodiments of this application, "and / or" is used to describe the relationship between associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects are in an "or" relationship. "Several" refers to one or more, and "multiple" refers to two or more. "First," "second," "third," "fourth," etc., are used to distinguish similar objects, rather than to describe a specific order or sequence. The methods disclosed in the embodiments of this application or the methods shown in the flowcharts include one or more steps for implementing the method. Without departing from the scope of the claims, the execution order of multiple steps can be interchanged, and some steps can also be deleted.
[0018] In the embodiments of this application, the semiconductor device includes, but is not limited to, a lithography machine, an etching machine, and a thin film deposition equipment. The embedded system of the semiconductor device includes several subsystems. The subsystems include, but are not limited to, a sensor subsystem, a calibration subsystem, and a power drive subsystem.
[0019] Embedded systems in semiconductor devices require log data storage during operation to quickly locate faults in the event of anomalies. Log data can be categorized into large-capacity log data and micro-log data based on its size. Large-capacity log data involves a larger volume of written data, requires more node storage space, and has more complex management logic. Micro-log data involves a smaller volume of written data, a higher writing frequency, and has higher requirements for reliability and real-time performance. Large-capacity log data includes, but is not limited to, process execution data, equipment operation data, and system management data. Micro-log data includes, but is not limited to, real-time sensor sampling data, equipment operating status snapshot data, and fault warning data.
[0020] To accommodate large-capacity log data storage, semiconductor devices typically employ a large-database-oriented approach that heavily relies on storage, memory, and file systems. However, for micro-log data storage, this approach suffers from wasted storage resources and high read / write latency. For example, using a file system to write log data into memory results in significant storage resource overhead, long write times, and susceptibility to data corruption across entire sectors during power outages when storing micro-log data.
[0021] Figure 1 This is a schematic diagram illustrating an application scenario for a semiconductor device.
[0022] Taking plasma etching machines as an example of semiconductor equipment, the working principle of a plasma etching machine is to selectively remove material with nanoscale precision through the synergistic effect of physical bombardment and chemical reaction in a vacuum environment using highly reactive gases excited into plasma. Specifically, for example... Figure 1As shown, the plasma etching machine 10 includes a magnetic control system 110, a gas output module 120, an etching chamber 130, an electrostatic chuck and heating plate 140, and a high-voltage power supply 150. The magnetic control system 110 includes a controller 111, a constant current source device 112, a communication middleware 113, and a coil 114.
[0023] The controller 111 is communicatively connected to the constant current source device 112 and the communication middleware 113. The controller 111 is used to send drive signals to the constant current source device 112 according to preset etching process parameters. The etching process parameters include wafer material and etching pattern precision.
[0024] The constant current source device 112 responds to the drive signal, outputs a constant drive current, and transmits the drive current to the coil 114 to drive the coil 114 to generate a constant magnetic field 11.
[0025] The communication middleware 113 is electrically connected to the constant current source device 112. The communication middleware 113 provides a communication interface for data distribution logic. The communication middleware 113 can collect data such as current, voltage, and power output from the constant current source device 112 and transmit the collected data to the controller 111.
[0026] Coil 114 is electrically connected to constant current source device 112, and coil 114 is positioned above etching cavity 130. When coil 114 receives driving current, coil 114 forms a magnetic field 11 of specific intensity and distribution within etching cavity 130. Magnetic field 11 confines and guides the ionized plasma within etching cavity 130, ensuring that active ions move precisely toward the target area on the surface of wafer 12, thus guaranteeing the directionality and precision of etching.
[0027] The gas output module 120 is used to input a specific type of reactive gas, including fluorine- or chlorine-containing gases, into the etching chamber 130. The reactive gas is ionized to generate a plasma composed of ions, electrons, and highly reactive free radicals. The highly reactive free radicals chemically react with the material on the surface of wafer 12, generating volatile compounds. Charged ions in the plasma are accelerated under the influence of an electric field and vertically bombard the surface of wafer 12. The physical impact of high-energy ions not only removes atoms from the surface of wafer 12 but also enhances the chemical reaction rate and achieves highly directional anisotropic etching, thereby etching vertical sidewalls and precisely replicating the patterns on the photoresist.
[0028] An electrostatic chuck and heating plate 140 are disposed at the bottom of the etching chamber 130. When the wafer 12 is placed on the surface of the electrostatic chuck and heating plate 140, the electrostatic chuck and heating plate 140 fix the wafer 12 through electrostatic adsorption effect, preventing the wafer 12 from shifting or vibrating during the etching process, providing and maintaining a constant substrate temperature, preventing the reaction gas from condensing on the surface of the wafer 12, and ensuring the stability of the chemical reaction rate.
[0029] The high-voltage power supply 150 is electrically connected to the electrostatic chuck and the heating plate 140. The high-voltage power supply 150 is used to provide two power signals of opposite polarity to the electrostatic chuck and the heating plate 140 to control the electrostatic chuck and the heating plate 140 to adsorb or release the wafer 12.
[0030] It is understandable that the plasma etching machine 10 can store data such as current, voltage and power output by the constant current source device 112. If the plasma etching machine 10 adopts a large database-oriented solution for storing large-capacity log data, there will be problems of wasted storage resources and high read / write latency.
[0031] Based on this, this application provides a micro log management method for micro log data storage. By configuring a micro log storage module in the subsystem of the embedded system, the micro log data is stored. It occupies less storage resources, has a faster read and write speed, and is suitable for high-frequency data writing scenarios.
[0032] Figure 2 This is a system block diagram of a semiconductor device for storing micro-log data, provided in one embodiment.
[0033] The micro-log management method of this application is applied to the embedded system of a semiconductor device. For example... Figure 2 As shown, the embedded system of the semiconductor device includes multiple subsystems, such as a sensor subsystem, a calibration subsystem, and a power drive subsystem. Each subsystem is equipped with an independent micro-log storage module. Each micro-log storage module includes multiple storage slots. The storage slots are used to store micro-log data. The micro-log storage module writes data page by page. To facilitate the storage, indexing, and tracing of micro-log data, the capacity of each storage slot is a multiple of the page capacity.
[0034] The micro log storage module takes Electrically Erasable Programmable Read-Only Memory (EEPROM) as an example. The EEPROM is divided into 10 storage slots, and the capacity of each slot is a multiple of the page capacity of the EEPROM. For example, if the page capacity of the EEPROM is 32 bytes, then the storage capacity of each slot can be w × 32 bytes, where w is a positive number, such as 0.5, 1, or 2.
[0035] The micro log management method of this application embodiment is described in detail below.
[0036] Figure 3 This is a flowchart of a micro log management method provided in one embodiment.
[0037] like Figure 3As shown, the micro log management method includes the following steps: S101. Obtain the target micro log data of the target subsystem.
[0038] The target subsystem can be any one of the multiple subsystems in the embedded system, and the target subsystem is configured with a target micro log storage module. The amount of data in the target micro log is less than or equal to the total capacity of all storage slots in the target micro log storage module.
[0039] The target micro log storage module takes EEPROM as an example. The EEPROM is divided into 10 storage slots. If the capacity of each storage slot is 32 bytes, then the data volume of the target micro log is less than or equal to 320 bytes.
[0040] S102. Determine the target storage slot in the target micro log storage module based on the assigned target index variable.
[0041] The target index variable is used to indicate the logical address of the storage slot where data is about to be written.
[0042] In this embodiment, the semiconductor device first determines the logical address of the target memory slot based on the assigned target index variable, and then determines the physical address corresponding to the logical address of the target memory slot based on the Logical Block Address (LBA) mapping table.
[0043] It is understandable that the target micro log storage module stores the LBA mapping table of the target subsystem. The LBA mapping table is used to store the logical address of each storage slot and its corresponding physical address.
[0044] For example, the target micro log storage module includes 10 storage slots. The LBA mapping table stores the logical address and its corresponding physical address for each storage slot. If the index variable values for each of the 10 storage slots are 0 to 9, then the logical addresses of the 10 storage slots are 0 to 9 respectively. If the assigned target index variable value is 5, then the target storage slot is the storage slot with logical address 5. The physical address of the target storage slot can then be determined according to the LBA mapping table.
[0045] S103. Determine whether the target storage slot is an empty slot.
[0046] If yes, proceed to step S104; otherwise, proceed to steps S105 to S107.
[0047] In this embodiment, the semiconductor device can determine whether a target memory cell is a blank cell based on its status marker. Specifically, the status marker includes a first marker and a second marker. The first marker marks the memory cell as a blank cell, and the second marker marks the memory cell as a non-blank cell. When the status marker of the target memory cell is the first marker, the semiconductor device determines that the target memory cell is a blank cell. When the status marker of the target memory cell is the second marker, the semiconductor device determines that the target memory cell is a non-blank cell.
[0048] S104. Write the target micro log data to the target storage slot.
[0049] S105, Cache target micro log data.
[0050] S106. Perform an erase operation on the target storage slot.
[0051] S107. Write the cached target micro log data to the target storage slot.
[0052] It can be understood that after the semiconductor device writes the target micro-log data to the target storage slot, it sets the status flag of the target storage slot to the second flag. After erasing the data stored in the target storage slot, the semiconductor device sets the status flag of the target storage slot to the first flag.
[0053] In this embodiment, after determining that the target storage slot is a non-blank slot, the semiconductor device first caches the target micro-log data, and then performs an erase operation on the target storage slot to clear it. After the target storage slot is reset to a blank slot, the semiconductor device writes the cached target micro-log data back to the target storage slot.
[0054] It is understandable that semiconductor devices store micro log data by configuring independent micro log storage modules for each subsystem of the embedded system. The micro log storage modules store data based on consecutive storage slots, occupy less storage resources, have faster read and write speeds, and are suitable for high-frequency data writing scenarios.
[0055] Figure 4 This is a schematic diagram of a format for micro log data stored in a storage slot, provided in one embodiment.
[0056] like Figure 4 As shown, the data size of the micro-log data is 32 bytes, of which the index variable occupies 1 byte, the reserved bits occupy 1 byte, the timestamp occupies 4 bytes, and the valid data occupies 26 bytes. The index variable points to the logical address of the storage slot where the micro-log data is stored. The reserved bits are used for byte alignment. The timestamp is the start or finish time of writing micro-log data to the storage slot. The valid data is the micro-log data written to the storage slot.
[0057] It is understandable that the miniature log data stored in the storage slot includes index variables, timestamps, and valid data.
[0058] In one embodiment, before acquiring the target micro log data of the target subsystem, the micro log management method further includes: based on the startup of the semiconductor device or the reset of the target subsystem, retrieving the historical micro log data stored in each storage slot of the target micro log storage module; and determining the target index variable based on the historical micro log data stored in each storage slot.
[0059] It is understandable that when the semiconductor device starts up or the target subsystem is reset, the semiconductor device restores the target subsystem to the state after the last data write by rebuilding the state machine, thus completing the storage state initialization. Rebuilding the state machine involves retrieving historical micro-log data stored in each storage slot of the target micro-log storage module. Historical micro-log data includes index variables, timestamps, and valid data.
[0060] In the above embodiments, determining the target index variable based on the historical micro-log data stored in each storage slot includes: determining the latest log index variable and the oldest log index variable based on the timestamps of the historical log data stored in each storage slot; and determining the target index variable based on the latest log index variable and the oldest log index variable. The latest log index variable indicates the logical address of the storage slot where data was last written, and the oldest log index variable indicates the logical address of the storage slot where data was first written.
[0061] It is understandable that semiconductor devices can determine the usage order of each storage slot based on the latest and oldest log index variables. The usage order of each storage slot is in ascending order of its logical address. The semiconductor device can increment the value of the latest log index variable by 1 to obtain the target index variable. The value of the target index variable is greater than or equal to 0 and less than or equal to the total number of storage slots. When the value of the target index variable equals the total number of storage slots, since there is no storage slot corresponding to the target index variable, the semiconductor device determines the oldest log index variable as the target index variable. The value of the target index variable corresponds to the logical address of the target storage slot. When the value of the target index variable equals the total number of storage slots, it indicates that all storage slots store micro-log data. In this case, the oldest log index variable is determined as the target index variable. During the next data write, the storage slot corresponding to the oldest log index variable is used again, and the latest micro-log data overwrites the oldest micro-log data, thus achieving circular storage across all storage slots, forming a circular buffer architecture, thereby saving storage resources.
[0062] For example, the target micro-log storage module includes 10 storage slots, each with a logical address from 0 to 9. If the latest log index variable has a value of 5 and the oldest log index variable has a value of 0, the semiconductor device can increment the value of the latest log index variable by 1, resulting in a target index variable value of 6. As data is continuously written, the latest log index variable and the target index variable are continuously updated. When the value of the latest log index variable is 9, the semiconductor device increments the value of the latest log index variable by 1, resulting in a target index variable value of 10. At this point, the value of the target index variable equals the total number of storage slots. The semiconductor device then designates the oldest log index variable as the target index variable and reuses the storage slot corresponding to the oldest log index variable during the next data write, overwriting the oldest micro-log data with the latest micro-log data, thus achieving cyclic storage across the 10 storage slots.
[0063] In another embodiment, before acquiring the target micro log data of the target subsystem, the micro log management method further includes: collecting the operating parameters of the target subsystem; determining the working status of the target subsystem based on the operating parameters; storing the operating parameters to generate target micro log data based on the working status of the target subsystem being normal; and issuing an error prompt based on the working status of the target subsystem being abnormal.
[0064] The operating parameters include, but are not limited to, real-time sensor sampling data, equipment operating status snapshot data, and fault warning data.
[0065] It is understandable that the operating parameters of the target subsystem are used to evaluate its operating status. For example, if the operating parameters of the target subsystem are within a preset range, the semiconductor device determines that the target subsystem is operating normally. If the operating parameters of the target subsystem exceed the preset range, the semiconductor device determines that the target subsystem is operating abnormally. The preset range can be set as needed.
[0066] In another embodiment, after writing the target micro log data to the target storage slot, the micro log management method further includes: when the number of target storage slots for writing the target micro log data reaches the total number of storage slots in the target micro log storage module, synchronizing the data stored in all storage slots to the large-capacity log management system of the embedded system in blocks, and performing an erase operation on all storage slots.
[0067] It's understandable that a large-capacity log management system in an embedded system is used to store large amounts of log data. Large-capacity log data involves writing large amounts of data and requires significant node storage space, making it suitable for long-term storage. After all storage slots in the target micro-log storage module are filled with target micro-log data, the semiconductor device synchronizes the target micro-log data stored in all slots to the large-capacity log management system block by block, thereby achieving data synchronization and long-term storage across all storage slots. After synchronization, the semiconductor device performs an erase operation on all storage slots, releasing the capacity of all slots at once to prepare for subsequent continuous data writing.
[0068] In another embodiment, after writing the target micro log data to the target storage slot, the micro log management method further includes: when the number of target storage slots for writing the target micro log data reaches the total number of storage slots in the target micro log storage module, synchronizing the data stored in the target storage slot with the earliest writing time to the large-capacity log management system of the embedded system, and performing an erase operation on the target storage slot with the earliest writing time.
[0069] It is understandable that after all storage slots in the target micro-log storage module have stored target micro-log data, the semiconductor device synchronizes the target micro-log data stored in the target storage slot with the earliest write time to the large-capacity log management system in blocks, thereby achieving data synchronization and long-term storage of a single storage slot. After synchronization is complete, the semiconductor device performs an erase operation on the target storage slot with the earliest write time, thereby releasing the capacity of the single storage slot for subsequent data writing.
[0070] In another embodiment, writing the target micro log data to the target storage slot includes writing the target micro log data to the target storage slot via an atomic write method.
[0071] It is understandable that writing target micro-log data via atomic write means that the write operation cannot be interrupted. In the event of a power failure, only the data written once will be lost, and the entire sector of data will not be lost, thereby improving data reliability.
[0072] The following describes another embodiment of the micro log management method in conjunction with the state machine reconstruction mechanism.
[0073] like Figure 5 As shown, the micro log management method includes the following steps: S201. Based on the startup of the semiconductor device or the reset of the target subsystem, retrieve the historical micro log data stored in each storage slot of the target micro log storage module.
[0074] S202. Determine the target index variable based on the historical micro-log data stored in each storage slot.
[0075] In this embodiment, when the semiconductor device is started or the target subsystem is reset, the semiconductor device restores the target subsystem to the state after the last data write by rebuilding the state machine, so as to complete the storage state initialization.
[0076] S203. Collect the operating parameters of the target subsystem.
[0077] S204. Determine the operating status of the target subsystem based on the operating parameters.
[0078] S205. Determine whether the target subsystem is in a normal working state.
[0079] If yes, proceed to step S206; otherwise, proceed to step S207.
[0080] S206. Store runtime parameters to generate target micro log data.
[0081] After completing step S206, proceed to steps S208 to S210.
[0082] S207, Issue an error message.
[0083] In this embodiment, when the target subsystem is in a normal operating state, the semiconductor device stores the operating parameters of the target subsystem as target micro-log data in the cache space. When the target subsystem is in an abnormal operating state, the semiconductor device issues an error message to indicate that the target subsystem has malfunctioned.
[0084] S208. Obtain the target micro log data of the target subsystem.
[0085] In this embodiment, after the target micro log data is generated, the semiconductor device reads the target micro log data from the cache space.
[0086] S209. Determine the target storage slot in the target micro log storage module based on the target index variable.
[0087] S210. Determine whether the target storage slot is an empty slot.
[0088] If yes, proceed to steps S211 to S213; otherwise, proceed to steps S215 to S217.
[0089] S211. Write the target micro log data to the target storage slot.
[0090] S212. Increment the value of the target index variable by 1.
[0091] S213. Determine whether the value of the target index variable is equal to the total number of storage slots in the target micro log storage module.
[0092] If yes, proceed to step S214; otherwise, return to step S208.
[0093] S214. Determine the oldest log index variable as the target index variable.
[0094] After completing step S214, return to step S208.
[0095] In this embodiment, when the value of the target index variable is equal to the total number of storage slots in the target micro log storage module, since there is no storage slot corresponding to the target index variable, the semiconductor device determines the oldest log index variable as the target index variable. When writing data again, the storage slot corresponding to the oldest log index variable is used again, and the latest micro log data is used to overwrite the oldest micro log data, so as to realize the circular storage of all storage slots, forming a circular buffer architecture, thereby saving storage resources.
[0096] S215, Cache target micro log data.
[0097] S216. Perform an erase operation on the target storage slot.
[0098] S217. Write the cached target micro-log data to the target storage slot.
[0099] In this embodiment, the semiconductor device stores micro log data by configuring independent micro log storage modules for each subsystem of the embedded system. The micro log storage modules store data based on continuous storage slots, occupying less storage resources and having faster read and write speeds, making them suitable for high-frequency data writing scenarios.
[0100] After completing step S217, return to step S212.
[0101] The micro log management method of the present application has been described in detail above. The micro log management device of the present application is described below.
[0102] Figure 6 This is a schematic diagram of the structure of a miniature log management device provided in one embodiment.
[0103] Miniature log management devices are used in target subsystems of embedded systems within semiconductor devices. For example... Figure 6 As shown, the micro log management device 20 includes a microcontroller 210, a micro log storage module 220, a communication module 230, a monitoring module 240, and an output module 250.
[0104] The microcontroller 210 is electrically connected to the communication module 230, the monitoring module 240, and the output module 250. The microcontroller 210 is used to acquire target micro-log data from the target subsystem, determine the target storage slot in the micro-log storage module 220 based on the assigned target index variable; if the target storage slot is empty, it writes the target micro-log data into the target storage slot via the communication module 230; if the target storage slot is not empty, it caches the target micro-log data, performs an erase operation on the target storage slot, and writes the cached target micro-log data into the target storage slot via the communication module 230.
[0105] The microcontroller 210 is communicatively connected to the host computer 21. The host computer 21 can send a log read command to the microcontroller 210 to read the target micro log data stored in the micro log storage module 220.
[0106] The micro log storage module 220 includes multiple storage slots for storing micro log data. The number of micro log storage modules 220 can be one or more. When there are multiple micro log storage modules 220, the micro log management device 20 determines a target micro log storage module from among the multiple micro log storage modules 220 and uses the target micro log storage module to store the target micro log data.
[0107] Communication module 230 is electrically connected to micro log storage module 220. Communication module 230 is used to write target micro log data from microcontroller 210 to target storage slot.
[0108] The monitoring module 240 is used to collect the operating parameters of the target subsystem and transmit the operating parameters to the microcontroller 210. The microcontroller 210 determines the working status of the target subsystem based on the operating parameters; if the working status of the target subsystem is normal, it stores the operating parameters to generate target micro log data; if the working status of the target subsystem is abnormal, it controls the output module 250 to interrupt the output and issues an abnormal prompt.
[0109] The output module 250 is used to output corresponding parameters when the target subsystem is in a normal operating state. For example, if the micro log management device 20 is... Figure 1 The constant current source device 112 shown in the figure outputs a constant drive current from the output module 250.
[0110] For example, the host computer 21 can be the controller of the target subsystem, the micro log storage module 220 can be an EEPROM, the communication module 230 can be a data writing interface, the monitoring module 240 can be an analog-to-digital converter, a sensor, etc., and the output module 250 can be an output interface.
[0111] In one embodiment, the microcontroller 210 retrieves historical microlog data stored in each storage slot of the microlog storage module 220 based on semiconductor device startup or target subsystem reset, and determines the target index variable based on the historical microlog data stored in each storage slot.
[0112] In the above embodiment, the microcontroller 210 determines the target index variable based on the historical microlog data stored in each storage slot, including: determining the latest log index variable and the oldest log index variable based on the timestamps of the historical log data stored in each storage slot, and determining the target index variable based on the latest log index variable and the oldest log index variable. The latest log index variable indicates the logical address of the storage slot where data was last written, and the oldest log index variable indicates the logical address of the storage slot where data was first written.
[0113] It can be understood that the microcontroller 210 determines the target index variable based on the latest log index variable and the oldest log index variable, including: adding 1 to the value of the latest log index variable to obtain the target index variable; and determining the oldest log index variable as the target index variable when the value of the target index variable is equal to the total number of storage slots in the micro log storage module 220. The value of the target index variable is greater than or equal to 0 and less than or equal to the total number of storage slots in the micro log storage module 220.
[0114] In another embodiment, after the communication module 230 writes the target micro log data to the target storage slot, the microcontroller 210 is further configured to: when the number of target storage slots for writing the target micro log data reaches the total number of storage slots in the micro log storage module 220, call the communication module 230 to synchronize the data stored in all storage slots to the large-capacity log management system of the embedded system in blocks, and perform an erase operation on all storage slots.
[0115] In another embodiment, after the communication module 230 writes the target micro log data to the target storage slot, the microcontroller 210 is further configured to: when the number of target storage slots for writing the target micro log data reaches the total number of storage slots in the micro log storage module 220, call the communication module 230 to synchronize the data stored in the target storage slot with the earliest writing time to the large-capacity log management system of the embedded system, and perform an erase operation on the target storage slot with the earliest writing time.
[0116] In another embodiment, the communication module 230 writes the target micro log data into the target storage slot, including writing the target micro log data into the target storage slot via an atomic write method.
[0117] It is understood that the micro log management device 20 stores micro log data through the micro log storage module 220. The micro log storage module 220 stores data based on continuous storage slots, which occupies less storage resources and has a faster read and write speed, making it suitable for high-frequency data writing scenarios.
[0118] The micro log storage module 220 uses an EEPROM with a storage capacity of 32 kByte and a page capacity of 64 Byte as an example. Ten storage slots are partitioned from the EEPROM to construct a linear storage architecture. The target micro log data is... Figure 4 Taking the format shown as an example, the target micro-log data is 32 bytes, which is smaller than the page capacity of the EEPROM. The target micro-log data is written using atomic writes, without crossing pages in a single write operation, so only one page of data is lost upon power failure. Using Random Access Memory (RAM) as an example, with a RAM capacity of 6 bytes or less, the micro-log storage module 220 can achieve a write latency of less than 8 milliseconds (ms). Large-capacity log data storage typically uses a file system (such as FatFS). The file system writes log data to SPI-NOR Flash or SD card, requiring a RAM capacity of 2 kBytes or more. Sector erasure occupies 4 kByte to 64 kBytes of RAM, with a write latency of 10 ms to 100 ms, which can easily cause entire sectors of data corruption upon power failure. Thus, the micro-log storage module 220 occupies fewer storage resources and has a faster read / write speed. For higher real-time performance, the RAM can be replaced with ferroelectric RAM (FRAM), reducing the write latency to 0.3 ms.
[0119] Figure 7 This is a schematic diagram of the structure of a semiconductor device provided in one embodiment.
[0120] like Figure 7 As shown, semiconductor device 30 includes memory 310 and processor 320. Memory 310 is coupled to processor 320.
[0121] Memory 310 stores computer-executable program code, which includes instructions. Processor 320 executes the various functions or steps performed by the semiconductor device in the above embodiments by running the instructions stored in memory 310. Memory 310 includes a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc. The data storage area may store data created during the use of the semiconductor device. Memory 310 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, and Universal Flash Storage (UFS), etc.
[0122] Processor 320 includes a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU). The CPU handles control logic and serial computing tasks. The GPU handles image algorithm logic and parallel computing tasks. In some embodiments, processor 320 also includes a Neural-network Processing Unit (NPU), an Application Processor (AP), an Image Signal Processor (ISP), a Digital Signal Processor (DSP), a modem processor, and a video codec.
[0123] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the semiconductor device. In other embodiments, the semiconductor device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements.
[0124] The functions or steps performed by the semiconductor device in the above embodiments can also be applied to chips, computer-readable storage media, or computer program products.
[0125] The chip includes a processor and an interface circuit, with the processor and interface circuit electrically connected. The interface circuit can read computer instructions stored in the memory and send the computer instructions to the processor. When the processor executes the computer instructions, it implements the various functions or steps performed by the semiconductor device in the above embodiments.
[0126] The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the various functions or steps performed by the semiconductor device in the above embodiments.
[0127] Computer-readable storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer-readable storage media include, but are not limited to, RAM, read-only memory (ROM), EEPROM, flash memory or other memory, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.
[0128] The computer program product includes computer instructions that, when executed by a processor, implement the various functions or steps performed by the semiconductor device in the above embodiments.
[0129] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.
Claims
1. A micro log management method, characterized in that, It is applied to embedded systems of semiconductor devices, wherein the embedded system includes several subsystems, each subsystem is configured with an independent micro log storage module, and each micro log storage module includes multiple storage slots; the method includes: Based on the startup of the semiconductor device or the reset of the target subsystem, retrieve the historical micro log data stored in each storage slot of the target micro log storage module; The target index variable is determined based on the historical micro-log data stored in each of the storage slots; Obtain the target micro log data of the target subsystem, wherein the amount of the target micro log data is less than or equal to the total capacity of all storage slots in the target micro log storage module; The target storage slot in the target micro log storage module is determined based on the target index variable, whereby the target index variable is used to indicate the logical address of the storage slot where data is about to be written. Since the target storage slot is empty, the target micro log data is written into the target storage slot; Since the target storage slot is a non-empty slot, the target micro log data is cached, an erase operation is performed on the target storage slot, and the cached target micro log data is written back to the target storage slot.
2. The method as described in claim 1, characterized in that, The target micro log storage module writes data page by page, and the capacity of each storage slot in the target micro log storage module is a multiple of the page capacity.
3. The method as described in claim 1, characterized in that, The step of writing the target micro log data into the target storage slot includes: The target micro-log data is written to the target storage slot using atomic write.
4. The method as described in claim 1, characterized in that, The step of determining the target index variable based on the historical micro-log data stored in each storage slot includes: The latest log index variable and the oldest log index variable are determined based on the timestamps of the historical micro log data stored in each storage slot. The latest log index variable is used to indicate the logical address of the storage slot where data was last written, and the oldest log index variable is used to indicate the logical address of the storage slot where data was first written. The target index variable is determined based on the latest log index variable and the oldest log index variable.
5. The method as described in claim 4, characterized in that, Determining the target index variable based on the latest log index variable and the oldest log index variable includes: The value of the latest log index variable is incremented by 1 to obtain the target index variable; the value of the target index variable is greater than or equal to 0 and less than or equal to the total number of storage slots in the target micro log storage module; When the value of the target index variable is equal to the total number of storage slots in the target micro log storage module, the oldest log index variable is determined as the target index variable.
6. The method as described in claim 1, characterized in that, Before acquiring the target micro log data of the target subsystem, the method further includes: Collect the operating parameters of the target subsystem; The operating status of the target subsystem is determined based on the operating parameters; Based on the fact that the target subsystem is in a normal working state, the operating parameters are stored to generate the target micro log data; An error message is issued based on the fact that the target subsystem is in an abnormal operating state.
7. The method as described in claim 1, characterized in that, After writing the target micro-log data into the target storage slot, the method further includes: When the number of target storage slots for writing the target micro log data reaches the total number of storage slots in the target micro log storage module, the data stored in all storage slots is synchronized to the large-capacity log management system of the embedded system in blocks, and an erase operation is performed on all storage slots.
8. The method as described in claim 1, characterized in that, After writing the target micro-log data into the target storage slot, the method further includes: When the number of target storage slots for writing the target micro log data reaches the total number of storage slots in the target micro log storage module, the data stored in the target storage slot with the earliest writing time is synchronized to the large-capacity log management system of the embedded system, and an erase operation is performed on the target storage slot with the earliest writing time.
9. A semiconductor device, characterized in that, It includes a memory and a processor, which implements the method as described in any one of claims 1 to 8 when the processor executes computer instructions stored in the memory.
10. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 8.