TWI534615B - Serial peripheral interface (spi) controller, serial peripheral interface flash memory and access method and access control method thereof - Google Patents

Serial peripheral interface (spi) controller, serial peripheral interface flash memory and access method and access control method thereof Download PDF

Info

Publication number
TWI534615B
TWI534615B TW102145500A TW102145500A TWI534615B TW I534615 B TWI534615 B TW I534615B TW 102145500 A TW102145500 A TW 102145500A TW 102145500 A TW102145500 A TW 102145500A TW I534615 B TWI534615 B TW I534615B
Authority
TW
Taiwan
Prior art keywords
data
flash memory
stream
page
peripheral interface
Prior art date
Application number
TW102145500A
Other languages
Chinese (zh)
Other versions
TW201447573A (en
Inventor
薛時彥
Original Assignee
聯發科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 聯發科技股份有限公司 filed Critical 聯發科技股份有限公司
Publication of TW201447573A publication Critical patent/TW201447573A/en
Application granted granted Critical
Publication of TWI534615B publication Critical patent/TWI534615B/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Read Only Memory (AREA)

Description

串列周邊介面控制器、串列周邊介面快閃記憶體及其存取方法和存取控制方法 Serial peripheral interface controller, serial peripheral interface flash memory, access method thereof and access control method

本發明係關於一種記憶體裝置,特別關於一種串列快閃記憶體(serial flash memory)裝置。 The present invention relates to a memory device, and more particularly to a serial flash memory device.

快閃記憶體裝置通常用於電子應用,如個人電腦、個人數位助理(Personal Digital Assistants,PDAs)、數位相機及行動電話。通常,快閃記憶體裝置分為平行快閃記憶體(parallel flash memory)裝置及串列快閃記憶體裝置。與平行快閃記憶體相比,串列快閃記憶體具有更少的傳輸線(transmission lines)和接腳(pin)數目。因此,串列快閃記憶體的封裝尺寸可相對減小,以及串列快閃記憶體可作為可攜式電子裝置之主導記憶體(dominant memory)。 Flash memory devices are commonly used in electronic applications such as personal computers, personal digital assistants (PDAs), digital cameras, and mobile phones. Generally, a flash memory device is divided into a parallel flash memory device and a tandem flash memory device. Serial flash memory has fewer transmission lines and pins than parallel flash memory. Therefore, the package size of the serial flash memory can be relatively reduced, and the serial flash memory can be used as the dominant memory of the portable electronic device.

一個傳統8接腳(8-pin)串列周邊介面(Serial Peripheral Interface,SPI)NAND快閃記憶體包含晶片選擇接腳CS#、串列時脈接腳SCK、串列資料輸入/串列資料輸入和輸出接腳SI/SO0、串列資料輸出/串列資料輸入和輸出接腳 SO/SO1、寫入保護/串列資料輸入和輸出接腳WP#/SO2、保持/串列資料輸入和輸出接腳HOLD#/SO3、電力供應接腳VCC和接地接腳GND。在該說明書中,簡潔起見,串列資料輸入/串列資料輸入和輸出接腳SI/SO0、串列資料輸出/串列資料輸入和輸出接腳SO/SO1、寫入保護/串列資料輸入和輸出接腳WP#/SO2及保持/串列資料輸入和輸出接腳HOLD#/SO3也可稱為串列輸入和輸出接腳。記憶體透過晶片選擇接腳CS#接收晶片選擇信號。當晶片選擇信號變為低位準時,記憶體處於有效電力模式(active power mode)下。當晶片選擇信號變為高位準時,記憶體失能(disabled),以及串列資料輸出接腳SO置於高阻抗狀態High-z。記憶體透過串列時脈接腳SCK接收串列時脈信號,用於為記憶體提供串列介面時序。位址資訊、指令及資料在串列時脈信號之上升邊緣鎖存(latch)或擷取(retrieve),以及資料的輸出係於串列時脈信號之下降邊緣之後所觸發。 A traditional 8-pin Serial Peripheral Interface (SPI) NAND flash memory includes a chip select pin CS#, a serial clock pin SCK, and a serial data input/serial data. Input and output pins SI/SO0, serial data output/serial data input and output pins SO/SO1, write protection/serial data input and output pin WP#/SO2, hold/serial data input and output pin HOLD#/SO3, power supply pin VCC and ground pin GND. In this specification, for the sake of brevity, serial data input/serial data input and output pin SI/SO0, serial data output/serial data input and output pin SO/SO1, write protection/serial data Input and output pins WP#/SO2 and hold/serial data input and output pins HOLD#/SO3 can also be referred to as serial input and output pins. The memory receives the wafer selection signal through the wafer selection pin CS#. When the wafer select signal goes low, the memory is in an active power mode. When the wafer select signal becomes high, the memory is disabled, and the serial data output pin SO is placed in the high impedance state High-z. The memory receives the serial clock signal through the serial clock pin SCK for providing serial interface timing for the memory. The address information, instructions, and data are latched or retrieved at the rising edge of the serial clock signal, and the output of the data is triggered after the falling edge of the serial clock signal.

第1A圖、第1B圖及第1C圖顯示上述傳統SPI NAND快閃記憶體之頁面讀取操作之時序圖。頁面讀取操作係執行用以將NAND快閃陣列中之資料傳送至快取記憶體(cache)。首先,當晶片選擇信號已賦能(enabled)後,記憶體透過串列資料輸入接腳SI接收頁面讀取指令CMD-PR。然後,記憶體接收區塊/頁面位址ADD-P。當區塊/頁面位址ADD-P已註冊(registered)後,記憶體開始由NAND快閃陣列中傳送資料至快取記憶體,且工作(busy)持續時長tCS。此後,發起(issue)獲取特徵指令CMD-GF以檢測操作狀態。基於接收到的狀態暫存器位址ADD-SR,由狀態暫存器(register)中讀取指示操作狀態的狀態 暫存器資料D-SR,然後透過串列資料輸出接腳SO輸出。 1A, 1B, and 1C are timing charts showing the page read operation of the above conventional SPI NAND flash memory. The page read operation is performed to transfer the data in the NAND flash array to the cache. First, after the wafer select signal is enabled, the memory receives the page read command CMD-PR through the serial data input pin SI. Then, the memory receives the block/page address ADD-P. When the block / page address ADD-P registered (Registered), starts transmitting data to the memory cache by the NAND flash array, and the work (BUSY) t CS long duration. Thereafter, the feature acquisition command CMD-GF is issued to detect the operation state. Based on the received status register address ADD-SR, the status register data D-SR indicating the operation status is read from the status register and then output through the serial data output pin SO.

在成功完成狀態後,發起隨機資料讀取操作以讀取快取記憶體中之資料。隨機資料讀取操作可為單一讀取操作(single read operation)、雙重讀取操作(dual read operation)或四重讀取操作(quad read operation)。在單一讀取操作中,串列輸入和輸出接腳SI/SO0用於輸入指令,以及串列輸入和輸出接腳SO/SO1用於輸出讀取資料,因而輸出資料流之帶寬為2位元(bits)。此外,在四重讀取操作中,串列輸入和輸出接腳SI/SO0、SO/SO1、WP#/SO2及HOLD#/SO3全部使用,以輸出讀取資料,因而輸出資料流之帶寬為4位元。 After successfully completing the state, a random data read operation is initiated to read the data in the cache memory. The random data read operation may be a single read operation, a dual read operation, or a quad read operation. In a single read operation, the serial input and output pins SI/SO0 are used for input instructions, and the serial input and output pins SO/SO1 are used to output read data, so the bandwidth of the output data stream is 2 bits. (bits). In addition, in the quad-read operation, the serial input and output pins SI/SO0, SO/SO1, WP#/SO2, and HOLD#/SO3 are all used to output the read data, so the bandwidth of the output data stream is 4 bits.

第2A圖和第2B圖顯示上述傳統SPI NAND快閃記憶體之四重讀取操作之時序圖。在四重讀取操作中,記憶體在晶片選擇信號已賦能後透過串列輸入和輸出接腳SI/SO0接收四重讀取指令CMD-RC。當三個虛擬位元DB及計劃選擇位元PS之後,記憶體接收行位址(column address)ADD-C。然後,在一虛擬位元組DBy後,根據行位址ADD-C,記憶體透過串列輸入和輸出接腳SI/SO0、SO/SO1、WP#/SO2和HOLD#/SO3將快取記憶體中之已讀取資料(如第2B圖中之位元組B1、B2、B3及B4)輸出。 2A and 2B are timing charts showing the quadruple read operation of the above conventional SPI NAND flash memory. In the quad-read operation, the memory receives the quad-read command CMD-RC through the serial input and output pins SI/SO0 after the wafer select signal has been enabled. After the three virtual bit DBs and the planned selection bit PS, the memory receives the column address ADD-C. Then, after a dummy byte DBy, according to the row address ADD-C, the memory will cache the memory through the serial input and output pins SI/SO0, SO/SO1, WP#/SO2, and HOLD#/SO3. The read data in the volume (such as the bits B1, B2, B3, and B4 in Figure 2B) is output.

然而,在具備處理多個資料流能力之電子裝置中,當電子裝置經由在不同資料流之間進行切換以由SPI NAND快閃記憶體中讀取資料或向SPI NAND快閃記憶體中寫入資料時,有可能存在許多等待週期(wait cycles)。例如,當透過第一資料流讀取資料時,執行有關第一頁面之頁面讀取操 作及隨機資料讀取操作,以由記憶體中讀取資料。當切換至透過第二資料流讀取資料時,執行有關第二頁面之頁面讀取操作及隨機資料讀取操作。此後,當切換回透過第一資料流讀取資料時,由於快取記憶體當前儲存了第二頁面之資料,需要再次執行有關第一頁面之頁面讀取操作,以將第一頁面之資料讀取至快取記憶體,然後執行隨機資料讀取操作以讀取快取記憶體中之資料。換言之,有可能再次發起頁面讀取指令、區塊/頁面位址、獲取特徵指令、狀態暫存器位址及行位址。因此,由於增加了等待週期以及重複發送一些資訊(如位址、指令、先前已讀取資料等等)而不加以重複使用,特別是在經由在不同資料流之間頻繁切換而執行存取之條件下,有可能浪費許多時間及存取資源。 However, in an electronic device having the capability to process multiple data streams, when the electronic device switches between different data streams to read data from the SPI NAND flash memory or write to the SPI NAND flash memory. When there is data, there may be many wait cycles. For example, when reading data through the first data stream, performing a page read operation on the first page Read and random data read operations to read data from memory. When switching to reading data through the second data stream, performing a page read operation and a random data read operation on the second page. Thereafter, when switching back to read data through the first data stream, since the cache memory currently stores the data of the second page, the page read operation on the first page needs to be performed again to read the information of the first page. The cache memory is fetched, and then a random data read operation is performed to read the data in the cache memory. In other words, it is possible to initiate a page read instruction, a block/page address, a get feature instruction, a state register address, and a row address again. Therefore, due to the increased waiting period and repeated transmission of some information (such as address, instructions, previously read data, etc.) without re-use, especially in the case of frequent switching between different streams of data to perform access Under conditions, it is possible to waste a lot of time and access resources.

有鑑於此,本發明提供至少一種串列周邊介面控制器、串列周邊介面快閃記憶體及其存取方法和存取控制方法。 In view of the above, the present invention provides at least one serial peripheral interface controller, a serial peripheral interface flash memory, an access method thereof, and an access control method.

本發明提供一種存取方法,用於一串列周邊介面快閃記憶體,其中該串列周邊介面快閃記憶體包含一快閃記憶體陣列並支援多個資料流,該存取方法包含:接收一流啟動(stream initiate)指令,用於該多個資料流中之一資料流,其中該流啟動指令包含該資料流之一存取類型及識別碼;接收位址資訊,其中該位址資訊包含該快閃記憶體陣列之一頁面之頁面位址及一位址指標(address pointer);以及根據該流啟動指令及該頁面位址,由該快閃記憶體陣列中讀取資料至對應於該資料 流之一流暫存器,或根據該流啟動指令,將欲寫入該快閃記憶體陣列之資料儲存入對應於該資料流之該流暫存器中。 The present invention provides an access method for a serial peripheral interface flash memory, wherein the serial peripheral memory flash memory comprises a flash memory array and supports a plurality of data streams, the access method comprising: Receiving a stream initiate instruction for one of the plurality of data streams, wherein the stream initiation instruction includes an access type and an identification code of the data stream; receiving the address information, wherein the address information Include a page address and an address pointer of a page of the flash memory array; and read data from the flash memory array to correspond to the flow start instruction and the page address The information Streaming a stream register, or according to the stream start command, storing data to be written into the flash memory array into the stream register corresponding to the data stream.

本發明另提供一種存取控制方法,用於一串列周邊介面快閃記憶體,其中該串列周邊介面快閃記憶體包含一快閃記憶體陣列並支援多個資料流,該存取方法包含:發送一流啟動指令至該串列周邊介面快閃記憶體,其中該流啟動指令用於該多個資料流中之一資料流,且該流啟動指令包含該資料流之一存取類型及一識別碼;發送位址資訊至該串列周邊介面快閃記憶體,其中該位址資訊包含該快閃記憶體陣列之一頁面之一頁面位址及一位址指標;以及根據該流啟動指令及該頁面位址,控制該串列周邊介面快閃記憶體由該快閃記憶體陣列中讀取資料至對應於該資料流之一流暫存器,或根據該流啟動指令,控制該串列周邊介面快閃記憶體將欲寫入該記憶體陣列之資料儲存入對應於該資料流之該流暫存器。 The present invention further provides an access control method for a serial peripheral interface flash memory, wherein the serial peripheral interface flash memory includes a flash memory array and supports multiple data streams, and the access method The method includes: sending a first-class startup command to the serial peripheral interface flash memory, wherein the flow startup instruction is used for one of the plurality of data streams, and the flow startup instruction includes an access type of the data stream and An identification code; sending address information to the serial peripheral interface flash memory, wherein the address information includes one page address and an address index of one of the pages of the flash memory array; and starting according to the stream The instruction and the page address, controlling the serial peripheral interface flash memory to read data from the flash memory array to a stream register corresponding to the data stream, or controlling the string according to the stream start command The column peripheral interface flash memory stores data to be written to the memory array into the stream register corresponding to the stream.

本發明另提供一種串列周邊介面快閃記憶體,支援多個資料流,該串列周邊介面快閃記憶體包含:一快閃記憶體陣列;多個流暫存器,每個流暫存器對應於該多個資料流中之一者;以及一控制邏輯,耦接於該快閃記憶體陣列及該多個流暫存器,接收用於該多個資料流中之一資料流之一流啟動指令及位址資訊,其中該流啟動指令包含該資料流之一存取類型及一識別碼,以及該位址資訊包含該快閃記憶體陣列之一頁面之一頁面位址及一位址指標;其中,資料係根據該流啟動指令及該頁面位址由該快閃記憶體陣列中讀取至對應於該資料流之一流暫存器,或資料係根據該流啟動指令儲存入對應於該資 料流之該流暫存器中。 The invention further provides a serial peripheral interface flash memory, which supports multiple data streams. The serial peripheral memory flash memory comprises: a flash memory array; a plurality of stream registers, each stream temporarily stored Corresponding to one of the plurality of data streams; and a control logic coupled to the flash memory array and the plurality of stream registers for receiving one of the plurality of data streams a first-level boot command and address information, wherein the stream start command includes an access type of the data stream and an identification code, and the address information includes a page address and a bit of one of the pages of the flash memory array An address indicator, wherein the data is read from the flash memory array to a stream register corresponding to the data stream according to the stream start command and the page address, or the data is stored according to the stream start command. In this capital The stream is in the stream register.

本發明另提供一種串列周邊介面控制器,耦接於一串列周邊介面快閃記憶體,以控制該串列周邊介面快閃記憶體之存取操作,其中該串列周邊介面快閃記憶體包含一快閃記憶體陣列,並支援多個資料流,該串列周邊介面控制器包含:一控制邏輯,發送用於該多個資料流中之一資料流之一流啟動指令及位址資訊至該串列周邊介面快閃記憶體,其中該流啟動指令包含該資料流之一存取類型及一識別碼,以及該位址資訊包含該快閃記憶體陣列之一頁面之一頁面位址及一位址指標,以及該控制邏輯根據該流啟動指令及該頁面位址控制該串列周邊介面快閃記憶體由該快閃記憶體陣列中讀取資料至對應於該資料流之一流暫存器,或該控制邏輯根據該流啟動指令將欲寫入該快閃記憶體陣列之資料儲存入對應於該資料流之該流暫存器。 The present invention further provides a serial peripheral interface controller coupled to a serial peripheral interface flash memory for controlling access operation of the serial peripheral interface flash memory, wherein the serial peripheral interface flash memory The body comprises a flash memory array and supports a plurality of data streams. The serial peripheral interface controller comprises: a control logic, and sends a flow start command and address information for one of the plurality of data streams Up to the serial peripheral interface flash memory, wherein the stream startup instruction includes an access type of the data stream and an identification code, and the address information includes one page address of one of the pages of the flash memory array And an address indicator, and the control logic controls the serial peripheral interface flash memory to read data from the flash memory array to correspond to one of the data streams according to the flow start command and the page address. The memory, or the control logic, stores the data to be written into the flash memory array into the stream register corresponding to the data stream according to the stream start command.

利用本發明所提供之串列周邊介面控制器、串列周邊介面快閃記憶體及其存取方法和存取控制方法,可實現資料流存取之高效操作,並縮短處理時間。 By using the serial peripheral interface controller, the serial peripheral interface flash memory, the access method and the access control method provided by the invention, the data stream access can be efficiently operated and the processing time can be shortened.

30‧‧‧主處理器 30‧‧‧Main processor

35‧‧‧主處理器匯流排 35‧‧‧Main processor bus

40‧‧‧主記憶體 40‧‧‧ main memory

50‧‧‧SPI控制器 50‧‧‧SPI controller

56‧‧‧SPI匯流排 56‧‧‧SPI bus

60‧‧‧SPI快閃記憶體 60‧‧‧SPI Flash Memory

410、420、480‧‧‧資料緩衝器 410, 420, 480‧‧‧ data buffer

500、600‧‧‧控制邏輯 500, 600‧‧‧ control logic

510、610‧‧‧流暫存器組 510, 610‧‧ ‧ stream register group

511、512、518、611、612、618‧‧‧流暫存器 511, 512, 518, 611, 612, 618‧‧ ‧ stream registers

521、522、523、620‧‧‧多工器 521, 522, 523, 620‧‧ ‧ multiplexers

530‧‧‧串列/平行轉換器 530‧‧‧Serial/Parallel Converter

531‧‧‧平行至QPI轉換器 531‧‧‧Parallel to QPI Converter

532‧‧‧QPI至平行轉換器 532‧‧‧QPI to Parallel Converter

540、640‧‧‧輸入/輸出緩衝器 540, 640‧‧‧ input/output buffers

541、642‧‧‧三態緩衝器 541, 642‧‧‧ tristate buffer

542、641‧‧‧緩衝器 542, 641‧‧ ‧ buffer

630‧‧‧頁面快取記憶體 630‧‧‧Page cache memory

650‧‧‧指令暫存器 650‧‧‧ instruction register

660‧‧‧位址暫存器 660‧‧‧ address register

670‧‧‧資料暫存器 670‧‧‧data register

680‧‧‧記憶體核心 680‧‧‧ memory core

682‧‧‧快閃記憶體陣列 682‧‧‧Flash memory array

684‧‧‧列解碼器 684‧‧‧ column decoder

686‧‧‧行解碼器 686‧‧‧ line decoder

ADD、ADD_I‧‧‧位址資訊 ADD, ADD_I‧‧‧ address information

ADD_C‧‧‧行位址 ADD_C‧‧‧ address

ADD_P‧‧‧區塊/頁面位址 ADD_P‧‧‧ Block/Page Address

ADD_SR‧‧‧狀態暫存器位址 ADD_SR‧‧‧Status Register Address

B1、B2、B3、B4‧‧‧位元組 B1, B2, B3, B4‧‧‧ bytes

CMD-GF‧‧‧獲取特徵指令 CMD-GF‧‧‧Get feature instructions

CMD-ID‧‧‧連續讀取指令 CMD-ID‧‧‧Continuous reading instructions

CMD-PR‧‧‧頁面讀取指令 CMD-PR‧‧‧ page read command

CMD-RC‧‧‧四重讀取指令 CMD-RC‧‧‧ four-fold read command

CMD-SI‧‧‧流啟動指令 CMD-SI‧‧‧ flow start command

CS#‧‧‧晶片選擇接腳 CS#‧‧‧ wafer selection pin

D-SR‧‧‧狀態暫存器資料 D-SR‧‧‧ Status Register Information

DB‧‧‧虛擬位元 DB‧‧‧ virtual bit

DBy‧‧‧虛擬位元組 DBy‧‧‧virtual byte

High-z‧‧‧高阻抗狀態 High-z‧‧‧high impedance state

PS‧‧‧計劃選擇位元 PS‧‧‧ plan selection bit

SCK‧‧‧串列時脈接腳 SCK‧‧‧ series clock pin

SI/SO0、SO/SO1、WP#/SO2、HOLD#/SO3‧‧‧串列輸入和輸出接腳 SI/SO0, SO/SO1, WP#/SO2, HOLD#/SO3‧‧‧ serial input and output pins

第1A圖、第1B圖及第1C圖顯示傳統SPI NAND快閃記憶體之頁面(page)讀取操作之時序圖。 1A, 1B, and 1C show timing diagrams of page read operations of conventional SPI NAND flash memory.

第2A圖和第2B圖顯示傳統SPI NAND快閃記憶體之四重讀取操作之時序圖。 Figures 2A and 2B show timing diagrams of a quad-read operation of a conventional SPI NAND flash memory.

第3A圖和第3B圖顯示根據本發明一實施例之SPI NAND快 閃記憶體之流啟動操作之時序圖。 3A and 3B show SPI NAND fast in accordance with an embodiment of the present invention Timing diagram of the flash memory start operation.

第4圖顯示根據本發明一實施例之SPI NAND快閃記憶體之連續讀取操作之時序圖。 Figure 4 is a timing diagram showing successive read operations of a SPI NAND flash memory in accordance with an embodiment of the present invention.

第5圖顯示根據本發明一實施例之SPI控制器50之區塊示意圖。 Figure 5 shows a block diagram of an SPI controller 50 in accordance with an embodiment of the present invention.

第6圖顯示根據本發明一實施例之SPI記憶體60之區塊示意圖。 Figure 6 shows a block diagram of SPI memory 60 in accordance with an embodiment of the present invention.

在說明書及申請專利範圍當中使用了某些詞彙來指稱特定組件。所屬領域中具有通常知識者應可理解,硬體製造商可能會用不同名詞來稱呼同一個組件。本說明書及申請專利範圍並不以名稱之差異來作為區分組件之方式,而是以組件在功能上之差異來作為區分之準則。在通篇說明書及申請專利範圍當中所提及之「包含」為一開放式用語,故應解釋成「包含但不限定於」。「大致」是指在可接受之誤差範圍內,所屬領域中具有通常知識者能夠在一定誤差範圍內解決所述技術問題,基本達到所述技術效果。此外,「耦接」一詞在此包含任何直接及間接之電性連接手段。因此,若文中描述一第一裝置耦接於一第二裝置,則代表該第一裝置可直接電性連接於該第二裝置,或透過其他裝置或連接手段間接地電性連接至該第二裝置。說明書後續描述為實施本發明之較佳實施方式,然該描述乃以說明本發明之一般原則為目的,並非用以限定本發明之範圍。本發明之保護範圍當視所附之申請專利範圍所界定者為準。 Certain terms are used throughout the description and claims to refer to particular components. It should be understood by those of ordinary skill in the art that hardware manufacturers may refer to the same component by different nouns. This specification and the scope of the patent application do not use the difference of the names as the means for distinguishing the components, but the difference in the function of the components as the criterion for distinguishing. The term "including" as used throughout the specification and the scope of the patent application is an open term and should be interpreted as "including but not limited to". "About" means that within the acceptable error range, those skilled in the art can solve the technical problem within a certain error range, and basically achieve the technical effect. In addition, the term "coupled" is used herein to include any direct and indirect electrical connection. Therefore, if a first device is coupled to a second device, the first device can be directly electrically connected to the second device, or can be electrically connected to the second device through other devices or connection means. Device. The description of the present invention is intended to be illustrative of the preferred embodiments of the invention. The scope of the invention is defined by the scope of the appended claims.

本發明之一實施例提供一種存取方法,用於SPI快閃記憶體。SPI快閃記憶體包含快閃記憶體陣列並支援多個資料流。SPI快閃記憶體進一步包含多個流暫存器,每個流暫存器對應於多個資料流中之一者。該存取方法包含流啟動操作、頁面存取操作及連續存取(continuous access)操作,其中流啟動操作用於啟動多個資料流中之一者。上述資料流之數目可為4至8。 An embodiment of the present invention provides an access method for SPI flash memory. The SPI flash memory contains a flash memory array and supports multiple streams of data. The SPI flash memory further includes a plurality of stream registers, each stream register corresponding to one of the plurality of data streams. The access method includes a stream initiation operation, a page access operation, and a continuous access operation, wherein the flow initiation operation is used to initiate one of a plurality of data streams. The number of data streams described above can range from 4 to 8.

第3A圖和第3B圖顯示根據本發明一實施例之SPI NAND快閃記憶體之流啟動操作之時序圖。首先,接收用於多個資料流中之一資料流(如Xth資料流)之流啟動指令CMD-SI。流啟動指令CMD-SI包含資料流之存取類型及資料流之識別碼。存取類型可為讀取類型或寫入類型,其中讀取類型指示資料流之存取操作為讀取操作,寫入類型指示資料流之存取類型為寫入操作,且對於單一資料流而言只有一個存取類型。資料流之存取類型及識別碼可根據流啟動指令CMD-SI之指令字(command word)來決定。例如,指令字4Xh指示用於Xth資料流並執行讀取操作之流啟動指令。然後,接收位址資訊ADD-I。位址資訊ADD-I包含快閃記憶體陣列之頁面之頁面位址及位址指標。存取類型及接收到的位址資訊ADD-I可儲存於對應於資料流之流暫存器中,以及位址指標用於指向儲存於流暫存器中之資料。因此,位址資訊ADD-I可為第1A圖和第1B圖中之頁面位址ADD-P與2A圖中之行位址ADD-C之組合。當SPI快閃記憶體接收到用於資料流之流啟動指令和位址資訊,以及存取類型已儲存入對應之流暫存器之後,資料流之啟動完成,換言之, 流啟動操作結束。 3A and 3B are timing diagrams showing the flow start operation of the SPI NAND flash memory in accordance with an embodiment of the present invention. First, a stream initiation command CMD-SI is received for one of a plurality of data streams (e.g., Xth data stream). The stream start command CMD-SI contains the access type of the data stream and the identification code of the data stream. The access type may be a read type or a write type, wherein the read type indicates that the access operation of the data stream is a read operation, the write type indicates that the access type of the data stream is a write operation, and for a single data stream There is only one access type. The access type and identification code of the data stream can be determined according to the command word of the stream start command CMD-SI. For example, the instruction word indicating a 4Xh X th data stream and performs a read operation start command ilk. Then, the address information ADD-I is received. The address information ADD-I contains the page address and address index of the page of the flash memory array. The access type and the received address information ADD-I can be stored in a stream register corresponding to the data stream, and the address indicator is used to point to the data stored in the stream register. Therefore, the address information ADD-I can be a combination of the page address ADD-P in the 1A and 1B pictures and the row address ADD-C in the 2A picture. When the SPI flash memory receives the stream start instruction and the address information for the data stream, and the access type has been stored in the corresponding stream register, the data stream is started, in other words, the stream start operation ends.

頁面存取操作緊隨流啟動操作,用於根據流啟動指令及頁面位址由快閃記憶體陣列中讀取頁面資料至對應於資料流之流暫存器,或根據流啟動指令將欲寫入快閃記憶體之資料儲存入對應於資料流之流暫存器。用於資料流之頁面存取操作在用於資料流之流啟動結束之後自發(spontaneously)執行。例如,若第一流啟動指令指示用於第一資料流並執行讀取操作之流啟動操作,則當第一資料流啟動之後,根據位址資訊中之頁面位址由快閃記憶體中讀取頁面資料,並將讀取的頁面資料儲存入對應於第一資料流之SPI快閃記憶體之第一流暫存器中。若第二流啟動指令指示用於第二資料流之流啟動指令並執行寫入操作之流啟動指令,則當第二資料流啟動後,發送欲寫入快閃記憶體陣列之頁面資料,並將其儲存入對應於第二資料流之SPI快閃記憶體之第二流暫存器中。 The page access operation follows the stream start operation, and is used to read the page data from the flash memory array to the stream register corresponding to the data stream according to the stream start instruction and the page address, or to write according to the stream start instruction. The data entered into the flash memory is stored in a stream register corresponding to the stream. The page access operation for the data stream is performed spontaneously after the end of the flow for streaming the data stream. For example, if the first stream start instruction indicates a stream start operation for the first data stream and performs a read operation, after the first data stream is started, the page address in the address information is read from the flash memory. The page data is stored in the first stream register of the SPI flash memory corresponding to the first data stream. If the second stream start instruction indicates a stream start instruction for the second data stream start instruction and the write operation, when the second data stream is started, the page data to be written to the flash memory array is sent, and It is stored in the second stream register of the SPI flash memory corresponding to the second data stream.

連續存取操作緊隨頁面存取操作,用於根據位址指標由流暫存器中輸出已讀取之頁面資料(連續讀取操作),或根據位址指標將流暫存器中之頁面資料寫入快閃記憶體陣列(連續寫入操作)。在連續存取操作中,首先接收用於資料流之連續存取指令。連續存取指令包含資料流之識別碼。在連續讀取操作中,根據位址指標,將對應於資料流之流暫存器中之已讀取頁面資料由SPI快閃記憶體中讀出,其中流暫存器可根據資料流之識別碼來決定,以及位址指標在資料輸出後增加。在連續寫入操作中,根據頁面位址及位址指標,將對應於資料流之流暫存器中之頁面資料寫入快閃記憶體,其中流暫存 器可根據資料流之識別碼來決定,以及位址指標在資料寫入後增加。 The continuous access operation follows the page access operation for outputting the read page data (continuous read operation) from the stream register according to the address index, or the page in the stream register according to the address index Data is written to the flash memory array (continuous write operation). In a continuous access operation, successive access instructions for the data stream are first received. The continuous access instruction contains the identification code of the data stream. In the continuous read operation, according to the address index, the read page data in the stream register corresponding to the data stream is read out from the SPI flash memory, wherein the stream register can be identified according to the data stream. The code determines and the address indicator increases after the data is output. In the continuous write operation, according to the page address and the address index, the page data corresponding to the stream buffer of the data stream is written into the flash memory, wherein the stream is temporarily stored. The device can be determined according to the identification code of the data stream, and the address indicator is increased after the data is written.

第4圖顯示根據本發明一實施例之SPI NAND快閃記憶體之連續讀取操作之時序圖。首先,接收包含資料流之識別碼之連續讀取指令CMD-ID。例如,指令字5Xh指示用於Xth資料流之連續讀取指令。然後,根據儲存於Xth流暫存器中之位址指標,將Xth流暫存器中之已讀取頁面資料(如第4圖中之輸出資料位元組B1、B2、B3及B4)由SPI快閃記憶體中讀出,以及儲存於Xth流暫存器中之位址指標在Xth流暫存器中之已讀取頁面資料輸出後增加。例如,在用於Xth資料流之流啟動操作中接收到之Xth資料流之最初之位址指標指向Xth流暫存器中之已讀取頁面資料之第一位元組。在由Xth流暫存器中輸出第一位元組、第二位元組、第三位元組及第四位元組之後,儲存於Xth資料流中之位址指標增加至指向Xth流暫存器中已讀取頁面資料之第五位元組。因此,當Xth流暫存器中之已讀取頁面資料之四個位元組已輸出後,若SPI快閃記憶體由Xth資料流切換至另一資料流,然後再切換回Xth資料流,則Xth流暫存器中之已讀取頁面資料之第五位元組可根據位址指標直接輸出,而無需發送行位址。更進一步,當Xth資料流啟動後,由於用於Xth資料流之已讀取頁面資料儲存於Xth流暫存器中,因而當切換回Xth資料流時無需再次發起頁面位址及頁面讀取操作。相應地,上述存取操作相比先前技術所耗費之處理時間更少。 Figure 4 is a timing diagram showing successive read operations of a SPI NAND flash memory in accordance with an embodiment of the present invention. First, a continuous read command CMD-ID containing the identification code of the data stream is received. For example, the instruction word indicates a sequential read 5Xh X th data stream of instructions. Then, according to the address index stored in the Xth stream register, the page data in the Xth stream register is read (such as the output data bytes B1, B2, B3, and B4 in FIG. 4). The address indicator read from the SPI flash memory and stored in the Xth stream register is incremented after the read page data is output in the Xth stream register. For example, in a data stream for the X th ilk received the start-up operation of the first address pointer point to the X th X th data stream in the stream register has been read a first group of bits of the data page. After outputting the first byte, the second byte, the third byte, and the fourth byte by the X th stream register, the address index stored in the X th data stream is increased to point to X The fifth byte of the page data has been read in the th stream register. Therefore, when the four bytes of the read page data in the Xth stream register have been output, if the SPI flash memory is switched from the Xth stream to another stream, then switch back to Xth. For the data stream, the fifth byte of the read page data in the Xth stream register can be directly output according to the address index without sending the row address. Further, after the Xth data stream is started, since the read page data for the Xth data stream is stored in the Xth stream register, it is not necessary to initiate the page address again when switching back to the Xth stream. Page read operation. Accordingly, the above access operations consume less processing time than prior art techniques.

另外,在連續存取操作期間,若儲存於流暫存器中之位址指標進入儲存於流暫存器中之頁面之頁面邊界區域 (boundary zone)時,預取(pre-fetch)靠近該頁面之另一頁面之資料,因而當跨越頁面邊界時資料可連續存取,而無需在頁面邊界處等待頁面等待週期。頁面邊界區域可為頁面邊界前方之N位元。例如,N可為16或32。 In addition, during a continuous access operation, if the address indicator stored in the stream register enters the page boundary area of the page stored in the stream register In a (boundary zone), pre-fetch is close to the data of another page of the page, so that when the page boundary is crossed, the data can be accessed continuously without waiting for the page waiting period at the page boundary. The page boundary area can be N bits in front of the page boundary. For example, N can be 16 or 32.

在一個實施例中,用於多個資料流之流啟動操作可依次(successively)發起。用於該多個資料流之啟動之操作順序及頁面存取操作可基於流啟動指令之接收順序來決定。此外,在用於資料流之啟動及頁面存取操作結束之前,用於資料流之連續存取操作無法執行。另外,若用於資料流之連續存取操作發起時,該資料流之流啟動操作及頁面存取操作尚未完成,則可由SPI快閃記憶體中輸出一暫停向量(pending vector),告知SPI控制器及/或主處理器(host processor)操作未完成。如上所述,例如,用於第一資料流之流啟動操作、用於第二資料流之流啟動操作、用於第三資料流之流啟動操作、用於第一資料流之連續存取操作、用於第二資料流之連續存取操作、用於第一資料流之連續存取操作、用於第三資料流之連續存取操作及用於第一資料流之連續存取操作依次發起。因此,與先前技術相比,多個資料流之操作之發起更加高效,且處理時間相對縮短。 In one embodiment, a stream initiation operation for multiple data streams may be initiated in succession. The sequence of operations and page access operations for the initiation of the plurality of streams may be determined based on the order in which the stream start instructions are received. In addition, continuous access operations for data streams cannot be performed until the start of the data stream and the end of the page access operation. In addition, if the stream initiation operation and the page access operation of the data stream are not completed when the continuous access operation for the data stream is initiated, a pause vector may be output from the SPI flash memory to notify the SPI control. The device and/or host processor operation is not completed. As described above, for example, a stream initiation operation for the first data stream, a stream initiation operation for the second data stream, a stream initiation operation for the third data stream, and a continuous access operation for the first data stream Continuous access operation for the second data stream, continuous access operation for the first data stream, continuous access operation for the third data stream, and successive access operations for the first data stream are sequentially initiated . Therefore, the initiation of operation of multiple data streams is more efficient and the processing time is relatively shorter compared to the prior art.

第5圖顯示根據本發明一實施例之SPI控制器50之區塊示意圖,其中SPI控制器50執行用於SPI快閃記憶體60之存取控制方法。SPI控制器50透過主處理器匯流排35耦接於主處理器30,SPI控制器50耦接於主記憶體40,並透過SPI匯流排56耦接於SPI快閃記憶體60。SPI快閃記憶體60包含快閃記憶體陣 列並支援多個資料流(在本實施例中為8個資料流)。SPI控制器50可整合於主處理器30中,或可整合於耦接於主處理器30之外部SPI介面之一部分。SPI控制器50接收來自主處理器30之存取指令,以控制SPI快閃記憶體60之存取操作。SPI控制器50將欲寫入之資料(如來自主記憶體40之寫入資料WD)發送至SPI快閃記憶體60,或將SPI快閃記憶體60中讀取之資料發送至主處理器30。 FIG. 5 shows a block diagram of an SPI controller 50 in accordance with an embodiment of the present invention, wherein the SPI controller 50 performs an access control method for the SPI flash memory 60. The SPI controller 50 is coupled to the main processor 30 via the main processor bus 35. The SPI controller 50 is coupled to the main memory 40 and coupled to the SPI flash memory 60 via the SPI bus 56. SPI flash memory 60 contains flash memory array The column supports and supports multiple data streams (eight data streams in this embodiment). The SPI controller 50 can be integrated into the main processor 30 or can be integrated into one of the external SPI interfaces coupled to the main processor 30. The SPI controller 50 receives an access command from the main processor 30 to control the access operation of the SPI flash memory 60. The SPI controller 50 sends the data to be written (such as the write data WD from the main memory 40) to the SPI flash memory 60, or transmits the data read in the SPI flash memory 60 to the main processor 30. .

SPI控制器50包含控制邏輯500、流暫存器組510、多工器(multiplexers)521、522及523、串列/平行轉換器530及輸入/輸出緩衝器540,其中流暫存器組510包含流暫存器511~518,串列/平行轉換器530包含平行至四重周邊介面(Quad Peripheral Interface,QPI)轉換器531及QPI至平行轉換器532,輸入/輸出緩衝器540包含三態緩衝器(tri-state buffer)541及緩衝器542。流暫存器組510之每個流暫存器儲存多個資料流之對應資料流之指令、狀態及位址資訊。流暫存器組510之每個流暫存器中所儲存之指令耦接於多工器521,以及儲存於流暫存器組510之每個流暫存器中所儲存之位址資訊耦接於多工器522。多工器521輸出已選擇之指令/狀態CS至控制邏輯500,以及多工器522輸出已選擇之位址資訊ADD至多工器523之輸入端。多工器523之另一輸入端接收來自主記憶體40之欲寫入SPI快閃記憶體60之寫入資料WD。主記憶體40可包含用於多個資料流之資料緩衝器,如資料緩衝器410~480。多工器523之輸出耦接於平行至QPI轉換器531,以及平行至QPI轉換器531耦接於三態緩衝器541。控制邏輯500耦接於多工器521、522及523, 以根據來自主處理器30之存取指令選擇多個資料流之指令、狀態、位址資訊及寫入資料。控制邏輯500也控制串列/平行轉換器530及三態緩衝器541。來自SPI快閃記憶體60之已讀取資料透過SPI匯流排56發送至緩衝器542,並於此後發送至QPI至平行轉換器532。QPI至平行轉換器532輸出已讀取資料RD,且已讀取資料RD透過主處理器匯流排35發送至主處理器30。 The SPI controller 50 includes control logic 500, stream register set 510, multiplexers 521, 522, and 523, a serial/parallel converter 530, and an input/output buffer 540, wherein the stream register set 510 The stream registers 511-518 are included, and the serial/parallel converter 530 includes a parallel to Quad Peripheral Interface (QPI) converter 531 and a QPI to parallel converter 532. The input/output buffer 540 includes three states. A tri-state buffer 541 and a buffer 542. Each stream register of the stream register group 510 stores instruction, status, and address information of a corresponding stream of the plurality of data streams. The instructions stored in each of the stream registers of the stream register group 510 are coupled to the multiplexer 521, and the address information information stored in each stream register of the stream register group 510. Connected to the multiplexer 522. The multiplexer 521 outputs the selected command/state CS to the control logic 500, and the multiplexer 522 outputs the selected address information ADD to the input of the multiplexer 523. The other input of the multiplexer 523 receives the write data WD from the main memory 40 to be written to the SPI flash memory 60. The main memory 40 can include data buffers for a plurality of data streams, such as data buffers 410-480. The output of the multiplexer 523 is coupled to the parallel to QPI converter 531, and the parallel to QPI converter 531 is coupled to the tristate buffer 541. The control logic 500 is coupled to the multiplexers 521, 522, and 523. The instructions, status, address information, and write data of the plurality of data streams are selected based on the access instructions from the main processor 30. Control logic 500 also controls serial/parallel converter 530 and tristate buffer 541. The read data from the SPI flash memory 60 is sent to the buffer 542 via the SPI bus 56 and thereafter sent to the QPI to parallel converter 532. The QPI-to-parallel converter 532 outputs the read data RD, and the read data RD is sent to the main processor 30 through the main processor bus 35.

控制邏輯500控制SPI控制器50之組件以控制SPI快閃記憶體60之存取操作。控制邏輯500發送用於多個資料流中之一資料流之流啟動指令及該資料流之位址資訊至SPI快閃記憶體60,以控制SPI快閃記憶體60根據流啟動指令及位址資訊執行用於該資料流之流啟動操作及頁面存取操作。流啟動指令包含資料流之存取類型及資料流之識別碼。位址資訊包含SPI快閃記憶體60之快閃記憶體陣列之頁面之頁面位址及位址指標。當資料流之存取類型指示讀取操作時,根據流啟動指令及頁面位址,控制邏輯500控制SPI快閃記憶體60由快閃記憶體中讀取資料至對應於該資料流之SPI快閃記憶體60中之流暫存器。可選地,當資料流之存取類型指示寫入操作時,根據流啟動指令,控制邏輯500控制SPI快閃記憶體60將欲寫入快閃記憶體陣列之資料儲存入對應於該資料流之SPI快閃記憶體60中之流暫存器。流啟動操作與頁面存取操作之細節已描述如上,簡潔起見,此處不再贅述。 Control logic 500 controls the components of SPI controller 50 to control the access operation of SPI flash memory 60. The control logic 500 sends a stream start command for one of the plurality of data streams and address information of the data stream to the SPI flash memory 60 to control the SPI flash memory 60 according to the stream start command and the address. The information is executed for the stream initiation operation and page access operation of the data stream. The stream start command includes the access type of the data stream and the identification code of the data stream. The address information includes the page address and address index of the page of the flash memory array of the SPI flash memory 60. When the access type of the data stream indicates the read operation, according to the flow start command and the page address, the control logic 500 controls the SPI flash memory 60 to read the data from the flash memory to the SPI corresponding to the data stream. A stream register in the flash memory 60. Optionally, when the access type of the data stream indicates the write operation, according to the flow start instruction, the control logic 500 controls the SPI flash memory 60 to store the data to be written into the flash memory array into the data stream. The stream register in the SPI flash memory 60. The details of the stream start operation and the page access operation have been described above, and for brevity, no further details are provided herein.

控制邏輯500進一步發送用於資料流之連續存取指令至SPI快閃記憶體60,以控制SPI快閃記憶體60執行用於資料流之連續存取操作。連續存取指令包含資料流之識別碼。當 資料流之存取類型指示讀取操作時,根據對應於該資料流之SPI快閃記憶體60中之流暫存器中所儲存之位址指標,控制邏輯500控制SPI快閃記憶體60由對應於該資料流之SPI快閃記憶體60中之流暫存器中輸出資料至SPI控制器50,且位址指標在資料輸出後增加。可選地,當資料流之存取類型指示寫入操作時,根據對應於該資料流之SPI快閃記憶體60中之流暫存器中所儲存之頁面位址及位址指標,控制邏輯500控制SPI快閃記憶體60將對應於該資料流之SPI快閃記憶體60中之流暫存器中所儲存之資料寫入快閃記憶體陣列,以及位址指標在資料寫入後增加。連續存取操作及位址指標之細節已描述如上,簡潔起見,此處不再贅述。 Control logic 500 further transmits successive access instructions for the data stream to SPI flash memory 60 to control SPI flash memory 60 to perform successive access operations for the data stream. The continuous access instruction contains the identification code of the data stream. when When the access type of the data stream indicates the read operation, the control logic 500 controls the SPI flash memory 60 according to the address index stored in the stream register in the SPI flash memory 60 corresponding to the data stream. The output data in the stream register in the SPI flash memory 60 corresponding to the data stream is sent to the SPI controller 50, and the address index is increased after the data is output. Optionally, when the access type of the data stream indicates the write operation, the control logic is based on the page address and the address index stored in the stream buffer in the SPI flash memory 60 corresponding to the data stream. The 500 control SPI flash memory 60 writes the data stored in the stream register in the SPI flash memory 60 corresponding to the data stream to the flash memory array, and the address index is increased after the data is written. . The details of the continuous access operation and the address index have been described above, and for brevity, no further details are provided herein.

當對應於該資料流之SPI快閃記憶體60中之流暫存器中所儲存之位址指標進入該頁面之頁面邊界區域時,控制邏輯500可進一步控制SPI快閃記憶體60預取靠近對應於該資料流之SPI快閃記憶體60中之流暫存器中所儲存之頁面之另一頁面之資料。因此,當跨越頁面邊界時資料可連續存取,無需在頁面邊界處等待頁面等待週期。頁面邊界區域可為頁面邊界前方之N位元。例如,N可為16或32。 When the address metric stored in the stream register in the SPI flash memory 60 corresponding to the data stream enters the page boundary area of the page, the control logic 500 can further control the SPI flash memory 60 to prefetch the proximity. Corresponding to the data of another page of the page stored in the stream register in the SPI flash memory 60 of the stream. Therefore, data can be accessed continuously across page boundaries without having to wait for page wait cycles at page boundaries. The page boundary area can be N bits in front of the page boundary. For example, N can be 16 or 32.

請注意,第5圖中之SPI控制器50僅為較佳舉例,本發明並不以此為限。例如,SPI控制器50可進一步包含用於產生信號之信號產生單元,如串列時脈信號產生單元。 Please note that the SPI controller 50 in FIG. 5 is only a preferred example, and the present invention is not limited thereto. For example, the SPI controller 50 can further include a signal generating unit for generating a signal, such as a serial clock signal generating unit.

第6圖顯示根據本發明一實施例之SPI記憶體60之區塊示意圖。SPI記憶體60支援多個資料流(在本實施例中為8個資料流),並包含控制邏輯600、流暫存器組610、多工器620、 頁面快取記憶體630、輸入/輸出緩衝器640、指令暫存器650、位址暫存器660、資料暫存器670及記憶體核心680,其中流暫存器組610包含流暫存器611~618,輸入/輸出緩衝器640包含緩衝器641及三態緩衝器642,記憶體核心680包含快閃記憶體陣列682、列(row)解碼器684及行(column)解碼器686。控制邏輯600根據接收自SPI控制器50之指令及資訊控制SPI快閃記憶體60之組件執行存取操作。輸入/輸出緩衝器640耦接於SPI匯流排56。指令暫存器650、位址暫存器660及資料暫存器670耦接於緩衝器641。位址暫存器660及資料暫存器670進一步耦接於記憶體核心680。接收自SPI控制器50之用於資料流之指令暫時儲存於指令暫存器650中,然後再發送並儲存至流暫存器組610中之對應流暫存器。接收自SPI控制器50之資料流之位址資訊暫時儲存於位址暫存器660中,然後再發送並儲存至流暫存器組610中之對應流暫存器。當用於資料流之連續存取操作發起時,對應於該資料流之流暫存器中所儲存之位址資訊發送至位址暫存器660,因而連續存取操作可根據該位址資訊執行。接收自SPI控制器50之欲寫入快閃記憶體陣列682之資料暫時儲存於資料暫存器670中,然後再發送並儲存至流暫存器組610中之對應流暫存器。當用於資料流之連續寫入操作發起時,對應於該資料流之流暫存器中所儲存之資料發送至資料暫存器670中,以寫入快閃記憶體陣列682。 Figure 6 shows a block diagram of SPI memory 60 in accordance with an embodiment of the present invention. The SPI memory 60 supports a plurality of data streams (eight data streams in this embodiment), and includes a control logic 600, a stream register group 610, and a multiplexer 620. Page cache memory 630, input/output buffer 640, instruction register 650, address register 660, data register 670 and memory core 680, wherein stream register group 610 includes stream register 611~618, the input/output buffer 640 includes a buffer 641 and a tristate buffer 642. The memory core 680 includes a flash memory array 682, a row decoder 684, and a column decoder 686. Control logic 600 controls the components of SPI flash memory 60 to perform access operations based on instructions and information received from SPI controller 50. The input/output buffer 640 is coupled to the SPI bus 56. The instruction register 650, the address register 660, and the data register 670 are coupled to the buffer 641. The address register 660 and the data register 670 are further coupled to the memory core 680. The instructions for the data stream received from the SPI controller 50 are temporarily stored in the instruction register 650 and then transmitted and stored to the corresponding stream register in the stream register group 610. The address information of the data stream received from the SPI controller 50 is temporarily stored in the address register 660 and then transmitted and stored to the corresponding stream register in the stream register group 610. When the continuous access operation for the data stream is initiated, the address information stored in the stream register corresponding to the data stream is sent to the address register 660, so that the continuous access operation can be based on the address information. carried out. The data received from the SPI controller 50 to be written to the flash memory array 682 is temporarily stored in the data register 670 and then transmitted and stored to the corresponding stream register in the stream register group 610. When a continuous write operation for the data stream is initiated, the data stored in the stream register corresponding to the data stream is sent to the data register 670 for writing to the flash memory array 682.

控制邏輯60接收來自SPI控制器50之用於多個資料流中之一資料流之流啟動指令及用於該資料流之位址資訊,並根據該流啟動指令及位址資訊控制SPI快閃記憶體60之 組件執行用於該資料流之流啟動操作及頁面存取操作。流啟動指令包含該資料流之存取類型及該資料流之識別碼。位址資訊包含快閃記憶體陣列682之頁面之頁面位址及位址指標。存取類型及接收到之位址資訊儲存於對應於該資料流之流暫存器組610中之流暫存器。當存取類型指示讀取操作時,根據流啟動指令及頁面位址,控制邏輯600控制SPI快閃記憶體60由快閃記憶體陣列682中讀取資料至頁面快取記憶體630,然後,根據該資料流之識別碼,頁面快取記憶體630中之頁面資料發送並儲存至對應於該資料流之流暫存器組610中之流暫存器。可選地,當存取類型指示寫入操作時,根據流啟動指令,控制邏輯600控制SPI快閃記憶體60將欲寫入快閃記憶體陣列682之資料儲存入對應於該資料流之流暫存器組610中之流暫存器。流啟動操作及頁面存取操作之細節已描述如上,簡潔起見,此處不再贅述。 The control logic 60 receives the stream start command from the SPI controller 50 for one of the plurality of data streams and the address information for the data stream, and controls the SPI flash according to the stream start command and the address information. Memory 60 The component performs a stream initiation operation and a page access operation for the data stream. The stream start instruction includes an access type of the data stream and an identification code of the data stream. The address information includes the page address and address indicator of the page of the flash memory array 682. The access type and the received address information are stored in a stream register in the stream register group 610 corresponding to the data stream. When the access type indicates a read operation, the control logic 600 controls the SPI flash memory 60 to read data from the flash memory array 682 to the page cache memory 630 according to the stream start command and the page address. Then, Based on the identification code of the data stream, the page data in the page cache 630 is sent and stored to the stream register in the stream register group 610 corresponding to the data stream. Optionally, when the access type indicates a write operation, according to the flow start command, the control logic 600 controls the SPI flash memory 60 to store the data to be written into the flash memory array 682 into the stream corresponding to the data stream. The stream register in the register set 610. The details of the stream start operation and the page access operation have been described above, and for brevity, no further details are provided herein.

控制邏輯600進一步接收來自SPI控制器50之用於資料流之連續存取指令,並控制SPI快閃記憶體60執行用於該資料流之連續存取操作。連續存取指令包含資料流之識別碼。當資料流之存取類型指示讀取操作時,根據對應於該資料流之流暫存器組610中之流暫存器中所儲存之位址指標,控制邏輯600控制SPI快閃記憶體60由對應於該資料流之流暫存器組610中之流暫存器中輸出資料至三態緩衝器642,以及控制邏輯600在資料輸出後增加位址指標。可選地,當存取類型指示寫入操作時,根據對應於該資料流之流暫存器組610中之流暫存器中所儲存之頁面位址及位址指標,控制邏輯600控制SPI快閃記憶 體60將對應於該資料流之流暫存器組610中之流暫存器中所儲存之資料寫入快閃記憶體陣列682。連續存取操作及位址指標已描述如上,簡潔起見,此處不再贅述。 Control logic 600 further receives successive access instructions for data streams from SPI controller 50 and controls SPI flash memory 60 to perform successive access operations for the data stream. The continuous access instruction contains the identification code of the data stream. When the access type of the data stream indicates a read operation, the control logic 600 controls the SPI flash memory 60 based on the address index stored in the stream register in the stream register group 610 corresponding to the data stream. The data is output from the stream register in the stream register group 610 corresponding to the data stream to the tristate buffer 642, and the control logic 600 increases the address index after the data is output. Optionally, when the access type indicates a write operation, the control logic 600 controls the SPI according to the page address and the address index stored in the stream register in the stream register group 610 corresponding to the data stream. Flash memory The body 60 writes the data stored in the stream register in the stream register group 610 corresponding to the stream to the flash memory array 682. The continuous access operation and address metrics have been described above, and for brevity, they are not described here.

當儲存於流暫存器中之位址指標進入流暫存器中所儲存之頁面之頁面邊界區域時,靠近該頁面之另一頁面之資料預取入流暫存器。因此,當跨越頁面邊界時資料可連續存取,而無需在頁面邊界處等待頁面等待週期。頁面邊界區域可為頁面邊界前方之N位元。例如,N可謂16或32。 When the address indicator stored in the stream register enters the page boundary area of the page stored in the stream register, the data of another page near the page is prefetched into the stream register. Thus, data can be accessed continuously across page boundaries without having to wait for page wait periods at page boundaries. The page boundary area can be N bits in front of the page boundary. For example, N can be said to be 16 or 32.

請注意,上述SPI快閃記憶體及SPI控制器反向相容(backward compatible)。例如,在一實施例中,大資料流量(data traffic)之存取操作,如有關啟動(booting)之存取操作及有關多個資料區塊之資料下載或資料複製(copy),可根據上述存取協定來執行,其他小資料流量之存取操作可根據已知存取協定來執行。 Please note that the above SPI flash memory and SPI controller are backward compatible. For example, in an embodiment, access operations of large data traffic, such as access operations related to booting and data download or data copying of multiple data blocks, may be based on the above Access protocol execution, other small data traffic access operations can be performed according to known access protocols.

如上所述,本發明提供了多資料流串列快閃記憶體裝置及其多資料流存取協定,以高效發起資料流之操作並縮短處理時間。 As described above, the present invention provides a multi-stream serial flash memory device and a multi-stream access protocol thereof for efficiently initiating data stream operations and shortening processing time.

雖然本發明已以實施例揭露於上,然其並非用以限定本發明,任何熟習此項技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the present invention has been described by way of example only, it is not intended to limit the invention, and the invention may be modified and modified without departing from the spirit and scope of the invention. The scope of protection is subject to the definition of the scope of the patent application.

60‧‧‧SPI快閃記憶體 60‧‧‧SPI Flash Memory

600‧‧‧控制邏輯 600‧‧‧Control logic

610‧‧‧流暫存器組 610‧‧‧Stream register group

611、612、...、618‧‧‧流暫存器 611, 612, ..., 618‧‧ ‧ stream register

620‧‧‧多工器 620‧‧‧Multiplexer

630‧‧‧頁面快取記憶體 630‧‧‧Page cache memory

640‧‧‧輸入/輸出緩衝器 640‧‧‧Input/Output Buffer

641‧‧‧緩衝器 641‧‧‧buffer

642‧‧‧三態緩衝器 642‧‧‧Three-state buffer

650‧‧‧指令暫存器 650‧‧‧ instruction register

660‧‧‧位址暫存器 660‧‧‧ address register

670‧‧‧資料暫存器 670‧‧‧data register

680‧‧‧記憶體核心 680‧‧‧ memory core

682‧‧‧快閃記憶體陣列 682‧‧‧Flash memory array

684‧‧‧列解碼器 684‧‧‧ column decoder

686‧‧‧行解碼器 686‧‧‧ line decoder

Claims (12)

一種存取方法,用於一串列周邊介面快閃記憶體,其中該串列周邊介面快閃記憶體包含一快閃記憶體陣列並支援多個資料流,該存取方法包含:接收一流啟動指令,用於該多個資料流中之一資料流,其中該流啟動指令包含該資料流之一存取類型及一識別碼;接收位址資訊,其中該位址資訊包含該快閃記憶體陣列之一頁面之一頁面位址及一位址指標;以及根據該流啟動指令及該頁面位址,由該快閃記憶體陣列中讀取資料至對應於該資料流之一流暫存器,或根據該流啟動指令,將欲寫入該快閃記憶體陣列之資料儲存入對應於該資料流之該流暫存器中。 An access method for a serial peripheral memory flash memory, wherein the serial peripheral memory flash memory comprises a flash memory array and supports multiple data streams, the access method includes: receiving a first-class boot The instruction is used for one of the plurality of data streams, wherein the stream initiation instruction includes an access type of the data stream and an identification code; and receiving the address information, wherein the address information includes the flash memory a page address and an address pointer of one of the array pages; and reading data from the flash memory array to a stream register corresponding to the data stream according to the stream start command and the page address, Or according to the flow start command, the data to be written into the flash memory array is stored in the stream register corresponding to the data stream. 如申請專利範圍第1項所述之存取方法,其進一步包含:接收一連續存取指令,用於該資料流,其中該連續存取指令包含該資料流之該識別碼;以及根據該存取類型及該位址指標,將該資料由對應於該資料流之該流暫存器中輸出,或將該資料寫入該快閃記憶體陣列;其中該位址指標在該資料輸出或寫入後增加。 The access method of claim 1, further comprising: receiving a continuous access instruction for the data stream, wherein the continuous access instruction includes the identification code of the data stream; and Taking the type and the address indicator, outputting the data from the stream register corresponding to the data stream, or writing the data to the flash memory array; wherein the address indicator is output or written in the data Increase after entering. 如申請專利範圍第2項所述之存取方法,其進一步包含:當該位址指標進入該頁面之一頁面邊界區域時,預取靠近該頁面之另一頁面之資料。 The access method of claim 2, further comprising: prefetching data of another page close to the page when the address indicator enters a page boundary area of the page. 一種存取控制方法,用於一串列周邊介面快閃記憶體,其中該串列周邊介面快閃記憶體包含一快閃記憶體陣列並支 援多個資料流,該存取方法包含:發送一流啟動指令至該串列周邊介面快閃記憶體,其中該流啟動指令用於該多個資料流中之一資料流,且該流啟動指令包含該資料流之一存取類型及一識別碼;發送位址資訊至該串列周邊介面快閃記憶體,其中該位址資訊包含該快閃記憶體陣列之一頁面之一頁面位址及一位址指標;以及根據該流啟動指令及該頁面位址,控制該串列周邊介面快閃記憶體由該快閃記憶體陣列中讀取資料至對應於該資料流之一流暫存器,或根據該流啟動指令,控制該串列周邊介面快閃記憶體將欲寫入該記憶體陣列之資料儲存入對應於該資料流之該流暫存器。 An access control method for a serial peripheral interface flash memory, wherein the serial peripheral interface flash memory comprises a flash memory array and supports Assisting multiple data streams, the access method includes: sending a first-class startup command to the serial peripheral interface flash memory, wherein the flow startup instruction is used for one of the plurality of data streams, and the flow initiation instruction Include one access type of the data stream and an identification code; send address information to the serial peripheral interface flash memory, wherein the address information includes a page address of one of the pages of the flash memory array and An address indicator; and controlling, according to the stream start command and the page address, the serial peripheral interface flash memory to read data from the flash memory array to a stream register corresponding to the data stream, Or according to the flow start command, controlling the serial peripheral interface flash memory to store data to be written into the memory array into the stream register corresponding to the data stream. 如申請專利範圍第4項所述之存取控制方法,其進一步包含:發送一連續存取指令至該串列周邊介面快閃記憶體,其中該連續存取指令用於該資料流,且該連續存取指令包含該資料流之該識別碼;以及根據該存取類型及該位址指標,控制該串列周邊介面快閃記憶體由對應於該資料流之該流暫存器中輸出該資料,或將該資料寫入該快閃記憶體陣列;其中,該位址指標在該資料輸出或寫入後增加。 The access control method of claim 4, further comprising: transmitting a continuous access instruction to the serial peripheral interface flash memory, wherein the continuous access instruction is used for the data stream, and the The continuous access instruction includes the identification code of the data stream; and controlling, according to the access type and the address indicator, the serial peripheral interface flash memory to be output by the stream register corresponding to the data stream Data, or write the data to the flash memory array; wherein the address indicator is incremented after the data is output or written. 如申請專利範圍第5項所述之存取控制方法,其進一步包含:當該位址指標進入該頁面之一頁面邊界區域時,控制該串 列周邊介面快閃記憶體預取靠近該頁面之另一頁面之資料。 The access control method of claim 5, further comprising: controlling the string when the address indicator enters a page boundary area of the page The column peripheral interface flash memory prefetches data near another page of the page. 一種串列周邊介面快閃記憶體,支援多個資料流,該串列周邊介面快閃記憶體包含:一快閃記憶體陣列;多個流暫存器,每個流暫存器對應於該多個資料流中之一者;以及一控制邏輯,耦接於該快閃記憶體陣列及該多個流暫存器,接收用於該多個資料流中之一資料流之一流啟動指令及一位址資訊,其中該流啟動指令包含該資料流之一存取類型及一識別碼,以及該位址資訊包含該快閃記憶體陣列之一頁面之一頁面位址及一位址指標;其中,資料係根據該流啟動指令及該頁面位址由該快閃記憶體陣列中讀取至對應於該資料流之一流暫存器,或該資料係根據該流啟動指令儲存入對應於該資料流之該流暫存器中。 A serial peripheral interface flash memory supporting a plurality of data streams, the serial peripheral memory flash memory comprising: a flash memory array; a plurality of stream registers, each stream register corresponding to the One of the plurality of data streams; and a control logic coupled to the flash memory array and the plurality of stream registers to receive a flow start command for one of the plurality of data streams and An address information, wherein the flow start instruction includes an access type of the data stream and an identification code, and the address information includes a page address and an address indicator of one of the pages of the flash memory array; The data is read from the flash memory array to a stream register corresponding to the data stream according to the stream start command and the page address, or the data is stored according to the stream start command. The stream is in the stream register. 如申請專利範圍第7項所述之串列周邊介面快閃記憶體,其中該控制邏輯進一步接收用於該資料流之一連續存取指令,該連續存取指令包含該資料流之該識別碼,其中,該資料係根據該存取類型及該位址指標由對應於該資料流之該流暫存器中輸出或寫入該快閃記憶體陣列,以及該控制邏輯在該資料輸出或寫入後增加該位址指標。 The serial peripheral interface flash memory of claim 7, wherein the control logic further receives a continuous access instruction for the data stream, the continuous access instruction including the identification code of the data stream The data is output or written to the flash memory array by the stream register corresponding to the data stream according to the access type and the address indicator, and the control logic outputs or writes the data in the data stream. Increase the address indicator after entering. 如申請專利範圍第8項所述之串列周邊介面快閃記憶體,其中,靠近該頁面之另一頁面之資料係當該位址指標進入該 頁面之一頁面邊界區域時預取。 The serial peripheral interface flash memory as described in claim 8 wherein the data of another page adjacent to the page is when the address indicator enters the Prefetch when one of the page boundary areas of the page. 一種串列周邊介面控制器,耦接於一串列周邊介面快閃記憶體,以控制該串列周邊介面快閃記憶體之存取操作,其中該串列周邊介面快閃記憶體包含一快閃記憶體陣列,並支援多個資料流,該串列周邊介面控制器包含:一控制邏輯,發送用於該多個資料流中之一資料流之一流啟動指令及位址資訊至該串列周邊介面快閃記憶體,其中該流啟動指令包含該資料流之一存取類型及一識別碼,以及該位址資訊包含該快閃記憶體陣列之一頁面之一頁面位址及一位址指標,以及該控制邏輯根據該流啟動指令及該頁面位址控制該串列周邊介面快閃記憶體由該快閃記憶體陣列中讀取資料至對應於該資料流之一流暫存器,或該控制邏輯根據該流啟動指令將欲寫入該快閃記憶體陣列之資料儲存入對應於該資料流之該流暫存器。 A serial peripheral interface controller coupled to a serial peripheral interface flash memory for controlling access operation of the serial peripheral interface flash memory, wherein the serial peripheral interface flash memory comprises a fast Flash memory array and supporting multiple data streams, the serial peripheral interface controller includes: a control logic, sending a flow start command and address information for one of the plurality of data streams to the serial a peripheral interface flash memory, wherein the stream startup command includes an access type of the data stream and an identification code, and the address information includes a page address and an address of one of the pages of the flash memory array The indicator, and the control logic controls, according to the flow start command and the page address, the serial peripheral interface flash memory to read data from the flash memory array to a stream register corresponding to the data stream, or The control logic stores data to be written to the flash memory array into the stream register corresponding to the data stream according to the stream start command. 如申請專利範圍第10項所述之串列周邊介面控制器,其中該控制邏輯進一步發送用於該資料流之一連續存取指令至該串列周邊介面快閃記憶體,其中該連續存取指令包含該資料流之該識別碼,以及該控制邏輯根據該存取類型及該位址指標控制該串列周邊介面快閃記憶體由對應於該資料流之該流暫存器中輸出該資料至該串列周邊介面控制器或將該資料寫入該快閃記憶體陣列,其中該位址指標在該資料輸出或寫入後增加。 The serial peripheral interface controller of claim 10, wherein the control logic further transmits a continuous access instruction for the data stream to the serial peripheral interface flash memory, wherein the continuous access The instruction includes the identification code of the data stream, and the control logic controls the serial peripheral interface flash memory according to the access type and the address indicator to output the data from the stream register corresponding to the data stream. Up to the serial peripheral interface controller or writing the data to the flash memory array, wherein the address indicator is incremented after the data is output or written. 如申請專利範圍第11項所述之串列周邊介面控制器,其中,當該位址指標進入該頁面之一頁面邊界區域時,該控 制邏輯控制該串列周邊介面快閃記憶體預取靠近該頁面之另一頁面之資料。 The serial peripheral interface controller according to claim 11, wherein when the address indicator enters a boundary area of a page of the page, the control The logic controls the serial peripheral interface flash memory to prefetch data adjacent to another page of the page.
TW102145500A 2013-06-13 2013-12-11 Serial peripheral interface (spi) controller, serial peripheral interface flash memory and access method and access control method thereof TWI534615B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
IN2016MU2013 IN2013MU02016A (en) 2013-06-13 2013-06-13

Publications (2)

Publication Number Publication Date
TW201447573A TW201447573A (en) 2014-12-16
TWI534615B true TWI534615B (en) 2016-05-21

Family

ID=52227126

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102145500A TWI534615B (en) 2013-06-13 2013-12-11 Serial peripheral interface (spi) controller, serial peripheral interface flash memory and access method and access control method thereof

Country Status (4)

Country Link
CN (1) CN104238957B (en)
BR (1) BR102013022935A2 (en)
IN (1) IN2013MU02016A (en)
TW (1) TWI534615B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105804734B (en) * 2016-04-12 2018-10-16 中国石油天然气集团公司 A method of identifying thick oil reservoir using nuclear magnetic resonance log
TWI608356B (en) * 2016-07-20 2017-12-11 聯陽半導體股份有限公司 Peripheral interface chip and data transmitted method thereof
CN108197502A (en) * 2018-01-11 2018-06-22 苏州国芯科技有限公司 A kind of SPI transmission methods, device, controller, encryption chip and communication equipment
TWI727449B (en) * 2018-10-17 2021-05-11 旺宏電子股份有限公司 Non-sequential page continuous read
TWI688955B (en) * 2019-03-20 2020-03-21 點序科技股份有限公司 Memory apparatus and accessing method for memory thereof
US10891184B2 (en) * 2019-05-22 2021-01-12 Macronix International Co., Ltd. Configurable data integrity mode, and memory device including same
CN111816627B (en) * 2020-09-09 2020-12-08 武汉新芯集成电路制造有限公司 Storage packaging chip and pin multiplexing method thereof

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101740102B (en) * 2008-11-11 2014-03-26 西安奇维测控科技有限公司 Multi-channel flash memory chip array structure and write-in and read-out methods thereof
CN101819560B (en) * 2009-02-27 2012-05-30 杭州晟元芯片技术有限公司 Method and device for executing program of SPI interface memory
CN102193888B (en) * 2010-03-12 2013-06-05 新唐科技股份有限公司 Data transmission system and programmable serial peripheral interface controller
US8135881B1 (en) * 2010-09-27 2012-03-13 Skyworks Solutions, Inc. Dynamically configurable serial data communication interface
CN202003346U (en) * 2010-12-22 2011-10-05 上海宇芯科技有限公司 Multi-channel not-and (NAND) flash controller
CN102945213B (en) * 2012-09-24 2016-08-10 无锡众志和达数据计算股份有限公司 A kind of out of order Memory Controller Hub based on FPGA and its implementation

Also Published As

Publication number Publication date
TW201447573A (en) 2014-12-16
CN104238957A (en) 2014-12-24
IN2013MU02016A (en) 2015-06-05
CN104238957B (en) 2018-03-09
BR102013022935A2 (en) 2015-07-28

Similar Documents

Publication Publication Date Title
TWI534615B (en) Serial peripheral interface (spi) controller, serial peripheral interface flash memory and access method and access control method thereof
CN106716383B (en) Memory device, method of controlling memory device, and memory system
TWI493350B (en) High priority command queue for peripheral component
CN107305781B (en) Memory device, memory system, and method of controlling memory device
KR100708128B1 (en) An apparatus and method for controlling nand flash memory
KR100913279B1 (en) Method and apparatus for transmitting memory pre-fetch commands on a bus
US8266369B2 (en) Flash memory interface
TWI446356B (en) Memory with output control and system thereof
KR102170644B1 (en) Non-volatile memory channel control using a general purpose programmable processor in combination with a low level programmable sequencer
KR20180035173A (en) Semiconductor memory device and continuous reading method for the same
US20130282945A1 (en) Apparatus and method emulating a parallel interface to effect parallel data transfer from serial flash memory
MX2012005183A (en) Command queue for peripheral component.
US20180143922A1 (en) Data inversion circuit
TW201305821A (en) Flexible flash commands
TW200826104A (en) Modular command structure for memory and memory system
GB2500082A (en) Delaying the transmission of data from a memory device until the output buffer of the memory device contains the data for the transfer
JP2008009817A (en) Semiconductor device and data transfer method
JP2006113689A (en) Bus bridge device and data transfer method
CN110851073A (en) Storage device and macro instruction execution method
TWI471731B (en) Memory access method, memory access control method, spi flash memory device and spi controller
US20030217218A1 (en) Interface for devices having different data bus widths and data transfer method using the interface
CN105608033B (en) Semiconductor device and method of operating the same
TWI473110B (en) Flash memory apparatus with serial interface and rsest method thereof
TWI740092B (en) Storage device and method for performing macro command
WO2016053146A1 (en) Computer system

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees