Serial NAND Flash Memory with On-Chip Execution Capability
Through shadow random access memory and mapping table technology, the problem of slow reading speed and wrong bits of NAND flash memory is solved, efficient data access and error correction are achieved, and the execution speed and accuracy of the system are improved.
Patent Information
- Application Number
- CN202110715918.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-02-19
- Filing Date
- 2021-06-25
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-06-25
AI Technical Summary
The read speed of NAND gate flash memory is slow and random access cannot be achieved, resulting in slow program execution and prone to error bit problems, requiring additional error correction code processing.
Using shadow random access memory and mapping table, the data in the NAND flash memory is mapped to the shadow random access memory through the serial peripheral interface to implement on-chip execution, and error bits are processed through the error correction code engine.
It improves the data access speed, ensures the accuracy of data, and realizes the random access capability of NAND gate flash memory, improving the system's response time and execution efficiency.
Smart Images

Figure CN114974374B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an integrated circuit and an operating method thereof. Background Art
[0002] The architecture of NOR Flash memory provides enough position lines to project to a complete memory range, so NOR Flash memory provides the advantages of random access and short read time, and can be ideally applied to program execution. In contrast, NAND Flash memory has a smaller storage cell size, higher memory density, and higher write and erase speed. However, compared with NOR Flash memory, NAND Flash memory has a slower read speed, so NAND Flash memory does not allow direct random access. For program code execution, especially for accessing program code, the execution speed of NAND Flash memory is slower than that of NOR Flash memory. Since NOR Flash memory has the ability of random access, NOR Flash memory can process programs in the execute in place (XiP) mode. In contrast, NAND Flash memory does not provide direct random access, so NAND Flash memory does not have the ability of in-chip execution. In addition, NAND flash memories may often have bad bits. Therefore, when NAND flash memories are transmitting data, the data reading operation must also integrate the function of error correction code to repair or compensate for the bad bits.
[0003] Public Content
[0004] In order to overcome the technical problems existing in the above-mentioned prior art, the present disclosure provides a technical solution, which is based on the hardware architecture of serial NAND flash memory (NAND Flash memory) and shadow random access memory (ShadowRAM), and uses a mapping table to access programs and data. It has the ability to execute in the chip to achieve the technical effect of improving data access speed and ensuring data correctness.
[0005] The present disclosure provides a method, comprising: determining the location of a first data in a NAND flash memory of an electronic device according to powering on the electronic device, transmitting the first data to a shadow random access memory of the electronic device, and when accessing the location of the first data in the NAND flash memory, outputting the first data from the shadow random access memory to a host device of the electronic device via a serial peripheral interface (SPI).
[0006] In the above method disclosed in the present invention, the first data is a program code of a boot loader. The first data in the shadow random access memory can be randomly accessed. The first data is an executable program executed by the host device, and the first data is executed after the system is started by the electronic device, and the instructions in the first data are retrieved from the shadow random access memory in an execute in place (XiP) mode. After the system is started, the electronic device can provide a command to map the shadow random access memory to a different location other than the first data.
[0007] According to the instruction, a second data can be transmitted from the NAND flash memory to a system memory of the electronic device, and the transmitted second data can be executed in the system memory. The second data is an application firmware program code.
[0008] The step of transmitting the second data includes: accessing a page of the NAND flash memory, reading the second data at a specified address by randomly accessing the page of the NAND flash memory, transmitting the second data by outputting the second data to a data cache area through a page buffer of the NAND flash memory, and transmitting the second data from the data cache area to a system random access memory.
[0009] The step of transmitting the first data includes: accessing a page of the NAND flash memory, reading the first data at a specified address by randomly accessing the page of the NAND flash memory, outputting the first data to a data cache area through a page buffer of the NAND flash memory to transmit the first data, and transmitting the first data from the data cache area to the shadow random access memory. The step of accessing the page of the random access memory includes: accessing multiple pages of the NAND flash memory.
[0010] The step of transmitting the first data from the data cache area to the shadow random access memory includes: reading the first data temporarily stored in the data cache area into an error correction code (ECC) engine, performing error correction on the first data in the ECC engine, and returning the corrected first data to the data cache according to the error correction completed. The designated address is stored in a non-volatile register.
[0011] The step of determining the first data includes: automatically executing the operation process of the electronic device in response to the power of the electronic device being turned on, wherein the operation includes reading the first data according to the specified address set of the first data in the NAND gate flash memory.
[0012] The method includes a data read operation, which includes: sending out multiple exclusive designated commands to perform data read operations on the shadow random access memory and the NAND flash memory respectively, wherein the electronic device uses an RD command for random access and a PgRD command for accessing a page of the NAND flash memory.
[0013] The data read operation includes: sending a unified command to perform a data read operation on the shadow random access memory and the NAND gate flash memory, and using an indicator signal to indicate whether the data is valid and can be transmitted in the variable waiting period. The indicator signal is an independent signal or a composite signal. The composite signal uses an existing data strobe signal (DS), and when the memory is ready to transmit data, the data strobe signal is driven from a tri-state to a logic low state, wherein the length of the waiting period can be configured by controlling the data strobe signal, and wherein the output data is aligned with the data strobe signal. The composite signal uses an existing interrupt signal.
[0014] The data read operation includes: executing a data read command according to an address included in the first data and stored in the shadow random access memory. The data read operation includes: verifying an input address from the host device through a control logic of the electronic device, and checking a mapping table to determine whether the input address corresponds to a data read operation in the shadow random access memory and the NAND flash memory. The mapping table includes a plurality of addresses, wherein the addresses include a source location of the NAND flash memory and a destination location of the shadow random access memory, and the mapping table is established when the system power is turned on, wherein the mapping table is established according to a non-volatile register that records the location of the first data residing in the NAND flash memory.
[0015] In another embodiment of the present disclosure, a method is also provided, including: determining the location of a first data in a serial NAND flash memory of an electronic device according to power-on of the electronic device, accessing a page of the serial NAND flash memory, reading the first data at a specified address by randomly accessing the page of the serial NAND flash memory, outputting the first data to a data cache area through a page buffer of the serial NAND flash memory to transmit the first data, and transmitting the first data from the data cache area to a shadow random access memory of the electronic device.
[0016] The above-mentioned method disclosed in the present invention also includes: after a system is started up by the electronic device, a host device executes an instruction in an in-chip execution mode in the first data of the shadow random access memory, and according to the executed instruction, the second data is transmitted from the serial NAND gate flash memory to a system random access memory of the electronic device.
[0017] The step of transmitting the second data includes: accessing a page of the serial NAND flash memory, reading the second data at a specified address by randomly accessing the page of the serial NAND flash memory, outputting the second data to a data cache area through a page buffer of the serial NAND flash memory to transmit the second data, and transmitting the second data from the data cache area to a shadow random access memory of the electronic device.
[0018] In another embodiment of the present disclosure, a serial NAND flash memory is also provided for performing data transfer operations through a serial peripheral interface. The serial NAND flash memory includes: a NAND flash memory for storing data, a non-volatile register for recording a source address for data transfer, a shadow random access memory connected to the NAND flash memory via a data cache area, wherein the data cache area is associated from the NAND flash memory to the shadow random access memory, and a control circuit connected to the NAND flash memory and the shadow random access memory, wherein the control circuit is used to: determine the location of a first data in a NAND flash memory of an electronic device according to power-on of the electronic device, and transmit the first data to a shadow random access memory of the electronic device.
[0019] The above-mentioned device of the present disclosure also includes: a mapping table connected to the control circuit, wherein the mapping table includes a NAND gate cache memory address of the first data and the address information of the shadow random access memory, and wherein the control circuit is used to: verify the NAND gate flash memory input address transmitted from a host device of an electronic system, determine whether the input address corresponds to the NAND gate flash memory address of the first data, and redirect the data reading operation in the shadow random access memory or read the NAND gate flash memory according to the determination result. The serial NAND gate flash memory also includes a data cache area connected to the NAND gate flash memory and the shadow random access memory, and the data cache area is used to temporarily store the data output by the serial NAND gate flash memory. The error correction code engine is connected to the shadow random access memory and the data cache area, wherein the error correction code engine is used to: read the first data temporarily stored in the data cache area, perform error correction on the first data of the error correction code engine, and return the corrected first data to the data cache area based on the completed error correction.
[0020] The serial peripheral interface bus includes a data input / output line, a clock signal line, and a chip select signal line, which are used to communicate between a host device and other components of the electronic device. The serial NAND gate flash memory further includes an indicator signal, which indicates whether the data is valid and can be transmitted in a variable waiting period. The indicator signal is an independent signal or a composite signal. The composite signal is an existing data selection signal, and when the memory is ready to transmit data, the data selection signal is driven from a tri-state to a logic low state, wherein the length of the waiting period can be configured by controlling the data selection signal, and wherein the output data is aligned with the data selection signal. The composite signal is an existing interruption signal.
[0021] Other aspects and advantages of the present disclosure will become apparent from a review of the following drawings, detailed description, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is an embodiment of an electronic device system 100 .
[0023] Figure 2 FIG. 2 is a block diagram of an exemplary device 200 capable of providing the first device 110 in the electronic device system.
[0024] Figure 3 FIG. 3 is a flow chart of an exemplary process 300 for running in execute-in-chip (XiP) mode.
[0025] Figure 4A A timing diagram of a data read operation in a shadow RAM in one embodiment.
[0026] Figure 4B FIG. 1 is a timing diagram of a data read operation in a NAND flash memory in one embodiment.
[0027] Figure 5 FIG. 1 is a timing diagram of a data reading operation in the electronic device system 100 in another embodiment.
[0028] Description of Reference Numerals
[0029] 100: Electronic device system
[0030] 110: Installation
[0031] 112: Device controller
[0032] 113: Control circuit
[0033] 114, 124: Serial Peripheral Interface
[0034] 115: NAND flash interface
[0035] 116: NAND Flash Memory Die
[0036] 120: Host device
[0037] 121: Processor
[0038] 122: On-chip random access memory
[0039] 123: Miscellaneous modules
[0040] 130: External RAM / DRAM
[0041] 140: Serial Peripheral Interface Bus
[0042] 200: Storage device
[0043] 202: Control circuit
[0044] 204: NAND Flash Memory
[0045] 205: Control Logic
[0046] 206: Paging Buffer
[0047] 207: NAND Gate Interface
[0048] 208: Data cache area
[0049] 210: Shadow RAM
[0050] 212: Error Correction Code Engine
[0051] 214: Control register
[0052] 218: Mapping table
[0053] 220: Data buffer
[0054] 302-330: Steps
[0055] 400, 500: Timing diagram DETAILED DESCRIPTION
[0056] The present disclosure describes an electronic device having an NAND flash memory with execute in place (XiP) capability. Specifically, the electronic device includes a host device that transmits data to and from the NAND flash memory in a serial manner. The NAND flash memory includes a NAND flash memory having a serial or parallel interface and a high memory density for data storage. In order to improve the response time of the electronic device and provide a random access memory for data reading operation in an execute in place (XiP) mode, the electronic device is used to mirror the data stored in the NAND flash memory to a shadow RAM. More specifically, when the power of the electronic device is turned on, the electronic device automatically transfers an executable program (e.g., a boot loader) from the NAND flash memory to the mapped RAM. The transfer is initiated by determining a location range of the executable program (e.g., a boot loader) stored in the NAND flash memory array. Then, the electronic device transfers the executable program by accessing one or more pages of the NAND flash memory and accesses the executable program on each of the one or more pages. The data packets (e.g., one or more characters) of the executable program are temporarily stored in a data cache for data error correction by an error correction code (ECC) engine of the electronic device. The executable program continues to be transferred until the last page of the NAND flash memory storing the executable program is completed.
[0057] For application firmware stored in the electronic device, the electronic device can read the programmable program (e.g., a boot loader) from the shadow random access memory and execute it in the on-chip execution mode. The executable program can include an operation command (e.g., a data read operation) and location range information of the application firmware stored in the NAND flash memory. By executing a boot loader in the on-chip execution mode, the electronic device can output the application firmware from the NAND flash memory to a system memory to perform further operations including directly executing the application from the system memory.
[0058] Figure 1The present invention is an embodiment of an electronic device system 100 including a host device 120, a storage device 110 and an external memory 130. The host device 120 includes a processor 121 for executing the operation of the host device 120 and an on-chip memory (e.g., an on-chip random access memory 122 for storing data or instructions). The on-chip random access memory 122 is connected to the processor 121 to transfer data to or from the processor 121. In addition, the host device 120 also includes a plurality of input ports (not shown) in a serial peripheral interface (SPI) 124, and the host device 120 can transmit or receive instructions or data to the storage device 110 via these input ports. The host device also includes a plurality of miscellaneous modules 123 connected to the processor 121. In this embodiment, the local device 120 transfers the received data to the external memory 130 embedded in the electronic device system 100 and connected to the host device 120. In this embodiment, the external memory 130 is a random access memory that stores instructions and data used by the host device 120. The external memory 130 can be a dynamic random access memory (DRAM) that stores instructions and data. Figure 1 As shown, a serial peripheral interface bus (SPI bus) 140 is connected to the host device 120 and the device 110 for communication. Generally speaking, the SPI bus 140 uses a "host-slave architecture" with a single host in full-duplex mode to connect to electronic devices. In some embodiments, the SPI bus 140 is upgraded and enhanced to support multiple input / output (I / O) to become an expanded serial peripheral interface bus (Expanded SPI, xSPI) defined by the Joint Electronic Device Engineering Council Solid State Technology Association (JEDEC Solid State Technology Association).
[0059] The device 110 includes a device controller 112, which may be a first die. Furthermore, the device 110 also includes a NAND flash memory die 116, which may be a separate second die. The device controller 112 includes a control circuit 113, a serial peripheral interface 114, and a NAND flash interface 115. In some embodiments, the system 100 may include one or more storage devices 110 connected to the host device 120. Here, the NAND flash memory die 116 may be an array of NAND flash memories, which are sequentially arranged in pages. The device controller 112 is connected to the NAND flash memory die 116 and is used to read data from the NAND flash memory die 116 or write data to the NAND flash memory die 116. Figure 1 As shown, the controller 112 is used to transfer data in a serial manner via the SPI 114 and the SPI bus 140 .
[0060] In some embodiments, the device 110 is a storage device. Also, in some embodiments, the device 110 is a slave device selected by a master device, wherein the master device is, for example, the host device 120 .
[0061] In some embodiments, the host device 120 is a host device, and the storage device 110 is a slave device. The electronic device system 110 has a single host-multiple slave bus topology, wherein the SPI bus 140 communicates with the host device 120 and the slave device 110.
[0062] The device controller 112 includes a control circuit 113, which can be a state machine controller, a special application microcontroller, or a general purpose microprocessor. Here, the controller 112 controls the operation of reading and writing data on the NAND flash memory die 116. In this embodiment, the storage device 110 includes two different dies (e.g., the controller die 112 or the NAND flash memory die 116). In some other embodiments, the controller 112 and the NAND flash memory die 116 are integrated into the same die, for example, the storage device 110 is manufactured in a monolithic manner.
[0063] In this embodiment, the processor 121 is used to execute instructions and process data, wherein the instructions and data executed or processed are obtained from the storage device 110 via the serial peripheral interface bus 140. In some embodiments, the processor 121 is a general-purpose microprocessor or a special application microcontroller. In addition, the processor 121 can also be a central processing unit.
[0064] The processor 121 also accesses instructions and data from the on-chip random access memory 122. For example, after the executable program in the storage device 110 is executed by the processor 121 in the on-chip execution mode, other instructions or processed data (e.g., application firmware) can be transferred from the storage device 110 to the on-chip random access memory 122 via the serial peripheral interface bus 140, and then the processor 121 can execute the instructions from the on-chip random access memory 122.
[0065] In some implementations, the external memory 130 is a cache memory. Figure 1 As shown, the cache memory is connected to the storage device 110 via the host device 120. The external memory 130 stores instruction codes from the storage device 110 and / or data requested by the processor 121, wherein the instruction codes correspond to instructions executed by the processor 121, and the data are requested by the processor 121 during operation.
[0066] The device controller die 112 transfers the instruction code and / or data from the NAND flash memory die 116 to the external memory 130. In the present embodiment, the NAND flash memory die 116 is a non-volatile memory for long-term storage of instructions and / or data; the NAND flash memory die 116 is, for example, a serial NAND or parallel NAND flash memory device. In the embodiment where the memory die 116 is a NAND flash memory, the storage device 110 is a NOR flash memory, which is simulated to provide features similar to the NOR flash memory by managing the same mechanisms as the connected NAND flash memory, such as error correction, shadowing, bad block replacement or skipping.
[0067] Serial Peripheral Interface Bus (for example: Figure 1The SPI bus 140 is a typical interface commonly used in the device 110 to access the NAND flash memory. When integrated into an embedded system (e.g., a microcontroller), the serial NAND flash memory requires fewer wire connections on the printed circuit board (PCB) of the electronic device system 110 when the serial NAND flash memory transmits one bit of data per clock cycle compared to the parallel NAND flash memory. For the electronic device system 100, the use of the serial NAND flash memory has the following advantages: it occupies less circuit board space, has low power consumption, and reduces the cost of the overall system.
[0068] In the present embodiment, the NAND flash memory die 116 may be a parallel NAND flash memory, for example, a 2Gb single level cell (SLC) NAND flash memory with a parallel interface. The flash memory device 110 converts the parallel data from the NAND flash memory die 116 into a serial format to output the converted serial format data to the serial peripheral interface 114 via the device controller 112. The NAND flash memory may support a four-wire bus with a page size of 1168+64 characters and a block size of 128K+4K characters. The NAND flash memory may also support random data read in x1, x2, x3 or x4 mode, wherein the array to register delay time of the read data is 25us, and it operates at a frequency of 104MHz. In addition, the NAND flash memory can program a page in about 300us, erase a block in about 1ms, and operate at a single voltage ranging from 2.7V to 3.6V. Moreover, the NAND flash memory die 116 can cooperate with the device controller 112 to support 4-bit error correction code (ECC) and 528-character operation. In another alternative embodiment, the NAND flash memory can be a serial NAND flash memory.
[0069] As described above, the SPI bus 140 is a serial synchronous communication bus used for communication and interconnection between the host device 120 and the device 110. The SPI bus 140 supports a single host-multiple slave bus topology, and its synchronous clock signal is provided by the host device 120 of the electronic device system 100. The SPI bus 140 also supports 24-bit and 32-bit addressing, data reading and writing for DDR devices, and a multi-line interface as an extended serial peripheral interface (xSPI).
[0070] In some embodiments, the external system memory 130 may be a static random access memory (SRAM), a virtual static random access memory (PSRAM), or a dynamic random access memory (DRAM). The external system memory 130 may be located outside the host device 120. In this case, the system memory 122 is used to store instructions and data transferred from the storage device 110 via the host device 120.
[0071] Furthermore, as mentioned above, the electronic device system 100 may include multiple devices 110 as slave devices therein; and Figure 1 In the illustrated mode, the number of slave devices can be increased by using different techniques, such as integrating a multiplexer to generate chip select signals.
[0072] Figure 2 FIG. 1 is a block diagram of an exemplary memory device 200 that can provide the first memory device 110 in the electronic device system 100. Here, the memory device 200 is an integrated monolithic chip (or "monolith") for implementing Figure 1 The storage device 110 of the present invention is a device 200. The device 200 includes a NAND flash memory chip 116 and a controller 112 associated therewith. In the present embodiment, the controller 112 includes circuit blocks, such as a control circuit 202, an error correction code engine 212, a control register 214, a mapping table 218, a serial peripheral interface 114, and a NAND interface 115. In addition, the controller 112 includes a shadow random access memory 210 and a data buffer 220, which are connected to the NAND flash memory chip 116 via the NAND interface 115.
[0073] In the present embodiment, the NAND flash memory die 116 includes a NAND flash memory 204, which is a NAND flash array. The NAND flash memory 204 can be directly integrated with other components and integrated in the storage device 200. The NAND flash memory die 116 is connected to the control logic 205, and the NAND flash memory die 116 is operated by the control logic 205; wherein the control logic 205 operates the NAND flash memory die 116 according to the command transmitted from the host device 120 via the serial peripheral interface 114, the NAND interface 115, and the NAND interface 207. Compared with other types of flash memories (e.g., NOR flash), the NAND flash memory die 116 has a smaller memory cell size and a higher data writing and erasing speed. However, the access delay time of the NAND flash memory 204 is usually longer, so it cannot provide random access for data reading. At the beginning of each data read cycle, the content of each page is read sequentially by address and command. Furthermore, the NAND flash memory 204 is connected to the data cache 208 via the page buffer 206 of the NAND flash memory 204 .
[0074] In this embodiment, the bit lines of the NAND flash memory 204 can be coupled to the page buffer 206. The page buffer 206 may include a sense amplifier and a storage element, such as a program buffer or a latch for each bit line connected thereto, which stores the data written to or read from a specific memory cell of the NAND flash memory 204. In general, the page buffer 206 and the NAND flash memory 204 are both manufactured in parallel and have the same layout. The page buffer 206 is usually adjacent to the memory cell of the NAND flash memory 204 on the device 200. The size of the page buffer 206 is equal to or larger than one page of the NAND flash memory 204.
[0075] like Figure 2As shown, the data cache 208 is coupled to the shadow random access memory 210 and the page buffer 206 for temporary data storage. The data between the data cache 208 and the shadow random access memory 210 is transferred instantaneously via the NAND gate interface 115 and 207 and the data buffer 220 located in the controller 112. The data stored in the NAND gate flash memory 204 can be output via the page buffer 206, and the data can be temporarily stored in the data cache 208. Generally, the data cache 208 is a random access memory; compared with the NAND gate flash memory 204, the random access memory has a faster access speed, and the random access memory is usually physically separated from the NAND gate flash memory 204 (the two are physically separated). In this embodiment, random address data reading is allowed in the data cache 208, and the size of the data cache 208 can be similar to the size of the page buffer 206, or twice or even three times the size of the page buffer 206. In some implementations, the data cache 208 is located inside the NAND flash memory 204 .
[0076] In this embodiment, the control circuit 202 is operably coupled to the SPI bus 140 via its SPI 114 to receive the chip select signal CS#, the clock signal CLK, and instructions and data via the SPI 124. Commands can be input via the data I / O line of the SPI 124, and then the commands are transferred to the control logic 202 and the control register 214. The control circuit 202 is combined with the control register 214 to interpret the commands from the host device 120 and perform corresponding operations, such as data read, data erase or data write operations in the AND gate flash memory 204.
[0077] like Figure 2 As shown, the control circuit 202 is connected to a mapping table 218, wherein the mapping table 218 can be composed of a content addressable memory, a lookup table or a register array. The mapping table 218 is used to map a specific data area in the NAND flash memory 204 to the shadow random access memory 210 according to a non-volatile register pre-configured by a user. In one embodiment, the non-volatile register is located in a special reserved area of the NAND flash memory 204, and the non-volatile register is read to the control register 214 when the system 100 is powered on.
[0078] In this embodiment, the control circuit 202 manages the mapping table 218 according to the mapping table 218, and checks any input address in the complete address character to perform a data read operation or a data write operation in the shadow random access memory 210 or the NAND flash memory 204. For example, the data read operation of the storage device 200 includes reading data with a selected address in the mapping table 218. The data read address is transmitted to the control circuit 202 from the data I / O line of the serial peripheral interface bus 140. Once the control circuit 202 receives the input data read address, the control circuit 202 verifies the data read address; and if the input address belongs to the range of the mirroring area of the NAND flash memory 204, the control circuit 202 redirects the data read address to the storage unit address of the shadow random access memory 210. Otherwise, if the input address is not in the mirroring area, the control circuit will only access the NAND flash memory 204.
[0079] The shadow random access memory 210 provides random access for data read operations, and also provides a near-zero latency time; and the shadow random access memory 210 can be accessed like a NAND flash memory, and the shadow random access memory 210 can even be accessed faster than a NAND flash memory. In this embodiment, the shadow random access memory 210 is used to store data transmitted from the NAND flash memory 204 and to mirror the data. The shadow random access memory 210 can also store other applications that are frequently executed by the system, for example, according to further configuration to be performed later, and after the system is booted and loaded, the interrupt routine is executed.
[0080] In the storage device 200, the ECC engine 212 is designated to perform data error concatenation according to the ECC characters detected for the read data. Figure 2As shown, the ECC engine 212 is coupled to the data cache 208 via the NAND interface and the data buffer 220, and the ECC engine 212 is used to detect the output data from the NAND flash memory 204 and transmitted to the shadow RAM 210. The ECC engine 212 calculates the output data for the error of the ECC, wherein the error of the ECC occurs when the data of the respective ECC characters transmitted from the data cache 208 (which is transmitted via the data buffer 220) are read. In addition, further, the control register 214 is coupled to the SPI 114 and the control circuit 202. The control register 214 is used to store the control parameters according to the command input via the SPI bus 140, and the control register 214 also implements the control logic in response to the different commands from the host device 120, and the control logic is also used to operate the storage device 200.
[0081] The storage device 200 can be connected to a host system or host device (e.g., Figure 1 In this embodiment, the storage device 200 is connected to the host device (not shown) through the serial peripheral interface 114 for interconnection. Figure 2 As described above, the serial peripheral interface 114 includes the following signal lines: a data input / output line (I / O line) for carrying instructions and data, a clock line (CLK line) for carrying a clock signal driven by the host device, and a chip select line for carrying a chip select signal, wherein the chip select signal is used to select the storage device 200 and thus communicate between the host device 120 and the storage device 200.
[0082] Figure 3 Flowchart of an exemplary process 300 for operating in the on-chip execution mode in the system 100. The exemplary process 300 includes two phases. The process of the first phase is shown in steps 302 to 316. The first phase includes mirroring the first data from the NAND flash memory 204 to the shadow random access memory 210. And, the process of the second phase is shown in steps 318 to 330. The second phase includes transferring the second data from the NAND flash memory 204 to the system random access memory by executing the first data in the on-chip execution mode in the shadow random access memory 210.
[0083] On-chip execution is a method of executing programs or instructions directly in long-term storage media (e.g., storage random access memory), rather than copying data from other memories to system random access memory for execution. Figure 2As shown, the shadow random access memory 210 is used as a storage device, which executes a program in an on-chip execution mode during system initialization, thereby reducing the storage device access time and improving the system response time.
[0084] In step 302, when the power of the system 100 is turned on, the control circuit 202 of the storage device 200 automatically transfers / mirrors the first data stored in the NAND flash memory 204 to the shadow random access memory 210. Next, in step 304, the transfer of the first data starts by determining the address range of the first data in the NAND flash memory 204. Here, the address of the first data in the NAND flash memory 204 is pre-stored in the mapping table 218 of the controller chip 202. In this embodiment, the mapping table 218 is configured according to the content of the register in the early stage after the power is turned on. In some embodiments, the mapping table 218 is used to store user-specific mapping information in the reserved NAND flash memory 204 area, and then, at a very early stage, the specific mapping information is transferred to the register when the system 100 is powered on.
[0085] In response to the power on of the system 100, the device 200 can automatically access the mapping table 218 and determine the data read address of the first data in the NAND flash memory 204. The mapping table 218 can include a logical block address and its corresponding physical block address. When the storage device 200 receives the logical block address transmitted from the host device 120, the control circuit 202 converts the logical block address into a physical block address according to the mapping table; wherein the physical block address is mapped to various memories (including: shadow random access memory 210 and NAND flash memory) of the electronic device system 100.
[0086] In this embodiment, for the execution in the on-chip execution mode, the mapping table 218 needs to be updated so that the corresponding logical address of any transferred first data points to the shadow random access memory 210 instead of the NAND flash memory 204 .
[0087] Typically, the first data is a small block of program code or program (e.g., a boot loader), which can be executed in an in-chip execution mode. If the operation of the boot loader can be supported by the SPI-NAND flash itself, the boot loader can be implemented by accessing the SPI-NAND flash similar to a NAND gate, and even the boot loader can be implemented in a continuous mode. In this embodiment, first, the boot loader is mirrored from the NAND flash memory 204 to the shadow random access memory 210, and then, the processor 121 executes the boot loader in the in-chip execution mode in the shadow random access memory 210, so that the second data (e.g., application firmware) can be transferred from the NAND flash memory 204 to the system random access memory (e.g., system memory 122 or external random access memory / dynamic random access memory 130). In addition, the boot loader may also include a minimum program, and before accessing, the minimum program of the boot loader performs appropriate settings for the system RAM and / or the external RAM / DRAM 130 .
[0088] Refer to Figure 3 Once the first data read address is determined, the control circuit 202 starts accessing the NAND flash memory 204 to transfer the first data. Figure 3 Steps 306 to 314 are shown to achieve the transfer of the first data from the NAND flash memory 204 to the shadow RAM 210 .
[0089] The read operation of the NAND flash memory 204 includes at least two procedures: a page read operation and a random data read operation for the page. Among them, the access to the page of the NAND flash memory 204 is usually the bottleneck of the read operation, which may take more than 25us. Once the physical block address (which serves as the data read start address) is mapped according to the mapping table, the control logic accesses the specific page of the NAND flash memory 204 and reads the first data located at the start address (as shown in step 306). The specified first data is output from the page of the NAND flash memory 204, and the first data is temporarily stored in the data cache area via the page buffer (as shown in step 308).
[0090] As described above, random access to address data is allowed in the data cache 208, and the size of the data cache 208 is similar to or larger than the paging of the NAND flash memory 204. With the above configuration, the ECC engine can access the data cache at a faster speed than the NAND flash memory 204. In this embodiment, the data in the data cache 208 is further transferred to the data buffer 220 via the NAND interfaces 115 and 207. When the data is transferred from the NAND interface 115 to the data buffer 220, the ECC engine 212 can also capture the data at the same time and calculate the correct information immediately after the data is transferred. Then, the ECC engine can correct the errors in the data buffer 220.
[0091] In response to the error data correction completed above, the control circuit 202 controls the data buffer 220 to output the corrected data packet of the first data to the shadow random access memory 210 (as shown in step 312). In this embodiment, the width of the data packet transmitted between blocks in the storage device 200 can be 8-bit word width, or greater than 8-bit word width.
[0092] The first data is stored on a single page of the NAND flash memory 204. In some embodiments, the data area size of the first data has a larger size measurement, and the first data is stored on multiple pages of the NAND flash memory 204. Therefore, the control circuit 202 confirms whether the page of the NAND flash memory 204 currently accessed is the last page of the data read operation (such as step 314). If the above confirmation result is negative (not the last page of the data read operation), when the last data packet of the current page is transmitted, a new page access command will be issued to read data on the next page of the NAND flash memory 204. Figure 3 As shown, the data reading performed on the next page of the NAND flash memory 204 is to repeat the operation of step 306 to step 314.
[0093] In some embodiments, the access to the NAND flash memory 204 is performed continuously from the end point of the current page on the NAND flash memory 204 to the start point of the next page. When accessing different pages of the NAND flash memory 204, waiting time is consumed between the respective access actions of different pages, and the NAND flash memory die 116 can use multiple page access operations to access multiple pages of the NAND flash memory. In this embodiment, the control circuit 202 initially starts the page access operation to the NAND flash memory chip die 116 via the NAND interface 115, 207. Once the last data packet of the first data is transmitted from the NAND flash memory 204, and the data packet is stored in the shadow random access memory 210 after data error correction, the mirroring of the first data is completed (such as step 316).
[0094] When the flash memory is ready (as in step 318), the system boot of the storage device 200 begins to provide a normal execution environment for running programs or applications (as in step 320). For smaller embedded systems, the system boot is usually initialized by loading the kernel into the main memory (e.g., external memory 130) and starting its execution. The initial system boot loader can be stored in a read-only memory (ROM) of the electronic device system 100. For other smaller embedded systems, a second boot program (the boot loader mentioned in step 322) can be stored in the storage device 200. On the other hand, for some embedded systems that do not have a read-only memory in the host device 120, the boot program is stored in the storage device 200 as the boot loader mentioned in step 322.
[0095] In this embodiment, once the system booting process begins, the mirroring of the application data (e.g., application firmware) begins by executing the first data in the shadow RAM 210 in the on-chip execution mode (e.g., step 322) to transfer the application data (the boot loader mentioned in step 322) from the NAND flash memory 204 to the external system memory 130 or the on-chip RAM 122. Here, the host device 120 executes the boot loader, which is initially mirrored from the NAND flash memory 204 and currently stored in the shadow RAM 210; and compared to the NAND flash memory 204 (or even compared to the NOR flash memory), the above embodiment (the boot loader is initially mirrored from the NAND flash memory 204 and currently stored in the shadow RAM 210) has a random access capability and a shorter access time.
[0096] Executing the boot loader in the on-chip execution mode includes sending a data read command and transmitting a data read address in a complete address character cycle. In the present embodiment, the boot loader includes a data read command and a data read address that refers to the second data (the second data is, for example, the application firmware stored in the NAND flash memory 204). The processor 121 of the host device retrieves the command and data from the shadow random access memory 210, and sends a read command (the read command has an address for reading the second data from the NAND flash memory 204) to the external system memory 130 according to the command retrieved from the shadow random access memory 210. Once the NAND flash memory 204 is ready, the data packet of the second data is output through the page buffer 206, and the data packet of the second data is temporarily stored in the data cache 208. Similar to the error correction operation described in step 310, once the data correction is completed, the error correction code engine 212 returns the corrected data packet to the data buffer 220. After the data error correction, the data packet of the second data is transmitted from the data buffer 220 in a serial manner and transmitted to the external system memory 130 or the on-chip random access memory 122 via the serial peripheral interface bus 140. For the second data stored in multiple pages of the NAND flash memory 204, the host device 120 uses various commands (such as PgRD commands and RD commands) according to the instructions stored in the boot loader to access the data stored in multiple pages of the NAND flash memory 204. In addition, the host device 120 repeatedly accesses the shadow random access memory 210 and the NAND flash memory die 116 (such as step 326) to execute the data read command in the on-chip execution mode and transmit the second data.
[0097] In another embodiment, the host device 120 may only access the RAM and execute only one data read command to access the NAND flash memory 204 and continuously transmit the second data from multiple pages of the NAND flash memory 204. For example, the memory device 200 is configured to use a unified data read command (e.g., RD command) to output data from multiple pages of the NAND flash memory 204, without sending multiple data read commands in the shadow RAM 210. Figure 5 The configuration and unified instruction settings are described in more detail in the accompanying drawings.
[0098] In other embodiments, the host device 120 provides the address character for accessing the NAND flash memory 204. The host device 120 transmits the address character for the data read operation to the control circuit 202 of the storage device 200 via the serial peripheral interface bus 140 and the serial peripheral interface 114. Once the control circuit 202 receives the address data, the control circuit 202 verifies the address; and when the address points to the program code, it executes the address redirected to the shadow random access memory according to the mapping table 218. The converted address will be transmitted to the shadow random access memory 210, which is used to execute the program in the on-chip execution mode.
[0099] The storage device 200 repeatedly executes the above steps 322 to 326 until all the second data (eg, application firmware) are transmitted to the external system memory 130 or the on-chip random access memory 122 (step 328). Figure 3 In the last step of the illustrated process flow, the host device 120 executes the application from the external system memory 130 or the on-chip random access memory 122 (step 330 ) to achieve shorter memory access time and better system performance.
[0100] For operations in the on-chip execution mode, for example, executing instructions stored in the shadow RAM to respectively perform data read or data write operations (the above data read or data write operations are performed to and from the NAND flash memory 204), first, the host device 120 accesses the shadow RAM to read the operation instructions, and then the host device 120 accesses the NAND flash memory 204 to transfer data for executing the instructions. Compared to accessing other memories in the system (e.g., the NAND flash memory 204), random access to the shadow RAM (for operations in the on-chip execution mode) is faster, so the above configuration can provide higher system efficiency.
[0101] Figure 4A and Figure 4B The timing diagrams are timing diagrams for data read operation in the system 100. These timing diagrams show exemplary waveforms used when reading data from the storage device 200 to the host device (eg, the host device 120) via the serial peripheral interface bus 140. Specifically, Figure 4A and Figure 4B It is shown that the shadow RAM is accessed to fetch instructions, and then the NAND flash memory 204 is accessed to transfer data to the system RAM. In this embodiment, Figure 4A and Figure 4BThe timing diagram shown includes three phases for a data read operation, including: 1) command and address phase; 2) dummy cycle phase; 3) data phase. These three phases are arranged in a serial manner to complete the data transfer from the storage device 200 to the host device 120.
[0102] like Figure 4A As shown, the device 200 uses the RD command to read instructions from the shadow random access memory 210. In another embodiment, as shown in FIG. Figure 4B As shown, the device 200 uses a PgRD command followed by an RD command to read data from a specific page of the NAND flash memory 204. Here, the RD command is used to retrieve data read instructions or data from the shadow RAM 210 or the page of the NAND flash memory die 116, respectively. On the other hand, the operation of the PgRD command is different from the RD command; the PgRD command is used to access a specific page of the NAND flash memory 204 for data read operation. In this embodiment, the instructions are stored in the shadow RAM 210; and the data corresponding to the operation in the on-chip execution mode (e.g., application firmware) is stored in the NAND flash memory 204.
[0103] refer to Figure 4A , after sending the chip select signal CS#, the SI / O pin is used in an earlier clock cycle to send the RD command and the complete address character (e.g., a 32-bit address) to the device 200. Once the instruction data transmission in the command and address phase is completed, the dummy cycle phase begins to buffer. In this embodiment, the dummy cycle is confirmed by the slave device (e.g., the storage device 200), which allows the instruction data to be transferred to the storage device 200 and enables the storage device 200 to complete preparation for data transmission. During the dummy cycle, the storage device 200 prepares the specified data according to the received instruction data, which is used to transmit data to the host device 120. For example, when the device 200 receives the RD command and the data read address, it starts to read instructions from its shadow random access memory 210. In the data phase, the instruction is sent out from the shadow random access memory 210 and transmitted to the serial peripheral interface bus 140. In this embodiment, the output instruction packet is aligned with the clock signal; and four clock cycles are used to transmit a 32-bit instruction; the above 32-bit instruction is stored in the shadow random access memory 210, which is used for an I / O bus with an 8-bit data width for a single transmission at each clock.
[0104] In another alternative embodiment, referring to Figure 4B, which is used for the "command and address" phase of the data read operation on the NAND flash memory 204, which includes the PgRD command and the RD command. In this embodiment, the PgRD command followed by the address character of the NAND flash memory 204 page is transmitted first, and then the "RD" command and the random address (the random address is located in the identified page of the NAND flash memory 204) are transmitted. A waiting delay time will be consumed between the PgRD and RD commands, and the waiting delay time is related to the access time of the NAND flash memory 204 page. As mentioned above, accessing the page of the NAND flash memory 204 (for example, by executing the PgRD command) may take a longer time (for example, 25us or more). The above-mentioned waiting delay time is caused by the characteristics and architecture of the NAND flash memory 204, and the waiting delay time is the main bottleneck of the data read operation. Once the designated page of the NAND flash memory 204 is accessed, the RD command is executed to read the data stored at the random address on the page of the NAND flash memory 204. Similar to the instruction read on the mapped SRAM, the output data packet from the NAND flash memory 204 is aligned with the clock signal; and, in the present embodiment, the 32-bit data stored in the NAND flash memory 204 is transmitted.
[0105] In actual situations, the designated data may be stored in multiple pages of the NAND flash memory 204. The memory device 200 with such a configuration must repeatedly transfer PgRD commands multiple times to access multiple pages of the NAND flash memory 204; and repeatedly transfer RD commands to access random addresses on corresponding pages of the NAND flash memory 204.
[0106] Data read commands (including: Figure 4B The PgRD command and RD command shown in FIG. 2 are the bottlenecks of the data read operation in the storage device 200, so the above data read commands are not conducive to random access applications (e.g., on-chip execution operations). In addition, the additional data read commands dedicated to various different memories of the device 200 will cause operational redundancy and complexity to the user.
[0107] The indicator signal is used to indicate whether the data within the variable waiting period of the waveform is valid. The indicator signal can be an independent signal or a composite signal. In addition, the indicator signal can use a variety of different types of signals, including: a data strobe signal (DS), an independent ready / busy signal, an interrupt signal, etc. The indicator signal can use an existing signal line (for example: a signal line equipped by the device for other purposes), or the indicator signal can have a dedicated signal line.
[0108] Figure 5 A timing diagram describing an exemplary data read operation in a storage device 200 according to an embodiment of the present application is described. In the present embodiment, a unified data read command RD is used for a data read operation in the storage device 200, which includes: instructions read from a shadow random access memory 210, and instructions read from a NAND flash memory 204. The above configuration uses a data select signal (DS) driven by the storage device 200, and the DS signal is transmitted to the host device 120 via the serial peripheral interface bus 140; the data select signal indicates whether the data is valid within a variable wait period of the waveform. Through the above configuration, in order to perform data reads on multiple pages of the NAND flash memory 204, continuous data reads will automatically load the next page of the NAND flash memory 204 into the data cache without sending additional page access commands. And if Figure 5 As shown, the memory access time is associated with the waiting period of the waveform, especially when the DS signal state changes. In this embodiment, the memory device 200 (especially the memory in the memory device 200) can configure the waiting period according to the setting of the DS signal.
[0109] Figure 5 The exemplary waveform includes three data read operations for on-chip execution in the electronic device system 100: 1) instruction read on the shadow random access memory 210 with a longer wait cycle, 2) data read on the NAND gate flash memory 204, and 3) instruction read on the shadow random access memory 210 with a shorter wait cycle.
[0110] Return to reference Figure 5, after sending the chip select signal CS#, the SI / O pin is used to transmit a unified RD command and a complete address character (e.g., a 32-bit address) to the device 200 for reading instructions on the shadow random access memory 210. In this command and address phase, the DS signal is in a tri-state. Once the command and address character transmission is completed, the wait cycle begins to prepare the dedicated specified instruction to transmit the data to the host device. In this embodiment, the instructions captured by the host device 120 and stored in the shadow random access memory 210 are retained, and the length of the wait cycle is determined by the DS signal. For example, when the shadow random access memory 210 is ready for instruction transmission, the storage device 200 drives the DS signal so that the DS signal changes from a tri-state to a logic low state. When the storage device 200 outputs an alternating DS signal (e.g., at the rising edge of the DS signal), the wait cycle segment ends. The output instruction data packet is aligned with the alternating DS signal cycle (e.g., the instruction data packet is aligned with the rising edge of the DS signal cycle). When the instruction data transfer is completed, the DS signal switches back to a three-state state, indicating that the shadow random access memory 210 is not yet ready for the data transfer.
[0111] The data read operation on the NAND flash memory 204 is similar to the operation mechanism described above. Once the second RD command and the complete address character are transmitted, the waiting cycle begins to prepare for the transmission of the specified data (the specified data is transmitted from the NAND flash memory 204 to the host device 120 via the serial peripheral interface bus 140). The DS signal remains in a tri-state, which indicates that the NAND flash memory 204 is preparing and is not yet ready for data transmission. When the NAND flash memory 204 is ready, the DS signal is driven from a tri-state to a logic low state, which indicates that the NAND flash memory 204 is ready for data transmission from the host device. The output data packet from the NAND flash memory 204 is aligned to the alternating DS signal, for example: the output data packet is aligned to the rising edge of the alternating DS signal. In this embodiment, the data packet is continuously output until the data read address reaches the end point of the NAND flash memory 204 paging. For data stored on multiple pages of the NAND flash memory die 116, the data read operation accesses the next page of the NAND flash memory 204 while the DS signal is driven back to a logic low state. Once the NAND flash memory 204 is ready to transfer data from the next page, the DS signal will be driven back to the toggled state to end the wait cycle. The memory device 200 continues to reply to send data from the next page of the NAND flash memory 204 while toggling the DS signal. In this embodiment, the memory device 200 continuously reads the next page of the NAND flash memory 204 into the data cache 208 without issuing any PgRD commands to access any particular NAND flash memory 204 page.
[0112] The third instruction fetch operation for the shadow RAM 210 begins at: Figure 5 The third RD command is inserted into the waveform of FIG. In this embodiment, the waiting period between the instruction insertion and the data transmission is shorter than the waiting period of the first instruction read operation shown at the starting point of the waveform. Here, an embodiment is provided to illustrate that the waiting period and the memory access time are not fixed, but can be configured according to the control of the DS signal.
[0113] In another embodiment, after sending the first RD command with an indicator (which is used to direct the storage device 110 or 200 to perform subsequent commands), an enhancement mode may be implemented to further improve the read performance without sending subsequent RD commands.
[0114] For example, the memory device 110 may improve data throughput by using an internal cache buffer to perform cache read sequential operations. This may allow consecutive pages to be read without providing the next memory page address to reduce the waiting time from tR to tRCBSY between memory pages or blocks. While data is being read out on one page, the data of the next page can be read into the cache buffer.
[0115] In some embodiments, the enhancement mode may be pre-configured and applied to the device when power is turned on.
[0116] Although the present disclosure has been disclosed in detail with preferred embodiments and embodiments as above, it is to be understood that these embodiments are intended to be illustrative rather than restrictive. It is contemplated that a person skilled in the art may conceive of various modifications and combinations, which fall within the spirit of the present disclosure and the scope of the appended claims.
Claims
1. A method for memory operation, comprising: Determine the location of a first data in a NAND flash memory of the electronic device according to the power-on of the electronic device; Transmitting the first data to a shadow random access memory of the electronic device; as well as When accessing the location of the first data in the NAND flash memory, outputting the first data from the shadow random access memory to a host device of the electronic device via a serial peripheral interface; The step of transmitting the first data to a shadow random access memory of the electronic device comprises: Outputting first data from the paging of the NAND flash memory, the first data being stored in the data cache area via the paging buffer; and The first data is transmitted from the data cache area to the shadow random access memory. 2 . The memory operation method according to claim 1 , wherein the first data is a program code of a boot loader program. 3 .
3. The memory operation method according to claim 1, wherein the first data in the shadow random access memory can be randomly accessed.
4. The memory operation method according to claim 1, wherein the first data is an executable program executed by the host device, the first data is executed after the system is started up by the electronic device, and the instructions in the first data are retrieved from the shadow random access memory in an in-chip execution mode.
5. The memory operation method according to claim 4, further comprising: Transmitting a second data from the NAND flash memory to a system memory of the electronic device according to the instruction; as well as The transferred second data is executed in the system memory. 6 . The memory operation method according to claim 5 , wherein the second data is an application firmware program code.
7. The memory operation method according to claim 5, wherein the step of transmitting the second data comprises: accessing a page of the NAND flash memory; Reading the second data at a designated address by randomly accessing the page of the NAND flash memory; Outputting the second data to a data cache area through a page buffer of the NAND flash memory to transmit the second data; and The second data is transmitted from the data cache area to a system random access memory.
8. The memory operation method according to claim 1, wherein the step of transmitting the first data comprises: accessing a page of the NAND flash memory; Reading the first data at a designated address by randomly accessing the page of the NAND flash memory; Outputting the first data to a data cache area through a page buffer of the NAND flash memory to transmit the first data; and The first data is transmitted from the data cache area to the shadow random access memory.
9. The memory operation method according to claim 8, wherein the step of accessing the page of the random access memory comprises: Accessing multiple pages of the NAND flash memory.
10. The memory operation method according to claim 8, wherein the step of transferring the first data from the data cache area to the shadow random access memory comprises: Reading the first data temporarily stored in the data cache area to an error correction code engine; In the error correction code engine, error correction is performed on the first data; as well as According to the error correction completed, the corrected first data is returned to the data cache area.
11. The memory operation method according to claim 8, wherein the designated address is stored in a non-volatile register.
12. The memory operation method according to claim 1, wherein the step of determining the position of the step of the first data comprises: In response to the power of the electronic device being turned on, the process of automatically executing the operation of the electronic device, The operation includes reading the first data according to a specified address set of the first data in a NAND flash memory.
13. The method of memory operation according to claim 1, comprising a data reading operation, the data reading operation comprising: Sending out a plurality of exclusive designated commands to respectively perform data reading operations on the shadow random access memory and the NAND flash memory, The electronic device uses a RD command for random access and a PgRD command for accessing a page of the NAND flash memory.
14. The method of memory operation according to claim 1, comprising a data reading operation, the data reading operation comprising: A unified command is sent to perform a data read operation on the shadow random access memory and the NAND flash memory, and an indicator signal is used to indicate whether the data is valid and can be transmitted in a variable waiting cycle. 15 . The memory operation method according to claim 14 , wherein the indicator signal is an independent signal or a composite signal.
16. The memory operation method according to claim 15, wherein the composite signal uses an existing data strobe signal, and when the shadow random access and the NAND flash memory are ready to transmit data, the data strobe signal is driven from a tri-state to a logic low state, The length of the waiting period is configured by controlling the data strobe signal, and an output data is aligned with the data strobe signal.
17. The memory operation method according to claim 15, wherein the composite signal uses an existing interrupt signal.
18. The method of memory operation according to claim 1, comprising a data reading operation, the data reading operation comprising: A data read command is executed according to an address included in the first data and stored in the shadow random access memory.
19. The method of memory operation according to claim 1, comprising a data reading operation, wherein the data reading operation comprises: Verifying the input address from the host device through a control logic of the electronic device; as well as A mapping table is checked to determine whether the input address corresponds to a data read operation in the shadow random access memory and the NAND flash memory.
20. The memory operation method according to claim 19, wherein the mapping table comprises a plurality of addresses, wherein the plurality of addresses include a source location of the NAND flash memory and a destination location of the shadow random access memory, and the mapping table is established when the system power is turned on, wherein the mapping table is established based on a non-volatile register that records the location of the first data residing in the NAND flash memory.
21. The memory operation method according to claim 1, wherein the electronic device provides a command, and after the system is powered on, the command further maps the shadow random access memory to a different location other than the first data.
22. A method of memory operation, comprising: Determine the location of a first data in a serial NAND flash memory of the electronic device according to the power-on of the electronic device; Accessing a page of the serial NAND flash memory; Reading the first data at a designated address by randomly accessing the page of the serial NAND flash memory; Outputting the first data to a data cache area through a page buffer of the serial NAND flash memory to transmit the first data; and The first data is transmitted from the data cache area to a shadow random access memory of the electronic device.
23. The memory operation method according to claim 22, further comprising: After the electronic device initiates a system boot, a host device executes an instruction in a chip execution mode in the first data of the shadow random access memory; as well as According to the executed instruction, the second data is transmitted from the serial NAND flash memory to a system random access memory of the electronic device.
24. The memory operation method according to claim 23, wherein the step of transmitting the second data comprises: Accessing a page of the serial NAND flash memory; Reading the second data at a designated address by randomly accessing the page of the serial NAND flash memory; Outputting the second data to a data cache area through a page buffer of the serial NAND flash memory to transmit the second data; and The second data is transmitted from the data cache area to a shadow random access memory of the electronic device.
25. A serial NAND flash memory for performing data transfer operation via a serial peripheral interface, the serial NAND flash memory comprising: A NAND flash memory for storing data, the data being output via a paging buffer; a non-volatile register for recording a source address for data transfer; a shadow random access memory connected to the NAND flash memory via a data cache, wherein the data cache is associated from a paging buffer of the NAND flash memory to the shadow random access memory; and A control circuit is connected to the NAND flash memory and the shadow random access memory, wherein the control circuit is used for: Determining the location of a first data in a NAND flash memory of an electronic device according to power-on of the electronic device; and The first data is transmitted to a shadow random access memory of the electronic device.
26. The serial NAND flash memory according to claim 25, further comprising a mapping table connected to the control circuit, wherein the mapping table comprises a NAND cache memory address of the first data and address information of the shadow random access memory, and wherein the control circuit is used to: verifying a NAND flash memory input address transmitted from a host device of an electronic system; Determining whether the input address corresponds to the NAND flash memory input address of the first data; and The data read operation is redirected in the shadow random access memory or the NAND gate flash memory is read according to the determination result.
27. The serial NAND flash memory as claimed in claim 25, further comprising a data cache area connected to the NAND flash memory and the shadow random access memory, and the data cache area is used to temporarily store data output by the serial NAND flash memory.
28. The serial NAND flash memory according to claim 27, further comprising an error correction code engine, the error correction code engine being connected to the shadow random access memory and the data cache area, wherein the error correction code engine is used for: Reading the first data temporarily stored in the data cache area; performing error correction on the first data of the error correction code engine; and According to the error correction completed, the corrected first data is returned to the data cache area.
29. The serial NAND flash memory according to claim 25 further includes a serial peripheral interface bus, which includes a data input / output line, a clock signal line and a chip select signal line, and the serial peripheral interface bus is used to communicate between a host device and other components of the electronic device.
30. The serial NAND flash memory according to claim 29, further comprising an indicator signal, the indicator signal indicating whether the data is valid and can be transmitted in the variable waiting cycle.
31. The serial NAND flash memory as claimed in claim 30, wherein the indicator signal is an independent signal or a composite signal.
32. The serial NAND flash memory according to claim 31, wherein the composite signal is an existing data strobe signal, and when the serial NAND flash memory is ready to transmit data, the data strobe signal is driven from a tri-state to a logic low state, The length of the waiting period can be configured by controlling the data strobe signal, and an output data is aligned with the data strobe signal.
33. The serial NAND flash memory as claimed in claim 31, wherein the composite signal is an existing interrupt signal.
