WO2018027535A1 - Method for accessing storage device and storage device - Google Patents

Method for accessing storage device and storage device Download PDF

Info

Publication number
WO2018027535A1
WO2018027535A1 PCT/CN2016/094127 CN2016094127W WO2018027535A1 WO 2018027535 A1 WO2018027535 A1 WO 2018027535A1 CN 2016094127 W CN2016094127 W CN 2016094127W WO 2018027535 A1 WO2018027535 A1 WO 2018027535A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
address
read
access
write
Prior art date
Application number
PCT/CN2016/094127
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Priority to PCT/CN2016/094127 priority Critical patent/WO2018027535A1/en
Priority to CN201680057568.4A priority patent/CN108139992B/en
Publication of WO2018027535A1 publication Critical patent/WO2018027535A1/en

Links

Images

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/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus

Definitions

  • the present application relates to the field of computers and, more particularly, to methods and storage devices for accessing storage devices.
  • Double Data Rate (DDR) technology features high bandwidth (up to 200 Gbit/s) and low latency (tens of nanoseconds), with the potential to host system interconnects. Since the DDR bus was originally designed to directly access the dynamic random access memory (DRAM) memory particles, it takes only a few ten to several tens of nanoseconds to complete the read and write access, and the delay is short.
  • the memory controller in the Central Processing Unit (CPU) is designed and implemented based on the protocol of the Joint Electron Device Engineering Council (JEDEC), and the read and write delays can be set to be shorter.
  • JEDEC Joint Electron Device Engineering Council
  • the CPU accesses these through the DDR bus.
  • NVM non-volatile memory
  • FPGA Field-Programmable Gate Array
  • the CPU accesses these through the DDR bus.
  • the access timing does not meet the DDR protocol requirements, causing the expansion device to fail to communicate with the CPU.
  • the extended device does not reply to the correct data within the specified time, causing the CPU to collect the wrong data, causing a system error.
  • the prior art proposes to use the command field reserved in the DDR bus protocol to extend the read/write command in advance.
  • the memory controller When an access request needs to be initiated to the extended device, the memory controller first sends an extended read/write command, and then sends a regular active line. Instruction (Active, ACT) instruction and read or write instruction.
  • the extension device performs an access preparation operation according to the received advance read/write command, and then gives a response according to the normal read/write command. In this way, each time the read and write access is performed, the memory controller needs to issue an advance read/write instruction in advance, and then the normal read/write instruction, resulting in a large bandwidth occupation and high CPU power consumption.
  • the embodiment of the present application provides a method and a storage device for accessing a storage device, which can reduce bandwidth occupation.
  • a method of accessing a storage device includes: receiving the deposit And storing, by the storage device, a first row of instructions, where the first row of instructions carries a first access address, where the first access address includes a first row address and first read/write indication information; Determining that the first access operation is a read operation or a write operation; performing a preparation operation of the determined first access operation according to the determined first access operation, the preparing operation for the storage device to complete the preset time threshold a read operation or a preparation process of the write operation; receiving a column instruction for performing the first access operation on the storage device, the column instruction carrying a column address; accessing the storage device according to the first row address and the column address A row address and an address space corresponding to the column address.
  • the storage device receives a row instruction that carries the first read/write indication information and the row address, determines whether the access operation is a read operation or a write operation according to the first read/write indication information, and performs the storage device according to the determined access operation. Setting a time threshold to complete the preparation operation of the determined access operation, receiving a column instruction carrying the column address, and accessing the address space corresponding to the row address and the column address, so that the storage device recognizes in advance whether the access operation is a read operation or a write operation. It extends the response time of the storage device for reading and writing operations, and thus can communicate with the CPU. That is to say, the CPU avoids sending the read and write instructions separately before sending the line instruction, thereby enabling communication with the storage device and reducing bandwidth occupation.
  • the preparing operation for performing the determined access operation according to the determined first access operation comprises: configuring a data interface transmission of the storage device according to the determined first access operation Direction, the data interface transmission direction includes input direction and output direction.
  • the storage device can recognize in advance whether the access operation performed on the storage device is a read operation or a write operation according to the first read/write indication information carried by the row instruction, so that the preparation operation of the access operation can be performed.
  • the preparation operation may be to open a data transceiving interface of the storage device and configure a transmission direction of the data transceiving interface. In this way, the storage device can recognize the read and write operations on the storage device in advance when receiving the row instruction, which is equivalent to extending the response time of the storage device to perform the read and write operations, thereby enabling communication with the CPU.
  • the first read/write indication information includes at least one field, where the determining, according to the first read/write indication information, that the first access operation is a read operation or a write operation comprises: And determining, according to the value of the at least one field, that the first access operation is a read operation or a write operation.
  • the read/write indication information may be at least one field, and the storage device may pre-configure a mapping relationship between the value of the at least one field and the read/write operation, so that the storage device obtains according to the at least one field.
  • the value can determine whether the access operation performed on the storage device is a read operation or a write operation, and the storage device can prepare for the determined access operation in advance, which is equivalent to extending the response time of accessing the storage device, so that the storage device can be combined with the CPU. Normal communication.
  • the method further includes: receiving a second row of instructions for performing a second access operation on the storage device, the second row of instructions carrying a second access address, the second access address Included in the second row address and the second read/write indication information; determining, according to the second read/write indication information, that the second access operation is a read operation or a write operation; according to the determined second access operation and the determined first access operation Whether it is the same, determining whether to modify the data interface transmission direction of the storage device; if the determined second access operation is the same as the determined first access operation, determining that the data interface transmission direction of the storage device is not modified.
  • the transmission direction of the data interface needs to be adjusted; if the storage device is in accordance with the second read/write indication.
  • the present application provides a storage device comprising means for performing the method of the first aspect or any possible implementation of the first aspect.
  • the application provides a storage device, including a command decoding and execution module, a command address interface module, a clock domain conversion circuit module, a data interface module, and a data storage module; Receiving a first row of instructions for performing a first access operation on the storage device, and receiving a column instruction for performing the first access operation on the storage device; the clock domain conversion circuit module for converting the command address interface module to receive The first row instruction and the clock domain of the column instruction; the command decoding and execution module is configured to decode the first row instruction and the column instruction after converting the clock domain by the clock domain conversion circuit module, and identify the The first row of instructions carries the first access address and the column instruction carries the column address, wherein the first access address includes the first row address and the first read/write indication information, and determines the first according to the first read/write indication information.
  • the access operation is a read operation or a write operation, and a preparation operation of the determined first access operation according to the determined first access operation
  • the preparation operation is performed by the storage device to complete the read operation or the preparation process of the write operation within a preset time threshold;
  • the data interface module is configured to receive or send data;
  • the data storage module is configured to translate according to the command And the first row address and the column address identified by the code and the execution module, and storing the data received by the data interface module to the first row address and the corresponding location of the column address
  • the address space, or the data in the address space corresponding to the first row address and the column address is sent by the data interface module.
  • the command decoding and execution module is specifically configured to: configure a transmission direction of the data interface module according to the determined first access operation, where the transmission direction of the data interface module includes Input direction and output direction.
  • the first read/write indication information includes at least one field; the command decoding and execution module is specifically configured to: determine the first access according to the value of the at least one field The operation is the read operation or the write operation.
  • the command address interface module is further configured to receive a second row of instructions for performing a second access operation on the storage device;
  • the clock domain conversion circuit module is further configured to convert the The clock domain of the second row instruction received by the command address interface module;
  • the command decoding and execution module is further configured to decode the second row instruction after converting the clock domain by the clock domain conversion circuit module, and identify the The second row of instructions carries the second access address, where the second access address includes the second row address and the second read/write indication information, and determines, according to the second read/write indication information, that the second access operation is the read operation or Determining whether to modify the transmission direction of the data interface module according to the determined second access operation and whether the determined first access operation is the same, the determined second access operation and the determined first access operation When the same, it is used to determine not to modify the transmission direction of the data interface module.
  • a system for accessing a storage device comprising: a CPU, a communication interface, and the storage device of the second aspect or the third aspect above.
  • the CPU is connected to the storage device and the communication interface.
  • the storage device is used to store instructions
  • the CPU is used to execute the instructions
  • the communication interface is used to communicate with other network elements under the control of the CPU.
  • a computer storage medium the program storage code storing program code for indicating access to the storage device in any one of the possible implementation manners of the first aspect or the first aspect The instructions of the method.
  • the storage device receives the line instruction carrying the first read/write indication information and the row address, and determines whether the access operation is a read operation or a write operation according to the first read/write indication information, and can perform according to the determined access operation.
  • the storage device completes the preparation operation of the determined access operation within a preset time threshold, receives the column instruction carrying the column address, and accesses the row address and the column address.
  • the address space corresponding to the address enables the storage device to recognize in advance whether the access operation is a read operation or a write operation, which prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU and avoiding the CPU before sending the line instruction. Sending read and write instructions separately reduces bandwidth usage.
  • FIG. 1 is a schematic structural diagram of a storage device of the present application.
  • FIG. 2 is a schematic diagram of a prior art read command accessing a storage device
  • 3a and 3b are schematic diagrams of a method for accessing a storage device by reading and writing instructions in the prior art
  • FIG. 4 is a schematic diagram of a method for accessing a storage device according to an embodiment of the present application.
  • 5a and 5b are schematic diagrams showing an address space of a storage device of the present application.
  • FIG. 6 is a schematic flowchart of a method for accessing a storage device according to an embodiment of the present application.
  • FIG. 7 is a schematic block diagram of a storage device according to an embodiment of the present application.
  • Figure 8 is a schematic block diagram of a system in accordance with an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a storage device according to an embodiment of the present application.
  • FPGA Field Programmable Gate Array
  • the memory/NVM extension technology can meet the requirements of big data processing for memory computing through memory expansion, improve computing performance, and reduce the processing delay of tasks; or increase the capacity and access performance of data storage through NVM expansion to meet mass storage. demand. Because the DDR interface has high bandwidth and low latency, and its working mode is designed to access memory, it is the first choice for expanding memory and NVM. Among them, NVM is a new type of memory technology based on new semiconductor materials, which has the characteristics of not losing data after power supply is stopped.
  • the Serial Presence Detect (SPD) of the module exists through the chip.
  • An integrated circuit (Inter-Integrated Circuit (IIC) serial interface-connected Electrically Erasable Read-Only Memory (EEPROM) device for storing information in a memory slot, storing memory
  • the configuration information of the module is used to assist the memory controller to accurately adjust the physical/timing parameters of the memory to achieve the best use effect.
  • the preparation operation of the access operation refers to the preparation operation that can be performed by accessing the storage space of the storage device according to the row address and the access instruction, and may be all preparation operations that the storage device can perform in advance or partially take a long time.
  • the transmission direction of the configuration data transceiver interface that takes a long time is taken as an example for description.
  • the storage device may be an FPGA-based storage device or other storage device with similar functions.
  • FPGA field-programmable gate array
  • FIG. 1 shows a schematic structural diagram of an FPGA storage device.
  • the FPGA-based storage device 100 mainly includes a data interface module 101, a clock domain conversion circuit module 102, a command decoding (Dec) and an execution module 103, and a data storage module 104, a command address interface module 105, and the like. Part of the composition.
  • the data interface circuit module 101 further includes a receiving part and a transmitting part.
  • the receiving portion of the data interface circuit portion 101 mainly samples and receives high-speed serial signals such as data from the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals of relatively low speed;
  • the transmitting portion of the data interface circuit portion 101 is mainly Receive data from the FPGA, perform parallel-to-serial conversion, modulation, etc., and then send it to the high-speed bus interface.
  • the receiving portion of the command address interface module 105 mainly samples and receives high-speed serial signals such as addresses and commands on the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals of relatively low speed.
  • the command address interface module 105 Since the command or address is unidirectional from the outside of the FPGA to the inside of the FPGA, the command address interface module 105 has only the receiving portion, and the data interface circuit module 101 is a bidirectional interface because of the need to receive and transmit data, and also needs to have a direction.
  • the control circuit performs the conversion of the transmission and reception directions.
  • the clock domain conversion circuit module 102 converts the signal from the interface circuit clock domain to the FPGA internal clock domain, or converts the signal from the FPGA internal clock domain to the interface circuit clock domain because In the hardware circuit, the signal must match the clock signal of the part, otherwise a signal sampling error will occur.
  • the command decode and execute module 103 decodes the command and address on the command bus to translate the correct DDR command sequence and execute the corresponding command based on the internal state.
  • the storage portion 104 inside the storage device is used to store read and write data.
  • the command sequence on the DDR access bus has command sequences such as ACT and Column Address Select (CAS). Specifically, the first is the ACT command, which is used to open a row in a Rank/Bank Group/Bank command; then the CAS command is used to select the column address in the row, and finally the bidirectional data control pin on the data bus ( Bi-directional Data Strobe (DQS)/Bi-directional data bus (DQ); after accessing the line, use the PreCharge command to close the line; the commands on the DDR bus must meet the DDR standard specification. Timing requirements.
  • ACT ACT
  • CAS Column Address Select
  • Time RAS-to-CAS Delay (tRCD): The time between the ACT command and the receipt of a column instruction;
  • CWL Column Write Write Latency
  • DDR is a data transmission technology that has a data transmission on the falling edge of the rising edge of the associated clock signal. Compared with single edge sampling, the data transmission rate can be doubled. It is widely used in the memory field. Since the DDR bus was originally designed to directly access DRAM memory particles, only ten Read and write access can be completed in a few to a few nanoseconds with a very short delay. Therefore, the effective delay ranges of the critical delay parameters CL/RL and CWL/WL specified in the DDR protocol are small. For example, the CL valid range in the DDR4 protocol is 9 to 24 clock cycles (as shown in Table 1 below), and the maximum value corresponds to 30 ns.
  • the read and write latency that can be set is also short. Therefore, the expansion of the interconnect and memory/NVM access directly on the memory side may result in an access timing that does not meet the protocol requirements, resulting in the extended storage device being unable to communicate with the CPU.
  • the prior art proposes to use the command field reserved in the DDR bus protocol to extend the read/write in advance.
  • the commands PR1/PW1, PR2/PW2 (as shown in Table 2), when an access request needs to be initiated to the extended storage device, the memory controller first gives an extended read/write command, and then gives a regular ACT command and read. Instruction or write instruction.
  • the extended storage device performs read and write access according to the received early read/write command, and then responds according to the normal DDR read/write command.
  • the memory controller needs to issue the PR1/PW1, PR2/PW2 instructions in advance, and then the normal ACT command, Read command (RD) or write command (WR), the operation of redundant PR1/PW1, PR2/PW2 instructions requires a large DDR access bandwidth.
  • the method 200 includes:
  • the storage device receives an ACT command, and the ACT command is used to activate a certain row of data in the DDR.
  • the ACT command carries a first access address, where the first access address includes a first row address and first read/write indication information, and the storage device determines, according to the first read/write indication information, whether the access operation is a read operation or a write operation, and according to the The determining the access operation is performed to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address.
  • the storage device determines, according to the first read/write indication information, that the access operation performed on the storage device is a read operation (that is, the access command is a read command), and performs a preparation operation required to send the data; the storage device reads and writes according to the first read/write
  • the indication information determines that the access operation performed on the storage device is a write operation (ie, the access instruction is a write command), and a preparation operation required to store the received data into the storage space. In this way, the storage device can recognize in advance whether a read operation or a write operation is to be performed on the access operation performed by the storage device.
  • the storage device can know in advance that the access instruction is a read command or a write command according to the first read/write indication information, so that the storage device can extend the response time of the access operation, that is, the DDR protocol is required to complete the data within the specified time.
  • a read operation or a write operation so that the storage device can communicate normally with the CPU.
  • the embodiment of the present invention takes the rate of the FPGA storage device as 1600MT/s as an example.
  • the CPU uses the first read/write indication information carried in the ACT command to know in advance that the access operation is a read operation (or a write operation), and the storage device access operation is performed.
  • the method for accessing the storage device in the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and according to the Determining the access operation to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage The device recognizes in advance whether the access operation is a read operation or a write operation, and prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU.
  • the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
  • the first read/write indication information includes at least one field
  • the determining, according to the first read/write indication information, that the first access operation is a read operation or a write operation comprises: determining, according to the value of the at least one field Determining whether the first access operation is a read operation or a write operation.
  • the first read/write indication information may be at least one field, and the storage device may determine, according to the at least one field, whether the access operation performed on the storage device is a read operation or a write operation.
  • the at least one field may be a high-order field of the access address, and the storage device may determine whether to be a read command or a write command by a difference in the value of the high-order field of the access address extension, for example, if the access address includes a row address A field is included, the value of which is 0 indicates that the access instruction is a write instruction; the value of this field indicates that the access instruction is a read instruction.
  • the storage device may configure, in advance, a mapping relationship between the values of the multiple fields and the access instruction.
  • the read/write indication information may also be other indication information that can be used to distinguish the access instruction from a read command or a write command, which is not limited in this application.
  • the storage device may further determine whether the access operation of the storage device is a read operation or a write operation according to whether the value of the first read/write indication information belongs to an address space of the storage device. For example, the storage device determines the byte space reserved in the Serial Presence Detect (SPD) information of the module (that is, the real storage space) as the write address space.
  • SPD Serial Presence Detect
  • the storage device determines whether the access operation is a read operation or a write operation according to whether the value of the at least one field belongs to an address range of the write address space. If the value of the at least one field belongs to the address range of the write address space, determining that the access instruction is a write instruction; if the value of the at least one field does not belong to the write address space, determining that the access instruction is a read instruction.
  • the storage device may also determine the byte space reserved in the SPD information as the read address space, and the storage device determines whether the access operation is a read operation or a write operation according to whether the value of the at least one field belongs to the read address space. If the access address belongs to the read address space, it is determined that the access operation is a read operation, otherwise it is a write operation.
  • the lower address ie, the row address
  • the maximum value is used as the maximum value to calculate whether the value of the at least one field belongs to the address space of the storage device.
  • the storage device may further determine a virtual address space according to the value of the at least one field, where the storage device further includes the reserved byte in the SPD information. Space (that is, the real storage space).
  • the storage device includes two address spaces, which can be regarded as a read address space and a write address space, respectively.
  • the at least one field may be a high address, and the lower address (ie, the row address) is a maximum value, and the address space determined according to the at least one field is actually a virtual space, and is not a space where the storage device actually exists.
  • the storage device determines that the access address belongs to the write address space according to the value of the at least one field, it is considered to be a write command (ie, a write operation to the storage device).
  • a write command ie, a write operation to the storage device.
  • the actual storage space of the FPGA is 0x00000000 ⁇ 0x0000FFFF.
  • the mapping of the storage space when the CPU starts, the storage space seen is as shown in FIG. 5b, and the write address space is 0x00000000 ⁇ 0x0000FFFF, the read address space is 0x00010000 ⁇ 0x0001FFFF.
  • the read address space is the Rank0/Bank Group0/Bank0 address
  • the write address space is the Rank1/Bank Group1/Bank1 address.
  • the two address spaces are mapped to a specific address space segment.
  • the size of the address space inside the FPGA storage device is 0x10000, and distinguish whether it is a read command or a write command by the difference of the address range.
  • the read address space is 0x00100000 to 0x0010ffff
  • the write address space is 0x00110000 to 0x0011fffff.
  • the difference between the read address space and the write address space may be only the upper bits of the address.
  • the real address space ie, the write address space
  • the address space corresponding to the read address ie, the virtual address space
  • the row address of the memory address carried by the ACT command is 5
  • the data is read; if the row address is 5 and the value of at least one field is 0, it is represented as a write command, and the data is stored in the address space of address 5.
  • the command interface circuit inside the FPGA receives the high-speed command/address serial data from the command address bus, and then converts it into a low-speed parallel signal. After passing through the clock domain conversion circuit, it enters the command decoding circuit and translates the DDR command.
  • the execution unit determines whether it is an ACT command. If it is an ACT command, it determines whether it is a read command or a write command according to the first read/write indication information carried in the ACT command. In this way, the storage device can determine in advance whether the access instruction is a read command or a write command according to the first read/write indication information.
  • the preparing operation of performing the determined access operation according to the determined first access operation includes: configuring a data interface transmission direction of the storage device according to the determined first access operation
  • the data interface transmission direction includes an input direction and an output direction.
  • the storage device may determine an access operation performed on the storage device in advance according to the first read/write indication information carried in the ACT command, and perform a preparation operation of the access operation.
  • the preparation operation may be to open a data transceiving interface, and adjust a data transmission direction of the data transceiving interface.
  • the storage device determines that the access operation to the storage device is a read operation according to the first read/write indication information
  • the storage device adjusts the data transceiving interface to a sending status.
  • the storage device is based on The first read/write indication information determines that the access operation to the storage device is a write operation, and the storage device adjusts the data transceiving interface to a receiving state.
  • the method further includes: receiving a second row of instructions for performing a second access operation on the storage device, where the second row of instructions carries a second access address, where the second access address includes The second row address and the second read/write indication information; determining, according to the second read/write indication information, that the second access operation is a read operation or a write operation; and the second access operation determined according to the second read/write indication information Whether the first access operation determined by the first read/write indication information is the same, determining whether to modify the data interface transmission direction of the storage device; and determining the second access operation and the first read/write indication information according to the second read/write indication information The determined first access operation is the same, and it is determined that the data interface transmission direction of the storage device is not modified.
  • the storage device After the storage device completes an access operation (represented as the first access operation), it records whether the first access operation finally performs a read operation or a write operation.
  • the address includes a second row address and a second read/write indication information
  • the storage device determines, according to the second read/write indication information, that the second access operation is a read operation and a write operation. At this time, whether the second access operation determined by the storage device according to the second read/write indication information is the same as the stored first access operation, determining whether the transmission direction of the storage device data interface needs to be modified.
  • the transmission direction of the data interface does not need to be modified; if the second read/write indication information determines the access operation When the access operation determined by the first read/write indication information is different, it is necessary to adjust the transmission direction of the data interface at this time. In this way, when the access operation determined by the second read/write indication information is the same as the access operation determined by the first read/write indication information, the storage device can further reduce the operation steps and reduce the power consumption.
  • the storage device after receiving the ACT command that carries the row address and the first read/write indication information, the storage device further receives the CAS command (ie, the column command), and the CAS command also carries The read/write indication information (represented as the third read/write indication information) is used to determine that the access operation performed on the storage device is a read operation or a write operation. Therefore, after receiving the CAS command, the storage device may determine whether the access address of the storage device can be accessed according to whether the access command determined according to the first read/write indication information is the same as the access command determined according to the second read/write indication information.
  • the storage device accesses the storage address corresponding to the row address carried by the ACT and the column address carried by the CAS.
  • the storage device of the embodiment of the present application can recognize the read/write instruction in advance, and start the read/write access operation in advance, thereby improving the bus transmission efficiency and the CPU processing efficiency.
  • the CPU is notified by an Error Correction Code (ECC) or an Alert_n pin information.
  • ECC Error Correction Code
  • the CPU determines whether the accessed storage space conforms to the access characteristics, and performs the correction to continue the access.
  • the method for accessing the storage device in the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and according to the Determining the access operation to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage The device recognizes in advance whether the access operation is a read operation or a write operation, and prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU.
  • the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
  • FIG. 6 illustrates an interaction flow diagram of a method of accessing a storage device in accordance with one embodiment of the present application.
  • the meanings of the various terms in the embodiments of the present application are the same as those of the foregoing embodiments.
  • the CPU carries a first access address on the first ACT command, where the first access address includes a first row address and first read/write indication information.
  • the CPU sends a first ACT command to the storage device.
  • the storage device configures a transmission direction of the data transceiving interface according to the first read/write indication information.
  • the storage device determines whether the first access operation is a read operation or a write operation according to the first read/write indication information, and configures a transmission direction of the corresponding data transceiving interface according to the determined first access operation. If the first access operation is a read operation, the storage device adjusts the data transceiving interface to a transmit status. If the first access operation is a write operation, the storage device adjusts the data transceiving interface to a receiving state.
  • the CPU sends a first CAS instruction to the storage device, where the CAS instruction carries the first column address.
  • the storage device After receiving the first ACT instruction carrying the first read/write indication information, the storage device also receives the first CAS instruction, and the first CAS instruction carries the column address.
  • the storage device accesses the address space corresponding to the first row address and the first column address according to the first row address and the first column address.
  • the CPU carries a second access address on the second ACT instruction, where the second access address includes a second row address and second read/write indication information.
  • the CPU sends a second ACT command to the storage device.
  • the storage device can further reduce the operation steps and reduce power consumption.
  • the CPU sends a second CAS instruction to the storage device, where the second CAS instruction carries the second column address.
  • the CPU accesses the address space corresponding to the second row address and the second column address according to the second row address and the second column address.
  • the method for accessing the storage device in the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and according to the Determining the access operation to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage The device recognizes in advance whether the access operation is a read operation or a write operation, and prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU.
  • the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
  • the size of the sequence numbers of the foregoing processes does not mean the order of execution sequence, and the order of execution of each process should be determined by its function and internal logic, and should not be applied to the embodiment of the present application.
  • the implementation process constitutes any limitation.
  • a method of accessing a storage device according to an embodiment of the present application is described in detail above, which will be described below.
  • a storage device according to an embodiment of the present application is described in detail above, which will be described below.
  • FIG. 7 shows a schematic block diagram of a memory device 500 in accordance with an embodiment of the present application.
  • the storage device 500 includes:
  • the first receiving module 510 is configured to receive a first row of instructions for performing a first access operation on the storage device, where the first row of instructions carries a first access address, where the first access address includes a first row address and a first read and write address Indication information;
  • the first determining module 520 is configured to determine, according to the first read/write indication information, that the first access operation is a read operation or a write operation;
  • the first processing module 530 is configured to perform a preparation operation of the determined first access operation according to the first access operation determined by the first determining module 520, where the preparing operation is used by the storage device to complete the preset time threshold. a read operation or a preparation process of the write operation;
  • a second receiving module 540 configured to receive a column instruction for performing the first access operation on the storage device, where the column instruction carries a column address;
  • the second processing module 550 is configured to access the first row address and the address space corresponding to the column address in the storage device according to the first row address and the column address.
  • the storage device determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and determining according to the determined The access operation is performed to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage device is advanced It is recognized whether the access operation is a read operation or a write operation, which prolongs the response time of the storage device for reading and writing operations, and thus can communicate with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
  • the first processing module 530 is specifically configured to: configure a data interface transmission direction of the storage device according to the determined first access operation, where the data interface transmission direction includes an input direction and Output direction.
  • the first read/write indication information includes at least one field; the first determining module 520 is specifically configured to: determine, according to the value of the at least one field, that the first access operation is Read or write operation.
  • the storage device 500 further includes: a third receiving module, configured to receive a second row of instructions for performing a second access operation on the storage device, the second row of instructions Carrying a second access address, where the second access address includes a second row address and a second read/write indication information, and the second determining module is configured to determine, according to the second read/write indication information, that the second access operation is a read operation or a third determining module, configured to determine whether to modify an interface transmission direction of the storage device according to whether the determined second access operation is the same as the determined first access operation; and the third processing module, according to the determining The second access operation is the same as the determined first access operation, and is used to determine that the interface transmission direction of the storage device is not modified.
  • a third receiving module configured to receive a second row of instructions for performing a second access operation on the storage device, the second row of instructions Carrying a second access address, where the second access address includes a second row address and a second read/write indication information, and the second determining module is configured to determine
  • the storage device 500 may correspond to a storage device of a method of accessing a storage device according to an embodiment of the present application, and the above-described and other operations and/or functions of respective modules in the storage device 500 respectively implement the foregoing respective methods
  • the corresponding process for the sake of brevity, will not be described here.
  • the storage device determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and determining according to the determined The access operation is performed to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage device is advanced It is recognized whether the access operation is a read operation or a write operation, which prolongs the response time of the storage device for reading and writing operations, and thus can communicate with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
  • FIG. 8 shows a system 700 for accessing a storage device of the present application, the system 700 comprising: a CPU 702, a storage device 500 of the embodiment of the present application, at least one network interface 705 or other communication interface, and at least one communication bus 703 for Achieve connection communication between devices.
  • a communication connection with at least one other network element is achieved by at least one network interface, which may be wired or wireless.
  • the processor 702 may be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (Application Specific Integrated Circuit), or other programmable logic device. , discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor may be any processor with a short read and write delay.
  • the communication bus 703 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus.
  • the 702 and the storage device 500 may also communicate through other types of buses, such as optical fibers or optical waveguides. But for the sake of clarity, the various totals in the picture The lines are all labeled as communication bus 703.
  • the embodiment of the present application further provides a computer storage medium, which can store program instructions for indicating any of the above methods.
  • the storage medium may be specifically the storage device 500.
  • the embodiment of the present application further provides a storage device 800, which is a hardware device for performing the foregoing method function of accessing a storage device.
  • the storage device 800 includes an interface module 801, at least one clock domain conversion circuit module 802, a command decode and execution module 803, and a data storage module 804.
  • the interface module 101 further includes a data interface module and a command address interface module, wherein the data interface module further includes a receiving portion and a transmitting portion.
  • the receiving part of the data interface module mainly samples and receives high-speed serial signals such as data from the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals with relatively low speed; the transmitting part of the data interface module mainly receives from the inside of the FPGA. Data, parallel and serial conversion, modulation, etc., are then sent to the high speed bus interface.
  • the receiving part of the command address interface module mainly samples and receives high-speed serial signals such as addresses and command data from the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals with relatively low speed.
  • the clock domain conversion circuit 102 converts the signal from the interface circuit clock domain to the FPGA internal clock domain, or converts the signal from the FPGA internal clock domain to the interface circuit clock domain, because in the hardware circuit, its signal must be associated with the portion of the The clock signals match, otherwise a signal sampling error will occur.
  • the command decode and execute module 803 decodes the command and address on the command bus to translate the correct DDR command sequence and execute the corresponding command based on the internal state.
  • the data storage module 804 is configured to store read and write data.
  • the storage device 800 receives a first row of instructions for performing a first access operation on the storage device through a command address interface, and transmits the command to the command decoding and execution module 803 via the clock domain conversion circuit 802, and the command decoding and execution module 803 translates
  • the first access address carries the first access address, and the first access address includes the first row address and the first read/write indication information, and determines, according to the first read/write indication information, that the first access operation is a read operation or a write operation, and performing a preparation operation of the first access operation according to the determined first access operation, receiving a column instruction for performing the first access operation on the storage device through the command address interface, and transmitting to the clock domain conversion circuit 802
  • the command decoding and execution module 803, the command decoding and execution module 803 translates the first column instruction to carry the column address
  • the data storage module 804 accesses the first row address and the column address in the storage device according to the first row address and the column address.
  • the corresponding address space For example,
  • the command decoding and execution module 803 performs a preparation operation for the access operation, including configuring a data transmission direction of the interface module 801,
  • the first read/write indication information includes at least one field
  • the command decoding and execution module 803 is further configured to determine, according to the value of the at least one field, that the first access operation is a read operation or Write operation.
  • the storage device 800 receives a second row of instructions for performing a second access operation on the storage device by using a command address interface, where the second row instruction carries a second access address and passes through a clock domain conversion circuit.
  • 802 is transmitted to the command decoding and execution module 803, and the command decoding and execution module 803 translates the second access address to include the second row address and the second read/write indication information, and determines the second read/write indication information according to the second read/write indication information.
  • the second access operation is a read operation or a write operation, and determining whether to modify the transmission direction of the data of the interface module 801 according to whether the determined second access operation is the same as the determined first access operation, if the second access operation is determined according to the determination As with the determined first access operation, it is determined that the data interface transmission direction of the storage device is not modified.
  • the storage device determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction that carries the first read/write indication information and the row address. And performing, according to the determined access operation, a preparation operation that enables the storage device to complete the determined access operation within a preset time threshold, receiving a column instruction carrying the column address, and accessing an address space corresponding to the row address and the column address,
  • the storage device is configured to recognize in advance whether the access operation is a read operation or a write operation, thereby prolonging the response time of the storage device for reading and writing operations, and thereby being able to communicate with the CPU.
  • the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
  • the size of the sequence numbers of the foregoing processes does not mean the order of execution sequence, and the order of execution of each process should be determined by its function and internal logic, and should not be applied to the embodiment of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present application which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or a light.
  • a medium such as a disk that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Static Random-Access Memory (AREA)
  • Memory System (AREA)

Abstract

A method for accessing a storage device and the storage device. The method comprises: receiving a first row instruction for performing a first access operation with respect to the storage device, the first row instruction carrying a first access address, the first access address comprising a first row address and first read/write indication information (S210); determining, on the basis of the read/write indication information, whether the first access operation is a read operation or a write operation (S220); performing, on the basis of the determined first access operation, a preparatory operation for the determined first access operation, the preparatory operation being used as a preparation process for the storage device to complete the read operation or the write operation by a preset time threshold (S230); receiving a column instruction for performing the first access operation with respect to the storage device, the column instruction carrying a column address (S240); and accessing, on the basis of the row address and of the column address, an address space corresponding to the row address and to the column address in the storage device (S250). The storage device is capable of recognizing in advance an access operation, thus extending access response time.

Description

访问存储设备的方法和存储设备Method and storage device for accessing storage devices 技术领域Technical field
本申请涉及计算机领域,并且更具体地,涉及访问存储设备的方法和存储设备。The present application relates to the field of computers and, more particularly, to methods and storage devices for accessing storage devices.
背景技术Background technique
双倍数据速率(Double Data Rate,DDR)技术具有高带宽(最高可达200Gbit/s)、低延迟(数十纳秒级别)的特点,具有承载系统互连的潜力。由于DDR总线原本被设计用来直接访问动态随机存储器(Dynamic Random Access Memory,DRAM)内存颗粒,因此只需十几到几十个纳秒即可完成读写访问,时延很短。中央处理器(Central Processing Unit,CPU)中的内存控制器是基于电子工程设计发展联合会议(Joint Electron Device Engineering Council,JEDEC)的协议设计和实现,能够设置的读写延迟同样较短。因此,在计算机存在扩展设备的条件下,譬如:非易失性存储(Non-volatile Memory,NVM)芯片、现场可编程门阵列(Field-Programmable Gate Array,FPGA)芯片,CPU通过DDR总线访问这些扩展设备时,会出现访问时序不满足DDR协议要求,导致扩展设备无法和CPU正常通信。例如,当CPU发出一个读命令后,扩展设备在规定的时间内没有回复正确的数据,导致CPU采集到错误的数据,从而引起系统错误。Double Data Rate (DDR) technology features high bandwidth (up to 200 Gbit/s) and low latency (tens of nanoseconds), with the potential to host system interconnects. Since the DDR bus was originally designed to directly access the dynamic random access memory (DRAM) memory particles, it takes only a few ten to several tens of nanoseconds to complete the read and write access, and the delay is short. The memory controller in the Central Processing Unit (CPU) is designed and implemented based on the protocol of the Joint Electron Device Engineering Council (JEDEC), and the read and write delays can be set to be shorter. Therefore, under the condition that the computer has an extension device, such as a non-volatile memory (NVM) chip or a Field-Programmable Gate Array (FPGA) chip, the CPU accesses these through the DDR bus. When the device is extended, the access timing does not meet the DDR protocol requirements, causing the expansion device to fail to communicate with the CPU. For example, when the CPU issues a read command, the extended device does not reply to the correct data within the specified time, causing the CPU to collect the wrong data, causing a system error.
现有技术提出利用DDR总线协议中保留的命令字段,扩展出提前读/写命令,在需要向扩展设备发起访问请求时,内存控制器先发送扩展的提前读写命令,再发送常规的激活行指令(Active,ACT)指令及读指令或写指令。扩展设备根据接收到的提前读/写命令,执行访问准备操作,再根据正常的读写命令给出响应。这样每次进行读写访问,都需要内存控制器提前发出提前读写指令,然后才是正常的读写指令,造成带宽占用较大,CPU功耗较高。The prior art proposes to use the command field reserved in the DDR bus protocol to extend the read/write command in advance. When an access request needs to be initiated to the extended device, the memory controller first sends an extended read/write command, and then sends a regular active line. Instruction (Active, ACT) instruction and read or write instruction. The extension device performs an access preparation operation according to the received advance read/write command, and then gives a response according to the normal read/write command. In this way, each time the read and write access is performed, the memory controller needs to issue an advance read/write instruction in advance, and then the normal read/write instruction, resulting in a large bandwidth occupation and high CPU power consumption.
发明内容Summary of the invention
本申请实施例提供一种访问存储设备的方法和存储设备,能够减少带宽占用。The embodiment of the present application provides a method and a storage device for accessing a storage device, which can reduce bandwidth occupation.
第一方面,提供了一种访问存储设备的方法。该方法包括:接收对该存 储设备进行第一访问操作的第一行指令,该第一行指令携带第一访问地址,该第一访问地址包括第一行地址以及第一读写指示信息;根据该第一读写指示信息,确定该第一访问操作是读操作或写操作;根据确定的第一访问操作,进行该确定的第一访问操作的准备操作,该准备操作用于该存储设备在预设时间阈值内完成该读操作或该写操作的准备过程;接收对该存储设备进行该第一访问操作的列指令,该列指令携带列地址;根据该第一行地址和该列地址,访问该存储设备中该第一行地址和该列地址对应的地址空间。In a first aspect, a method of accessing a storage device is provided. The method includes: receiving the deposit And storing, by the storage device, a first row of instructions, where the first row of instructions carries a first access address, where the first access address includes a first row address and first read/write indication information; Determining that the first access operation is a read operation or a write operation; performing a preparation operation of the determined first access operation according to the determined first access operation, the preparing operation for the storage device to complete the preset time threshold a read operation or a preparation process of the write operation; receiving a column instruction for performing the first access operation on the storage device, the column instruction carrying a column address; accessing the storage device according to the first row address and the column address A row address and an address space corresponding to the column address.
存储设备接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。也就是说,CPU避免了在发送行指令之前单独发送读写指令,就能够实现与存储设备的通信,减少了带宽占用。The storage device receives a row instruction that carries the first read/write indication information and the row address, determines whether the access operation is a read operation or a write operation according to the first read/write indication information, and performs the storage device according to the determined access operation. Setting a time threshold to complete the preparation operation of the determined access operation, receiving a column instruction carrying the column address, and accessing the address space corresponding to the row address and the column address, so that the storage device recognizes in advance whether the access operation is a read operation or a write operation. It extends the response time of the storage device for reading and writing operations, and thus can communicate with the CPU. That is to say, the CPU avoids sending the read and write instructions separately before sending the line instruction, thereby enabling communication with the storage device and reducing bandwidth occupation.
结合第一方面,在一些可能的实现方式中,该根据确定的第一访问操作,进行该确定的访问操作的准备操作包括:根据该确定的第一访问操作,配置该存储设备的数据接口传输方向,该数据接口传输方向包括输入方向和输出方向。With reference to the first aspect, in some possible implementations, the preparing operation for performing the determined access operation according to the determined first access operation comprises: configuring a data interface transmission of the storage device according to the determined first access operation Direction, the data interface transmission direction includes input direction and output direction.
存储设备根据行指令携带的第一读写指示信息,可以提前识别出对存储设备进行的访问操作是读操作还是写操作,从而能够进行访问操作的准备操作。该准备操作可以是打开存储设备的数据收发接口,以及配置数据收发接口的传输方向。这样,该存储设备能够在接收到行指令时就可以提前识别出对存储设备进行的读写操作,相当于延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。The storage device can recognize in advance whether the access operation performed on the storage device is a read operation or a write operation according to the first read/write indication information carried by the row instruction, so that the preparation operation of the access operation can be performed. The preparation operation may be to open a data transceiving interface of the storage device and configure a transmission direction of the data transceiving interface. In this way, the storage device can recognize the read and write operations on the storage device in advance when receiving the row instruction, which is equivalent to extending the response time of the storage device to perform the read and write operations, thereby enabling communication with the CPU.
结合第一方面,在一些可能的实现方式中,该第一读写指示信息包括至少一个字段;其中,该根据该第一读写指示信息,确定该第一访问操作是读操作或写操作包括:根据该至少一个字段的取值,确定该第一访问操作是读操作或写操作。With reference to the first aspect, in some possible implementations, the first read/write indication information includes at least one field, where the determining, according to the first read/write indication information, that the first access operation is a read operation or a write operation comprises: And determining, according to the value of the at least one field, that the first access operation is a read operation or a write operation.
该读写指示信息可以是至少一个字段,存储设备可以预先配置该至少一个字段的值与读写操作的映射关系,这样存储设备根据该至少一个字段的取 值可以确定对存储设备进行的访问操作是读操作还是写操作,存储设备可以提前为确定的访问操作做好准备工作,相当于延长了访问该存储设备的响应时间,从而该存储设备能够与CPU正常通信。The read/write indication information may be at least one field, and the storage device may pre-configure a mapping relationship between the value of the at least one field and the read/write operation, so that the storage device obtains according to the at least one field. The value can determine whether the access operation performed on the storage device is a read operation or a write operation, and the storage device can prepare for the determined access operation in advance, which is equivalent to extending the response time of accessing the storage device, so that the storage device can be combined with the CPU. Normal communication.
结合第一方面,在一些可能的实现方式中,该方法还包括:接收对该存储设备进行第二访问操作的第二行指令,该第二行指令携带第二访问地址,该第二访问地址包括第二行地址以及第二读写指示信息;根据该第二读写指示信息,确定该第二访问操作是读操作或写操作;根据确定的第二访问操作与该确定的第一访问操作是否相同,确定是否修改该存储设备的数据接口传输方向;若根据该确定的第二访问操作与该确定的第一访问操作相同,确定不修改该存储设备的数据接口传输方向。With reference to the first aspect, in some possible implementations, the method further includes: receiving a second row of instructions for performing a second access operation on the storage device, the second row of instructions carrying a second access address, the second access address Included in the second row address and the second read/write indication information; determining, according to the second read/write indication information, that the second access operation is a read operation or a write operation; according to the determined second access operation and the determined first access operation Whether it is the same, determining whether to modify the data interface transmission direction of the storage device; if the determined second access operation is the same as the determined first access operation, determining that the data interface transmission direction of the storage device is not modified.
若存储设备根据第二读写指示信息确定的访问操作与根据第一读写指示信息确定的访问操作不相同时,这时需要进行调整数据接口的传输方向;若存储设备根据第二读写指示信息确定的访问操作与根据第一读写指示信息确定的访问操作相同时,则不需要修改数据接口的传输方向,这样存储设备可以进一步减少操作步骤,降低功耗。If the access operation determined by the storage device according to the second read/write indication information is different from the access operation determined according to the first read/write indication information, then the transmission direction of the data interface needs to be adjusted; if the storage device is in accordance with the second read/write indication When the access operation determined by the information is the same as the access operation determined according to the first read/write indication information, the transmission direction of the data interface does not need to be modified, so that the storage device can further reduce the operation steps and reduce the power consumption.
第二方面,本申请提供了一种存储设备,该存储设备包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的模块。In a second aspect, the present application provides a storage device comprising means for performing the method of the first aspect or any possible implementation of the first aspect.
第三方面,本申请提供了一种存储设备,该存储设备包括命令译码和执行模块、命令地址接口模块、时钟域转换电路模块、数据接口模块和数据存储模块;该命令地址接口模块,用于接收对该存储设备进行第一访问操作的第一行指令,以及接收对该存储设备进行该第一访问操作的列指令;该时钟域转换电路模块,用于转换该命令地址接口模块接收的该第一行指令和该列指令的时钟域;该命令译码和执行模块,用于对通过该时钟域转换电路模块转换时钟域后的第一行指令和列指令进行译码,识别出该第一行指令携带第一访问地址和该列指令携带列地址,其中,该第一访问地址包括第一行地址以及第一读写指示信息,并根据该第一读写指示信息确定该第一访问操作是读操作或写操作,以及根据确定的该第一访问操作进行该确定的第一访问操作的准备操作,该准备操作用于该存储设备在预设时间阈值内完成该读操作或该写操作的准备过程;该数据接口模块,用于接收或发送数据;该数据存储模块,用于根据该命令译码和执行模块识别出的该第一行地址和该列地址,将该数据接口模块接收的数据存储到该第一行地址和该列地址对应的地 址空间,或者通过该数据接口模块发送该第一行地址和该列地址对应的地址空间中的数据。In a third aspect, the application provides a storage device, including a command decoding and execution module, a command address interface module, a clock domain conversion circuit module, a data interface module, and a data storage module; Receiving a first row of instructions for performing a first access operation on the storage device, and receiving a column instruction for performing the first access operation on the storage device; the clock domain conversion circuit module for converting the command address interface module to receive The first row instruction and the clock domain of the column instruction; the command decoding and execution module is configured to decode the first row instruction and the column instruction after converting the clock domain by the clock domain conversion circuit module, and identify the The first row of instructions carries the first access address and the column instruction carries the column address, wherein the first access address includes the first row address and the first read/write indication information, and determines the first according to the first read/write indication information. The access operation is a read operation or a write operation, and a preparation operation of the determined first access operation according to the determined first access operation The preparation operation is performed by the storage device to complete the read operation or the preparation process of the write operation within a preset time threshold; the data interface module is configured to receive or send data; and the data storage module is configured to translate according to the command And the first row address and the column address identified by the code and the execution module, and storing the data received by the data interface module to the first row address and the corresponding location of the column address The address space, or the data in the address space corresponding to the first row address and the column address is sent by the data interface module.
结合第三方面,在一些可能的实现方式中,该命令译码和执行模块具体用于:根据该确定的第一访问操作,配置该数据接口模块的传输方向,该数据接口模块的传输方向包括输入方向和输出方向。With reference to the third aspect, in some possible implementations, the command decoding and execution module is specifically configured to: configure a transmission direction of the data interface module according to the determined first access operation, where the transmission direction of the data interface module includes Input direction and output direction.
结合第三方面,在一些可能的实现方式中,该第一读写指示信息包括至少一个字段;该命令译码和执行模块具体用于:根据该至少一个字段的取值,确定该第一访问操作是该读操作或该写操作。With reference to the third aspect, in some possible implementations, the first read/write indication information includes at least one field; the command decoding and execution module is specifically configured to: determine the first access according to the value of the at least one field The operation is the read operation or the write operation.
结合第三方面,在一些可能的实现方式中,该命令地址接口模块,还用于接收对该存储设备进行第二访问操作的第二行指令;该时钟域转换电路模块,还用于转换该命令地址接口模块接收的该第二行指令的时钟域;该命令译码和执行模块,还用于对通过该时钟域转换电路模块转换时钟域后的第二行指令进行译码,识别出该第二行指令携带第二访问地址,其中,该第二访问地址包括第二行地址以及第二读写指示信息,并根据该第二读写指示信息确定该第二访问操作是该读操作或该写操作,以及根据确定的第二访问操作与该确定的第一访问操作是否相同,确定是否修改该数据接口模块的传输方向,在该确定的第二访问操作与该确定的第一访问操作相同时,用于确定不修改该数据接口模块的传输方向。With reference to the third aspect, in some possible implementations, the command address interface module is further configured to receive a second row of instructions for performing a second access operation on the storage device; the clock domain conversion circuit module is further configured to convert the The clock domain of the second row instruction received by the command address interface module; the command decoding and execution module is further configured to decode the second row instruction after converting the clock domain by the clock domain conversion circuit module, and identify the The second row of instructions carries the second access address, where the second access address includes the second row address and the second read/write indication information, and determines, according to the second read/write indication information, that the second access operation is the read operation or Determining whether to modify the transmission direction of the data interface module according to the determined second access operation and whether the determined first access operation is the same, the determined second access operation and the determined first access operation When the same, it is used to determine not to modify the transmission direction of the data interface module.
第四方面,提供了一种访问存储设备的系统,该系统包括:CPU、通信接口和上述第二方面或上述第三方面的存储设备。CPU与存储设备和通信接口连接。存储设备用于存储指令,CPU用于执行该指令,通信接口用于在CPU的控制下与其他网元进行通信。该CPU执行该存储设备存储的指令时,该执行使得该CPU执行第一方面或第一方面的任意可能的实现方式中的方法。In a fourth aspect, a system for accessing a storage device is provided, the system comprising: a CPU, a communication interface, and the storage device of the second aspect or the third aspect above. The CPU is connected to the storage device and the communication interface. The storage device is used to store instructions, the CPU is used to execute the instructions, and the communication interface is used to communicate with other network elements under the control of the CPU. When the CPU executes an instruction stored by the storage device, the execution causes the CPU to perform the method of the first aspect or any possible implementation of the first aspect.
第五方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码用于指示执行上述第一方面或第一方面的任一种可能的实现方式中的访问存储设备的方法的指令。In a fifth aspect, a computer storage medium is provided, the program storage code storing program code for indicating access to the storage device in any one of the possible implementation manners of the first aspect or the first aspect The instructions of the method.
基于上述技术方案,存储设备接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地 址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信,且避免了CPU在发送行指令之前单独发送读写指令,减少了带宽占用。The storage device receives the line instruction carrying the first read/write indication information and the row address, and determines whether the access operation is a read operation or a write operation according to the first read/write indication information, and can perform according to the determined access operation. The storage device completes the preparation operation of the determined access operation within a preset time threshold, receives the column instruction carrying the column address, and accesses the row address and the column address. The address space corresponding to the address enables the storage device to recognize in advance whether the access operation is a read operation or a write operation, which prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU and avoiding the CPU before sending the line instruction. Sending read and write instructions separately reduces bandwidth usage.
附图说明DRAWINGS
下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。BRIEF DESCRIPTION OF THE DRAWINGS The drawings to be used in the embodiments or the description of the prior art will be briefly described below.
图1是本申请存储设备的结构示意图;1 is a schematic structural diagram of a storage device of the present application;
图2是现有技术的读指令访问存储设备的方法的示意图;2 is a schematic diagram of a prior art read command accessing a storage device;
图3a和图3b分别是现有技术的读、写指令访问存储设备的方法的示意图;3a and 3b are schematic diagrams of a method for accessing a storage device by reading and writing instructions in the prior art;
图4是本申请实施例的访问存储设备的方法的示意图;4 is a schematic diagram of a method for accessing a storage device according to an embodiment of the present application;
图5a和图5b是本申请存储设备的地址空间的示意图;5a and 5b are schematic diagrams showing an address space of a storage device of the present application;
图6是本申请实施例的访问存储设备的方法的示意性流程图;FIG. 6 is a schematic flowchart of a method for accessing a storage device according to an embodiment of the present application; FIG.
图7是本申请实施例的存储设备的示意性框图;7 is a schematic block diagram of a storage device according to an embodiment of the present application;
图8是本申请实施例的系统的示意性框图;Figure 8 is a schematic block diagram of a system in accordance with an embodiment of the present application;
图9是本申请实施例的存储设备的结构示意图。FIG. 9 is a schematic structural diagram of a storage device according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments.
为了方便理解本申请实施例,首先在介绍本申请实施例之前引入以下几个要素。In order to facilitate the understanding of the embodiments of the present application, the following elements are first introduced before the introduction of the embodiments of the present application.
现场可编程门阵列(FPGA)兼备高能效和高灵活性两个方面,大约是通用处理器10~100倍之间的效率。此外,FPGA非常适合做细粒度的加速。Field Programmable Gate Array (FPGA) combines energy efficiency with high flexibility, which is approximately 10 to 100 times more efficient than general purpose processors. In addition, FPGAs are ideal for fine-grained acceleration.
内存/NVM扩展技术是通过内存扩展可以满足大数据处理对于内存计算的需求,提高计算性能,降低任务的处理时延;或者是通过NVM扩展,可以提高数据存储的容量和访问性能,满足海量存储需求。由于DDR接口具有高带宽、低延迟的特点,并且其工作模式的设计就是为了访问内存,是扩展内存和NVM的首选。其中,NVM为基于新的半导体材料而出现的多种新型内存技术,具有停止供电后数据不丢失的特性。The memory/NVM extension technology can meet the requirements of big data processing for memory computing through memory expansion, improve computing performance, and reduce the processing delay of tasks; or increase the capacity and access performance of data storage through NVM expansion to meet mass storage. demand. Because the DDR interface has high bandwidth and low latency, and its working mode is designed to access memory, it is the first choice for expanding memory and NVM. Among them, NVM is a new type of memory technology based on new semiconductor materials, which has the characteristics of not losing data after power supply is stopped.
模组存在的串行检测(Serial Presence Detect,SPD),是通过芯片间的 集成电路总线(Inter-Integrated Circuit,IIC)串行接口连接的电可擦只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)对内存插槽中的模组存在的信息检查装置,存储着内存模组的配置信息,用来协助内存控制器端精确调整内存的物理/时序参数,以达到最佳使用效果。The Serial Presence Detect (SPD) of the module exists through the chip. An integrated circuit (Inter-Integrated Circuit (IIC) serial interface-connected Electrically Erasable Read-Only Memory (EEPROM) device for storing information in a memory slot, storing memory The configuration information of the module is used to assist the memory controller to accurately adjust the physical/timing parameters of the memory to achieve the best use effect.
本申请实施例中,访问操作的准备操作是指根据行地址和访问指令访问存储设备的存储空间能够进行的准备操作,可以是存储设备能够提前进行的所有准备操作或者是部分需要时间较长的准备操作等,只要能够使得存储设备接收到列指令后在DDR协议规定的时间内完成读写操作的准备操作,都在本申请保护的范围之内,为描述方便,本申请以该准备操作为耗时较长的配置数据收发接口的传输方向为例进行说明。In the embodiment of the present application, the preparation operation of the access operation refers to the preparation operation that can be performed by accessing the storage space of the storage device according to the row address and the access instruction, and may be all preparation operations that the storage device can perform in advance or partially take a long time. The preparation operation, etc., as long as the storage device can complete the preparation operation of the read/write operation within the time specified by the DDR protocol after receiving the column command, is within the scope of the protection of the present application, and the preparation operation is The transmission direction of the configuration data transceiver interface that takes a long time is taken as an example for description.
应理解,本申请实施例中,存储设备可以是基于FPGA的存储设备,或者是功能相似的其他存储设备。为了描述方便,下述实施例以FPGA存储设备为例进行说明,但本申请对此并不限定。It should be understood that, in the embodiment of the present application, the storage device may be an FPGA-based storage device or other storage device with similar functions. For the convenience of description, the following embodiments are described by taking an FPGA storage device as an example, but the present application is not limited thereto.
图1示出了FPGA存储设备的结构示意图。如图1所示,基于FPGA的存储设备100主要有数据接口模块101,时钟域转换电路模块102,命令译码(Dec)和执行模块103,以及数据存储模块104、命令地址接口模块105等几部分组成。FIG. 1 shows a schematic structural diagram of an FPGA storage device. As shown in FIG. 1, the FPGA-based storage device 100 mainly includes a data interface module 101, a clock domain conversion circuit module 102, a command decoding (Dec) and an execution module 103, and a data storage module 104, a command address interface module 105, and the like. Part of the composition.
其中,数据接口电路模块101还包括接收部分和发送部分。数据接口电路部分101的接收部分主要是采样接收从高速总线接口上的数据等高速串行信号,并进行串并转换,转换成速度相对低的并行信号;数据接口电路部分101的发送部分主要是从FPGA内部接收数据,进行并串转换,调制等,然后发送到高速总线接口上。The data interface circuit module 101 further includes a receiving part and a transmitting part. The receiving portion of the data interface circuit portion 101 mainly samples and receives high-speed serial signals such as data from the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals of relatively low speed; the transmitting portion of the data interface circuit portion 101 is mainly Receive data from the FPGA, perform parallel-to-serial conversion, modulation, etc., and then send it to the high-speed bus interface.
命令地址接口模块105的接收部分主要是采样接收从高速总线接口上的地址和命令等高速串行信号,并进行串并转换,转换成速度相对低的并行信号。The receiving portion of the command address interface module 105 mainly samples and receives high-speed serial signals such as addresses and commands on the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals of relatively low speed.
因为命令或地址是单向的从FPGA外部往FPGA内部流动的,所以命令地址接口模块105只有接收部分,而数据接口电路模块101因为要接收和发送数据,是双向的接口,还需要有方向的控制电路进行发送和接收方向的转换。Since the command or address is unidirectional from the outside of the FPGA to the inside of the FPGA, the command address interface module 105 has only the receiving portion, and the data interface circuit module 101 is a bidirectional interface because of the need to receive and transmit data, and also needs to have a direction. The control circuit performs the conversion of the transmission and reception directions.
时钟域转换电路模块102是把信号从接口电路时钟域转化成FPGA内部时钟域,或者把信号从FPGA内部时钟域转换到接口电路时钟域中,因为在 硬件电路中,其信号必须要与该部分的时钟信号相匹配,否则会出现信号采样错误发生。The clock domain conversion circuit module 102 converts the signal from the interface circuit clock domain to the FPGA internal clock domain, or converts the signal from the FPGA internal clock domain to the interface circuit clock domain because In the hardware circuit, the signal must match the clock signal of the part, otherwise a signal sampling error will occur.
命令译码和执行模块103,对命令总线上的命令和地址进行译码,以翻译出正确的DDR的命令序列,并根据内部的状态执行相应的命令。The command decode and execute module 103 decodes the command and address on the command bus to translate the correct DDR command sequence and execute the corresponding command based on the internal state.
存储设备内部的存储部分104用于存储读写的数据。The storage portion 104 inside the storage device is used to store read and write data.
DDR访问总线上的命令顺序有ACT、列指令(Column Address Select,CAS)等命令序列。具体地,首先是ACT命令,用于打开某个Rank/Bank Group/Bank命令内的行;然后是CAS命令,用于选择行内的列地址,最后才是数据总线上的双向数据控制引脚(Bi-directional Data Strobe,DQS)/双向数据总线(Bi-directional data bus,DQ);等访问完该行后,用PreCharge命令关闭该行;DDR总线上的各命令之间必须满足DDR标准规范规定的时序要求。The command sequence on the DDR access bus has command sequences such as ACT and Column Address Select (CAS). Specifically, the first is the ACT command, which is used to open a row in a Rank/Bank Group/Bank command; then the CAS command is used to select the column address in the row, and finally the bidirectional data control pin on the data bus ( Bi-directional Data Strobe (DQS)/Bi-directional data bus (DQ); after accessing the line, use the PreCharge command to close the line; the commands on the DDR bus must meet the DDR standard specification. Timing requirements.
DDR标准中几个时间信息的定义:Definition of several time information in the DDR standard:
行指令到列指令时延(time RAS-to-CAS Delay,tRCD):从ACT命令到接收到列指令之间的时间;Time RAS-to-CAS Delay (tRCD): The time between the ACT command and the receipt of a column instruction;
CAS附加潜伏期(Posted CAS Additive Latency,AL);Postal Attachment Latency (AL);
列地址读命令潜伏期(Column Address Select Latency,CL):从内部携带读命令的CAS指令发出到第一笔数据输出的这段时间,CL只在读取时使用;Column Address Select Latency (CL): The time from when the CAS command carrying the read command is internally sent to the first data output, CL is only used during reading;
列地址写命令潜伏期(CAS Write Latency,CWL):从内部携带写命令的CAS指令到第一个可见的数据输入之间的时间定义为CWL。这是DDR3新增的时序参数,仅在写操作时使用;Column Write Write Latency (CWL): The time between the CAS instruction carrying the write command internally and the first visible data input is defined as CWL. This is a new timing parameter for DDR3 and is only used during write operations;
读命令潜伏期(time of Read Latency,RL):读命令时,CAS命令到数据总线上的第一个DQ的延时,一般RL=AL+CL;Time of Read Latency (RL): The delay of the first DQ on the data bus from the CAS command when reading the command, generally RL=AL+CL;
写命令潜伏期(time of Write Latency,WL):写命令时,CAS命令到数据总线上的第一个DQ的延时,一般WL=AL+CWL。Time of Write Latency (WL): The delay of the first DQ on the data bus from the CAS command when writing a command, typically WL=AL+CWL.
目前大多数的CPU不支持AL不等于0的情况。上述计算中,以AL=0为例进行说明,但本申请并不限于此。Most current CPUs do not support the case where AL is not equal to zero. In the above calculation, AL=0 is taken as an example, but the present application is not limited thereto.
DDR为一种数据传输技术,在随路时钟信号的上升沿下降沿都有一次数据传输,相对单沿采样可以使数据的传输速率提高一倍,目前广泛应于内存领域。由于DDR总线原本被设计用来直接访问DRAM内存颗粒,只需十 几到几十个纳秒即可完成读写访问,时延很短。因此,DDR协议中规定的关键时延参数CL/RL、CWL/WL的有效范围都较小。例如,DDR4协议中的CL有效范围为9~24个时钟周期(如下表1所示),最大值对应30ns。DDR is a data transmission technology that has a data transmission on the falling edge of the rising edge of the associated clock signal. Compared with single edge sampling, the data transmission rate can be doubled. It is widely used in the memory field. Since the DDR bus was originally designed to directly access DRAM memory particles, only ten Read and write access can be completed in a few to a few nanoseconds with a very short delay. Therefore, the effective delay ranges of the critical delay parameters CL/RL and CWL/WL specified in the DDR protocol are small. For example, the CL valid range in the DDR4 protocol is 9 to 24 clock cycles (as shown in Table 1 below), and the maximum value corresponds to 30 ns.
表1Table 1
A6A6 A5A5 A4A4 A2A2 CAS LatencyCAS Latency
00 00 00 00 99
00 00 00 11 1010
00 00 11 00 1111
00 00 11 11 1212
00 11 00 00 1313
00 11 00 11 1414
00 11 11 00 1515
00 11 11 11 1616
11 00 00 00 1818
11 00 00 11 2020
11 00 11 00 22twenty two
11 00 11 11 24twenty four
11 11 00 00 ReservedReserved
11 11 00 11 ReservedReserved
11 11 11 00 ReservedReserved
11 11 11 11 ReservedReserved
由于CPU中的内存控制器是基于JEDEC的协议设计和实现,能够设置的读写延迟同样较短。因此,直接在内存侧进行互连和内存/NVM访问的扩展会出现访问时序不满足协议要求,导致扩展存储设备无法和CPU正常通信。例如,如图2所示,当CPU首先发出ACT指令,再发出一个读命令(图中的读(READ)指令)后,扩展存储设备的反应时间只有t=tCL,若DDR存储设备不能在规定的时间内给出响应(例如,输出数据(Dout)),就会造成CPU采集到错误的数据,进而无法与扩展存储设备进行通信。Since the memory controller in the CPU is designed and implemented based on the JEDEC protocol, the read and write latency that can be set is also short. Therefore, the expansion of the interconnect and memory/NVM access directly on the memory side may result in an access timing that does not meet the protocol requirements, resulting in the extended storage device being unable to communicate with the CPU. For example, as shown in Figure 2, when the CPU first issues an ACT command and then issues a read command (read (READ) command), the response time of the extended storage device is only t = tCL, if the DDR storage device cannot be specified. Giving a response within the time (for example, output data (Dout)) causes the CPU to collect the wrong data and thus cannot communicate with the extended storage device.
现有技术提出利用DDR总线协议中保留的命令字段,扩展出提前读/写 命令PR1/PW1、PR2/PW2(如表2所示),在需要向扩展存储设备发起访问请求时,内存控制器先给出扩展的提前读/写命令,再给出常规的ACT指令及读指令或写指令。扩展存储设备根据接收到的提前读/写命令,执行读写访问,再根据正常的DDR读写命令给出响应。The prior art proposes to use the command field reserved in the DDR bus protocol to extend the read/write in advance. The commands PR1/PW1, PR2/PW2 (as shown in Table 2), when an access request needs to be initiated to the extended storage device, the memory controller first gives an extended read/write command, and then gives a regular ACT command and read. Instruction or write instruction. The extended storage device performs read and write access according to the received early read/write command, and then responds according to the normal DDR read/write command.
表2Table 2
Figure PCTCN2016094127-appb-000001
Figure PCTCN2016094127-appb-000001
因此,如图3a和图3b所示,现有技术中,每次进行读写访问的时候,都需要内存控制器提前发出PR1/PW1、PR2/PW2的指令,然后才是正常的ACT指令、读指令(RD)或写指令(WR),多余的PR1/PW1、PR2/PW2指令的操作需要占用较大的DDR访问带宽。Therefore, as shown in FIG. 3a and FIG. 3b, in the prior art, each time the read/write access is performed, the memory controller needs to issue the PR1/PW1, PR2/PW2 instructions in advance, and then the normal ACT command, Read command (RD) or write command (WR), the operation of redundant PR1/PW1, PR2/PW2 instructions requires a large DDR access bandwidth.
图4示出了根据本申请一个实施例的访问存储设备的方法200的示意图,该方法200可以由存储设备执行。该方法200包括:4 shows a schematic diagram of a method 200 of accessing a storage device, which may be performed by a storage device, in accordance with one embodiment of the present application. The method 200 includes:
S210,接收对该存储设备进行第一访问操作的第一行指令,该第一行指令携带第一访问地址,该第一访问地址包括第一行地址以及第一读写指示信息;S210, receiving a first row of instructions for performing a first access operation on the storage device, where the first row of instructions carries a first access address, where the first access address includes a first row address and first read/write indication information;
S220,根据该第一读写指示信息,确定该第一访问操作是读操作或写操作;S220. Determine, according to the first read/write indication information, that the first access operation is a read operation or a write operation;
S230,根据确定的第一访问操作,进行该确定的第一访问操作的准备操作,该准备操作用于该存储设备在预设时间阈值内完成该读操作或该写操作的准备过程;S230. Perform a preparation operation of the determined first access operation according to the determined first access operation, where the preparation operation is used by the storage device to complete the read operation or the preparation process of the write operation within a preset time threshold.
S240,接收对该存储设备进行该第一访问操作的列指令,该列指令携带列地址;S240. Receive a column instruction for performing the first access operation on the storage device, where the column instruction carries a column address.
S250,根据该第一行地址和该列地址,访问该存储设备中该第一行地址和该列地址对应的地址空间。 S250. Access the first row address and the address space corresponding to the column address in the storage device according to the first row address and the column address.
具体而言,存储设备接收ACT指令,ACT指令用于激活DDR中的某一行数据。该ACT指令携带第一访问地址,该第一访问地址包括第一行地址以及第一读写指示信息,存储设备根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间。Specifically, the storage device receives an ACT command, and the ACT command is used to activate a certain row of data in the DDR. The ACT command carries a first access address, where the first access address includes a first row address and first read/write indication information, and the storage device determines, according to the first read/write indication information, whether the access operation is a read operation or a write operation, and according to the The determining the access operation is performed to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address.
存储设备根据该第一读写指示信息确定对存储设备进行的访问操作为读操作(即访问指令为读指令)时,进行将数据发送出去所需的准备操作;存储设备根据该第一读写指示信息确定对存储设备进行的访问操作为写操作(即访问指令为写指令)时,进行将接收到的数据存储到的存储空间所需的准备操作。这样,该存储设备能够提前识别出即将对存储设备进行的访问操作进行读操作还是写操作。换句话说,存储设备根据第一读写指示信息能够提前获知访问指令为读指令或写指令,这样存储设备能够延长访问操作的响应的时间,即满足DDR协议要求在规定的时间内完成数据的读操作或写操作,从而该存储设备能够与CPU正常通信。The storage device determines, according to the first read/write indication information, that the access operation performed on the storage device is a read operation (that is, the access command is a read command), and performs a preparation operation required to send the data; the storage device reads and writes according to the first read/write The indication information determines that the access operation performed on the storage device is a write operation (ie, the access instruction is a write command), and a preparation operation required to store the received data into the storage space. In this way, the storage device can recognize in advance whether a read operation or a write operation is to be performed on the access operation performed by the storage device. In other words, the storage device can know in advance that the access instruction is a read command or a write command according to the first read/write indication information, so that the storage device can extend the response time of the access operation, that is, the DDR protocol is required to complete the data within the specified time. A read operation or a write operation so that the storage device can communicate normally with the CPU.
如图2所示,现有技术中,当CPU发出一个读命令(即CAS指令携带的读写指示信息)后,存储设备的反应时间即从接收到CAS指令计时只有t=tCL,由表1可知,CL≤20周期,但是扩展的存储设备一般的延迟都比较大,例如,FPGA设备在1600MT/s的速率下,RL需要28-30周期左右,无法满足标准的DDR协议的时延。FPGA设备在不同速率下,RL时延不同,具体的对应关系如表3所示。As shown in FIG. 2, in the prior art, when the CPU issues a read command (ie, the read/write indication information carried by the CAS command), the response time of the storage device is only t=tCL from the receipt of the CAS command, and is shown in Table 1. It can be seen that CL ≤ 20 cycles, but the extended storage device generally has a relatively large delay. For example, in an FPGA device at a rate of 1600 MT/s, the RL needs about 28-30 cycles, which cannot meet the delay of the standard DDR protocol. The FPGA device has different RL delays at different rates. The specific correspondence is shown in Table 3.
表3table 3
DDR4速率(MT/s)DDR4 rate (MT/s) RL延迟值(周期)RL delay value (cycle)
13331333 26~2826~28
16001600 28~3028~30
18661866 3232
21332133 3838
本发明实施例以FPGA存储设备的速率为1600MT/s为例进行说明,CPU通过ACT指令中携带的第一读写指示信息提前获知访问操作为读操作(或写操作)时,存储设备访问操作的反应时间可以扩展为ACT指令和CAS指 令之间的时间与CAS指令到数据出现在总线上(或数据存储到地址空间中)的时间之和,即t=tRCD+tCL(tCWL)。The embodiment of the present invention takes the rate of the FPGA storage device as 1600MT/s as an example. The CPU uses the first read/write indication information carried in the ACT command to know in advance that the access operation is a read operation (or a write operation), and the storage device access operation is performed. Reaction time can be extended to ACT instructions and CAS instructions The time between the command and the time when the CAS instruction to the data appears on the bus (or the data is stored in the address space), that is, t = tRCD + tCL (tCWL).
表4Table 4
Figure PCTCN2016094127-appb-000002
Figure PCTCN2016094127-appb-000002
例如,如表4所示RCD=10周期时,双倍数据速率的DDR4的速率为1600MT/s,实际速率为1600/2=800MT/s,即周期为1/800=1.25ns,也就是说,tCL=10*1.25=12.5ns。RCD的最小值为12.5ns(即10周期),没有最大值。所以RL=RCD+CL>30周期,从而能够满足28-30周期的要求,使得CPU能够与FPGA存储设备进行通信。For example, as shown in Table 4, when RCD=10 cycles, the double data rate DDR4 rate is 1600MT/s, and the actual rate is 1600/2=800MT/s, that is, the period is 1/800=1.25ns, that is, , tCL = 10 * 1.25 = 12.5 ns. The minimum value of RCD is 12.5 ns (ie 10 cycles) with no maximum. So RL = RCD + CL > 30 cycles, so that the requirements of 28-30 cycles can be met, enabling the CPU to communicate with the FPGA storage device.
应理解,本申请实施例中,对“命令”和“指令”不进行区分,即描述的含义是一致的。本申请实施例中的“访问指令”和“访问地址”即为通常描述的“访存指令”和“访存地址”,本申请实施例对此也不进行区分。It should be understood that, in the embodiment of the present application, the “command” and the “instruction” are not distinguished, that is, the meanings of the description are consistent. The "access command" and the "access address" in the embodiment of the present application are the "fetching instruction" and the "fetch address" which are generally described, and the embodiment of the present application does not distinguish this.
因此,本申请实施例的访问存储设备的方法,通过接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。此外,本申请实施例避免了CPU在发送行指令之前单独发送读写指令,减少了带宽占用。Therefore, the method for accessing the storage device in the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and according to the Determining the access operation to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage The device recognizes in advance whether the access operation is a read operation or a write operation, and prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
可选地,该第一读写指示信息包括至少一个字段;其中,该根据该第一读写指示信息,确定该第一访问操作是读操作或写操作包括:根据该至少一个字段的取值,确定该第一访问操作是读操作或写操作。Optionally, the first read/write indication information includes at least one field, where the determining, according to the first read/write indication information, that the first access operation is a read operation or a write operation comprises: determining, according to the value of the at least one field Determining whether the first access operation is a read operation or a write operation.
该第一读写指示信息可以是至少一个字段,存储设备可以根据该至少一个字段确定对该存储设备进行的访问操作是读操作还是写操作。该至少一个字段可以是访问地址的高位字段,存储设备可以通过在访问地址扩展的高位字段值的不同确定是读指令还是写指令,例如,若访问地址除包含行地址还 包括一个字段,该字段的值为0表示访问指令为写指令;该字段的值为1表示访问指令为读指令。The first read/write indication information may be at least one field, and the storage device may determine, according to the at least one field, whether the access operation performed on the storage device is a read operation or a write operation. The at least one field may be a high-order field of the access address, and the storage device may determine whether to be a read command or a write command by a difference in the value of the high-order field of the access address extension, for example, if the access address includes a row address A field is included, the value of which is 0 indicates that the access instruction is a write instruction; the value of this field indicates that the access instruction is a read instruction.
应理解,该至少一个字段为多个字段时,存储设备可以提前配置好该多个字段的值分别与访问指令的映射关系。It should be understood that, when the at least one field is a plurality of fields, the storage device may configure, in advance, a mapping relationship between the values of the multiple fields and the access instruction.
还应理解,该读写指示信息还可以是其他能够用于区分访问指令为读指令或写指令的指示信息,本申请对此不进行限定。It should also be understood that the read/write indication information may also be other indication information that can be used to distinguish the access instruction from a read command or a write command, which is not limited in this application.
可选地,存储设备还可以根据该第一读写指示信息的值是否属于该存储设备的地址空间确定对该存储设备的访问操作是读操作还是写操作。例如,存储设备将模组存在的串行检测(Serial Presence Detect,SPD)信息中预留的字节空间(即真实存在的存储空间)确定为写地址空间。第一读写指示信息为至少一个字段时,存储设备根据该至少一个字段的值是否属于写地址空间的地址范围,确定访问操作为读操作或写操作。若该至少一个字段的值属于写地址空间的地址范围,则确定该访问指令为写指令;若至少一个字段的值不属于写地址空间,则确定该访问指令为读指令。Optionally, the storage device may further determine whether the access operation of the storage device is a read operation or a write operation according to whether the value of the first read/write indication information belongs to an address space of the storage device. For example, the storage device determines the byte space reserved in the Serial Presence Detect (SPD) information of the module (that is, the real storage space) as the write address space. When the first read/write indication information is at least one field, the storage device determines whether the access operation is a read operation or a write operation according to whether the value of the at least one field belongs to an address range of the write address space. If the value of the at least one field belongs to the address range of the write address space, determining that the access instruction is a write instruction; if the value of the at least one field does not belong to the write address space, determining that the access instruction is a read instruction.
应理解,存储设备也可以将SPD信息中预留的字节空间确定为读地址空间,存储设备根据该至少一个字段的值是否属于读地址空间确定访问操作为读操作或写操作。若访问地址属于读地址空间,确定访问操作为读操作,否则为写操作。It should be understood that the storage device may also determine the byte space reserved in the SPD information as the read address space, and the storage device determines whether the access operation is a read operation or a write operation according to whether the value of the at least one field belongs to the read address space. If the access address belongs to the read address space, it is determined that the access operation is a read operation, otherwise it is a write operation.
需要说明的是,该至少一个字段为地址高位时,以低位地址(即行地址)为最大值计算该至少一个字段的值是否属于该存储设备的地址空间。It should be noted that, when the at least one field is the address high bit, the lower address (ie, the row address) is used as the maximum value to calculate whether the value of the at least one field belongs to the address space of the storage device.
可选地,该第一读写指示信息通过至少一个字段表示时,存储设备还可以根据该至少一个字段的取值确定一个虚拟的地址空间,存储设备还包括SPD信息中存储预留的字节空间(即真实存在的存储空间)。这样,存储设备包括两个地址空间,可以分别看作读地址空间和写地址空间。Optionally, when the first read/write indication information is represented by the at least one field, the storage device may further determine a virtual address space according to the value of the at least one field, where the storage device further includes the reserved byte in the SPD information. Space (that is, the real storage space). Thus, the storage device includes two address spaces, which can be regarded as a read address space and a write address space, respectively.
需要说明的是,该至少一个字段可以地址高位,以低位地址(即行地址)为最大值,根据该至少一个字段确定的地址空间实际为虚拟的空间,并不是该存储设备真正存在的空间。It should be noted that the at least one field may be a high address, and the lower address (ie, the row address) is a maximum value, and the address space determined according to the at least one field is actually a virtual space, and is not a space where the storage device actually exists.
存储设备根据该至少一个字段的值确定该访问地址属于写地址空间时,则被认为是写命令(即对存储设备进行写操作)。如图5a所示,FPGA实际的存储空间为0x00000000~0x0000FFFF。通过对存储空间的映射,使得CPU启动时,看到的存储空间如图5b所示,写地址空间为 0x00000000~0x0000FFFF,读地址空间为0x00010000~0x0001FFFF。When the storage device determines that the access address belongs to the write address space according to the value of the at least one field, it is considered to be a write command (ie, a write operation to the storage device). As shown in Figure 5a, the actual storage space of the FPGA is 0x00000000~0x0000FFFF. Through the mapping of the storage space, when the CPU starts, the storage space seen is as shown in FIG. 5b, and the write address space is 0x00000000~0x0000FFFF, the read address space is 0x00010000~0x0001FFFF.
具体地,在FPGA存储设备中可以设置2个Rank/Bank Group/Bank地址空间,读地址空间为Rank0/Bank Group0/Bank0地址,写地址空间为Rank1/Bank Group1/Bank1地址。在CPU的基本输入/输出系统(Basic Input/Output System,BIOS)启动的时候,把这两段地址空间映射到特定的地址空间段。假设FPGA存储设备内部的地址空间大小为0x10000,通过地址取值范围的不同来区分是读指令还是写指令。例如,读地址空间为0x00100000~0x0010ffff,写地址空间为0x00110000~0x0011ffff。可选地,读地址空间和写地址空间两者的区别可以仅在于地址的高位。Specifically, two Rank/Bank Group/Bank address spaces can be set in the FPGA storage device, the read address space is the Rank0/Bank Group0/Bank0 address, and the write address space is the Rank1/Bank Group1/Bank1 address. When the CPU's Basic Input/Output System (BIOS) is started, the two address spaces are mapped to a specific address space segment. Assume that the size of the address space inside the FPGA storage device is 0x10000, and distinguish whether it is a read command or a write command by the difference of the address range. For example, the read address space is 0x00100000 to 0x0010ffff, and the write address space is 0x00110000 to 0x0011ffff. Alternatively, the difference between the read address space and the write address space may be only the upper bits of the address.
再例如,假设真实的地址空间(即写地址空间)为0~10,读地址对应的地址空间(即虚拟地址空间)为10~20的,当ACT指令携带的访存地址中行地址为5,至少一个字段的值为10,即访问地址为15,其中的地址大于10表示该访存命令是读命令,而真正的读地址还是15-10=5,综合起来就是从地址为5的地址空间中读取数据;如果行地址为5,至少一个字段的值为0,则表示为写命令,将数据存储到地址为5的地址空间中。For example, if the real address space (ie, the write address space) is 0 to 10, the address space corresponding to the read address (ie, the virtual address space) is 10 to 20, and the row address of the memory address carried by the ACT command is 5, The value of at least one field is 10, that is, the access address is 15, wherein the address greater than 10 indicates that the memory access command is a read command, and the real read address is still 15-10=5, which is a combination address address 5 address space. The data is read; if the row address is 5 and the value of at least one field is 0, it is represented as a write command, and the data is stored in the address space of address 5.
FPGA内部的命令接口电路从命令地址总线上接收到高速的命令/地址串行数据后,先转换成低速的并行信号,经过时钟域转换电路后,进入命令译码电路,翻译出DDR的命令;执行单元判断是否是ACT命令,若是ACT命令,则根据ACT命令携带的第一读写指示信息,判断是读命令还是写命令。这样,存储设备根据该第一读写指示信息,可以提前确定出访问指令是读指令还是写指令。再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得存储设备能够延长从识别出访问指令到给出响应的时间,即满足DDR协议要求,从而该存储设备能够与CPU正常通信。The command interface circuit inside the FPGA receives the high-speed command/address serial data from the command address bus, and then converts it into a low-speed parallel signal. After passing through the clock domain conversion circuit, it enters the command decoding circuit and translates the DDR command. The execution unit determines whether it is an ACT command. If it is an ACT command, it determines whether it is a read command or a write command according to the first read/write indication information carried in the ACT command. In this way, the storage device can determine in advance whether the access instruction is a read command or a write command according to the first read/write indication information. Receiving the column instruction carrying the column address and accessing the address space corresponding to the row address and the column address, so that the storage device can extend the time from the recognition of the access command to the response, that is, the DDR protocol requirement is met, so that the storage device can The CPU communicates normally.
可选地,在本申请一个实施例中,该根据确定的第一访问操作,进行该确定的访问操作的准备操作包括:根据该确定的第一访问操作,配置该存储设备的数据接口传输方向,该数据接口传输方向包括输入方向和输出方向。Optionally, in an embodiment of the present application, the preparing operation of performing the determined access operation according to the determined first access operation includes: configuring a data interface transmission direction of the storage device according to the determined first access operation The data interface transmission direction includes an input direction and an output direction.
具体而言,存储设备根据ACT指令携带的第一读写指示信息,可以提前确定对该存储设备进行的访问操作,并进行该访问操作的准备操作。该准备操作可以是打开数据收发接口,以及调整数据收发接口的数据传输方向等。具体地,若存储设备根据该第一读写指示信息确定对该存储设备的访问操作为读操作,则存储设备调整数据收发接口为发送状态。若存储设备根据 该第一读写指示信息确定对该存储设备的访问操作为写操作,则存储设备调整数据收发接口为接收状态。Specifically, the storage device may determine an access operation performed on the storage device in advance according to the first read/write indication information carried in the ACT command, and perform a preparation operation of the access operation. The preparation operation may be to open a data transceiving interface, and adjust a data transmission direction of the data transceiving interface. Specifically, if the storage device determines that the access operation to the storage device is a read operation according to the first read/write indication information, the storage device adjusts the data transceiving interface to a sending status. If the storage device is based on The first read/write indication information determines that the access operation to the storage device is a write operation, and the storage device adjusts the data transceiving interface to a receiving state.
可选地,在本申请一个实施例中,该方法还包括:接收对该存储设备进行第二访问操作的第二行指令,该第二行指令携带第二访问地址,该第二访问地址包括第二行地址以及第二读写指示信息;根据该第二读写指示信息,确定该第二访问操作是读操作或写操作;根据该第二读写指示信息确定的第二访问操作与该第一读写指示信息确定的第一访问操作是否相同,确定是否修改该存储设备的数据接口传输方向;若根据该第二读写指示信息确定的第二访问操作与该第一读写指示信息确定的第一访问操作相同,确定不修改该存储设备的数据接口传输方向。Optionally, in an embodiment of the present application, the method further includes: receiving a second row of instructions for performing a second access operation on the storage device, where the second row of instructions carries a second access address, where the second access address includes The second row address and the second read/write indication information; determining, according to the second read/write indication information, that the second access operation is a read operation or a write operation; and the second access operation determined according to the second read/write indication information Whether the first access operation determined by the first read/write indication information is the same, determining whether to modify the data interface transmission direction of the storage device; and determining the second access operation and the first read/write indication information according to the second read/write indication information The determined first access operation is the same, and it is determined that the data interface transmission direction of the storage device is not modified.
具体而言,存储设备完成一次访问操作(表示为第一访问操作)之后,会记录第一访问操作最终执行的是读操作还是写操作。存储设备接收到下一个对该存储设备进行访问操作(表示为第二访问操作)的第二行指令,该第二行指令与第一行指令类似携带有第二访问地址,且该第二访问地址包括第二行地址和第二读写指示信息,存储设备根据该第二读写指示信息确定该第二访问操作为读操作还写操作。此时,存储设备可以根据第二读写指示信息确定的第二访问操作与存储的第一访问操作是否相同,确定是否需要修改存储设备数据接口的传输方向。Specifically, after the storage device completes an access operation (represented as the first access operation), it records whether the first access operation finally performs a read operation or a write operation. Receiving, by the storage device, a second row of instructions for performing an access operation (represented as a second access operation) to the storage device, the second row of instructions carrying a second access address similar to the first row of instructions, and the second access The address includes a second row address and a second read/write indication information, and the storage device determines, according to the second read/write indication information, that the second access operation is a read operation and a write operation. At this time, whether the second access operation determined by the storage device according to the second read/write indication information is the same as the stored first access operation, determining whether the transmission direction of the storage device data interface needs to be modified.
若存储设备根据第二读写指示信息确定的访问操作与根据第一读写指示信息确定的访问操作相同时,则不需要修改数据接口的传输方向;若第二读写指示信息确定的访问操作与第一读写指示信息确定的访问操作不相同时,这时候才需要进行调整数据接口的传输方向。这样,在若第二读写指示信息确定的访问操作与第一读写指示信息确定的访问操作相同时,存储设备可以进一步减少操作步骤,降低功耗。If the access operation determined by the storage device according to the second read/write indication information is the same as the access operation determined according to the first read/write indication information, the transmission direction of the data interface does not need to be modified; if the second read/write indication information determines the access operation When the access operation determined by the first read/write indication information is different, it is necessary to adjust the transmission direction of the data interface at this time. In this way, when the access operation determined by the second read/write indication information is the same as the access operation determined by the first read/write indication information, the storage device can further reduce the operation steps and reduce the power consumption.
可选地,在本申请一个实施例中,存储设备接收到携带行地址和第一读写指示信息的ACT指令后,还会接收到CAS指令(即列指令),且该CAS指令也会携带读写指示信息(表示为第三读写指示信息),该第三读写指示信息用于确定对存储设备进行的访问操作为读操作或写操作。因此,存储设备在接收到CAS指令后,可以根据第一读写指示信息确定的访问指令与根据第二读写指示信息确定的访问指令是否相同,确定是否能够访问存储设备的地址空间。若根据第一读写指示信息确定的访问操作与第三读写指示信息 确定的访问操作相同,则存储设备访问ACT携带的行地址和CAS携带的列地址对应的存储空间。本申请实施例存储设备能够提前识别出读写指令,提前启动读写访问操作,提高了总线传输效率和CPU处理效率。Optionally, in an embodiment of the present application, after receiving the ACT command that carries the row address and the first read/write indication information, the storage device further receives the CAS command (ie, the column command), and the CAS command also carries The read/write indication information (represented as the third read/write indication information) is used to determine that the access operation performed on the storage device is a read operation or a write operation. Therefore, after receiving the CAS command, the storage device may determine whether the access address of the storage device can be accessed according to whether the access command determined according to the first read/write indication information is the same as the access command determined according to the second read/write indication information. If the access operation and the third read/write indication information are determined according to the first read/write indication information If the determined access operation is the same, the storage device accesses the storage address corresponding to the row address carried by the ACT and the column address carried by the CAS. The storage device of the embodiment of the present application can recognize the read/write instruction in advance, and start the read/write access operation in advance, thereby improving the bus transmission efficiency and the CPU processing efficiency.
可选地,在本申请一个实施例中,如果存储设备根据ACT指令携带的第一读写指示信息确定的访问操作,和根据后续的CAS指令携带的第二读写指示信息确定的访问操作不一致时,则存储设备给出此次DDR访问异常的信息,通过纠错码(Error Correction Code,ECC)或者Alert_n管脚信息通知CPU。Optionally, in an embodiment of the present application, if the access operation determined by the storage device according to the first read/write indication information carried by the ACT command is inconsistent with the access operation determined according to the second read/write indication information carried by the subsequent CAS command, When the storage device gives the information of the DDR access exception, the CPU is notified by an Error Correction Code (ECC) or an Alert_n pin information.
CPU在接收到ECC错误或Alert_n的错误指示时,判断访问的存储空间是否符合访问的特性,进行修正后继续访问。When receiving an error indication of ECC error or Alert_n, the CPU determines whether the accessed storage space conforms to the access characteristics, and performs the correction to continue the access.
因此,本申请实施例的访问存储设备的方法,通过接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。此外,本申请实施例避免了CPU在发送行指令之前单独发送读写指令,减少了带宽占用。Therefore, the method for accessing the storage device in the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and according to the Determining the access operation to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage The device recognizes in advance whether the access operation is a read operation or a write operation, and prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
图6示出了根据本申请一个实施例的访问存储设备的方法的交互流程图。本申请实施例中的各种术语的含义与前述各实施例相同。FIG. 6 illustrates an interaction flow diagram of a method of accessing a storage device in accordance with one embodiment of the present application. The meanings of the various terms in the embodiments of the present application are the same as those of the foregoing embodiments.
应注意,这只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。It should be noted that this is only to help those skilled in the art to better understand the embodiments of the present application, and not to limit the scope of the embodiments of the present application.
310,CPU在第一ACT指令上携带第一访问地址,该第一访问地址包括第一行地址以及第一读写指示信息。310. The CPU carries a first access address on the first ACT command, where the first access address includes a first row address and first read/write indication information.
320,CPU向存储设备发送第一ACT指令。320. The CPU sends a first ACT command to the storage device.
330,存储设备根据该第一读写指示信息,配置数据收发接口的传输方向。330. The storage device configures a transmission direction of the data transceiving interface according to the first read/write indication information.
存储设备根据第一读写指示信息,确定第一访问操作为读操作还是写操作,并根据确定的第一访问操作配置对应的数据收发接口的传输方向。若第一访问操作为读操作,则存储设备调整数据收发接口为发送状态。若第一访问操作为写操作,则存储设备调整数据收发接口为接收状态。 The storage device determines whether the first access operation is a read operation or a write operation according to the first read/write indication information, and configures a transmission direction of the corresponding data transceiving interface according to the determined first access operation. If the first access operation is a read operation, the storage device adjusts the data transceiving interface to a transmit status. If the first access operation is a write operation, the storage device adjusts the data transceiving interface to a receiving state.
340,CPU向存储设备发送第一CAS指令,该CAS指令携带第一列地址。340. The CPU sends a first CAS instruction to the storage device, where the CAS instruction carries the first column address.
存储设备接收到携带第一读写指示信息的第一ACT指令后,还会接收到第一CAS指令,且该第一CAS指令携带列地址。After receiving the first ACT instruction carrying the first read/write indication information, the storage device also receives the first CAS instruction, and the first CAS instruction carries the column address.
350,存储设备根据第一行地址和第一列地址,访问第一行地址和第一列地址对应的地址空间。350. The storage device accesses the address space corresponding to the first row address and the first column address according to the first row address and the first column address.
360,CPU在第二ACT指令上携带第二访问地址,该第二访问地址包括第二行地址以及第二读写指示信息。360. The CPU carries a second access address on the second ACT instruction, where the second access address includes a second row address and second read/write indication information.
370,CPU向存储设备发送第二ACT指令。370. The CPU sends a second ACT command to the storage device.
380,存储设备根据该第一读写指示信息确定的访问操作与第二读写指示信息确定的访问操作是否相同,确定是否修改数据接口的传输方向。380. Determine whether the access operation determined by the storage device according to the first read/write indication information is the same as the access operation determined by the second read/write indication information, and determine whether to modify the transmission direction of the data interface.
若不同,则需要配置合适的数据接口的传输方向,若相同,则不需要修改数据接口的传输方向,存储设备可以进一步减少操作步骤,降低功耗。If they are different, you need to configure the transmission direction of the appropriate data interface. If they are the same, you do not need to modify the transmission direction of the data interface. The storage device can further reduce the operation steps and reduce power consumption.
390,CPU向存储设备发送第二CAS指令,该第二CAS指令携带第二列地址。390. The CPU sends a second CAS instruction to the storage device, where the second CAS instruction carries the second column address.
400,CPU根据第二行地址和第二列地址,访问第二行地址和第二列地址对应的地址空间。400. The CPU accesses the address space corresponding to the second row address and the second column address according to the second row address and the second column address.
应理解,上述相应信息的具体指示方式可参考前述各实施例,为了简洁,在此不再赘述。It should be understood that the foregoing specific manners of the corresponding information may refer to the foregoing embodiments, and are not described herein for brevity.
因此,本申请实施例的访问存储设备的方法,通过接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。此外,本申请实施例避免了CPU在发送行指令之前单独发送读写指令,减少了带宽占用。Therefore, the method for accessing the storage device in the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and according to the Determining the access operation to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage The device recognizes in advance whether the access operation is a read operation or a write operation, and prolongs the response time of the storage device for reading and writing operations, thereby enabling communication with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in the various embodiments of the present application, the size of the sequence numbers of the foregoing processes does not mean the order of execution sequence, and the order of execution of each process should be determined by its function and internal logic, and should not be applied to the embodiment of the present application. The implementation process constitutes any limitation.
上文中详细描述了根据本申请实施例的访问存储设备的方法,下面将描 述根据本申请实施例的存储设备。A method of accessing a storage device according to an embodiment of the present application is described in detail above, which will be described below. A storage device according to an embodiment of the present application.
图7示出了根据本申请实施例的存储设备500的示意性框图。如图7所示,该存储设备500包括:FIG. 7 shows a schematic block diagram of a memory device 500 in accordance with an embodiment of the present application. As shown in FIG. 7, the storage device 500 includes:
第一接收模块510,用于接收对该存储设备进行第一访问操作的第一行指令,该第一行指令携带第一访问地址,该第一访问地址包括第一行地址以及第一读写指示信息;The first receiving module 510 is configured to receive a first row of instructions for performing a first access operation on the storage device, where the first row of instructions carries a first access address, where the first access address includes a first row address and a first read and write address Indication information;
第一确定模块520,用于根据该第一读写指示信息,确定该第一访问操作是读操作或写操作;The first determining module 520 is configured to determine, according to the first read/write indication information, that the first access operation is a read operation or a write operation;
第一处理模块530,用于根据该第一确定模块520确定的第一访问操作,进行该确定的第一访问操作的准备操作,该准备操作用于该存储设备在预设时间阈值内完成该读操作或该写操作的准备过程;The first processing module 530 is configured to perform a preparation operation of the determined first access operation according to the first access operation determined by the first determining module 520, where the preparing operation is used by the storage device to complete the preset time threshold. a read operation or a preparation process of the write operation;
第二接收模块540,用于接收对该存储设备进行该第一访问操作的列指令,该列指令携带列地址;a second receiving module 540, configured to receive a column instruction for performing the first access operation on the storage device, where the column instruction carries a column address;
第二处理模块550,用于根据该第一行地址和该列地址,访问该存储设备中该第一行地址和该列地址对应的地址空间。The second processing module 550 is configured to access the first row address and the address space corresponding to the column address in the storage device according to the first row address and the column address.
因此,本申请实施例提供的存储设备,通过接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。此外,本申请实施例避免了CPU在发送行指令之前单独发送读写指令,减少了带宽占用。Therefore, the storage device provided by the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and determining according to the determined The access operation is performed to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage device is advanced It is recognized whether the access operation is a read operation or a write operation, which prolongs the response time of the storage device for reading and writing operations, and thus can communicate with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
可选地,在本申请一个实施例中,该第一处理模块530具体用于:根据该确定的第一访问操作,配置该存储设备的数据接口传输方向,该数据接口传输方向包括输入方向和输出方向。Optionally, in an embodiment of the present application, the first processing module 530 is specifically configured to: configure a data interface transmission direction of the storage device according to the determined first access operation, where the data interface transmission direction includes an input direction and Output direction.
可选地,在本申请一个实施例中,该第一读写指示信息包括至少一个字段;该第一确定模块520具体用于:根据该至少一个字段的取值,确定该第一访问操作是读操作或写操作。Optionally, in an embodiment of the present application, the first read/write indication information includes at least one field; the first determining module 520 is specifically configured to: determine, according to the value of the at least one field, that the first access operation is Read or write operation.
可选地,在本申请一个实施例中,该存储设备500还包括:第三接收模块,用于接收对该存储设备进行第二访问操作的第二行指令,该第二行指令 携带第二访问地址,该第二访问地址包括第二行地址以及第二读写指示信息;第二确定模块,用于根据该第二读写指示信息,确定该第二访问操作是读操作或写操作;第三确定模块,用于根据确定的第二访问操作与该确定的第一访问操作是否相同,确定是否修改该存储设备的接口传输方向;第三处理模块,若根据该确定的第二访问操作与该确定的第一访问操作相同,用于确定不修改该存储设备的接口传输方向。Optionally, in an embodiment of the present application, the storage device 500 further includes: a third receiving module, configured to receive a second row of instructions for performing a second access operation on the storage device, the second row of instructions Carrying a second access address, where the second access address includes a second row address and a second read/write indication information, and the second determining module is configured to determine, according to the second read/write indication information, that the second access operation is a read operation or a third determining module, configured to determine whether to modify an interface transmission direction of the storage device according to whether the determined second access operation is the same as the determined first access operation; and the third processing module, according to the determining The second access operation is the same as the determined first access operation, and is used to determine that the interface transmission direction of the storage device is not modified.
根据本申请实施例的存储设备500可对应于根据本申请实施例的访问存储设备的方法的存储设备,并且存储设备500中的各个模块的上述和其它操作和/或功能分别为了实现前述各个方法的相应流程,为了简洁,在此不再赘述。The storage device 500 according to an embodiment of the present application may correspond to a storage device of a method of accessing a storage device according to an embodiment of the present application, and the above-described and other operations and/or functions of respective modules in the storage device 500 respectively implement the foregoing respective methods The corresponding process, for the sake of brevity, will not be described here.
因此,本申请实施例提供的存储设备,通过接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。此外,本申请实施例避免了CPU在发送行指令之前单独发送读写指令,减少了带宽占用。Therefore, the storage device provided by the embodiment of the present application determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction carrying the first read/write indication information and the row address, and determining according to the determined The access operation is performed to enable the storage device to complete the preparation operation of the determined access operation within a preset time threshold, receive the column instruction carrying the column address, and access the address space corresponding to the row address and the column address, so that the storage device is advanced It is recognized whether the access operation is a read operation or a write operation, which prolongs the response time of the storage device for reading and writing operations, and thus can communicate with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
图8示出了本申请的访问存储设备的系统700,该系统700包括:CPU702、本申请实施例的存储设备500,至少一个网络接口705或者其他通信接口,和至少一个通信总线703,用于实现各设备之间的连接通信。通过至少一个网络接口(可以是有线或者无线)实现与至少一个其他网元之间的通信连接。8 shows a system 700 for accessing a storage device of the present application, the system 700 comprising: a CPU 702, a storage device 500 of the embodiment of the present application, at least one network interface 705 or other communication interface, and at least one communication bus 703 for Achieve connection communication between devices. A communication connection with at least one other network element is achieved by at least one network interface, which may be wired or wireless.
应理解,在本申请实施例中,该处理器702还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何读写延迟较短的处理器等。It should be understood that, in the embodiment of the present application, the processor 702 may be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (Application Specific Integrated Circuit), or other programmable logic device. , discrete gates or transistor logic devices, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any processor with a short read and write delay.
该通信总线703除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等,该702和该存储设备500还可以通过其他类型的总线进行通信,例如,光纤或光波导等,但是为了清楚说明起见,在图中将各种总 线都标为通信总线703。The communication bus 703 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. The 702 and the storage device 500 may also communicate through other types of buses, such as optical fibers or optical waveguides. But for the sake of clarity, the various totals in the picture The lines are all labeled as communication bus 703.
本申请实施例还提供一种计算机存储介质,该计算机存储介质可以存储用于指示上述任一种方法的程序指令。The embodiment of the present application further provides a computer storage medium, which can store program instructions for indicating any of the above methods.
可选地,该存储介质具体可以为存储设备500。Optionally, the storage medium may be specifically the storage device 500.
如图9所示,本申请实施例还提供了一种存储设备800,该存储设备800为用于执行上述访问存储设备的方法功能的硬件设备。As shown in FIG. 9 , the embodiment of the present application further provides a storage device 800, which is a hardware device for performing the foregoing method function of accessing a storage device.
该存储设备800包括接口模块801,至少一个时钟域转换电路模块802,命令译码和执行模块803,以及数据存储模块804。接口模块101还包括数据接口模块和命令地址接口模块,其中数据接口模块还包括接收部分和发送部分。数据接口模块的接收部分主要是采样接收从高速总线接口上的数据等高速串行信号,并进行串并转换,转换成速度相对低的并行信号;数据接口模块的发送部分主要是从FPGA内部接收数据,进行并串转换,调制等,然后发送到高速总线接口上。命令地址接口模块的接收部分主要是采样接收从高速总线接口上的地址和命令数据等高速串行信号,并进行串并转换,转换成速度相对低的并行信号。时钟域转换电路102是把信号从接口电路时钟域转化成FPGA内部时钟域,或者把信号从FPGA内部时钟域转换到接口电路时钟域中,因为在硬件电路中,其信号必须要与该部分的时钟信号相匹配,否则会出现信号采样错误发生。命令译码和执行模块803对命令总线上的命令和地址进行译码,以翻译出正确的DDR的命令序列,并根据内部的状态执行相应的命令。数据存储模块804用于存储读写的数据。The storage device 800 includes an interface module 801, at least one clock domain conversion circuit module 802, a command decode and execution module 803, and a data storage module 804. The interface module 101 further includes a data interface module and a command address interface module, wherein the data interface module further includes a receiving portion and a transmitting portion. The receiving part of the data interface module mainly samples and receives high-speed serial signals such as data from the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals with relatively low speed; the transmitting part of the data interface module mainly receives from the inside of the FPGA. Data, parallel and serial conversion, modulation, etc., are then sent to the high speed bus interface. The receiving part of the command address interface module mainly samples and receives high-speed serial signals such as addresses and command data from the high-speed bus interface, and performs serial-to-parallel conversion to convert into parallel signals with relatively low speed. The clock domain conversion circuit 102 converts the signal from the interface circuit clock domain to the FPGA internal clock domain, or converts the signal from the FPGA internal clock domain to the interface circuit clock domain, because in the hardware circuit, its signal must be associated with the portion of the The clock signals match, otherwise a signal sampling error will occur. The command decode and execute module 803 decodes the command and address on the command bus to translate the correct DDR command sequence and execute the corresponding command based on the internal state. The data storage module 804 is configured to store read and write data.
该存储设备800通过命令地址接口接收对所述存储设备进行第一访问操作的第一行指令,并通过时钟域转换电路802传输到命令译码和执行模块803,命令译码和执行模块803翻译出该第一行指令携带第一访问地址,该第一访问地址包括第一行地址以及第一读写指示信息,并根据该第一读写指示信息,确定该第一访问操作是读操作或写操作,以及根据确定的第一访问操作,进行该第一访问操作的准备操作,通过命令地址接口接收对所述存储设备进行第一访问操作的列指令,并通过时钟域转换电路802传输到命令译码和执行模块803,命令译码和执行模块803翻译出该第一列指令携带列地址,数据存储模块804根据该第一行地址和列地址访问存设备中第一行地址和列地址对应的地址空间。例如,将数据存储到第一行地址和列地址对应的地址空间中,或者是将第一行地址和列地址对应的地址空间中的数据发送出 去。The storage device 800 receives a first row of instructions for performing a first access operation on the storage device through a command address interface, and transmits the command to the command decoding and execution module 803 via the clock domain conversion circuit 802, and the command decoding and execution module 803 translates The first access address carries the first access address, and the first access address includes the first row address and the first read/write indication information, and determines, according to the first read/write indication information, that the first access operation is a read operation or a write operation, and performing a preparation operation of the first access operation according to the determined first access operation, receiving a column instruction for performing the first access operation on the storage device through the command address interface, and transmitting to the clock domain conversion circuit 802 The command decoding and execution module 803, the command decoding and execution module 803 translates the first column instruction to carry the column address, and the data storage module 804 accesses the first row address and the column address in the storage device according to the first row address and the column address. The corresponding address space. For example, storing data in an address space corresponding to a first row address and a column address, or sending data in an address space corresponding to a first row address and a column address go with.
可选地,作为一个实施例,命令译码和执行模块803对访问操作进行准备操作包括配置接口模块801数据的传输方向,Optionally, as an embodiment, the command decoding and execution module 803 performs a preparation operation for the access operation, including configuring a data transmission direction of the interface module 801,
可选地,作为一个实施例,该第一读写指示信息包括至少一个字段,命令译码和执行模块803还用于根据该至少一个字段的取值,确定该第一访问操作是读操作或写操作。Optionally, as an embodiment, the first read/write indication information includes at least one field, and the command decoding and execution module 803 is further configured to determine, according to the value of the at least one field, that the first access operation is a read operation or Write operation.
可选地,作为一个实施例,该存储设备800通过命令地址接口接收对该存储设备进行第二访问操作的第二行指令,该第二行指令携带第二访问地址,并通过时钟域转换电路802传输到命令译码和执行模块803,命令译码和执行模块803翻译出该第二访问地址包括第二行地址以及第二读写指示信息,并根据该第二读写指示信息,确定该第二访问操作是读操作或写操作,以及根据确定的第二访问操作与该确定的第一访问操作是否相同,确定是否修改接口模块801数据的传输方向,若根据该确定的第二访问操作与该确定的第一访问操作相同,确定不修改该存储设备的数据接口传输方向。Optionally, as an embodiment, the storage device 800 receives a second row of instructions for performing a second access operation on the storage device by using a command address interface, where the second row instruction carries a second access address and passes through a clock domain conversion circuit. 802 is transmitted to the command decoding and execution module 803, and the command decoding and execution module 803 translates the second access address to include the second row address and the second read/write indication information, and determines the second read/write indication information according to the second read/write indication information. The second access operation is a read operation or a write operation, and determining whether to modify the transmission direction of the data of the interface module 801 according to whether the determined second access operation is the same as the determined first access operation, if the second access operation is determined according to the determination As with the determined first access operation, it is determined that the data interface transmission direction of the storage device is not modified.
从本申请实施例提供的以上技术方案可以看出,存储设备通过接收携带第一读写指示信息和行地址的行指令,根据该第一读写指示信息确定该访问操作是读操作还是写操作,并根据确定的访问操作进行能够使得该存储设备在预设时间阈值内完成该确定的访问操作的准备操作,再接收携带列地址的列指令,并访问行地址和列地址对应的地址空间,使得该存储设备提前识别出访问操作是读操作还是写操作,延长了存储设备进行读写操作的响应时间,进而能够与CPU进行通信。此外,本申请实施例避免了CPU在发送行指令之前单独发送读写指令,减少了带宽占用。It can be seen from the above technical solution provided by the embodiment of the present application that the storage device determines whether the access operation is a read operation or a write operation according to the first read/write indication information by receiving a line instruction that carries the first read/write indication information and the row address. And performing, according to the determined access operation, a preparation operation that enables the storage device to complete the determined access operation within a preset time threshold, receiving a column instruction carrying the column address, and accessing an address space corresponding to the row address and the column address, The storage device is configured to recognize in advance whether the access operation is a read operation or a write operation, thereby prolonging the response time of the storage device for reading and writing operations, and thereby being able to communicate with the CPU. In addition, the embodiment of the present application avoids that the CPU separately sends the read/write instruction before sending the line instruction, thereby reducing bandwidth occupation.
应理解,本申请中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。It should be understood that the specific examples in the present application are only intended to help those skilled in the art to better understand the embodiments of the present application, and do not limit the scope of the embodiments of the present application.
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" herein is merely an association relationship describing an associated object, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, and A and B exist simultaneously. There are three cases of B alone. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。 It should be understood that, in the various embodiments of the present application, the size of the sequence numbers of the foregoing processes does not mean the order of execution sequence, and the order of execution of each process should be determined by its function and internal logic, and should not be applied to the embodiment of the present application. The implementation process constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光 盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including The instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or a light. A medium such as a disk that can store program code.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以该权利要求的保护范围为准。 The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application. It should be covered by the scope of protection of this application. Therefore, the scope of protection of this application is subject to the scope of protection of the claims.

Claims (12)

  1. 一种访问存储设备的方法,其特征在于,包括:A method for accessing a storage device, comprising:
    接收对所述存储设备进行第一访问操作的第一行指令,所述第一行指令携带第一访问地址,所述第一访问地址包括第一行地址以及第一读写指示信息;Receiving a first row of instructions for performing a first access operation on the storage device, the first row of instructions carrying a first access address, where the first access address includes a first row address and first read/write indication information;
    根据所述第一读写指示信息,确定所述第一访问操作是读操作或写操作;Determining, according to the first read/write indication information, that the first access operation is a read operation or a write operation;
    根据确定的第一访问操作,进行所述确定的第一访问操作的准备操作,所述准备操作用于所述存储设备在预设时间阈值内完成所述读操作或所述写操作的准备过程;Performing a preparation operation of the determined first access operation according to the determined first access operation, where the preparation operation is used by the storage device to complete the read operation or the preparation process of the write operation within a preset time threshold ;
    接收对所述存储设备进行所述第一访问操作的列指令,所述列指令携带列地址;Receiving a column instruction for performing the first access operation on the storage device, the column instruction carrying a column address;
    根据所述第一行地址和所述列地址,访问所述存储设备中所述第一行地址和所述列地址对应的地址空间。And accessing, by the first row address and the column address, an address space corresponding to the first row address and the column address in the storage device.
  2. 根据权利要求1所述的方法,其特征在于,所述根据确定的第一访问操作,进行所述确定的访问操作的准备操作包括:The method according to claim 1, wherein the preparing operation for performing the determined access operation according to the determined first access operation comprises:
    根据所述确定的第一访问操作,配置所述存储设备的数据接口传输方向,所述数据接口传输方向包括输入方向和输出方向。And configuring, according to the determined first access operation, a data interface transmission direction of the storage device, where the data interface transmission direction includes an input direction and an output direction.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一读写指示信息包括至少一个字段;The method according to claim 1 or 2, wherein the first read/write indication information comprises at least one field;
    其中,所述根据所述第一读写指示信息,确定所述第一访问操作是读操作或写操作包括:The determining, according to the first read/write indication information, that the first access operation is a read operation or a write operation includes:
    根据所述至少一个字段的取值,确定所述第一访问操作是所述读操作或所述写操作。Determining, according to the value of the at least one field, that the first access operation is the read operation or the write operation.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, further comprising:
    接收对所述存储设备进行第二访问操作的第二行指令,所述第二行指令携带第二访问地址,所述第二访问地址包括第二行地址以及第二读写指示信息;Receiving a second row of instructions for performing a second access operation on the storage device, the second row of instructions carrying a second access address, the second access address comprising a second row address and second read/write indication information;
    根据所述第二读写指示信息,确定所述第二访问操作是所述读操作或所述写操作; Determining, according to the second read/write indication information, that the second access operation is the read operation or the write operation;
    根据确定的第二访问操作与所述确定的第一访问操作是否相同,确定是否修改所述存储设备的数据接口传输方向;Determining whether to modify a data interface transmission direction of the storage device according to whether the determined second access operation is the same as the determined first access operation;
    在所述确定的第二访问操作与所述确定的第一访问操作相同时,确定不修改所述存储设备的数据接口传输方向。And determining that the data interface transmission direction of the storage device is not modified when the determined second access operation is the same as the determined first access operation.
  5. 一种存储设备,其特征在于,包括:A storage device, comprising:
    第一接收模块,用于接收对所述存储设备进行第一访问操作的第一行指令,所述第一行指令携带第一访问地址,所述第一访问地址包括第一行地址以及第一读写指示信息;a first receiving module, configured to receive a first row of instructions for performing a first access operation on the storage device, where the first row of instructions carries a first access address, where the first access address includes a first row address and a first Read and write indication information;
    第一确定模块,用于根据所述第一读写指示信息,确定所述第一访问操作是读操作或写操作;a first determining module, configured to determine, according to the first read/write indication information, that the first access operation is a read operation or a write operation;
    第一处理模块,用于根据所述第一确定模块确定的第一访问操作,进行所述确定的第一访问操作的准备操作,所述准备操作用于所述存储设备在预设时间阈值内完成所述读操作或所述写操作的准备过程;a first processing module, configured to perform a preparation operation of the determined first access operation according to the first access operation determined by the first determining module, where the preparing operation is used by the storage device within a preset time threshold Completing the read operation or the preparation process of the write operation;
    第二接收模块,用于接收对所述存储设备进行所述第一访问操作的列指令,所述列指令携带列地址;a second receiving module, configured to receive a column instruction for performing the first access operation on the storage device, where the column instruction carries a column address;
    第二处理模块,用于根据所述第一行地址和所述列地址,访问所述存储设备中所述第一行地址和所述列地址对应的地址空间。The second processing module is configured to access the address space corresponding to the first row address and the column address in the storage device according to the first row address and the column address.
  6. 根据权利要求5所述的存储设备,其特征在于,所述第一处理模块具体用于:The storage device according to claim 5, wherein the first processing module is specifically configured to:
    根据所述确定的第一访问操作,配置所述存储设备的数据接口传输方向,所述数据接口传输方向包括输入方向和输出方向。And configuring, according to the determined first access operation, a data interface transmission direction of the storage device, where the data interface transmission direction includes an input direction and an output direction.
  7. 根据权利要求5或6所述的存储设备,其特征在于,所述第一读写指示信息包括至少一个字段;The storage device according to claim 5 or 6, wherein the first read/write indication information includes at least one field;
    所述第一确定模块具体用于:The first determining module is specifically configured to:
    根据所述至少一个字段的取值,确定所述第一访问操作是所述读操作或所述写操作。Determining, according to the value of the at least one field, that the first access operation is the read operation or the write operation.
  8. 根据权利要求5至7中任一项所述的存储设备,其特征在于,所述存储设备还包括:The storage device according to any one of claims 5 to 7, wherein the storage device further comprises:
    第三接收模块,用于接收对所述存储设备进行第二访问操作的第二行指令,所述第二行指令携带第二访问地址,所述第二访问地址包括第二行地址以及第二读写指示信息; a third receiving module, configured to receive a second row of instructions for performing a second access operation on the storage device, where the second row of instructions carries a second access address, the second access address includes a second row address, and a second Read and write indication information;
    第二确定模块,用于根据所述第二读写指示信息,确定所述第二访问操作是所述读操作或所述写操作;a second determining module, configured to determine, according to the second read/write indication information, that the second access operation is the read operation or the write operation;
    第三确定模块,用于根据确定的第二访问操作与所述确定的第一访问操作是否相同,确定是否修改所述存储设备的数据接口传输方向;a third determining module, configured to determine whether to modify a data interface transmission direction of the storage device according to whether the determined second access operation is the same as the determined first access operation;
    第三处理模块,在所述确定的第二访问操作与所述确定的第一访问操作相同时,用于确定不修改所述存储设备的数据接口传输方向。And the third processing module is configured to determine not to modify a data interface transmission direction of the storage device when the determined second access operation is the same as the determined first access operation.
  9. 一种存储设备,其特征在于,包括:命令译码和执行模块、命令地址接口模块、时钟域转换电路模块、数据接口模块和数据存储模块;A storage device, comprising: a command decoding and execution module, a command address interface module, a clock domain conversion circuit module, a data interface module, and a data storage module;
    所述命令地址接口模块,用于接收对所述存储设备进行第一访问操作的第一行指令,以及接收对所述存储设备进行所述第一访问操作的列指令;The command address interface module is configured to receive a first line instruction for performing a first access operation on the storage device, and receive a column instruction for performing the first access operation on the storage device;
    所述时钟域转换电路模块,用于转换所述命令地址接口模块接收的所述第一行指令和所述列指令的时钟域;The clock domain conversion circuit module is configured to convert a clock domain of the first row instruction and the column instruction received by the command address interface module;
    所述命令译码和执行模块,用于对通过所述时钟域转换电路模块转换时钟域后的第一行指令和列指令进行译码,识别出所述第一行指令携带第一访问地址和所述列指令携带列地址,其中,所述第一访问地址包括第一行地址以及第一读写指示信息,并根据所述第一读写指示信息确定所述第一访问操作是读操作或写操作,以及根据确定的所述第一访问操作进行所述确定的第一访问操作的准备操作,所述准备操作用于所述存储设备在预设时间阈值内完成所述读操作或所述写操作的准备过程;The command decoding and execution module is configured to decode a first row instruction and a column instruction after converting a clock domain by the clock domain conversion circuit module, and identify that the first row instruction carries a first access address and The column instruction carries a column address, where the first access address includes a first row address and first read/write indication information, and determines, according to the first read/write indication information, that the first access operation is a read operation or a write operation, and a preparation operation of the determined first access operation according to the determined first access operation, the prepare operation being performed by the storage device to complete the read operation within a preset time threshold or The preparation process of the write operation;
    所述数据接口模块,用于接收或发送数据;The data interface module is configured to receive or send data;
    所述数据存储模块,用于根据所述命令译码和执行模块识别出的所述第一行地址和所述列地址,将所述数据接口模块接收的数据存储到所述第一行地址和所述列地址对应的地址空间,或者通过所述数据接口模块发送所述第一行地址和所述列地址对应的地址空间中的数据。The data storage module is configured to store data received by the data interface module to the first row address according to the first row address and the column address identified by the command decoding and execution module The address space corresponding to the column address, or the data in the address space corresponding to the first row address and the column address is sent by the data interface module.
  10. 根据权利要求9所述的存储设备,其特征在于,所述命令译码和执行模块具体用于:The storage device according to claim 9, wherein the command decoding and execution module is specifically configured to:
    根据所述确定的第一访问操作,配置所述数据接口模块的传输方向,所述数据接口模块的传输方向包括输入方向和输出方向。And configuring, according to the determined first access operation, a transmission direction of the data interface module, where a transmission direction of the data interface module includes an input direction and an output direction.
  11. 根据权利要求9或10所述的存储设备,其特征在于,所述第一读写指示信息包括至少一个字段;The storage device according to claim 9 or 10, wherein the first read/write indication information comprises at least one field;
    所述命令译码和执行模块具体用于: The command decoding and execution module is specifically configured to:
    根据所述至少一个字段的取值,确定所述第一访问操作是所述读操作或所述写操作。Determining, according to the value of the at least one field, that the first access operation is the read operation or the write operation.
  12. 根据权利要求9至11中任一项所述的存储设备,其特征在于,所述命令地址接口模块,还用于接收对所述存储设备进行第二访问操作的第二行指令;The storage device according to any one of claims 9 to 11, wherein the command address interface module is further configured to receive a second line instruction for performing a second access operation on the storage device;
    所述时钟域转换电路模块,还用于转换所述命令地址接口模块接收的所述第二行指令的时钟域;The clock domain conversion circuit module is further configured to convert a clock domain of the second row instruction received by the command address interface module;
    所述命令译码和执行模块,还用于对通过所述时钟域转换电路模块转换时钟域后的第二行指令进行译码,识别出所述第二行指令携带第二访问地址,其中,所述第二访问地址包括第二行地址以及第二读写指示信息,并根据所述第二读写指示信息确定所述第二访问操作是所述读操作或所述写操作,以及根据确定的第二访问操作与所述确定的第一访问操作是否相同,确定是否修改所述数据接口模块的传输方向,在所述确定的第二访问操作与所述确定的第一访问操作相同时,用于确定不修改所述数据接口模块的传输方向。 The command decoding and execution module is further configured to decode a second row of instructions after the clock domain is converted by the clock domain conversion circuit module, and identify that the second row instruction carries a second access address, where The second access address includes a second row address and second read/write indication information, and determines, according to the second read/write indication information, that the second access operation is the read operation or the write operation, and according to the determining Whether the second access operation is the same as the determined first access operation, determining whether to modify the transmission direction of the data interface module, when the determined second access operation is the same as the determined first access operation, Used to determine not to modify the transmission direction of the data interface module.
PCT/CN2016/094127 2016-08-09 2016-08-09 Method for accessing storage device and storage device WO2018027535A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/094127 WO2018027535A1 (en) 2016-08-09 2016-08-09 Method for accessing storage device and storage device
CN201680057568.4A CN108139992B (en) 2016-08-09 2016-08-09 Method for accessing storage device and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/094127 WO2018027535A1 (en) 2016-08-09 2016-08-09 Method for accessing storage device and storage device

Publications (1)

Publication Number Publication Date
WO2018027535A1 true WO2018027535A1 (en) 2018-02-15

Family

ID=61161227

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/094127 WO2018027535A1 (en) 2016-08-09 2016-08-09 Method for accessing storage device and storage device

Country Status (2)

Country Link
CN (1) CN108139992B (en)
WO (1) WO2018027535A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631966A (en) * 2020-12-17 2021-04-09 海光信息技术股份有限公司 Data processing method, memory controller, processor and electronic equipment
CN114461561A (en) * 2022-01-28 2022-05-10 华为数字能源技术有限公司 Address determination method, address adaptation table generation method and battery replacement cabinet
CN115460350A (en) * 2022-09-02 2022-12-09 白犀牛智达(北京)科技有限公司 Image processing method and system based on FPGA

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240581B (en) * 2018-11-29 2023-08-08 北京地平线机器人技术研发有限公司 Memory access control method and device and electronic equipment
CN112463682B (en) * 2020-11-11 2023-01-10 苏州浪潮智能科技有限公司 System and method for realizing multi-device access based on module computer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1497607A (en) * 2002-10-07 2004-05-19 三星电子株式会社 Circuit and method for supplying page mode operation in semiconductor storing device
CN101206916A (en) * 2006-12-22 2008-06-25 富士通株式会社 Memory device, memory controller and memory system
US20100250841A1 (en) * 2009-03-27 2010-09-30 Sony Corporation Memory controlling device
CN102411982A (en) * 2010-09-25 2012-04-11 杭州华三通信技术有限公司 Memory controller and method for controlling commands

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6488994A (en) * 1987-09-29 1989-04-03 Toshiba Corp Storage device
CN100512488C (en) * 2005-03-24 2009-07-08 华为技术有限公司 Method and system for providing presentation information by radio local area network to presentation system
CN101123113B (en) * 2007-09-20 2010-07-14 上海交通大学 Access method and control device for synchronous dynamic random access memory
JP2010003067A (en) * 2008-06-19 2010-01-07 Sony Corp Memory system, access control method therefor, and computer program
JP5428687B2 (en) * 2009-09-14 2014-02-26 株式会社リコー Memory control device
US9281036B2 (en) * 2013-01-08 2016-03-08 Qualcomm Incorporated Memory device having an adaptable number of open rows

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1497607A (en) * 2002-10-07 2004-05-19 三星电子株式会社 Circuit and method for supplying page mode operation in semiconductor storing device
CN101206916A (en) * 2006-12-22 2008-06-25 富士通株式会社 Memory device, memory controller and memory system
US20100250841A1 (en) * 2009-03-27 2010-09-30 Sony Corporation Memory controlling device
CN102411982A (en) * 2010-09-25 2012-04-11 杭州华三通信技术有限公司 Memory controller and method for controlling commands

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631966A (en) * 2020-12-17 2021-04-09 海光信息技术股份有限公司 Data processing method, memory controller, processor and electronic equipment
CN112631966B (en) * 2020-12-17 2024-01-26 海光信息技术股份有限公司 Data processing method, memory controller, processor and electronic equipment
CN114461561A (en) * 2022-01-28 2022-05-10 华为数字能源技术有限公司 Address determination method, address adaptation table generation method and battery replacement cabinet
CN114461561B (en) * 2022-01-28 2024-04-09 华为数字能源技术有限公司 Address determination method, address adaptation table generation method and battery exchange cabinet
CN115460350A (en) * 2022-09-02 2022-12-09 白犀牛智达(北京)科技有限公司 Image processing method and system based on FPGA
CN115460350B (en) * 2022-09-02 2024-01-12 白犀牛智达(北京)科技有限公司 Image processing method and system based on FPGA

Also Published As

Publication number Publication date
CN108139992B (en) 2020-06-16
CN108139992A (en) 2018-06-08

Similar Documents

Publication Publication Date Title
KR102443078B1 (en) Apparatus, system and method for determining comparison information based on memory data
WO2018027535A1 (en) Method for accessing storage device and storage device
US8391088B2 (en) Pseudo-open drain type output driver having de-emphasis function, semiconductor memory device, and control method thereof
US9536586B2 (en) Memory device and memory system having the same
US8862973B2 (en) Method and system for error management in a memory device
US9164834B2 (en) Semiconductor memory devices, memory systems including the same and method of writing data in the same
US11036412B2 (en) Dynamically changing between latency-focused read operation and bandwidth-focused read operation
US20160378366A1 (en) Internal consecutive row access for long burst length
US20140237177A1 (en) Memory module and memory system having the same
TWI600010B (en) Apparatus, method and system for performing successive writes to a bank of a dynamic random access memory
US20120159286A1 (en) Data transmission device, memory control device, and memory system
US20170242600A1 (en) Data storage device
US20150242352A1 (en) Semiconductor memory device, memory system, and method using bus-invert encoding
JP2021111333A (en) Auto-increment write count for nonvolatile memory
US20230092562A1 (en) System, device, and method for memory interface including reconfigurable channel
US20230368825A1 (en) Storage controller, storage device, and operation method of storage device
US9785584B2 (en) Data storage device and method thereof
US11726717B2 (en) NAND dropped command detection and recovery
KR102608909B1 (en) Semiconductor device
US20220093202A1 (en) Adaptive dram (dynamic random access memory) burst length for inline ecc (error checking and correction)
US20230112776A1 (en) Operation method of memory module, operation method of memory controller, and operation method of memory system
US20240020252A1 (en) Computing system and operating method thereof
KR20240009813A (en) Storage modue supporting single serialized write interfacing scheme and operation method thereof
CN116504289A (en) Memory device
KR20130136811A (en) Semiconductor memory device, memory system including the same, and operating method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16911990

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16911990

Country of ref document: EP

Kind code of ref document: A1