Memory controller, bridging device and instruction and data transfer method
By designing a bridge device and combining memory controllers with different processes or specifications, a high-speed transmission interface is realized, which solves the problem that the host device cannot access the latest data storage device, and achieves efficient access and cost savings, and has backward compatibility.
Patent Information
- Application Number
- CN202310615936.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-05-12
- Filing Date
- 2023-05-29
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, the host device cannot access or verify the newly developed data storage device through the existing bridge device, especially when the data storage device evolves with the process or specification, the lack of a bridge device that supports the latest process or specification, resulting in storage. Get difficulties.
A bridge device is designed to provide a high-speed transmission interface by combining memory controllers of different processes or specifications, and to use instructions and data transfer methods to assist the host device to access the data storage device, which has backward compatibility. The bridge device includes a pair of memory controllers, which connects through a bus to realize the transfer of memory instructions and data, ensuring bidirectional operation between the host device and the data storage device.
It realizes efficient access of data storage devices of different processes or specifications by the host device, reduces the production cost of bridge devices, avoids the need for special bridge devices for each application, has backward compatibility, and supports the latest specifications of data storage. system.
Smart Images

Figure CN118939582A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for transferring instructions and data between memory controllers, and more particularly to a bridge device combining multiple memory controllers. The method assists a host device in accessing a data storage device by transferring instructions and data between the memory controllers, and enables the bridge device to have a backward compatible characteristic. Background Art
[0002] As the technology of data storage devices has grown rapidly in recent years, many data storage devices, such as memory cards that comply with Secure Digital (SD) / Multi Media Card (MMC) specifications, Compact flash (CF) specifications, Memory Stick (MS) specifications, and Extreme Digital (XD) specifications, Solid State Disk (SSD), embedded Multi Media Card (eMMC), and Universal Flash Storage (UFS) have been widely used in a variety of applications.
[0003] Generally speaking, a host device needs to access a data storage device through a transmission interface that meets the specifications. If the host device itself does not have a transmission interface that supports the specifications of the data storage device, it must access the data storage device through a specific bridge device. However, in order to improve performance and save costs, data storage devices are usually developed using the latest process or the latest specifications as the process or specifications evolve, but at the same time, there may not be a bridge device that supports the latest process or the latest specifications, resulting in the problem that the host device cannot access or verify the newly developed data storage device through the existing bridge device.
[0004] To solve this problem, a bridge device is needed that can combine high-speed transmission interfaces made with different processes or specifications to assist a host device in accessing a data storage device, and to make the bridge device backward compatible. Summary of the invention
[0005] According to an embodiment of the present invention, a memory controller is coupled between a peer memory controller and a data storage device, and includes a first transmission interface, a second transmission interface, and a control unit. The first transmission interface is coupled to a transmission interface of the peer memory controller via a bus, and includes an instruction register. The second transmission interface is coupled to the data storage device. The control unit is coupled to the first transmission interface and the second transmission interface, and is used to access the data storage device via the second transmission interface. In a write mode, the first transmission interface loads a first instruction into the instruction register in response to an instruction latch enable signal issued by the transmission interface of the peer memory controller, and obtains first transfer data from the bus in response to the first instruction. A value of the first instruction is selectively set to a first value or a second value, the first value is used to indicate a memory instruction transfer operation in a first direction, and the second value is used to indicate a memory data transfer operation in a first direction, and the first transmission interface processes the first transfer data according to the value of the first instruction to obtain a memory instruction or write data.
[0006] According to one embodiment of the present invention, a bridge device is coupled between a host device and a data storage device, and includes a first controller and a second controller. The first controller includes a first transmission interface. The second controller is coupled to the first controller and includes a second transmission interface. The second transmission interface is coupled to the first transmission interface via a bus. The first transmission interface and the second transmission interface are flash memory interfaces, the first transmission interface operates in a slave mode, and the second transmission interface operates in a master mode. In a write mode, the first transmission interface receives a first instruction from the second transmission interface, and obtains first transfer data from the bus in response to the first instruction, wherein a value of the first instruction is selectively set to a first value or a second value, the first value is used to indicate a memory instruction transfer operation in a first direction, the second value is used to indicate a memory data transfer operation in the first direction, and the first transmission interface processes the first transfer data according to the value of the first instruction to obtain a memory instruction or write data.
[0007] According to an embodiment of the present invention, a method for transferring instructions and data between multiple memory controllers includes: receiving a first instruction from a second transmission interface by a first transmission interface, wherein the first transmission interface is a memory interface of a first memory controller, the second transmission interface is a memory interface of a second memory controller, the second transmission interface is coupled to the first transmission interface via a bus, the first transmission interface operates in a slave mode, the second transmission interface operates in a master mode, and a value of the first instruction is selectively set to a first value or a second value, the first value is used to indicate a memory instruction transfer operation in a first direction, and the second value is used to indicate a memory data transfer operation in the first direction; obtaining first transfer data from the bus in response to the first instruction by the first transmission interface; and processing the first transfer data by the first transmission interface according to the value of the first instruction to obtain a memory instruction or write data. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 FIG. 4 is a block diagram showing an example of a data storage device according to an embodiment of the present invention.
[0009] Figure 2 FIG. 4 is a simplified block diagram of a data storage device according to an embodiment of the present invention.
[0010] Figure 3 FIG. 1 is a block diagram showing an example of a data storage system according to an embodiment of the present invention.
[0011] Figure 4 FIG. 1 shows an implementation example of a data storage system according to an embodiment of the present invention.
[0012] Figure 5 FIG. 4 is a schematic diagram showing control signals and data transmitted through a corresponding bus between two interconnected transmission interfaces according to an embodiment of the present invention.
[0013] Figure 6 FIG. 4 is a flow chart showing an example of a method for transferring instructions and data between two transmission interfaces belonging to different controllers according to an embodiment of the present invention.
[0014] Fig. 7A FIG. 4 shows a signal waveform diagram of a command cycle on a bus according to an embodiment of the present invention.
[0015] Figure 7B FIG. 4 shows a signal waveform diagram of an address cycle on a bus according to an embodiment of the present invention.
[0016] Fig. 8A FIG. 4 shows a signal waveform diagram of a data input cycle on a bus according to an embodiment of the present invention.
[0017] Figure 8B FIG. 4 shows a signal waveform diagram of a data output cycle on a bus according to an embodiment of the present invention.
[0018] Fig. 9 FIG. 4 is a flow chart showing a method for performing bidirectional command and data transfer between a host device and a data storage device using a bridge device according to an embodiment of the present invention.
[0019] Fig.10 FIG. 4 is a schematic diagram showing a common bridge transfer format according to an embodiment of the present invention.
[0020] Fig.11 FIG. 4 is a schematic diagram showing the use of four transfer data blocks to carry four data.
[0021] Fig.12 FIG. 4 is a schematic diagram showing a method of using one transfer data block to carry eight instructions.
[0022] Fig.13 FIG. 4 is a schematic diagram showing a command packet according to an embodiment of the present invention.
[0023]
Explanation of symbols
[0024] 100, 200, 300, 400: Data storage device
[0025] 110,210:Memory controller
[0026] 112: Microprocessor
[0027] 112C: Program code
[0028] 112M: Read-only memory
[0029] 114: Memory interface
[0030] 115,215,315,325,415,425: Control unit
[0031] 116: Buffer memory
[0032] 118:Host Interface
[0033] 120,220: Memory device
[0034] 130,330,430: Host device
[0035] 132: Encoder
[0036] 134:Decoder
[0037] 214: Flash memory interface
[0038] 218,413:UFS interface
[0039] 310,320,410,420: Controller
[0040] 350,450: Bridge device
[0041] 311,313,321,323,510,520: Transmission interface
[0042] 360,370,460,470:bus
[0043] 411,421,NFC:NAND flash memory controller
[0044] 423: PCIe interface
[0045] 511: Instruction register
[0046] 512: Address register
[0047] 513: Direct Memory Access Engine
[0048] 530: Static Random Access Memory
[0049] 1300: Command packet
[0050] ADD: address signal
[0051] ALE: Address latch enable signal
[0052] Bridge_CMD: Bridge command
[0053] CLE: Command latch enable signal
[0054] CMD,CMD[1],CMD[2],CMD[3],CMD[4],CMD[5],CMD[6],CMD[7],CMD[8]: command
[0055] D0,D1,D2,Dn,DATA[1],DATA[2],DATA[3],DATA[4]: data
[0056] DATA: data part
[0057] DC-1, DC-2, DC-3: Transfer data blocks
[0058] DQS: Data select communication signal
[0059] DQx: Data input / output signal
[0060] Dummy: Additional part
[0061] RE#: Read enable signal
[0062] UFS_CMD: Memory Commands
[0063] WE: Write enable signal DETAILED DESCRIPTION
[0064] In the following, many specific details are described to provide a thorough understanding of the embodiments of the present invention. However, those skilled in the art will still understand how to implement the present invention in the absence of one or more specific details or relying on other methods, elements or materials. In other cases, well-known structures, materials or operations are not shown or described in detail to avoid obscuring the main concepts of the present invention.
[0065] References throughout this specification to "an embodiment" or "an example" mean that a particular feature, structure, or characteristic described in conjunction with that embodiment or example is included in at least one of the multiple embodiments of the present invention. Thus, the phrases "in an embodiment of the present invention," "according to an embodiment of the present invention," "in an example," or "according to an example of the present invention" appearing in various places throughout this specification do not necessarily all refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics may be combined in any suitable combinations and / or subcombinations in one or more embodiments or examples.
[0066] In addition, in order to make the purpose, features and advantages of the present invention more clearly understood, the following specific embodiments of the present invention are specifically cited and described in detail with the accompanying drawings. The purpose is to illustrate the spirit of the present invention rather than to limit the scope of protection of the present invention. It should be understood that the following embodiments can be implemented via software, hardware, firmware, or any combination thereof.
[0067] Figure 1 1 shows an example of a block diagram of a data storage device according to an embodiment of the present invention. The data storage device 100 may include a memory device 120 and a memory controller 110. The memory controller 110 is used to access the memory device 120 and control the operation of the memory device 120. The memory device 120 may be a non-volatile (NV) memory device (e.g., a flash memory), and may include one or more memory elements (e.g., one or more flash memory dies, one or more flash memory chips, or other similar elements).
[0068] The data storage device 100 may be coupled to a host device 130. The host device 130 may include at least a processor, a power circuit, and at least one random access memory (RAM), such as at least one dynamic random access memory (DRAM), at least one static random access memory (SRAM), etc. (not shown in the figure). Figure 1 ). The processor and the random access memory may be connected to each other via a bus and may be coupled to the power circuit to obtain power. The processor may control the operation of the host device 130. The power circuit may supply power to the processor, the random access memory, and the data storage device 100, for example, outputting one or more driving voltages to the data storage device 100. The data storage device 100 may obtain the driving voltage from the host device 130 as the power supply of the data storage device 100 and provide storage space for the host device 130.
[0069] According to an embodiment of the present invention, the memory controller 110 may include a microprocessor 112, a read-only memory (ROM) 112M, a memory interface 114, a buffer memory 116, and a host interface 118, wherein the microprocessor 112, the ROM 112M, and the buffer memory 116 may constitute a control unit 115 of the memory controller 110. The ROM 112M is used to store program code 112C. The microprocessor 112 is used to execute the program code 112C to control access to the memory device 120. The program code 112C may include one or more program modules, such as a boot loader program code. When the data storage device 100 obtains power from the host device 130, the microprocessor 112 may execute an initialization program of the data storage device 100 by executing the program code 112C. During the initialization process, the microprocessor 112 may load a set of In-System Programming (ISP) program codes (not shown) from the memory device 120. Figure 1). The microprocessor 112 can execute the set of in-system programming codes so that the data storage device 100 can have various functions. According to an embodiment of the present invention, the set of in-system programming codes may include, but are not limited to: one or more program modules related to memory access (e.g., reading, writing, and erasing), such as a read operation module, a lookup table module, a wear leveling module, a read refresh module, a read reclaim module, a garbage collection module, an unexpected power off recovery (SPOR) module, and an uncorrectable error correction code (UECC) module, which are respectively provided to perform corresponding operations such as reading, lookup table, wear leveling, read refresh, read reclaim, garbage collection, unexpected power off recovery, and error handling of detected UECC errors.
[0070] The memory interface 114 includes an encoder 132 and a decoder 134 , wherein the encoder 132 is used to encode data to be written into the memory device 120 , such as performing error correction code (ECC) encoding, and the decoder 134 is used to decode data read from the memory device 120 .
[0071] In a typical case, the memory device 120 includes a plurality of memory elements, such as a plurality of flash memory dies or a plurality of flash memory chips, and each memory element may include a plurality of memory blocks. The memory controller 110 performs an erase operation on the memory device 120 in units of blocks. In addition, a memory block may record (include) a specific number of data pages, such as physical data pages, wherein the memory controller 110 performs a write operation on the memory device 120 in units of data pages.
[0072] In practice, the memory controller 110 may utilize its own internal components to perform a variety of control operations, such as utilizing the memory interface 114 to control the access operations of the memory device 120 (especially the access operations to at least one memory block or at least one data page), utilizing the buffer memory 116 to perform the required buffer processing, and utilizing the host interface 118 to communicate with the host device 130.
[0073] In one embodiment, the memory controller 110 communicates with the host device 130 via the host interface 118 using a standard communication protocol. For example, the standard communication protocol includes (but is not limited to): Universal Serial Bus (USB) standard, SD interface standard, Ultra High Speed-I (UHS-I) interface standard, Ultra High Speed-II (UHS-II) interface standard, CF interface standard, MMC interface standard, eMMC interface standard, UFS interface standard, Advanced Technology Attachment (ATA) standard, Serial ATA (SATA) standard, Peripheral Component Interconnect Express (PCIe) standard, Parallel Advanced Technology Attachment (PATA) standard, etc.
[0074] In one embodiment, the buffer memory 116 is implemented as a random access memory. For example, the buffer memory 116 may be a static random access memory, but the present invention is not limited thereto. In other embodiments, the buffer memory 116 may be a dynamic random access memory.
[0075] In one embodiment, the data storage device 100 may be a portable memory device (e.g., a memory card that complies with SD / MMC, CF, MS, or XD standards), and the host device 130 is an electronic device that can be connected to the data storage device, such as a mobile phone, a notebook computer, a desktop computer, etc. In another embodiment, the data storage device 100 may be a solid state drive or an embedded storage device that complies with UFS or eMMC specifications, and may be disposed in an electronic device, such as a mobile phone, a notebook computer, or a desktop computer, and in this case, the host device 130 may be a processor of the electronic device.
[0076] The host device 130 may issue instructions to the data storage device 100 , such as a read instruction or a write instruction, to access data stored in the memory device 120 , or the host device 130 may issue instructions to the data storage device 100 to further control and manage the data storage device 100 .
[0077] Figure 2is a simplified block diagram of a data storage device according to an embodiment of the present invention, wherein the components inside the memory controller can be simplified into three parts: a host interface, a memory interface, and a control unit, so as to simplify the description in the subsequent paragraphs. Figure 2 As shown, the data storage device 200 may include a memory device 220 and a memory controller 210. The memory controller 210 is used to access the memory device 220 and control the operation of the memory device 220. The memory device 220 may be a non-volatile (NV) memory device, such as the above-mentioned flash memory.
[0078] In one embodiment of the present invention, the memory device 220 is a NAND flash memory, and the data storage device 200 can be implemented as a UFS device. Therefore, in this embodiment, the memory controller 210 may include a UFS interface 218, a flash memory interface 214, and a control unit 215, wherein the UFS interface 218 is the aforementioned host interface, and the flash memory interface 214 is the aforementioned memory interface. The control unit 215 may be as follows: Figure 1 The control unit 215 can communicate with a host device (eg, a microprocessor, a read-only memory, and a buffer memory) through the UFS interface 218 and in accordance with the UFS communication protocol. Figure 2 The control unit 215 can communicate with the memory device 220 through the flash memory interface 214 .
[0079] As described above, if a host device is equipped with a transmission interface that supports the specifications of the data storage device 100 / 200 (e.g., the specifications of the UFS communication protocol described above), the host device can directly access the data storage device 100 / 200 through the transmission interface. If the host device itself is not equipped with a transmission interface that supports the specifications of the data storage device 100 / 200, it must access the data storage device 100 / 200 through a specific bridge device.
[0080] However, when the data storage device 100 / 200 is developed using the latest process or the latest specification as the process or specification evolves, there may not be a bridge device that can support the latest process or the latest specification, or the bridge device may not simultaneously include different high-speed transmission interfaces made with different processes or specifications, resulting in the problem that the host device cannot access or verify the newly developed data storage device 100 / 200 through the existing bridge device. Similarly, when the host device is configured with a transmission interface that complies with the latest specification, it may not be able to correctly access a device that is not configured with a transmission interface that complies with the latest specification. For example, according to the definition of the UFS specification, the UFS 3.1 and UFS 3.0 versions are not compatible with each other because the lengths of the descriptors defined by each are different. If the host device is a host platform that uses the UFS 3.1 specification, the corresponding device must use the firmware of the UFS3.1 specification, otherwise there will be differences in compatibility, resulting in the host device being unable to correctly operate the device, and vice versa.
[0081] To solve this problem, the present invention proposes a bridge device that can be combined with high-speed transmission interfaces made with different processes or specifications to assist a host device in accessing a data storage device, and to enable the bridge device to have backward compatible characteristics. In addition, the present invention also proposes a method for transferring instructions and data applied inside a bridge device, which assists a host device in accessing a data storage device by transferring instructions and data between memory controllers combined inside the bridge device.
[0082] Figure 3 is a block diagram showing an example of a data storage system according to an embodiment of the present invention. The data storage system may include at least a data storage device 300 and a bridge device 350. The bridge device 350 may be coupled between the data storage device 300 and the host device 330 to perform a bidirectional transfer operation between the data storage device 300 and the host device 330, and to transmit instructions, data and signals between the host device 330 and the data storage device 300 to assist the host device 330 in accessing the data storage device 300.
[0083] According to an embodiment of the present invention, the bridge device 350 may include controllers 310 and 320. The controller 310 may include transmission interfaces 311 and 313 and a control unit 315. The controller 320 may include transmission interfaces 321 and 323 and a control unit 325. The transmission interfaces 311, 313, 321 and 323 communicate with a coupled device or a transmission interface respectively in accordance with corresponding standard communication protocols, wherein the transmission interface 311 is coupled to the transmission interface 321, so that the controllers 310 and 320 can communicate through the transmission interfaces 311 and 321, and the transmission interface 323 is used to communicate with the host device 330, and the transmission interface 313 is used to communicate with the data storage device 300. The control units 315 and 325 can enable the controllers 310 and 320 to have corresponding functions by executing built-in program codes, and the control units 315 and 325 can be used to control the transmission and reception of signals and packets between the two transmission interfaces 311 and 313 and 321 and 323 in accordance with corresponding standard communication protocols, process signals and packets to be transmitted or received, and execute and control the format conversion of signals and packets, so that signals and packets can be transmitted through the corresponding transmission interfaces in the correct data format.
[0084] The bridge device 350 may further include a bus 360, which is coupled between the controllers 310 and 320 and is used to connect the transmission interfaces 311 and 321, so that the controllers 310 and 320 can be connected and communicated with each other through the transmission interfaces 311 and 321, and transmit signals and packets, such as control signals, command signals, and data packets, through the bus 360. In an embodiment of the present invention, the transmission interfaces 311 and 321 generate a plurality of transfer data chunks in a common bridge transfer format, wherein the transfer data chunks carry instructions and data to be transmitted between the host device 330 and the data storage device 300, including the aforementioned control signals, command signals, and data packets.
[0085] According to an embodiment of the present invention, the transmission interfaces 311 and 321 may be flash memory interfaces. For example, the transmission interfaces 311 and 321 may be NAND flash memory interfaces (or NAND flash memory controllers (NFC)). In addition, according to an embodiment of the present invention, the controllers 310 and 320 may be memory controllers, such as the memory controllers 110 or 210 of the present invention described above. In an embodiment of the present invention, the control units 315 and 325 may be implemented in the same manner as the control unit 115, that is, the control units 315 and 325 may respectively include components such as a microprocessor, a read-only memory, and a buffer memory, for performing corresponding signal processing between the two transmission interfaces 311 and 313 and 321 and 323 in accordance with corresponding standard communication protocols.
[0086] According to an embodiment of the present invention, the transmission interface 323 may be a Peripheral Component Interconnect Express (PCIe) interface or a Universal Serial Bus (USB) interface, and the controller 320 may communicate with the host device 330 through the transmission interface 323 in accordance with the corresponding PCIe or USB communication protocol. In addition, according to an embodiment of the present invention, when the data storage device 300 is implemented as a UFS device, the transmission interface 313 may be a UFS interface, and the controller 310 may communicate with the data storage device 300 through the transmission interface 313 in accordance with the corresponding UFS communication protocol to access the data storage device 300. However, it should be noted that the present invention is not limited to being implemented only by a PCIe interface, a USB interface, or a UFS interface.
[0087] According to an embodiment of the present invention, the data storage device 300 can be implemented in the same manner as the data storage device 100 or 200. That is, the data storage device 300 can be implemented in the same manner as the data storage device 100 or 200. Figure 1 or Figure 2 The data storage device 300 includes a memory device and a memory controller, wherein the memory controller included in the data storage device 300 can be coupled to the controller 310 of the bridge device 350. For example, the memory controller of the data storage device 300 can be coupled to the controller 310 via a corresponding bus 370.
[0088] More specifically, when the data storage device 300 is implemented as a UFS device, the host interface or UFS interface of the memory controller included in the data storage device 300 can be coupled to the transmission interface 313 of the controller 310 through the corresponding bus 370. At this time, the transmission interface 313 can also be a UFS interface, so that the controller 310 can communicate with the memory controller in the data storage device 300 through the corresponding UFS interface.
[0089] Therefore, according to one embodiment of the present invention, the data storage system may include at least three controllers, including controllers 310 and 320 (hereinafter also referred to as the first controller and the second controller) configured in the bridge device 350, and a memory controller (hereinafter also referred to as the third controller) configured in the data storage device 300. In an embodiment of the present invention, the first controller, the second controller and the third controller are all memory controllers. In addition, according to one embodiment of the present invention, the first controller and the third controller may be selected as the same memory controller. For example, the first controller and the third controller may be controller chips of the same model, or the first controller and the third controller may both be UFS memory controllers, but may be UFS memory controllers of the same or different models, wherein when the first controller and the third controller are UFS memory controllers of different models, the UFS specifications followed by the two are compatible with each other, and the second controller may be an SSD memory controller. In other words, in some embodiments of the present invention, the bridge device 350 may be configured with the same memory controller as the data storage device 300, wherein the host interfaces of the two memory controllers (or, when the data storage device 300 is implemented as a UFS device, it may be a UFS interface) may be interconnected via a corresponding bus, so that the first controller in the bridge device 350 and the third controller in the data storage device 300 may communicate via the two interfaces.
[0090] In addition, the transmission interfaces 311 and 321 of the controllers 310 and 320 in the bridge device 350 may be the aforementioned memory interfaces and are connected to each other via a corresponding bus 360 . The bus 360 may be a bus for communicating with a memory device, such as a NAND bus.
[0091] It should be noted that the above are only some of the ways to implement the present invention, and the present invention is not limited thereto. In other embodiments of the present invention, the first controller and the third controller may also be selected as different memory controllers.
[0092] According to an embodiment of the present invention, the first controller may be configured to operate in a host mode, and the third controller may be configured to operate in a device mode. Therefore, in an embodiment where the first controller and the third controller are both memory controllers or the first controller and the third controller are the same memory controller, the first controller is a memory controller operating in the host mode, and the third controller is a memory controller operating in the device mode.
[0093] According to an embodiment of the present invention, the memory controller may be configured with hardware devices and corresponding firmware and software structures for performing host mode operations, and may also be configured with hardware devices and corresponding firmware and software structures for performing device mode operations. Thus, in an embodiment of the present invention, the same memory controller may be used in both a bridge device and a data storage device by setting the operation mode.
[0094] According to one embodiment of the present invention, the memory controller can be configured to operate in a device mode or a host mode by means of software or hardware. For example, the memory controller may include a register for storing a setting value of an operation mode. The control unit of the memory controller may set the setting value stored in the register by executing a corresponding software program code, for example, the aforementioned ISP program code. When the setting value stored in the register is set to a first setting value, the control unit may operate in a host mode, thereby causing the memory controller to operate in the host mode. When the setting value stored in the register is set to a second setting value, the control unit may operate in a device mode, thereby causing the memory controller to operate in the device mode. For another example, the memory controller may include a setting pin, for example, a general-purpose input / output (GPIO) pin, and the memory controller may determine which mode to operate in according to the setting value of the setting pin. When the setting pin is set to a first setting value, the control unit may operate in a host mode, thereby causing the memory controller to operate in the host mode. When the setting pin is set to a second setting value or is not set, the control unit can operate in a device mode, thereby making the memory controller operate in the device mode.
[0095] According to one embodiment of the present invention, when the memory controller and / or its control unit are configured to operate in a host mode, its memory transmission interface, for example, the aforementioned flash memory interface, operates in a slave mode, and when the memory controller and / or its control unit are configured to operate in a device mode, its memory transmission interface operates in a master mode.
[0096] Continuing from the above embodiment, in one embodiment of the present invention, the second controller can be configured to operate in a device mode, the first controller can be configured to operate in a host mode, and the third controller can be configured to operate in a device mode. Under this configuration, the transmission interface 321 can operate in a master mode, the transmission interface 311 can operate in a slave mode, and the memory transmission interface (for example, the aforementioned flash memory interface 114 or flash memory interface 214) of the memory controller (third controller) configured in the data storage device can operate in a master mode.
[0097] According to one embodiment of the present invention, when the memory controller operates in the host mode, the control unit of the memory controller can be a host controller interface (HCI) for controlling the overall communication protocol of the memory controller. For example, when the memory controller operates in the host mode, the control unit of the memory controller will actively set the corresponding register, and the hardware device and the corresponding firmware and software structure in the memory controller for executing the operation of the host mode can operate according to the setting value of the register, so that the data to be transmitted through each transmission interface can have a format that conforms to the corresponding communication protocol, so that each transmission interface can directly transmit the signal and packet that conforms to the correct data format, and can correctly parse the content of the signal and packet. When the memory controller operates in the device mode, the hardware device and the corresponding firmware and software structure in the memory controller for executing the operation of the device mode are used to process the corresponding communication protocol. For example, the control unit and other components receive and process signals and packets in accordance with the corresponding standard communication protocol.
[0098] Figure 4 4 shows an implementation example of a data storage system according to an embodiment of the present invention. The data storage system may include at least a data storage device 400 and a bridge device 450. The bridge device 450 may be coupled between the data storage device 400 and the host device 430 to perform a bidirectional transfer operation between the data storage device 400 and the host device 430, and to transmit instructions, data and signals between the host device 430 and the data storage device 400 to assist the host device 430 in accessing the data storage device 400.
[0099] The bridge device 450 may include controllers 410 and 420. In this example, the controller 410 may be a UFS memory controller, the controller 420 may be an SSD memory controller, and the data storage device 400 may be a UFS device. The controller 420 may include a flash memory interface operating in a master mode, such as a NAND flash memory controller (hereinafter referred to as NFC) 421, a PCIe interface 423, and a control unit 425 as shown in the figure. The controller 410 may include a flash memory interface operating in a slave mode, such as the NFC411, the UFS interface 413, and the control unit 415 as shown in the figure. The data storage device 400 may include a UFS memory controller and a memory device as described above.
[0100] The NFC 411 and the NFC 421 may be coupled to each other via the bus 460 , the UFS interface 413 and the UFS interface of the UFS memory controller inside the data storage device 400 may be coupled to each other via the bus 470 , and the controller 420 may communicate with the host device 430 via the PCIe interface 423 .
[0101] In this embodiment, the controller 420 may be configured to operate in a device mode, the controller 410 may be configured to operate in a host mode, and the UFS memory controller inside the data storage device 400 may be configured to operate in a device mode.
[0102] It should be noted that Figure 4 The interfaces of specific specifications shown in the figure, such as the UFS interface, NFC and PCIe interface, are only one of the various implementation examples to which the present invention can be applied, and the present invention is not limited to being implemented with only these specific specifications.
[0103] In addition, it should be noted that in the embodiment of the present invention, the first controller and the second controller in the bridge device (eg, the bridge device 350, 450) may be memory controllers originally developed to connect to a corresponding memory device, such as Figure 1 or Figure 2 However, in the embodiment of the present invention, the first controller and the second controller are not directly connected to the memory device (e.g., a NAND flash memory), but instead the memory interfaces of the first controller and the second controller originally used to connect the memory device are connected to each other through a corresponding bus, e.g., a NAND bus, in a symmetrical manner. By means of this architecture and corresponding operation mode settings (e.g., the aforementioned master mode and slave mode), a bidirectional data, signal and command transfer operation between the data storage device and the host device through the bridge device is realized.
[0104] Figure 5A schematic diagram showing control signals and data transmitted through corresponding buses between two interconnected transmission interfaces according to an embodiment of the present invention is shown. In this example, the transmission interface 510 may be a flash memory interface operating in a slave mode, such as the UFS NFC illustrated in the figure, and since the transmission interface 510 is arranged as a role of receiving memory access instructions, the transmission interface 510 may include at least an instruction register 511, an address register 512, and a direct memory access (DMA) engine 513. In addition, the transmission interface 510 may be further coupled to or include a static random access memory (SRAM) 530. On the other hand, the transmission interface 520 may be a flash memory interface operating in a master mode, such as the SSD NFC illustrated in the figure.
[0105] Figure 6 The flowchart of an exemplary method of command and data transfer between two transmission interfaces belonging to different controllers according to an embodiment of the present invention is shown. According to an embodiment of the present invention, since the bridge device is used to assist a host device in accessing a data storage device, the following flow first describes the operation of the bridge device in a write mode, and the write mode refers to a mode configured to perform a first direction memory command transfer operation and a first direction memory data transfer operation.
[0106] In one embodiment of the present invention, the first direction is a transmission direction from a transmission interface operating in a master mode (or, from a memory controller in a bridge device including a transmission interface operating in a master mode) to a transmission interface operating in a slave mode (or, to a memory controller in a bridge device including a transmission interface operating in a slave mode). For example, Figure 3 In the direction from the transmission interface 321 to the transmission interface 311, Figure 4 direction from NFC 421 to NFC 411, or Figure 5 In contrast, the second direction is a transmission direction from a transmission interface operating in slave mode (or, from a memory controller in a bridge device including a transmission interface operating in slave mode) to a transmission interface operating in master mode (or, to a memory controller in a bridge device including a transmission interface operating in master mode). For example, Figure 3 In the direction from the transmission interface 311 to the transmission interface 321, Figure 4 direction from NFC 411 to NFC 421, or Figure 5 (direction from transmission interface 510 to transmission interface 520).
[0107] The method for transferring instructions and data between multiple memory controllers proposed by the present invention comprises the following steps:
[0108] Step S602: The first transmission interface receives the first instruction from the second transmission interface. As described above, the first transmission interface may be a memory interface of the first memory controller, and the second transmission interface may be a memory interface of the second memory controller. For the first memory controller, the second memory controller may be a peer memory controller. In addition, according to an embodiment of the present invention, a value of the first instruction is selectively set to a first value or a second value, the first value is used to indicate the aforementioned memory instruction transfer operation in the first direction, and the second value is used to indicate the aforementioned memory data transfer operation in the first direction. That is, the subsequent transfer operation can be distinguished as a transfer operation of an instruction or a data by setting the value of the instruction.
[0109] Step S604: The first transmission interface obtains first transfer data from the bus in response to the first instruction. As described above, the first transfer data may be a memory access instruction or data provided by the peer memory controller or the host device and provided by the peer memory controller to the bus.
[0110] Step S606: The first transmission interface processes the first transfer data according to the value of the first instruction to obtain a memory instruction or write data.
[0111] Reference Figure 5 , multiple control signals can be transmitted between the transmission interfaces 510 and 520 through the corresponding bus. For example, the chip enable signal CE is used to enable the target device, such as one or more flash memory chips. The command latch enable signal CLE is used to indicate the latch operation of the command. The address latch enable signal ALE is used to indicate the latch operation of the address. The read enable signal RE# is used to indicate the read operation. The write enable signal WE is used to indicate the write operation. The data strobe signal DQS is used to provide a reference for the data transmitted as a sampling sequence. The data input / output signal DQx is used to provide bidirectional command, address, and data transmission.
[0112] According to an embodiment of the present invention, in the write mode, the transmission interface 520 may issue a command latch enable signal CLE and an address latch enable signal ALE. The transmission interface 510 loads a command (e.g., the aforementioned first command) into the command register 511 in response to the command latch enable signal CLE, and loads an address signal indicating memory address information into the address register 512 in response to the address latch enable signal ALE. Since the command corresponding to the write mode is a write command, the transmission interface 510 obtains transfer data from the bus in response to the first command.
[0113] Similarly, in the read mode, the transmission interface 520 can also issue a command latch enable signal CLE and an address latch enable signal ALE. The transmission interface 510 loads an instruction (for example, a second instruction or a read instruction) into the instruction register in response to the command latch enable signal CLE, and loads an address signal used to indicate memory address information into the address register 512 in response to the address latch enable signal ALE. Then, the transmission interface 510 transmits transfer data to the bus in response to the second instruction, where the transfer data can be a response instruction provided by the data storage device or read data of the memory device read from the data storage device. Similarly, the value of the second instruction is selectively set to a third value or a fourth value, the third value is used to indicate the memory instruction transfer operation in the second direction, and the fourth value is used to indicate the memory data transfer operation in the second direction.
[0114] In an embodiment of the present invention, the memory command may be an access command of the memory device provided to the data storage device through the transmission interface 520 for accessing the data storage device, or a response command provided to the host device through the transmission interface 510 for responding to the access operation result, and the memory data may be write data provided to the data storage device through the transmission interface 520 for writing into the memory device, or read data read from the memory device and provided to the host device through the transmission interface 510.
[0115] Fig. 7A , 7B 8A and 8B are waveform diagrams of signals on a bus coupled between transmission interfaces of two controllers in a bridge device, wherein Fig. 7A Displays the signal waveform of an instruction cycle. Figure 7B Displays the signal waveform of an address cycle. Fig. 8A The signal waveform diagram showing the data input cycle, Figure 8B The signal waveform diagram of the data output cycle is displayed.
[0116] The signal marked with a # in the figure is a low-level enable signal, and the signal segment drawn with a slash indicates that its status is don't care. Fig. 7A As shown, in the instruction cycle, the transmission interface 520 sets the level of the instruction latch enable signal CLE to a high level to issue the instruction latch enable signal CLE and simultaneously indicate that the instruction is currently transmitted on the data bus DQ, and sets the level of the write enable signal WE# from a low level to a high level, so that the transmission interface 510 responds to the latch enable signal CLE and the enable signal WE# to capture the instruction CMD from the data bus DQ.
[0117] like Figure 7BAs shown, during the address cycle, the transmission interface 520 sets the level of the address latch enable signal ALE to a high level to issue the address latch enable signal ALE and simultaneously indicate that the address signal is currently transmitted on the data bus DQ, and sets the level of the write enable signal WE# from a low level to a high level, so that the transmission interface 510 responds to the address latch enable signal ALE and the enable signal WE# to capture the address signal ADD from the data bus DQ.
[0118] In the data input cycle, the transmission interface 510 provides data to the data bus DQ, and the transmission interface 520 reads the data D0, D1, D2 ... Dn in sequence in response to the data selection communication signal DQS. Fig. 8A As shown, the transmission interface 520 can sample data at twice the data rate in response to the rising edge and falling edge of the data selection communication signal DQS issued by the transmission interface 510. The transmission interface 520 can issue an end instruction after the reading is completed. During the data input cycle, the transmission interface 520 does not operate the chip enable signal CE, the command latch enable signal CLE, the address latch enable signal ALE, the read enable signal RE# and the write enable signal WE#.
[0119] In the data output cycle, the transmission interface 520 provides data to the data bus DQ, and the transmission interface 510 reads the data D0, D1, D2 ... Dn in sequence in response to the data selection communication signal DQS. Figure 8B As shown, the transmission interface 510 can sample data at twice the data rate in response to the rising edge and the falling edge of the data selection communication signal DQS issued by the transmission interface 520 .
[0120] According to an embodiment of the present invention, the address signal can be transmitted using one or more clock cycles according to the difference in the content of the operation. In an embodiment of the present invention, for the read operation and write operation of the instruction and / or data, the transmission interface 520 can use 5 clock cycles to transmit the address signal, wherein the first 4 clock cycles are used to transmit the memory address, for example, the memory address of the SRAM 530, and the last cycle is used to transmit the information of the transfer quantity. For the read operation and write operation of the feature table, the transmission interface 520 can use 1 clock cycle to transmit the address signal. Here, the feature table is stored at the transmission interface 510 end to record hardware parameters, such as the duty cycle of the clock signal and the duration of the high level / low level, etc., and the address signal transmitted corresponding to the read operation and write operation of the feature table is used to indicate that the feature value whose value is to be set (written) or read is stored in the address of the feature table.
[0121] In addition, according to an embodiment of the present invention, the transfer unit of the command (e.g., memory command) and the data (e.g., write data and read data) transferred through the bridge device are different, and the information of the transfer number transmitted in the address signal using the fifth cycle can indicate the number or size of valid commands (e.g., valid memory commands) or valid data (e.g., valid write data and valid read data) in the transfer data. For example, the transfer unit of the command transferred through the bridge device can be set to 512 bytes, and the transfer unit of the data transferred through the bridge device can be set to 4 kilobytes (KB), and the transfer number transmitted in the address signal can indicate how many valid 512-byte commands or 4 kilobytes of data there are in the subsequent transfer data.
[0122] According to an embodiment of the present invention, the write mode can further distinguish between a command (e.g., a memory command) write operation and a data (e.g., memory data) write operation. As described above, in the write mode, the value of a command (e.g., a first command, which can be a command defined by the Open NAND Flash Memory Interface (ONFI) Alliance) issued by the transmission interface 520 to the transmission interface 510 is selectively set to a first value (e.g., 88h) or a second value (e.g., 80h). In addition, after the data transfer is completed, the transmission interface 520 can issue another command to the transmission interface 510, and its value can be set to a predetermined value (e.g., 10h) to indicate that the data input is completed.
[0123] Therefore, in one embodiment of the present invention, for a command (e.g., a memory command) write operation, the command, data, and control signal transmitted on the bus may be in the following order:
[0124] ONFI command (88h) -> address signal (the 1st to 4th clock cycles are the memory address, the 5th clock cycle is the value n) -> command -> ONFI command (10h)
[0125] At this time, the effective instruction size of the instruction part in the transfer data is n*512B.
[0126] For data (e.g., memory data) write operations, the instructions, data, and control signals transmitted on the bus may be in the following order:
[0127] ONFI command (80h) -> address signal (the 1st to 4th clock cycles are the memory address, and the 5th clock cycle is the value n) -> data -> ONFI command (10h)
[0128] At this time, the valid data size of the data part in the transfer data is n*4KB. For example, the subsequent n transfer data chunks contain (valid) data to be transferred.
[0129] Similarly, according to an embodiment of the present invention, the read mode can further distinguish between a command (e.g., a memory command) read operation and a data (e.g., a memory data) read operation. As described above, in the read mode, the value of a command (e.g., a second command, which can be a command defined by the ONFI Alliance) issued by the transmission interface 520 to the transmission interface 510 is selectively set to a third value (e.g., 08h) or a fourth value (e.g., 00h). In addition, after issuing the address signal, the transmission interface 520 can issue another command to the transmission interface 510, and its value can be set to another predetermined value (e.g., 30h) to indicate that the operation of the transmission interface 520 is completed, and the transmission interface 510 will subsequently output the transfer data.
[0130] Therefore, in one embodiment of the present invention, for a command (e.g., a memory command) read operation, the command, data, and control signal transmitted on the bus may be in the following order:
[0131] ONFI command (08h) -> address signal (the 1st to 4th clock cycles are the memory address, the 5th clock cycle is the value n) -> ONFI command (30h) -> command
[0132] At this time, the effective instruction size of the instruction part in the transfer data is n*512B.
[0133] For data (e.g., memory data) read operations, the instructions, data, and control signals transmitted on the bus may be in the following order:
[0134] ONFI command (00h) -> address signal (the 1st to 4th clock cycles are the memory address, the 5th clock cycle is the value n) -> ONFI command (30h) -> data
[0135] At this time, the valid data size of the data part in the transfer data is n*4KB. For example, the subsequent n transfer data chunks contain (valid) data to be transferred.
[0136] In addition, for the write (set) operation of the feature table, the value of a command (which can be an ONFI command) issued by the transmission interface 520 to the transmission interface 510 can be set to, for example, EFh, and for the read (get) operation of the feature table, the value of a command (which can be an ONFI command) issued by the transmission interface 520 to the transmission interface 510 can be set to, for example, EEh.
[0137] Therefore, for the write (set) / (get) read operation of the feature table, the command, data and control signal transmitted on the bus can be in the following order:
[0138] ONFI command (EFh / EFh) -> address signal (only 1 clock cycle) -> corresponding characteristic value is set / obtained
[0139] According to an embodiment of the present invention, the value set by the corresponding feature value indicated by the address signal or the value obtained from the corresponding feature value field indicated by the address signal may include multiple bits. For example, in an embodiment of the present invention, the value may include 4 bits.
[0140] According to an embodiment of the present invention, a transmission interface coupled to two controllers in a bridge device generates a plurality of transfer data chunks in a common bridge transfer format, wherein the transfer data chunks carry the instructions and data to be transmitted between the host device and the data storage device as described above.
[0141] Fig. 9 FIG. 1 is a flow chart showing a method for performing bidirectional command and data transfer between a host device and a data storage device using a bridge device according to an embodiment of the present invention. For the sake of consistency of description, the element naming used in the above embodiment is continued, and the method includes the following steps:
[0142] Step S902: Transmitting instructions between the first transmission interface and the second transmission interface.
[0143] Step S904: Transmit an address signal between the first transmission interface and the second transmission interface.
[0144] Step S906: A plurality of transfer data blocks are generated in a common bridge transfer format between the first transmission interface and the second transmission interface, and a bidirectional transfer operation is performed.
[0145] Fig.10 FIG. 4 is a schematic diagram showing a common bridge transfer format according to an embodiment of the present invention. Fig.10, multiple transfer data blocks having a common bridge transfer format are shown, for example, transfer data blocks DC-1, DC-2 and DC-3. Each transfer data block includes a data portion DATA and an additional portion Dummy. The data portion DATA is used to carry instructions or data transmitted between the host device and the data storage device, and the data portion of the transfer data block has a fixed size, for example, the 4KB size shown in the figure. Therefore, in an embodiment of the present invention, some data blocks are used to transmit instructions between the host device and the data storage device, and some transfer data blocks are used to transmit data between the host device and the data storage device. The additional portion Dummy is used to carry additional information, such as but not limited to, a low-density parity-check code (abbreviated as LDPC), parity check bits, error correction codes, etc. generated according to the content of the data portion DATA.
[0146] As described above, the transfer units of the instructions and data transferred by the bridge device are different. In the embodiment of the present invention, the instructions and data transferred by the bridge device are all carried in the data part DATA of the transfer data block. Therefore, the packaging methods of the instructions and data are different.
[0147] In an embodiment of the present invention, the transfer unit of the data transferred through the bridge device can be set to be equal to the size of the data portion DATA, for example, the aforementioned 4 kilobytes (KB), so the transmission interface 510 / 520 can put each 4KB data to be transferred through the bridge device into the data portion DATA of a transfer data block, and use the transfer number carried in the fifth cycle of the address signal to indicate the amount of data in the transfer data, that is, the number or size of the aforementioned valid data (for example, valid write data and valid read data). For example, for data, the transfer number transmitted in the address signal can indicate how many transfer data blocks in the subsequent transfer data contain data to be transferred.
[0148] Fig.11 FIG. 1 is a schematic diagram showing four data items carried by four transfer data blocks. The data DATA[1], DATA[2], DATA[3], and DATA[4] in the figure are four data items carried by the data portion of the transfer data block. According to one embodiment of the present invention, a data item carried by the data portion of a transfer data block may be a data packet.
[0149] In the first direction transfer operation, the data or data packet carried in the data portion of the transfer data block is the data provided by the transmission interface 520 to the transmission interface 510 and further transferred to the data storage device through the transmission interface 510. Therefore, after receiving the transfer data block, the transmission interface 510 can provide the data or data packet therein to the data storage device. In the second direction transfer operation, the data or data packet carried in the data portion of the transfer data block is the data provided by the transmission interface 510 to the transmission interface 520 and further transferred to the host device through the transmission interface 520. Therefore, after receiving the transfer data block, the transmission interface 520 can provide the data or data packet therein to the host device.
[0150] For instructions, since the transfer unit of the instructions transferred through the bridge device, for example, the aforementioned 512 bytes, is smaller than the size of the data portion DATA, the transmission interface 510 / 520 can put multiple instructions that need to be transferred through the bridge device into the data portion DATA of a transfer data block, and use the transfer number carried in the 5th cycle of the address signal to indicate the number of valid instructions in the transfer data, that is, the number or size of the aforementioned valid memory instructions.
[0151] Fig.12 FIG. 1 is a schematic diagram showing a transfer data block carrying eight instructions. Instructions CMD[1], CMD[2], CMD[3], CMD[4], CMD[5], CMD[6], CMD[7], and CMD[8] in the figure are eight instructions carried in the data portion of the same transfer data block, and at least one of them is a valid instruction.
[0152] According to an embodiment of the present invention, the multiple instructions carried by the data portion of a transfer data block may be multiple instruction packets, and each instruction packet may be a combination of a bridge instruction and a memory instruction, wherein in the transfer operation in the first direction, the bridge instruction is an instruction provided by the transmission interface 520 to the transmission interface 510, and the memory instruction is an instruction that needs to be further transferred to the data storage device through the transmission interface 510, that is, the part of the memory instruction packaged in the instruction packet is the instruction that is actually provided to the data storage device for accessing the memory device. After receiving the transfer data block, the transmission interface 510 can parse the bridge instruction to obtain the content indicated by the transmission interface 520, and obtain the memory instruction, and then the transmission interface 510 can provide the memory instruction to the data storage device.
[0153] In the transfer operation in the second direction, the bridge command is a command provided by the transmission interface 510 to the transmission interface 520, and the memory command is a command that needs to be further transferred to the host device through the transmission interface 520. That is, the part of the memory command packaged in the command packet is the actual command to be provided to the host device, for example, the aforementioned response command. After receiving the transfer data block, the transmission interface 520 can parse the bridge command to obtain the content indicated by the transmission interface 510, and obtain the memory command, and then the transmission interface 520 can provide the memory command to the host device.
[0154] Fig.13 FIG. 1 shows a schematic diagram of a command packet according to an embodiment of the present invention. As shown in the figure, the command packet 1300 may include a bridge command Bridge_CMD and a memory command UFS_CMD. In an embodiment of the present invention, the first 256 bytes of the command packet may carry the bridge command Bridge_CMD, and the last 256 bytes may carry the memory command UFS_CMD.
[0155] It should be noted that in the embodiment of the present invention, both the transmission interface 510 and the transmission interface 520 can generate transfer data blocks in a common bridge transfer format. For example, in the aforementioned first direction transfer operation, the transmission interface 520 generates the transfer data blocks in a common bridge transfer format, and in the aforementioned second direction transfer operation, the transmission interface 510 generates the transfer data blocks in a common bridge transfer format.
[0156] When generating a transfer data block that carries instructions to be transmitted between a host device and a data storage device, the transmission interface 510 / 520 packages a bridge instruction and a memory instruction into the data portion DATA of the transfer data block, generates the content of the additional portion Dummy of the transfer data block according to the content of the data portion DATA, and provides the transfer data block to the transmission interface 520 / 510 via a bus.
[0157] In an embodiment of the present invention, a bridge device is proposed, which is composed of memory controllers connected to each other in a symmetrical manner, so as to combine high-speed transmission interfaces made with different processes or specifications, and solve the problems of the existing technology. In addition, in an embodiment of the present invention, the first controller and the second controller in the bridge device can be memory controllers that have been originally developed to connect to a corresponding memory device, but are not directly connected to the memory device, but are connected to each other in a symmetrical manner through a corresponding bus. In this way, the manufacturing cost of the bridge device can be effectively saved, and there is no need to develop corresponding bridge devices for various different applications.
[0158] In addition, the present invention proposes a command and data transfer method that can be applied to the inside of a bridge device, by combining the command and data transmission between the memory controller inside the bridge device to assist the host device in accessing the data storage device, so as to actually embody the various operations of effectively accessing the memory device by using the bridge device in a data storage system with a high-speed transmission interface manufactured with different processes or specifications.
[0159] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A memory controller coupled between a peer memory controller and a data storage device, comprising: a first transmission interface coupled to a transmission interface of the peer memory controller via a bus and comprising a command register; a second transmission interface, coupled to the data storage device; as well as a control unit, coupled to the first transmission interface and the second transmission interface, for accessing the data storage device through the second transmission interface, wherein in a write mode, the first transmission interface loads a first instruction into the instruction register in response to an instruction latch enable signal issued by the transmission interface of the peer memory controller, and obtains first transfer data from the bus in response to the first instruction, A value of the first instruction is selectively set to a first value or a second value, the first value is used to indicate a memory instruction transfer operation in a first direction, and the second value is used to indicate a memory data transfer operation in the first direction. The first transmission interface processes the first transfer data according to the value of the first instruction to obtain a memory instruction or write data.
2. The memory controller according to claim 1, wherein: The memory command is a command provided to the data storage device through the second transmission interface for accessing a memory device of the data storage device, and the write data is data provided to the data storage device through the second transmission interface for writing into the memory device.
3. The memory controller according to claim 1, wherein: The first transmission interface further includes an address register. The first transmission interface loads a first address signal into the address register in response to an address latch enable signal sent by the transmission interface of the peer memory controller, and the first address signal includes information of a transfer quantity.
4. The memory controller according to claim 3, wherein: The transfer quantity information indicates a quantity of valid memory commands or valid write data in the first transfer data.
5. The memory controller according to claim 3, wherein: The first transmission interface receives the first address signal in response to a plurality of clock cycles, and the first address signal carries information of the transfer quantity in one of the plurality of clock cycles.
6. The memory controller according to claim 1, wherein: The memory command is different from a transfer unit of the write data.
7. The memory controller according to claim 1, wherein: In a read mode, the first transmission interface loads a second instruction into the instruction register in response to the instruction latch enable signal issued by the transmission interface of the peer memory controller, obtains a response instruction or read data provided by the data storage device as second transfer data according to a value of the second instruction, and transmits the second transfer data to the bus in response to the second instruction, wherein the value of the second instruction is selectively set to a third value or a fourth value, the third value is used to indicate a second direction memory instruction transfer operation, and the fourth value is used to indicate the second direction memory data transfer operation.
8. A bridge device coupled between a host device and a data storage device, comprising: A first controller, comprising: a first transmission interface; and A second controller, coupled to the first controller, comprises: a second transmission interface coupled to the first transmission interface via a bus, The first transmission interface and the second transmission interface are flash memory interfaces, the first transmission interface operates in a slave mode, and the second transmission interface operates in a master mode. In a write mode, the first transmission interface receives a first instruction from the second transmission interface, and obtains first transfer data from the bus in response to the first instruction, wherein a value of the first instruction is selectively set to a first value or a second value, the first value is used to indicate a memory instruction transfer operation in a first direction, the second value is used to indicate a memory data transfer operation in the first direction, and the first transmission interface processes the first transfer data according to the value of the first instruction to obtain a memory instruction or write data.
9. The bridging device according to claim 8, characterized in that: The memory command is a command provided to the data storage device for accessing a memory device of the data storage device, and the write data is data provided to the data storage device for writing into the memory device.
10. The bridging device according to claim 8, characterized in that: The first transmission interface includes: an instruction register; and An address register, The first transmission interface loads the first instruction into the instruction register in response to an instruction latch enable signal issued by the second transmission interface, and loads a first address signal into the address register in response to an address latch enable signal issued by the second transmission interface, and the first address signal includes information of a transfer quantity.
11. The bridging device according to claim 10, characterized in that: The transfer quantity information indicates a quantity of valid memory commands or valid write data in the first transfer data.
12. The bridging device according to claim 10, characterized in that: The first transmission interface receives the first address signal in response to a plurality of clock cycles, and the first address signal carries information of the transfer quantity in one of the plurality of clock cycles.
13. The bridging device according to claim 8, characterized in that: The memory command is different from a transfer unit of the write data.
14. The bridging device according to claim 8, characterized in that: In a read mode, the first transmission interface receives a second instruction from the second transmission interface, obtains a response instruction or read data provided by the data storage device as second transfer data according to a value of the second instruction, and transmits the second transfer data to the bus in response to the second instruction, wherein the value of the second instruction is selectively set to a third value or a fourth value, the third value is used to indicate a memory instruction transfer operation in a second direction, and the fourth value is used to indicate a memory data transfer operation in the second direction.
15. A method for transferring instructions and data between multiple memory controllers, comprising: A first transmission interface receives a first instruction from a second transmission interface, wherein the first transmission interface is a memory interface of a first memory controller, the second transmission interface is a memory interface of a second memory controller, the second transmission interface is coupled to the first transmission interface via a bus, the first transmission interface operates in a slave mode, the second transmission interface operates in a master mode, and a value of the first instruction is selectively set to a first value or a second value, the first value is used to indicate a memory instruction transfer operation in a first direction, and the second value is used to indicate a memory data transfer operation in the first direction; Responding to the first instruction, the first transmission interface obtains first transfer data from the bus; as well as The first transmission interface processes the first transfer data according to the value of the first instruction to obtain a memory instruction or write data.
16. The method according to claim 15, characterized in that The memory command is a command provided to access a memory device of a data storage device coupled to the first memory controller, and the write data is data provided to write into the memory device.
17. The method according to claim 15, characterized in that The memory command is different from a transfer unit of the write data.
18. The method according to claim 15, characterized in that Also includes: receiving a second instruction from the second transmission interface through the first transmission interface, wherein a value of the second instruction is selectively set to a third value or a fourth value, the third value is used to indicate a memory instruction transfer operation in a second direction, and the fourth value is used to indicate a memory data transfer operation in the second direction; Obtaining, by the first transmission interface, a response instruction or read data provided by a data storage device according to the value of the second instruction as second transfer data; as well as The first transmission interface transmits the second transfer data to the bus in response to the second instruction.
