A FLASH emulator supporting power-off data randomization
By designing the power-down data randomization module in the FLASH emulator, the data randomization function during high voltage is realized, which solves the problem that the existing technology cannot simulate the random data situation of the FLASH chip, and meets the requirements of software development and interface power-down testing. demand and improve the quality of software development.
Patent Information
- Application Number
- CN202010384232.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-09
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-05-09
AI Technical Summary
Existing FLASH emulators cannot effectively simulate the third situation of FLASH chips during erasing and writing: random data, and cannot meet the needs of software development and interface power-down testing.
A FLASH emulator including a FLASH interface processing module, a data path selection module, a power-off data randomization module, an erasure control module and a memory module is designed. Through the power-off detection module, reset control module and random number generation module, it is realized The data randomization function during the high-voltage period of FLASH supports data to be correctly written, maintain the original value, or write random data when the interface is powered off.
The data randomization function during FLASH high voltage period is realized, which meets the needs of software development and interface power-down testing, and improves the quality of software development.
Smart Images

Figure CN111597699B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of chip emulators, and in particular to a FLASH emulator supporting power-off data randomization. Background Art
[0002] In order to improve the reliability of FLASH chips, many manufacturers have proposed software and hardware solutions based on FTL (Flash Translation Layer) technology. This solution requires that the software design and testing must support various data processing after the FLASH chip is powered off and not powered off, and complete the interface power-off function test. If the FLASH chip used by the customer loses power during the FLASH erase and write period, the storage unit data generally has three situations: new data, original data and random data.
[0003] Based on the requirements of FLASH chip hardware and software collaborative development and testing, most FLASH chips need to be debugged on FLASH emulators for FLASH functions and software design, development and debugging. General FLASH emulators use FPGA (Field Programmable Gate Array) to simulate the functions of FLASH chips, complete basic commands such as FLASH erase, write and read, and simulate FLASH erase delay through counters to achieve the delay effect of real FLASH chip erase.
[0004] This type of simulator usually implements the functional simulation of two situations: power failure and data writing during FLASH erasing (during the high voltage period of erase and programming commands). If there is no power failure during FLASH erasing, the data is correctly written into the storage unit; if the interface loses power during FLASH erasing, the data is either correctly written into the storage unit or not written and the original data value is retained. The third random data situation of the actual FLASH chip is not simulated, and the requirements of software development and interface power failure testing cannot be met.
[0005] In view of the above problems, the present invention proposes a FLASH emulator that supports power-off data randomization. The FLASH emulator supports FLASH erase, write and read operations; the FLASH emulator supports interface power-off during FLASH high voltage, and data may be written correctly, or keep the original data unchanged, or write randomized data. The FLASH emulator has the function of randomizing data during power-off during FLASH high voltage, which is convenient for software development and interface power-off testing to ensure the quality of software development. Summary of the invention
[0006] The invention solves the problem of how to realize the function of randomizing power-off data in a FLASH emulator, so as to realize the functional simulation of randomizing power-off data of a FLASH chip.
[0007] To achieve the above functions, the simulator of the present invention includes: a FLASH interface processing module, a data path selection module, a power-off data randomization module, an erase control module, a read control module and a memory module.
[0008] The FLASH interface processing module is connected to the FLASH controller interface to realize the interface signal processing function of the FLASH controller erase command, write command and read command; the FLASH interface processing module outputs a high voltage enable HV_EN signal to control the power-off data randomization module and the data path selection module; the data path selection module is connected to the FLASH interface processing module, the power-off data randomization module and the read control module to realize the path control function of erasing and reading data; the power-off data randomization module is connected to the data path selection module, the erase control module and the read control module to realize the function of generating random data values when the FLASH is powered off during erase and write, or the function of maintaining the original erase data value of the interface when the power is not powered off during erase and write; the erase control module is connected to the power-off data randomization module and the memory module to realize the FLASH erase and write control function; the read control module is connected to the memory module, the power-off data randomization module and the data path selection module to read the memory module data of the interface read address, or read the memory module data of the current erase and write address; the memory module is connected to the erase control module and the read control module to realize the data storage and reading functions.
[0009] The simulator of the present invention, wherein the power-off data randomization module comprises: a power-off detection module, a reset control module, an erase data processing module and a random number generation module. The power-off detection module detects the states of the interface power-off PORn signal and the erase high voltage enable HV_EN signal, outputs the data randomization enable FILL_EN signal, and realizes the interface power-off detection and control functions; the erase data processing module is connected to the random number generation module, the erase control module, the read control module and the data path selection module, and realizes the erase data processing function; the reset control module, under the control of the PORn signal and the FILL_EN signal, outputs the high voltage reset HV_RST signal, and realizes the reset control function of the erase control module; the random number generation module is connected to the erase data processing module to generate random numbers. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Attached Figure 1 It is a structural diagram of the FLASH emulator of the present invention.
[0011] Attached Figure 2 It is a timing diagram of data processing during power failure during high voltage of the present invention. DETAILED DESCRIPTION
[0012] In order to better understand the present invention, its functional principle is described in detail below with reference to the accompanying drawings.
[0013] like Figure 1 The figure shows the structure diagram of the FLASH emulator of the present invention. The FLASH interface processing module outputs a high voltage enable HV_EN signal to control the operation command of the current FLASH controller; the power failure detection module outputs a randomization enable FILL_EN signal to control the randomization data enable of the current FLASH erase operation; the reset control module outputs a high voltage reset HV_RST signal to control the reset of the erase control module.
[0014] When the HV_EN signal is at a high level, it indicates that a FLASH erase / write operation is currently in progress, and the power-off detection module starts the interface power-off detection function. If it is detected that the PORn signal has a power-off and becomes a low level, the power-off detection module outputs a FILL_EN signal at a high level, and starts the power-off data randomization function of the data randomization processing module. If it is detected that the PORn signal is always at a high level, the power-off detection module outputs a FILL_EN signal at a low level, and the data of the data randomization processing module maintains the original erase / write value. When the HV_EN signal is at a low level, it indicates that a FLASH erase / write operation is not currently in progress, and the power-off detection module does not start the power-off detection function, and outputs a FILL_EN signal at a low level.
[0015] When the FILL_EN signal is at a high level, the HV_RST signal output by the reset control module is at a low level until the current erase operation is completed and then becomes a high level to reset the erase control module; when the FILL_EN signal is at a low level, the HV_RST signal output by the reset control module changes synchronously with the PORn signal.
[0016] The power-off data randomization module generates random data according to the principle of "the original data bit is 1, the interface is powered off when writing 0, and the new data bit is randomly 1 or 0" during the write operation; the power-off data randomization module generates random data according to the principle of "the original data bit is 0, the interface is powered off when erasing 1, and the new data bit is randomly 0 or 1" during the erase operation.
[0017] The storage medium in the memory module is not limited to the BlockRAM in the FPGA, but also includes other storage media such as off-chip SRAM.
[0018] like Figure 2 The figure shows a timing diagram of the power-off data processing during high voltage period of the present invention. The FLASH high voltage period is divided into two stages, the checking stage and the writing stage.
[0019] Detection phase: After the high-voltage enable HV_EN signal is valid at a high level, while the detection enable CHECK_EN signal is always valid, when the PORn signal is powered off and becomes a low level, the fill enable FILL_EN signal becomes a valid high level in the write phase; when the PORn signal is always at a high level, the fill enable FILL_EN signal is invalid at a low level.
[0020] Write phase: After the high voltage enable HV_EN signal is valid and the CHECK_EN signal becomes low, the write phase is entered. If the fill enable FILL_EN signal is high, the data after power-off data randomization is written into the memory cell; if the fill enable FILL_EN signal is low, the original data is written into the memory cell.
[0021] After the data is written into the FLASH memory, the high voltage enable HV_EN signal becomes low level, completing the current erase and write operation. If the previous data is randomized during power failure during high voltage, the HV_RST signal becomes high level, resetting the erase and write control module; if the previous data is written normally during high voltage, the HV_RST signal remains low level, and the subsequent FLASH operations continue.
Claims
1. A FLASH emulator supporting power-off data randomization, comprising a FLASH interface processing module, a data path selection module, a power-off data randomization module, an erase control module, a read control module and a memory module, The FLASH interface processing module is connected to the FLASH controller interface to realize the interface signal processing function of the FLASH controller erase command, write command and read command; the FLASH interface processing module outputs the high voltage enable HV_EN signal to control the power-off data randomization module and the data path selection module; The data path selection module is connected with the FLASH interface processing module, the power-off data randomization module and the read control module to realize the path control function of erasing and reading data; The power-off data randomization module is connected to the data path selection module, the erase control module and the read control module to realize the function of generating random data values when the FLASH is powered off during erase or write, or the function of maintaining the original erase data value of the interface when the power is not off during erase; The erase control module is connected with the power-off data randomization module and the memory module to realize the FLASH erase control function; A read control module is connected to the memory module, the power-off data randomization module and the data path selection module to read the memory module data of the interface read address or the memory module data of the current erase / write address; The memory module is connected to the erase and write control module and the read control module to realize the data storage and reading functions; The power-off data randomization module includes: a power-off detection module, a reset control module, an erase data processing module and a random number generation module, wherein: the power-off detection module detects the states of the interface power-off PORn signal and the high voltage enable HV_EN signal, outputs the randomization enable FILL_EN signal, and realizes the interface power-off detection and control functions; the erase data processing module is connected to the random number generation module, the erase control module, the read control module and the data path selection module, and realizes the erase data processing function; The reset control module outputs a high-voltage reset HV_RST signal under the control of the PORn signal and the FILL_EN signal to realize the reset control function of the erase control module; the random number generation module is connected to the erase data processing module to generate random numbers; When the high voltage enable HV_EN signal is at a high level, it indicates that a FLASH erase / write operation is currently being performed, and the power-off detection module starts the interface power-off detection function. If it is detected that the PORn signal is powered off and becomes low, the power-off detection module outputs a FILL_EN signal at a high level, and starts the power-off data randomization function of the data randomization processing module to generate randomized data; if it is detected that the PORn signal is always at a high level, the power-off detection module outputs a FILL_EN signal at a low level, and the data of the data randomization processing module maintains the original data value; when the HV_EN signal is at a low level, it indicates that a FLASH erase / write operation is not currently being performed, the power-off detection module does not start the power-off detection function, and outputs a FILL_EN signal at a low level; The high-voltage reset HV_RST signal, when the FILL_EN signal is at a high level, the reset control module outputs the HV_RST signal as an invalid low level, and it does not become a valid high level until the current erase operation is completed, resetting the erase control module; when the FILL_EN signal is at a low level, the HV_RST signal output by the reset control module changes synchronously with the PORn signal.
2. A FLASH emulator supporting power-off data randomization according to claim 1, characterized in that During the write operation, the power-off data randomization module generates random data according to the principle of "the original data bit is 1, the power is off when writing 0, and the new data bit is randomly 1 or 0".
3. A FLASH emulator supporting power-off data randomization according to claim 1, characterized in that During the erase operation, the power-off data randomization module generates random data according to the principle of "the original data bit is 0, the power is off when erasing 1, and the new data bit is randomly 0 or 1".
4. A FLASH emulator supporting power-off data randomization according to claim 1, characterized in that The storage medium in the memory module is not limited to the BlockRAM in the FPGA, but also includes off-chip SRAM storage medium.
Citation Information
Patent Citations
FLASH simulator supporting power-down data randomization
CN212782027U
