WO2024077866A1 - 一种内存映射方法、系统、设备及存储介质 - Google Patents

一种内存映射方法、系统、设备及存储介质 Download PDF

Info

Publication number
WO2024077866A1
WO2024077866A1 PCT/CN2023/081751 CN2023081751W WO2024077866A1 WO 2024077866 A1 WO2024077866 A1 WO 2024077866A1 CN 2023081751 W CN2023081751 W CN 2023081751W WO 2024077866 A1 WO2024077866 A1 WO 2024077866A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
host
memory mapping
memory
mapping method
Prior art date
Application number
PCT/CN2023/081751
Other languages
English (en)
French (fr)
Inventor
王江为
阚宏伟
郝锐
王彦伟
Original Assignee
浪潮(北京)电子信息产业有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浪潮(北京)电子信息产业有限公司 filed Critical 浪潮(北京)电子信息产业有限公司
Publication of WO2024077866A1 publication Critical patent/WO2024077866A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/109Address translation for multiple virtual address spaces, e.g. segmentation
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C17/00Read-only memories programmable only once; Semi-permanent stores, e.g. manually-replaceable information cards
    • G11C17/14Read-only memories programmable only once; Semi-permanent stores, e.g. manually-replaceable information cards in which contents are determined by selectively establishing, breaking or modifying connecting links by permanently altering the state of coupling elements, e.g. PROM
    • G11C17/18Auxiliary circuits, e.g. for writing into memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of storage technology, and in particular to a memory mapping method, system, device and storage medium.
  • Memory mapping is a special way to access device files. It can link a block of address space in the memory with the device file we specify, thereby converting the access to this block of memory into the access to the device file.
  • Memory-mapped files are somewhat similar to virtual memory. Memory-mapped files can reserve an area of address space and commit physical memory to this area. The physical memory of a memory-mapped file comes from a file that already exists on the disk, and the file must be mapped before it can be operated on. When using memory-mapped files to process files stored on disk, there is no need to perform I/O (Input/Output) operations on the files, which makes memory-mapped files play a very important role in processing large amounts of data.
  • I/O Input/Output
  • acceleration resource pool In current related technologies, a large number of acceleration devices form an acceleration resource pool, which can realize accelerated processing of distributed applications.
  • memory replacement can be performed between the local memory end and the remote memory end based on the memory replacement mechanism, realizing remote memory management at the virtual machine level, horizontally expanding the memory resources of the virtual machine, and focusing on how to perform remote memory mapping on the virtual machine.
  • the association relationship between the physical page and the memory interval in the cache can be established locally, and the data of the associated physical page and memory interval can be exchanged.
  • the structure of the remote memory can be obtained and sent to the local memory, and the local memory structure identical to the remote memory can be established locally for memory detection.
  • the purpose of this application is to provide a memory mapping method, system, device and storage medium to effectively implement memory mapping and improve the flexibility of memory access.
  • a memory mapping method comprising:
  • the host's operation object, operation type and operation content are determined
  • the register operation is performed based on the operation type and operation content
  • the operation object is a storage module
  • a storage operation is performed based on the operation type and the operation content
  • the operation types include: single address read, single address write, multiple non-continuous address read, multiple non-continuous address write, continuous address read, and continuous address write.
  • the operation content includes an operation address; determining the operation address in the operation content of the host according to the analysis result includes:
  • the address translation function is enabled, the virtual address in the parsing result is translated to obtain the physical address corresponding to the virtual address;
  • the operation address in the operation content of the host this time is determined.
  • converting the virtual address in the parsing result to obtain a physical address corresponding to the virtual address includes:
  • the virtual memory address space of the host is converted into the storage address space of the PCIe domain;
  • the virtual IO address space of the host is converted into the register address space of the PCIe domain.
  • it also includes:
  • the enabling state of the address translation function is adjusted according to the first instruction.
  • the parameter adjustment port is a serial port.
  • it also includes:
  • the enabling state of the address translation function is adjusted according to the parsing result obtained this time.
  • determining the operation address in the operation content of the host according to the operation object and the obtained physical address includes:
  • the obtained physical address is used as the operation address in the determined operation content of the host this time;
  • the obtained physical address is used as the sliding address, and combined with the configured sliding base address, the operation address in the host's current operation content is determined;
  • the obtained physical address is used as the operation address in the determined operation content of the host this time.
  • it also includes:
  • the opening state of the window sliding function and/or the sliding base address are adjusted according to the second instruction.
  • it also includes:
  • the opening state of the window sliding function and/or the sliding base address are adjusted according to the parsing result obtained this time.
  • the operation content when the operation type is continuous address writing, includes: an operation address indicating an initial write position, a data increment step or a data decrement step, a value of the initial write position, and a total data write amount.
  • the operation content when the operation type is continuous address reading, includes: an operation address indicating an initial read position and a total data read amount.
  • the operation content when the operation type is multiple non-continuous address writes, includes: the 1st operation address to the Nth operation address representing the 1st write position to the Nth write position respectively, and the data content representing the 1st write position to the Nth write position respectively; N is a positive integer not less than 2.
  • the operation content when the operation type is multiple non-continuous address reads, includes: the 1st operation address to the Nth operation address representing the 1st read position to the Nth read position in sequence; N is a positive integer not less than 2.
  • performing a memory operation based on an operation type and an operation content includes:
  • the memory operation is performed based on the operation type and the operation content by integrating them into a burst address mode.
  • the message sent by the host is to encapsulate the remote memory operation behavior into a message when the host wants to operate the remote memory.
  • the operation content is used to indicate the specific operation information of the host's current operation.
  • a memory mapping system comprising:
  • the parsing unit is used to receive the message sent by the host and parse the message according to the preset custom transmission protocol to obtain the parsing result; according to the parsing result, determine the operation object, operation type and operation content of the host this time;
  • a first execution unit configured to perform a register operation based on an operation type and an operation content when the operation object is a register module
  • a second execution unit configured to perform a memory operation based on an operation type and an operation content when the operation object is a storage module
  • the operation types include: single address read, single address write, multiple non-continuous address read, multiple non-continuous address write, continuous address read, and continuous address write.
  • a memory mapping method comprising:
  • the programmable storage device registers based on the operation type and operation content.
  • device operation when the operation object is a storage module, the programmable storage device performs a memory operation based on the operation type and the operation content;
  • the operation types include: single address read, single address write, multiple non-continuous address read, multiple non-continuous address write, continuous address read, and continuous address write.
  • a memory mapping device comprising:
  • register module register module
  • the processing module is used to execute a computer program to implement the steps of the memory mapping method as described above.
  • a non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the memory mapping method described above are implemented.
  • the technical solution provided by the embodiment of the present application is a programmable storage device connected to the host for communication, that is, the present application is to optimize the memory mapping at the storage medium end, so that the flexibility of the present application solution is improved and a flexible memory access method is provided.
  • a custom transmission protocol can be set.
  • the programmable storage device receives a message sent by the host, the message is parsed according to the preset custom transmission protocol to obtain a parsing result.
  • the operation type of the present application can also support multiple non-continuous address reads, multiple non-continuous address writes, continuous address reads, and continuous address writes, so that the present application solution has a flexible memory access method.
  • the host's operation object, operation type and operation content can be determined based on the parsing result.
  • the operation object is a register module
  • register operations can be performed based on the operation type and operation content
  • memory operations can be performed based on the operation type and operation content, that is, the scheme of the present application can effectively access the register module and storage module in the programmable storage device, that is, memory mapping can be effectively implemented.
  • the present application implements memory mapping by setting a programmable storage device, that is, all functions can be implemented in the programmable storage device through hardware media, so compared with the traditional scheme of implementing memory mapping through host-side settings, the performance will be higher.
  • the solution of the present application can effectively implement memory mapping, has a flexible memory access method, and has higher performance.
  • FIG1 is a flow chart of a first implementation of a memory mapping method in the present application.
  • FIG2 is a schematic diagram of a connection between a host and a programmable storage device in a specific implementation manner of the present application
  • FIG3 is a schematic diagram of the structure of a memory mapping system in the present application.
  • FIG4 is a schematic diagram of the structure of a memory mapping device in the present application.
  • FIG5 is a schematic diagram of address mapping of the window sliding function in the present application.
  • FIG6 is a flow chart of a second implementation of the memory mapping method in the present application.
  • FIG. 7 is a non-volatile readable storage medium in the present application.
  • the core of this application is to provide a memory mapping method that can effectively implement memory mapping, has a flexible memory access method, and has higher performance.
  • FIG. 1 is a flowchart of an implementation of a memory mapping method in the present application.
  • the memory mapping method can be applied to a programmable storage device connected to a host for communication, and can include the following steps:
  • Step S101 receiving a message sent by a host and parsing the message according to a preset custom transmission protocol to obtain a parsing result.
  • the host wants to operate the remote memory, that is, when the host wants to operate the programmable storage device connected to the host for communication, it is necessary to convert the local operation into a network operation.
  • the host CPU Central Processing Unit
  • the host's original PCIe Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard
  • the host's PCIe over Ethernet processing unit can be used to encapsulate the remote memory operation behavior into a message, which can be sent to the remote programmable storage device through the network card.
  • the host communicates with the programmable storage device through the network card and the switch.
  • the programmable storage device can receive messages sent by the host through network devices such as switches, and in the solution of the present application, messages of a custom transmission protocol are used to achieve flexible memory access.
  • the message After receiving the message sent by the host, the message can be parsed according to the preset custom transmission protocol to obtain the parsing result.
  • Step S102 According to the analysis result, the host's operation object, operation type and operation content are determined.
  • Eth L2Header, IP Header and UDP Header are the header part of the message, which can be set based on the network transmission rules of the message to achieve network transmission of the message.
  • the transport layer protocol in Table 1 adopts UDP (User Data Protocol), which has a simple protocol, is a connectionless transmission protocol, and has a fast transmission speed. Since no connection is established when transmitting data, there is no need to maintain the connection status, including the sending and receiving status, so that a host server can transmit the same message to multiple clients at the same time, and the header of the UDP packet is very short, only 8 bytes. And it is understandable that in other implementations, the custom transmission protocol can choose other The network transmission rules of this type do not affect the implementation of this application.
  • FCS Framework Check Sequence
  • the op, address and data in Table 1 are the customized remote memory operation formats.
  • the data area can be used to store the corresponding write data content.
  • the address area can be used to store single or multiple addresses.
  • the meaning of each bit in the op area can be customized, so that the host's operation object, operation type and operation content can be determined based on the op, address and data in the parsing results.
  • the operation types may include: single address read, single address write, multiple non-continuous address read, multiple non-continuous address write, continuous address read, and continuous address write.
  • the operation content is used to indicate the specific operation information of the host's current operation, for example, it may include one or more operation addresses, the data content to be written when the operation type is write, and other information.
  • register modules There are two types of operation objects, namely register modules and storage modules.
  • step S103 When the operation object is a register module, the operation of step S103 may be performed.
  • step S104 When the operation object is a storage module, the operation of step S104 may be performed.
  • Step S103 performing register operation based on the operation type and operation content
  • the operation object is a register module
  • a read operation or a write operation of the register can be performed according to the operation type and operation content.
  • Step S104 Perform memory operation based on the operation type and operation content.
  • the operation object is a storage module
  • a read operation or a write operation can be performed on the storage module according to the operation type and operation content.
  • the operation content includes an operation address.
  • determining the operation address in the operation content of the host according to the analysis result may specifically include the following steps:
  • Step 1 Determine whether to enable the address translation function
  • step 2 is executed: the virtual address in the parsing result is translated to obtain the physical address corresponding to the virtual address;
  • step 3 use the address in the parsing result as the obtained physical address
  • Step 4 According to the operation object and the obtained physical address, determine the operation address in the host's current operation content.
  • the present application can support the host to directly send a virtual address, and can also support the host to directly send a physical address, thereby further enhancing the flexibility of the present application scheme.
  • the address of the address area can be a virtual address for the host to perform CPU operations, or a PCIe domain address, that is, the host itself completes the conversion of the virtual address to the physical address of the PCIe domain.
  • the address translation function it is necessary to determine whether the address translation function is enabled. If the address translation function is enabled, it means that the host sends a virtual address, and the programmable storage device of this application needs to convert the virtual address to obtain the physical address corresponding to the virtual address. For example, when the operation object is a storage module, the host's virtual memory address space is converted to The storage address space of the PCIe domain, when the operation object is a register module, converts the virtual IO address space of the host into the register address space of the PCIe domain.
  • address translation function If the address translation function is not enabled, it means that the host performs virtual address translation itself, and the address in the resolution result can be directly used as the obtained physical address.
  • the operation address in the host's current operation content can be determined based on the operation object and the obtained physical address.
  • Whether the address translation function is enabled can be determined according to the situation of the host. For example, in some cases, when the corresponding resources of the host are sufficient, the host can perform virtual address translation by itself, so that the programmable storage device does not need to enable the address translation function. Correspondingly, in some cases, in order to save the corresponding resources of the host, the host can send the virtual address, and the programmable storage device of the present application enables the address translation function to realize the conversion of the virtual address.
  • the present application can also support dynamic adjustment according to actual needs to improve flexibility.
  • it can also include:
  • the enabling state of the address translation function is adjusted according to the first instruction.
  • the programmable storage device is provided with a parameter adjustment port, for example, the parameter adjustment port is specifically an interface such as a serial port, and the staff can send a first instruction to the programmable storage device through the parameter adjustment port, so that the programmable storage device adjusts the on state of the address conversion function according to the first instruction, for example, according to actual needs, the address conversion function is switched from the on state to the off state, or the address conversion function is switched from the off state to the on state.
  • the parameter adjustment port is specifically an interface such as a serial port
  • the staff can send a first instruction to the programmable storage device through the parameter adjustment port, so that the programmable storage device adjusts the on state of the address conversion function according to the first instruction, for example, according to actual needs, the address conversion function is switched from the on state to the off state, or the address conversion function is switched from the off state to the on state.
  • the enabling state of the address translation function is adjusted according to the parsing result obtained this time.
  • This implementation method takes into account that, although the enabled state of the address conversion function can be effectively adjusted through the parameter adjustment port of the programmable storage device, it may not be convenient in implementation because the programmable storage device is set at a remote end and remote staff are required to go to the site and connect to the parameter adjustment port of the programmable storage device through relevant debugging equipment to adjust the enabled state of the address conversion function.
  • the host only needs to send a message to achieve the adjustment, and there is no need for staff to perform on-site operations, which is more convenient and quick.
  • an additional operation type needs to be set, namely, the first parameter adjustment operation type. If after receiving the message sent by the host and obtaining the parsing result, it is determined that the host's operation type this time is the first parameter adjustment, indicating that the on-state of the address translation function needs to be adjusted at this time, then the on-state of the address translation function can be adjusted according to the parsing result obtained this time. For example, in some specific occasions, when the operation type is the first parameter adjustment, setting a certain bit in the operation content to 0 indicates that the address translation function is set to the on state, and the bit is 1, indicating that the address translation function is set to the off state.
  • the operation address in the host's current operation content can be determined based on the operation object and the obtained physical address. For example, some simple methods are to directly obtain the obtained physical address.
  • the processing address is used as the operation address in determining the operation content of the host this time.
  • step 4 may specifically include:
  • the obtained physical address is used as the operation address in the determined operation content of the host this time;
  • the obtained physical address is used as the sliding address, and combined with the configured sliding base address, the operation address in the host's current operation content is determined;
  • the obtained physical address is used as the operation address in the determined operation content of the host this time.
  • the obtained physical address can be directly used as the operation address in the determined operation content of the host this time.
  • this implementation mode sets a window sliding function, so that the operation address in the current operation content of the host is determined according to whether the window sliding function is turned on.
  • BAR2 represents the sliding address, which can be mapped to different operation addresses by combining with the sliding base address, and can be mapped to register space 1 or register space 2 in Figure 5.
  • BAR0 represents the virtual address in the parsing result, which can be mapped to the storage address space, that is, the corresponding physical address is obtained.
  • the window sliding function is not turned on, the obtained physical address can be directly used as the operation address in the determined host's current operation content.
  • the register address width accessible to the host can be expanded, because the host can use the same address range to access different register spaces of the programmable storage device, further improving the flexibility of the present application solution.
  • the sliding base address can be configured and adjusted to play the role of window sliding, and there are many specific adjustment methods.
  • the window sliding function can also be turned on or off.
  • it can also include:
  • the opening state of the window sliding function and/or the sliding base address are adjusted according to the second instruction.
  • the programmable storage device is provided with a parameter adjustment port, for example, the parameter adjustment port is specifically an interface such as a serial port, and the staff can send a second instruction to the programmable storage device through the parameter adjustment port, so that the programmable storage device adjusts the opening state and/or the sliding base address of the window sliding function according to the second instruction, for example, according to actual needs, the window sliding function is switched from the opening state to the closing state, or the window sliding function is switched from the closing state to the opening state, and the value of the sliding base address can also be adjusted according to actual needs.
  • the parameter adjustment port is specifically an interface such as a serial port
  • the staff can send a second instruction to the programmable storage device through the parameter adjustment port, so that the programmable storage device adjusts the opening state and/or the sliding base address of the window sliding function according to the second instruction, for example, according to actual needs, the window sliding function is switched from the opening state to the closing state, or the window sliding function is switched from the closing state to the opening state, and the value
  • this time is the second parameter During adjustment, the opening state of the window sliding function and/or the sliding base address are adjusted according to the analysis result obtained this time.
  • This implementation takes into account that, although the enabling state and/or the sliding base address of the window sliding function can be effectively adjusted through the parameter adjustment port of the programmable storage device, it may not be convenient in implementation because the programmable storage device is set at a remote end and remote staff are required to go to the site and connect to the parameter adjustment port of the programmable storage device through relevant debugging equipment to achieve the enabling state and/or the sliding base address of the window sliding function.
  • the host only needs to send a message to achieve the adjustment, and there is no need for staff to perform on-site operations, which is more convenient and quick.
  • the operation type namely, the second parameter adjustment operation type. If after receiving the message sent by the host and obtaining the parsing result, it is determined that the host's operation type this time is the second parameter adjustment, it means that it is necessary to adjust the opening state and/or the sliding base address of the window sliding function at this time. Then, according to the parsing result obtained this time, the opening state and/or the sliding base address of the window sliding function can be adjusted. For example, in some specific occasions, when the operation type is the second parameter adjustment, a certain bit in the operation content is set to 0, indicating that the window sliding function is set to the opening state, and at this time, the value of several bits subsequently specified by the bit is regarded as the sliding base address. If the bit is 1, it means that the window sliding function is set to the closed state.
  • the operation types of the present application may at least include: single address read, single address write, multiple non-continuous address read, multiple non-continuous address write, continuous address read, and continuous address write.
  • the operation content may include: an operation address representing an initial write position, a data increment step or a data decrement step, a value of the initial write position, and a total data write amount.
  • the host CPU wants to write data starting from 0x5a5a and increasing by 2 to the memory space with a continuous increase of 1K starting from the virtual base address 0x1000. Then the host CPU can send a command to write 1K data starting from 0x5a5a and increasing by 2 at the memory address 0x1000 (virtual address space). This command is the same as the command of the host CPU to write the local memory address.
  • the PCIe over Ethernet processing unit of the host encapsulates the command into a message and sends it to the programmable storage device through the network.
  • [17:8] of the op area 1K, which means that the number of 1K written this time, that is, the total amount of data written in the operation content is 1K.
  • Address area 0x1000, which is a virtual address, so the continuously increasing virtual address needs to be converted into a non-continuous physical address, and the physical address corresponding to the virtual address 0x1000 is the operation address of the initial write position in the determined operation content.
  • DDR SDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • the data area is 0x5a5a, that is, the value of the initial write position in the operation content is 0x5a5a.
  • the memory write operation can be performed based on the operation type and operation content.
  • the host can realize data incremental continuous address writing by sending a message once, which is very flexible and has high writing efficiency. That is, there is no need to send multiple messages to realize data writing at each address location respectively, but to send one message, so that the operation content includes: the operation address representing the initial write position, the data increment step or the data decrement step, the value of the initial write position, and the total data write amount, so as to realize the data writing of the continuous address in an incremental or decremental manner.
  • the operation content when the operation type is continuous address read, includes: an operation address representing an initial read position and a total data read amount.
  • the parsed operation content needs to include the operation address indicating the initial read position and the total data read amount.
  • the 2nd bit of the op area is 1
  • [17:8] 1K in the op area, indicating that the number of reads this time is 1K, that is, the total data read amount in the operation content is 1K.
  • the operation address of the initial read position can be determined through the address of the Address area.
  • the operation content when the operation type is multiple non-continuous address reads, includes: the 1st operation address to the Nth operation address representing the 1st read position to the Nth read position in sequence; N is a positive integer not less than 2.
  • the host CPU wants to read the register value of the register space address 0x20010 (PCIe domain address, no virtual address conversion is required) and the register value of the register space address 0x20020 (PCIe domain address, no virtual address conversion is required) of the remote programmable storage device.
  • the window sliding function is enabled, and the sliding base address is specifically configured to be 0x2000.
  • the host CPU can send a command to read register addresses 0x10 and 0x20, which is the same as the command for the host CPU to read local register addresses.
  • the host's PCIe over Ethernet processing unit encapsulates the command into a message and sends it to the programmable storage device through the network.
  • the data area has two addresses, 0x10 and 0x20, and since both addresses are sliding addresses, combined with the sliding base address, it can be determined that the operation address of the first read position in the operation content is 0x20010, and the operation address of the second read position is 0x20020.
  • the register read operation can be performed based on the operation type and operation content, specifically reading the data at the register address 0x20010 and the data at the register address 0x20020, and both are fed back to the host through messages, thereby realizing the host's read operation on the remote register.
  • the host can realize the reading of multiple non-continuous addresses by sending a message once, which is very flexible and has high reading efficiency. That is, there is no need to send N read messages to realize the reading of N non-continuous addresses respectively, but only one message needs to be sent.
  • the operation content when the operation type is multiple non-continuous address writes, includes: the 1st operation address to the Nth operation address, which represent the 1st write position to the Nth write position respectively, and the data content, which represent the 1st write position to the Nth write position respectively; N is a positive integer not less than 2.
  • the operation content needs to include the first operation address to the Nth operation address sequentially representing the first write position to the Nth write position. And because it is data writing, it is also necessary to include the data content sequentially representing the first write position to the Nth write position.
  • performing a memory operation based on an operation type and an operation content may specifically include:
  • the memory operation is performed based on the operation type and the operation content by integrating them into a burst address mode.
  • This implementation takes into account that if the operation object is a storage module and multiple non-continuous physical addresses are determined, the memory addresses can be integrated to improve the memory access efficiency. That is, by integrating into a burst address mode, the non-continuous physical addresses can be integrated into a burst address mode (partially continuous) suitable for DDR operations, which is beneficial to improving the read/write efficiency of DDR.
  • the technical solution provided by the embodiment of the present application is a programmable storage device connected to the host for communication, that is, the present application is to optimize the memory mapping at the storage medium end, so that the flexibility of the present application solution is improved and a flexible memory access method is provided.
  • a custom transmission protocol can be set.
  • the programmable storage device receives a message sent by the host, the message is parsed according to the preset custom transmission protocol to obtain a parsing result.
  • the operation type of the present application can also support multiple non-continuous address reads, multiple non-continuous address writes, continuous address reads, and continuous address writes, so that the present application solution has a flexible memory access method.
  • the host's operation object, operation type and operation content can be determined based on the analysis result.
  • the operation object is a register module
  • register operations can be performed based on the operation type and operation content
  • memory operations can be performed based on the operation type and operation content, that is, the solution of the present application can effectively access the register module and storage module in the programmable storage device, that is, memory mapping can be effectively implemented.
  • the present application implements memory mapping by setting a programmable storage device, that is, all functions can be implemented in the programmable storage device through hardware media, so compared with the traditional solution that implements memory mapping through host-side settings, Shooting, the performance will be higher.
  • the solution of the present application can effectively implement memory mapping, has a flexible memory access method, and has higher performance.
  • the embodiment of the present application also provides a memory mapping system, which can be referred to in correspondence with the above.
  • FIG. 3 it is a schematic diagram of the structure of a memory mapping system in the present application, which is applied to a programmable storage device connected to a host for communication, and includes:
  • the parsing unit 301 is used to receive the message sent by the host and parse the message according to the preset custom transmission protocol to obtain the parsing result; according to the parsing result, determine the operation object, operation type and operation content of the host this time;
  • a first execution unit 302 configured to perform a register operation based on an operation type and an operation content when the operation object is a register module;
  • a second execution unit 303 configured to perform a memory operation based on an operation type and an operation content when the operation object is a storage module;
  • the operation types include at least: single address read, single address write, multiple non-continuous address reads, multiple non-continuous address writes, continuous address reads, and continuous address writes.
  • the operation content includes an operation address
  • the parsing unit 301 determines the operation address in the operation content of the host according to the parsing result, including:
  • the address translation function is enabled, the virtual address in the parsing result is translated to obtain the physical address corresponding to the virtual address;
  • the operation address in the operation content of the host this time is determined.
  • the first adjustment unit is used to adjust the enabling state of the address translation function according to the first instruction when receiving the first instruction sent by the parameter adjustment port.
  • the second adjustment unit is used to receive the message sent by the host and after obtaining the parsing result, when it is determined that the operation type of the host this time is the first parameter adjustment, adjust the opening state of the address translation function according to the parsing result obtained this time.
  • the parsing unit 301 determines the operation address in the operation content of the host according to the operation object and the obtained physical address, including:
  • the obtained physical address is used as the operation address in the determined operation content of the host this time;
  • the obtained physical address is used as the sliding address, and combined with the configured sliding base address, the operation address in the host's current operation content is determined;
  • the obtained physical address is used as the operation address in the determined operation content of the host this time.
  • the third adjustment unit is used to adjust the opening state of the window sliding function and/or the sliding base address according to the second instruction when receiving the second instruction sent by the parameter adjustment port.
  • the fourth adjustment unit is used to receive the message sent by the host and after obtaining the analysis result, when it is determined that the host's operation type this time is the second parameter adjustment, adjust the opening state and/or the sliding base address of the window sliding function according to the analysis result obtained this time.
  • the operation content when the operation type is continuous address write, includes: an operation address representing an initial write position, a data increment step or a data decrement step, a value of the initial write position, and a total data write amount.
  • the operation content when the operation type is continuous address read, includes: an operation address representing an initial read position and a total data read amount.
  • the operation content when the operation type is multiple non-continuous address writes, includes: the 1st operation address to the Nth operation address, which represent the 1st write position to the Nth write position respectively, and the data content, which represent the 1st write position to the Nth write position respectively; N is a positive integer not less than 2.
  • the operation content when the operation type is multiple non-continuous address reads, includes: the 1st operation address to the Nth operation address representing the 1st read position to the Nth read position in sequence; N is a positive integer not less than 2.
  • performing a memory operation based on an operation type and an operation content includes:
  • the memory operation is performed based on the operation type and the operation content by integrating them into a burst address mode.
  • the embodiments of the present application also provide a memory mapping device and a non-volatile readable storage medium, which can be mutually referenced with the above.
  • a computer program 701 is stored on the non-volatile readable storage medium 700, and when the computer program 801 is executed by the processor, the steps of the memory mapping method in any of the above embodiments are implemented.
  • the non-volatile readable storage medium mentioned here includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the technical field.
  • the memory mapping device may include:
  • Register module 401 register module 402
  • the processing module 403 is used to execute a computer program to implement the steps of the memory mapping method in any of the above embodiments.
  • the embodiment of the present application further provides a memory mapping method, which can be applied to the host side, as shown in FIG6 , and can include the following steps:
  • Step S601 Generate a message according to the host's operation object, operation type and operation content;
  • Step S602 sending a message to a programmable storage device according to a preset custom transmission protocol, so that the programmable storage device parses the message, and determines the operation object, operation type and operation content of the host according to the parsing result obtained after the parsing;
  • the programmable storage device when the operation object is a register module, the programmable storage device performs register operations based on the operation type and operation content; when the operation object is a storage module, the programmable storage device performs memory operations based on the operation type and operation content;
  • the operation types include: single address read, single address write, multiple non-continuous address read, multiple non-continuous address write, continuous address read, and continuous address write.
  • each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments.
  • the same or similar parts between the embodiments can be referred to each other.
  • the description is relatively simple, and the relevant parts can be referred to the method part.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请公开了一种内存映射方法、系统、设备及存储介质,应用于存储技术领域,包括:接收主机发送的报文并按照预设的自定义传输协议解析报文,得到解析结果;根据解析结果,确定出主机本次的操作对象,操作类型以及操作内容;当操作对象为寄存器模块时,基于操作类型和操作内容进行寄存器操作;当操作对象为存储模块时,基于操作类型和操作内容进行存储器操作;其中,操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。应用本申请的方案,可以有效地实现内存映射,并且具有灵活的内存访问方式,且性能更高。

Description

一种内存映射方法、系统、设备及存储介质
相关申请的交叉引用
本申请要求于2022年10月14日提交中国专利局,申请号为202211260324.X,申请名称为“一种内存映射方法、系统、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及存储技术领域,特别是涉及一种内存映射方法、系统、设备及存储介质。
背景技术
内存映射是一种访问设备文件的特殊方式,可以将内存中某块地址空间和我们指定的设备文件联系起来,从而把对这块内存的访问转换为对设备文件的访问。
内存映射文件与虚拟内存有些类似,通过内存映射文件可以保留一个地址空间的区域,同时将物理存储器提交给此区域,内存映射文件的物理存储器来自一个已经存在于磁盘上的文件,而且在对该文件进行操作之前必须首先对文件进行映射。使用内存映射文件处理存储于磁盘上的文件时,将不必再对文件执行I/O(Input/Output,输入/输出)操作,使得内存映射文件在处理大数据量的文件时能起到相当重要的作用。
在目前的相关技术中,大量的加速设备组成加速资源池,可以实现分布式应用的加速处理。
目前在实现内存映射时,都是在本地服务器端进行相应程序的设置,导致内存访问比较单一,灵活性较低。
例如,在目前的相关技术中,可以根据内存置换机制,对本地内存端和远程内存端之间进行内存置换,实现了虚拟机层级的远程内存管理,水平拓展虚拟机的内存资源,重点阐述了在虚拟机上如何进行远程内存映射。
又如,在目前的相关技术中,可以在本地建立缓存中物理页与内存区间之间的关联关系,并对关联的物理页和内存区间进行数据交换。又如,在目前的相关技术中,可以获取远端内存的结构发送给本地内存并在本地建立与远端内存相同的本地内存结构,用于内存检测。
如上文的描述,上述的方案在实现内存映射时,都是在本地服务器端进行相应程序的设置,导致内存访问比较单一,灵活性较低,通常只支持单个内存地址的读写操作。
发明内容
本申请的目的是提供一种内存映射方法、系统、设备及存储介质,以有效地实现内存映射,提高内存访问的灵活性。
为解决上述技术问题,本申请提供如下技术方案:
一种内存映射方法,包括:
接收主机发送的报文并按照预设的自定义传输协议解析报文,得到解析结果;
根据解析结果,确定出主机本次的操作对象,操作类型以及操作内容;
当操作对象为寄存器模块时,基于操作类型和操作内容进行寄存器操作;
当操作对象为存储模块时,基于操作类型和操作内容进行存储器操作;
其中,操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
在一些实施例中,操作内容中包括操作地址;根据解析结果确定出主机本次的操作内容中的操作地址,包括:
判断是否开启地址转换功能;
如果开启地址转换功能,则对解析结果中的虚拟地址进行转换,得到对应于虚拟地址的物理地址;
如果未开启地址转换功能,则将解析结果中的地址作为得到的物理地址;
根据操作对象以及得到的物理地址,确定出主机本次的操作内容中的操作地址。
在一些实施例中,对解析结果中的虚拟地址进行转换,得到对应于虚拟地址的物理地址,包括:
当操作对象为存储模块时,将主机的虚拟内存地址空间转换为PCIe域的存储地址空间;
当操作对象为寄存器模块时,将主机的虚拟IO地址空间转换为PCIe域的寄存器地址空间。
在一些实施例中,还包括:
当接收到参数调整端口发送的第一指令时,根据第一指令调整地址转换功能的开启状态。
在一些实施例中,参数调整端口为串口。
在一些实施例中,还包括:
接收主机发送的报文并在得到解析结果之后,当确定出主机本次的操作类型为第一参数调整时,根据本次得到的解析结果调整地址转换功能的开启状态。
在一些实施例中,根据操作对象以及得到的物理地址,确定出主机本次的操作内容中的操作地址,包括:
当操作对象为存储模块时,将得到的物理地址作为确定出的主机本次的操作内容中的操作地址;
当操作对象为寄存器模块时,判断是否开启窗口滑动功能;
如果开启窗口滑动功能,则将得到的物理地址作为滑动地址,并结合配置的滑动基地址,确定出主机本次的操作内容中的操作地址;
如果未开启窗口滑动功能,则将得到的物理地址作为确定出的主机本次的操作内容中的操作地址。
在一些实施例中,还包括:
当接收到参数调整端口发送的第二指令时,根据第二指令调整窗口滑动功能的开启状态和/或滑动基地址。
在一些实施例中,还包括:
接收主机发送的报文并在得到解析结果之后,当确定出主机本次的操作类型为第二参数调整时,根据本次得到的解析结果调整窗口滑动功能的开启状态和/或滑动基地址。
在一些实施例中,当操作类型为连续地址写时,操作内容中包括:表示初始写位置的操作地址,数据递增步长或者数据递减步长,初始写位置的数值,以及数据总写入量。
在一些实施例中,当操作类型为连续地址读时,操作内容中包括:表示初始读位置的操作地址和数据总读取量。
在一些实施例中,当操作类型为多个非连续地址写时,操作内容中包括:依次表示第1写位置至第N写位置的第1操作地址至第N操作地址,依次表示第1写位置至第N写位置的数据内容;N为不小于2的正整数。
在一些实施例中,当操作类型为多个非连续地址读时,操作内容中包括:依次表示第1读位置至第N读位置的第1操作地址至第N操作地址;N为不小于2的正整数。
在一些实施例中,基于操作类型和操作内容进行存储器操作,包括;
当根据操作类型和操作内容,确定出多个非连续的物理地址时,通过整合为burst地址模式的方式,基于操作类型和操作内容进行存储器操作。
在一些实施例中,主机发送的报文为在主机要操作远端内存时,将对远端的内存操作行为封装成报文。
在一些实施例中,操作内容用于表示主机本次操作的具体操作信息。
一种内存映射系统,包括:
解析单元,用于接收主机发送的报文并按照预设的自定义传输协议解析报文,得到解析结果;根据解析结果,确定出主机本次的操作对象,操作类型以及操作内容;
第一执行单元,用于当操作对象为寄存器模块时,基于操作类型和操作内容进行寄存器操作;
第二执行单元,用于当操作对象为存储模块时,基于操作类型和操作内容进行存储器操作;
其中,操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
一种内存映射方法,包括:
按照主机本次的操作对象,操作类型以及操作内容,生成报文;
按照预设的自定义传输协议发送报文至可编程存储设备,以使可编程存储设备解析报文,并根据解析后得到的解析结果,确定出主机本次的操作对象,操作类型以及操作内容;
其中,当操作对象为寄存器模块时,可编程存储设备基于操作类型和操作内容进行寄存 器操作;当操作对象为存储模块时,可编程存储设备基于操作类型和操作内容进行存储器操作;操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
一种内存映射设备,包括:
寄存器模块,寄存器模块;
处理模块,用于执行计算机程序以实现如上述的内存映射方法的步骤。
一种非易失性可读存储介质,非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的内存映射方法的步骤。
应用本申请实施例所提供的技术方案,采用的是与主机通信连接的可编程存储设备,即本申请是在存储介质端实现内存映射的优化,使得本申请方案的灵活性提高,具有灵活的内存访问方式。具体的,由于本申请采用的是与主机通信连接的可编程存储设备,因此,可以进行自定义传输协议的设置,可编程存储设备接收主机发送的报文时,便是按照预设的自定义传输协议解析报文,得到解析结果。而由可以进行自定义传输协议的设置,因此,除了单个地址读、单个地址写之外,本申请的操作类型还可以支持多个非连续地址读、多个非连续地址写,连续地址读,以及连续地址写,使得本申请方案具有灵活的内存访问方式。
得到了解析结果之后,便可以根据解析结果,确定出主机本次的操作对象,操作类型以及操作内容。当操作对象为寄存器模块时,可以基于操作类型和操作内容进行寄存器操作,而当操作对象为存储模块时,便可以基于操作类型和操作内容进行存储器操作,即本申请的方案可以有效地进行可编程存储设备中的寄存器模块和存储模块的访问,也即可以有效地实现内存映射。此外,本申请通过设置可编程存储设备实现了内存映射,即所有功能可以在可编程存储设备中通过硬件介质实现,因此相较于传统方案中通过主机端的设置实现内存映射,性能会更高。
综上,本申请的方案可以有效地实现内存映射,并且具有灵活的内存访问方式,且性能更高。
附图说明
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请中内存映射方法的第一实施流程图;
图2为本申请中一种具体实施方式中主机与可编程存储设备的连接示意图;
图3为本申请中一种内存映射系统的结构示意图;
图4为本申请中一种内存映射设备的结构示意图;
图5为本申请中窗口滑动功能的地址映射示意图;
图6为本申请中内存映射方法的第二实施流程图;
图7为本申请中一种非易失性可读存储介质。
具体实施方式
本申请的核心是提供一种内存映射方法,可以有效地实现内存映射,并且具有灵活的内存访问方式,且性能更高。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的其他实施例,都属于本申请保护的范围。
请参考图1,图1为本申请中一种内存映射方法的实施流程图,该内存映射方法可以应用于与主机通信连接的可编程存储设备中,可以包括以下步骤:
步骤S101:接收主机发送的报文并按照预设的自定义传输协议解析报文,得到解析结果。
具体的,主机要操作远端内存时,即主机要操作与主机通信连接的可编程存储设备时,需要把本地操作转换为网络操作,例如一些具体场合中,对于主机CPU(Central Processing Unit,中央处理器)发送的指令,可以通过主机的PCIe over Ethernet处理单元,把主机原本的PCIe(Peripheral Component Interconnect Express,高速串行计算机扩展总线标准)操作转换为网络操作,即通过主机的PCIe over Ethernet处理单元,把对远端的内存操作行为封装成报文,从而可以通过网卡发送给远端的可编程存储设备,例如图2中,主机通过网卡和交换机与可编程存储设备通信。
可编程存储设备可以通过交换机等网络设备,接收到主机发送的报文,并且本申请的方案中,采用的是自定义传输协议的报文,以实现灵活的内存访问。
接收到主机发送的报文之后,便可以按照预设的自定义传输协议解析报文,得到解析结果。
步骤S102:根据解析结果,确定出主机本次的操作对象,操作类型以及操作内容。
自定义传输协议的具体格式可以有多种,只要能够实现本申请对于报文的要求即可。可参阅下表一,为一些具体实施方式中的报文的传输协议的格式表。
表一:
表一的实施方式中,Eth L2Header,IP Header以及UDP Header为报文的表头部分,该部分可以基于报文的网络传输规则进行设定,以实现报文的网络传输。表一中的传输层协议采用的是UDP(User Data Protocol,用户数据报协议),协议简单,是面向无连接的传输协议,且传输速度快。由于传输数据不建立连接,因此也就不需要维护连接状态,包括收发状态等,使得一台主机服务机可同时向多个客户机传输相同的消息,且UDP信息包的标题很短,只有8个字节。并且可以理解的是,其他实施方式中,自定义传输协议可以选择其他 类型的网络传输规则,并不影响本申请的实施。
表一中的FCS(Frame Check Sequence,帧校验序列)指的是数据链路层的协定数据单元(帧)的尾部的4个字节的序列。
表一中的op,address以及data则为自定义的远端内存操作格式。其中,操作类型为写时,data区域可以用来放置相应的写数据内容。address区域可以用来放置单个或多个地址。op区域的各个bit的含义均可以进行自定义,使得根据解析结果中的op,address以及data,可以确定出主机本次的操作对象,操作类型以及操作内容。
本申请的方案中,为了保障内存访问的灵活性,操作类型可以包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
操作内容用于表示主机本次操作的具体操作信息,例如可以包括1个或多个操作地址,操作类型为写时需要写入的数据内容等信息。
操作对象则包括2种,即寄存器模块和存储模块。
当操作对象为寄存器模块时,可以执行步骤S103的操作。
当操作对象为存储模块时,可以执行步骤S104的操作。
步骤S103:基于操作类型和操作内容进行寄存器操作;
具体的,操作对象为寄存器模块时,便可以按照操作类型和操作内容,进行寄存器的读操作或者写操作。
步骤S104:基于操作类型和操作内容进行存储器操作。
相应的,操作对象为存储模块时,便可以按照操作类型和操作内容,对进行存储器的读操作或者写操作。
在本申请的一些具体实施方式中,操作内容中包括操作地址。在执行步骤S102时,根据解析结果确定出主机本次的操作内容中的操作地址,可以具体包括以下步骤:
步骤一:判断是否开启地址转换功能;
如果开启地址转换功能,则执行步骤二:对解析结果中的虚拟地址进行转换,得到对应于虚拟地址的物理地址;
如果未开启地址转换功能,则执行步骤三:将解析结果中的地址作为得到的物理地址;
步骤四:根据操作对象以及得到的物理地址,确定出主机本次的操作内容中的操作地址。
该种实施方式考虑到,本申请可以支持主机直接发送虚拟地址,也可以支持主机直接发送物理地址,从而进一步地增强了本申请方案的灵活性。例如上文表一的例子中,address区域的地址,可以是主机进行CPU操作的虚拟地址,也可以是PCIe域地址,即主机自己完成了虚拟地址到PCIe域的物理地址转换。
本申请的方案中,需要判断是否开启地址转换功能,如果开启地址转换功能,说明主机发送的是虚拟地址,需要由本申请的可编程存储设备来进行虚拟地址的转换,得到对应于虚拟地址的物理地址。例如当操作对象为存储模块时,便是将主机的虚拟内存地址空间转换为 PCIe域的存储地址空间,当操作对象为寄存器模块时,便是将主机的虚拟IO地址空间转换为PCIe域的寄存器地址空间。
如果未开启地址转换功能,说明主机自己进行了虚拟地址的转换,则可以直接将解析结果中的地址作为得到的物理地址。
确定出了物理地址之后,便可以根据操作对象以及得到的物理地址,确定出主机本次的操作内容中的操作地址。
地址转换功能是否开启,可以根据主机的情况来确定,例如部分场合中,主机的相应资源较为充足时,可以由主机自己进行虚拟地址的转换,从而使得可编程存储设备无需开启地址转换功能。相应的,部分场合中,为了节约主机的相应资源时,主机发送虚拟地址即可,由本申请的可编程存储设备开启地址转换功能实现虚拟地址的转换。
并且,是否开启地址转换功能,本申请还可以支持根据实际需要进行动态调整,以提高灵活性。例如在本申请的一些具体实施方式中,还可以包括:
当接收到参数调整端口发送的第一指令时,根据第一指令调整地址转换功能的开启状态。
该种实施方式中,可编程存储设备设置有参数调整端口,例如该参数调整端口具体为串口等接口,工作人员可以通过参数调整端口发送第一指令至可编程存储设备,从而使得可编程存储设备根据第一指令调整地址转换功能的开启状态,例如根据实际需要,将地址转换功能从开启状态切换为关闭状态,或者将地址转换功能从关闭状态切换为开启状态。
进一步的,在本申请的一些具体实施方式中,还可以包括:
接收主机发送的报文并在得到解析结果之后,当确定出主机本次的操作类型为第一参数调整时,根据本次得到的解析结果调整地址转换功能的开启状态。
该种实施方式考虑到,通过可编程存储设备的参数调整端口,虽然能够有效地调整地址转换功能的开启状态,但是在实施时未必方便,因为可编程存储设备设置在远端,需要远端的工作人员到现场通过相关调试设备连接到可编程存储设备的参数调整端口,来实现地址转换功能的开启状态的调整。
而该种实施方式中,只需要主机发送报文便可以实现调整,无需工作人员进行现场操作,更为方便快捷。
具体的,该种实施方式中需要增设一种操作类型,即第一参数调整这一操作类型,如果在接收主机发送的报文,得到解析结果之后,确定出主机本次的操作类型为第一参数调整,说明此时需要调整地址转换功能的开启状态,则可以根据本次得到的解析结果调整地址转换功能的开启状态。例如一些具体场合中,操作类型为第一参数调整时,设定操作内容中的某一bit为0,表示将地址转换功能设置为开启状态,该bit为1,则表示将地址转换功能设置为关闭状态。
如上文步骤四的描述,在确定出了物理地址之后,便可以根据操作对象以及得到的物理地址,确定出主机本次的操作内容中的操作地址。例如一些简单方式,便是直接将得到的物 理地址作为确定出主机本次的操作内容中的操作地址。
在本申请的一些具体实施方式中,上述步骤四可以具体包括:
当操作对象为存储模块时,将得到的物理地址作为确定出的主机本次的操作内容中的操作地址;
当操作对象为寄存器模块时,判断是否开启窗口滑动功能;
如果开启窗口滑动功能,则将得到的物理地址作为滑动地址,并结合配置的滑动基地址,确定出主机本次的操作内容中的操作地址;
如果未开启窗口滑动功能,则将得到的物理地址作为确定出的主机本次的操作内容中的操作地址。
该种实施方式中考虑到,当操作对象为存储模块时,可以直接将得到的物理地址作为确定出的主机本次的操作内容中的操作地址。
而对于寄存器模块,该种实施方式设置了窗口滑动功能,从而按照是否开启窗口滑动功能,确定出主机本次的操作内容中的操作地址。
具体的,当开启窗口滑动功能时,该种实施方式中,是将得到的物理地址作为滑动地址结合配置的滑动基地址,确定出主机本次的操作内容中的操作地址,即滑动地址+滑动基地址=操作地址。例如图5中,BAR2便表示的是滑动地址,通过与滑动基地址结合,可以映射至不同的操作地址,图5中便可以映射至寄存器空间1或寄存器空间2。此外,图5中,BAR0表示的是解析结果中的虚拟地址,可以将其映射至存储地址空间,也即得到对应的物理地址。当然,未开启窗口滑动功能时,可以直接将得到的物理地址作为确定出的主机本次的操作内容中的操作地址。
在开启窗口滑动功能时,可以扩展主机可访问的寄存器地址位宽,因为主机可以使用相同的地址区间来访问可编程存储设备的不同的寄存器空间,进一步的提高了本申请方案的灵活性。
滑动基地址可以进行配置和调整,以起到窗口滑动的功能,具体的调整方式可以有多种。当然,窗口滑动功能也可以选择开启或者关闭。例如在本申请的一些具体实施方式中,还可以包括:
当接收到参数调整端口发送的第二指令时,根据第二指令调整窗口滑动功能的开启状态和/或滑动基地址。
该种实施方式中,可编程存储设备设置有参数调整端口,例如该参数调整端口具体为串口等接口,工作人员可以通过参数调整端口发送第二指令至可编程存储设备,从而使得可编程存储设备根据第二指令调整窗口滑动功能的开启状态和/或滑动基地址,例如根据实际需要,将窗口滑动功能从开启状态切换为关闭状态,或者将窗口滑动功能从关闭状态切换为开启状态,还可以根据实际需要,调整滑动基地址的取值。
进一步的,在本申请的一些具体实施方式中,还可以包括:
接收主机发送的报文并在得到解析结果之后,当确定出主机本次的操作类型为第二参数 调整时,根据本次得到的解析结果调整窗口滑动功能的开启状态和/或滑动基地址。
该种实施方式考虑到,通过可编程存储设备的参数调整端口,虽然能够有效地调整窗口滑动功能的开启状态和/或滑动基地址,但是在实施时未必方便,因为可编程存储设备设置在远端,需要远端的工作人员到现场通过相关调试设备连接到可编程存储设备的参数调整端口,来实现窗口滑动功能的开启状态和/或滑动基地址的调整。
而该种实施方式中,只需要主机发送报文便可以实现调整,无需工作人员进行现场操作,更为方便快捷。
具体的,该种实施方式中需要增设一种操作类型,即第二参数调整这一操作类型,如果在接收主机发送的报文,得到解析结果之后,确定出主机本次的操作类型为第二参数调整,说明此时需要调整窗口滑动功能的开启状态和/或滑动基地址。则可以根据本次得到的解析结果,调整窗口滑动功能的开启状态和/或滑动基地址。例如一些具体场合中,操作类型为第二参数调整时,设定操作内容中的某一bit为0,表示将调整窗口滑动功能设置为开启状态,且此时该bit后续的指定若干bit的数值,视为是滑动基地址。而如果该bit为1,则表示将窗口滑动功能设置为关闭状态。
如上文的描述,本申请的操作类型至少可以包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
在本申请的一些具体实施方式中,当操作类型为连续地址写时,操作内容中可以包括:表示初始写位置的操作地址,数据递增步长或者数据递减步长,初始写位置的数值,以及数据总写入量。
例如一些具体场合中,主机CPU想要向虚拟基地址为0x1000开始的连续递增1K的内存空间,写入从0x5a5a开始递增2的数据。则主机CPU可以发送写内存地址0x1000(虚拟地址空间)开始1K个从0x5a5a开始递增2的数据的命令,该命令与主机CPU写本地内存地址命令相同。之后,主机的PCIe over Ethernet处理单元将该命令封装成报文进而通过网络发送至可编程存储设备。
可编程存储设备进行报文的解析。例如一些具体场合中,op区域的第0个bit为0,即[0]=0,表示操作类型为写操作,op区域的第1个bit为0,即[1]=0,表示操作对象为存储模块。op区域的第2个bit为1,第3个bit为0,即[3:2]=1,表示操作类型为连续地址,因此结合第0个bit为0,便可以确定本次的操作类型具体为连续地址写。
op区域的第4个bit为0,第5个bit为1,第6个bit为0,第7个bit为0即[7:4]=2,表示递增2,也就是操作内容中的数据递增步长为2。op区域的[17:8]=1K,表示本次写入1K个数,也就是操作内容中的数据总写入量为1K。Address区域=0x1000,为虚拟地址,因此需要将连续递增的虚拟地址转换为非连续的物理地址,而对应于虚拟地址0x1000的物理地址便是确定出的操作内容中的初始写位置的操作地址。此外,部分场合中还可以进行内存优化,会把非连续的物理地址整合成适合DDR操作的burst地址模式,以提高DDR SDRAM(Double Data Rate Synchronous Dynamic Random Access Memory双倍速率同步动 态随机存储器)的访存效率。data区域为0x5a5a,也就是操作内容中的初始写位置的数值为0x5a5a。
因此,该例子中,在得到解析结果之后,便可以基于操作类型和操作内容,进行存储器的写操作。
可以看出,该种实施方式中,主机通过发送一次报文,便可以实现数据递增式的连续地址写,灵活性很强,写入效率高,即无需发送多次报文以分别实现各个地址位置的数据写入,而是发送1次报文,使得操作内容中包括:表示初始写位置的操作地址,数据递增步长或者数据递减步长,初始写位置的数值,以及数据总写入量,便可以实现递增或者递减式的连续地址的数据写入。
在本申请的一些具体实施方式中,当操作类型为连续地址读时,操作内容中包括:表示初始读位置的操作地址和数据总读取量。
与前述实施方式类似,操作类型为连续地址读时,解析出的操作内容中需要包括表示初始读位置的操作地址和数据总读取量。例如op区域的第0个bit为1,即[0]=1,表示操作类型为读操作,op区域的第2个bit为1,第3个bit为0,即[3:2]=1,表示操作类型为连续地址,因此结合第0个bit为1,便可以确定本次的操作类型具体为连续地址读。op区域的[17:8]=1K,表示本次读1K个数,也就是操作内容中的数据总读取量为1K。而通过Address区域的地址,可以确定出初始读位置的操作地址。
在本申请的一些具体实施方式中,当操作类型为多个非连续地址读时,操作内容中包括:依次表示第1读位置至第N读位置的第1操作地址至第N操作地址;N为不小于2的正整数。
例如一些具体场合中,主机CPU想要读取远端的可编程存储设备的寄存器空间地址0x20010(PCIe域地址,无需进行虚拟地址转换)的寄存器值,以及寄存器空间地址0x20020(PCIe域地址,无需进行虚拟地址转换)的寄存器值。
例如该种实施方式中开启了窗口滑动功能,滑动基地址具体配置为0x2000。
主机CPU可以发送读寄存器地址0x10和0x20的命令,该命令与主机CPU读取本地寄存器地址命令相同。之后,主机的PCIe over Ethernet处理单元将该命令封装成报文进而通过网络发送至可编程存储设备。
可编程存储设备进行报文的解析。例如一些具体场合中,op区域的第0个bit为1,即[0]=1,表示操作类型为读操作,op区域的第1个bit为1,即[1]=1,表示操作对象为寄存器模块。op区域的第2个bit为1,第3个bit为0,即[3:2]=2,表示操作类型为多个非连续地址,因此结合第0个bit为1,便可以确定本次的操作类型具体为多个非连续地址读。
data区域有2个地址,分别为为0x10和0x20,并且由于这两个地址均为滑动地址,因此结合滑动基地址,可以确定出操作内容中的第1读位置的操作地址为0x20010,第2读位置的操作地址为0x20020。
因此,该种例子中,可以基于操作类型和操作内容进行寄存器的读操作,具体是读取寄存器地址为0x20010的数据,以及寄存器地址为0x20020的数据,且均通过报文反馈给主机,实现主机对于远端寄存器的读取操作。
可以看出,该种实施方式中,主机通过发送一次报文,便可以实现多个非连续地址的读取,灵活性很强,且读取效率高,即无需发送N次读报文以分别实现N个非连续地址的读取,而是发送1次报文即可。
在本申请的一些具体实施方式中,当操作类型为多个非连续地址写时,操作内容中包括:依次表示第1写位置至第N写位置的第1操作地址至第N操作地址,依次表示第1写位置至第N写位置的数据内容;N为不小于2的正整数。
与前述实施方式类似,当操作类型为多个非连续地址写时,操作内容中需要包括依次表示第1写位置至第N写位置的第1操作地址至第N操作地址。并且由于是数据写入,因此还需要包括依次表示第1写位置至第N写位置的数据内容。
可以看出,由于主机发送1次报文,便可以实现N个位置的数据写入,因此灵活性很强,也提高了写入效率,即无需分别发送N次报文来实现N个位置的数据写入。
在本申请的一些具体实施方式中,基于操作类型和操作内容进行存储器操作,可以具体包括;
当根据操作类型和操作内容,确定出多个非连续的物理地址时,通过整合为burst地址模式的方式,基于操作类型和操作内容进行存储器操作。
该种实施方式考虑到,如果操作对象是存储模块,且确定出的是多个非连续的物理地址时,则可以进行内存地址的整合,从而提高内存访问效率,也即通过整合为burst地址模式的方式,可以把非连续的物理地址整合成适合DDR操作的burst地址模式(部分连续),有利于提高DDR的读/写效率。
应用本申请实施例所提供的技术方案,采用的是与主机通信连接的可编程存储设备,即本申请是在存储介质端实现内存映射的优化,使得本申请方案的灵活性提高,具有灵活的内存访问方式。具体的,由于本申请采用的是与主机通信连接的可编程存储设备,因此,可以进行自定义传输协议的设置,可编程存储设备接收主机发送的报文时,便是按照预设的自定义传输协议解析报文,得到解析结果。而由可以进行自定义传输协议的设置,因此,除了单个地址读、单个地址写之外,本申请的操作类型还可以支持多个非连续地址读、多个非连续地址写,连续地址读,以及连续地址写,使得本申请方案具有灵活的内存访问方式。
得到了解析结果之后,便可以根据解析结果,确定出主机本次的操作对象,操作类型以及操作内容。当操作对象为寄存器模块时,可以基于操作类型和操作内容进行寄存器操作,而当操作对象为存储模块时,便可以基于操作类型和操作内容进行存储器操作,即本申请的方案可以有效地进行可编程存储设备中的寄存器模块和存储模块的访问,也即可以有效地实现内存映射。此外,本申请通过设置可编程存储设备实现了内存映射,即所有功能可以在可编程存储设备中通过硬件介质实现,因此相较于传统方案中通过主机端的设置实现内存映 射,性能会更高。
综上,本申请的方案可以有效地实现内存映射,并且具有灵活的内存访问方式,且性能更高。
相应于上面的方法实施例,本申请实施例还提供了一种内存映射系统,可与上文相互对应参照。
参见图3所示,为本申请中一种内存映射系统的结构示意图,应用于与主机通信连接的可编程存储设备中,包括:
解析单元301,用于接收主机发送的报文并按照预设的自定义传输协议解析报文,得到解析结果;根据解析结果,确定出主机本次的操作对象,操作类型以及操作内容;
第一执行单元302,用于当操作对象为寄存器模块时,基于操作类型和操作内容进行寄存器操作;
第二执行单元303,用于当操作对象为存储模块时,基于操作类型和操作内容进行存储器操作;
其中,操作类型至少包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
在本申请的一些具体实施方式中,操作内容中包括操作地址;解析单元301根据解析结果确定出主机本次的操作内容中的操作地址,包括:
判断是否开启地址转换功能;
如果开启地址转换功能,则对解析结果中的虚拟地址进行转换,得到对应于虚拟地址的物理地址;
如果未开启地址转换功能,则将解析结果中的地址作为得到的物理地址;
根据操作对象以及得到的物理地址,确定出主机本次的操作内容中的操作地址。
在本申请的一些具体实施方式中,还包括:
第一调整单元,用于当接收到参数调整端口发送的第一指令时,根据第一指令调整地址转换功能的开启状态。
在本申请的一些具体实施方式中,还包括:
第二调整单元,用于接收主机发送的报文并在得到解析结果之后,当确定出主机本次的操作类型为第一参数调整时,根据本次得到的解析结果调整地址转换功能的开启状态。
在本申请的一些具体实施方式中,解析单元301根据操作对象以及得到的物理地址,确定出主机本次的操作内容中的操作地址,包括:
当操作对象为存储模块时,将得到的物理地址作为确定出的主机本次的操作内容中的操作地址;
当操作对象为寄存器模块时,判断是否开启窗口滑动功能;
如果开启窗口滑动功能,则将得到的物理地址作为滑动地址,并结合配置的滑动基地址,确定出主机本次的操作内容中的操作地址;
如果未开启窗口滑动功能,则将得到的物理地址作为确定出的主机本次的操作内容中的操作地址。
在本申请的一些具体实施方式中,还包括:
第三调整单元,用于当接收到参数调整端口发送的第二指令时,根据第二指令调整窗口滑动功能的开启状态和/或滑动基地址。
在本申请的一些具体实施方式中,还包括:
第四调整单元,用于接收主机发送的报文并在得到解析结果之后,当确定出主机本次的操作类型为第二参数调整时,根据本次得到的解析结果调整窗口滑动功能的开启状态和/或滑动基地址。
在本申请的一些具体实施方式中,当操作类型为连续地址写时,操作内容中包括:表示初始写位置的操作地址,数据递增步长或者数据递减步长,初始写位置的数值,以及数据总写入量。
在本申请的一些具体实施方式中,当操作类型为连续地址读时,操作内容中包括:表示初始读位置的操作地址和数据总读取量。
在本申请的一些具体实施方式中,当操作类型为多个非连续地址写时,操作内容中包括:依次表示第1写位置至第N写位置的第1操作地址至第N操作地址,依次表示第1写位置至第N写位置的数据内容;N为不小于2的正整数。
在本申请的一些具体实施方式中,当操作类型为多个非连续地址读时,操作内容中包括:依次表示第1读位置至第N读位置的第1操作地址至第N操作地址;N为不小于2的正整数。
在本申请的一些具体实施方式中,基于操作类型和操作内容进行存储器操作,包括;
当根据操作类型和操作内容,确定出多个非连续的物理地址时,通过整合为burst地址模式的方式,基于操作类型和操作内容进行存储器操作。
相应于上面的方法和系统实施例,本申请实施例还提供了一种内存映射设备以及一种非易失性可读存储介质,可与上文相互对应参照。可参阅图7,该非易失性可读存储介质700上存储有计算机程序701,计算机程序801被处理器执行时实现如上述任一实施例中的内存映射方法的步骤。这里所说的非易失性可读存储介质包括随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质。
可参阅图4,该内存映射设备可以包括:
寄存器模块401,寄存器模块402;
处理模块403,用于执行计算机程序以实现如上述任一实施例中的内存映射方法的步骤。
相应于上面的实施例,本申请实施例还提供了一种内存映射方法,可以应用于主机端,可参阅图6,可以包括以下步骤:
步骤S601:按照主机本次的操作对象,操作类型以及操作内容,生成报文;
步骤S602:按照预设的自定义传输协议发送报文至可编程存储设备,以使可编程存储设备解析报文,并根据解析后得到的解析结果,确定出主机本次的操作对象,操作类型以及操作内容;
其中,当操作对象为寄存器模块时,可编程存储设备基于操作类型和操作内容进行寄存器操作;当操作对象为存储模块时,可编程存储设备基于操作类型和操作内容进行存储器操作;操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的系统和设备而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的技术方案及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请的保护范围内。

Claims (20)

  1. 一种内存映射方法,其特征在于,包括:
    接收所述主机发送的报文并按照预设的自定义传输协议解析所述报文,得到解析结果;
    根据所述解析结果,确定出所述主机本次的操作对象,操作类型以及操作内容;
    当所述操作对象为寄存器模块时,基于所述操作类型和所述操作内容进行寄存器操作;
    当所述操作对象为存储模块时,基于所述操作类型和所述操作内容进行存储器操作;
    其中,所述操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
  2. 根据权利要求1所述的内存映射方法,其特征在于,所述操作内容中包括操作地址;根据所述解析结果确定出所述主机本次的操作内容中的操作地址,包括:
    判断是否开启地址转换功能;
    如果开启地址转换功能,则对所述解析结果中的虚拟地址进行转换,得到对应于所述虚拟地址的物理地址;
    如果未开启地址转换功能,则将所述解析结果中的地址作为得到的物理地址;
    根据所述操作对象以及得到的所述物理地址,确定出所述主机本次的操作内容中的操作地址。
  3. 根据权利要求2所述的内存映射方法,其特征在于,所述对所述解析结果中的虚拟地址进行转换,得到对应于所述虚拟地址的物理地址,包括:
    当所述操作对象为存储模块时,将所述主机的虚拟内存地址空间转换为PCIe域的存储地址空间;
    当所述操作对象为寄存器模块时,将所述主机的虚拟IO地址空间转换为PCIe域的寄存器地址空间。
  4. 根据权利要求2所述的内存映射方法,其特征在于,还包括:
    当接收到参数调整端口发送的第一指令时,根据所述第一指令调整所述地址转换功能的开启状态。
  5. 根据权利要求4所述的内存映射方法,其特征在于,所述参数调整端口为串口。
  6. 根据权利要求2所述的内存映射方法,其特征在于,还包括:
    接收所述主机发送的报文并在得到解析结果之后,当确定出所述主机本次的操作类型为第一参数调整时,根据本次得到的所述解析结果调整所述地址转换功能的开启状态。
  7. 根据权利要求2所述的内存映射方法,其特征在于,所述根据所述操作对象以及得到的所述物理地址,确定出所述主机本次的操作内容中的操作地址,包括:
    当所述操作对象为存储模块时,将得到的所述物理地址作为确定出的所述主机本次的操作内容中的操作地址;
    当所述操作对象为寄存器模块时,判断是否开启窗口滑动功能;
    如果开启窗口滑动功能,则将得到的所述物理地址作为滑动地址,并结合配置的滑动基地址,确定出所述主机本次的操作内容中的操作地址;
    如果未开启窗口滑动功能,则将得到的所述物理地址作为确定出的所述主机本次的操作内容中的操作地址。
  8. 根据权利要求7所述的内存映射方法,其特征在于,还包括:
    当接收到参数调整端口发送的第二指令时,根据所述第二指令调整所述窗口滑动功能的开启状态和/或所述滑动基地址。
  9. 根据权利要求7所述的内存映射方法,其特征在于,还包括:
    接收所述主机发送的报文并在得到解析结果之后,当确定出所述主机本次的操作类型为第二参数调整时,根据本次得到的所述解析结果调整所述窗口滑动功能的开启状态和/或所述滑动基地址。
  10. 根据权利要求1所述的内存映射方法,其特征在于,当所述操作类型为连续地址写时,所述操作内容中包括:表示初始写位置的操作地址,数据递增步长或者数据递减步长,初始写位置的数值,以及数据总写入量。
  11. 根据权利要求1所述的内存映射方法,其特征在于,当所述操作类型为连续地址读时,所述操作内容中包括:表示初始读位置的操作地址和数据总读取量。
  12. 根据权利要求1所述的内存映射方法,其特征在于,当所述操作类型为多个非连续地址写时,所述操作内容中包括:依次表示第1写位置至第N写位置的第1操作地址至第N操作地址,依次表示第1写位置至第N写位置的数据内容;N为不小于2的正整数。
  13. 根据权利要求1所述的内存映射方法,其特征在于,当所述操作类型为多个非连续地址读时,所述操作内容中包括:依次表示第1读位置至第N读位置的第1操作地址至第N操作地址;N为不小于2的正整数。
  14. 根据权利要求1至13任一项所述的内存映射方法,其特征在于,所述基于所述操作类型和所述操作内容进行存储器操作,包括;
    当根据所述操作类型和所述操作内容,确定出多个非连续的物理地址时,通过整合为burst地址模式的方式,基于所述操作类型和所述操作内容进行存储器操作。
  15. 根据权利要求1所述的内存映射方法,其特征在于,所述主机发送的报文为在所述主机要操作远端内存时,将对远端的内存操作行为封装成报文。
  16. 根据权利要求1所述的内存映射方法,其特征在于,所述操作内容用于表示所述主机本次操作的具体操作信息。
  17. 一种内存映射系统,其特征在于,包括:
    解析单元,用于接收所述主机发送的报文并按照预设的自定义传输协议解析所述报 文,得到解析结果;根据所述解析结果,确定出所述主机本次的操作对象,操作类型以及操作内容;
    第一执行单元,用于当所述操作对象为寄存器模块时,基于所述操作类型和所述操作内容进行寄存器操作;
    第二执行单元,用于当所述操作对象为存储模块时,基于所述操作类型和所述操作内容进行存储器操作;
    其中,所述操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
  18. 一种内存映射方法,其特征在于,包括:
    按照主机本次的操作对象,操作类型以及操作内容,生成报文;
    按照预设的自定义传输协议发送报文至可编程存储设备,以使所述可编程存储设备解析所述报文,并根据解析后得到的解析结果,确定出所述主机本次的操作对象,操作类型以及操作内容;
    其中,当所述操作对象为寄存器模块时,所述可编程存储设备基于所述操作类型和所述操作内容进行寄存器操作;当所述操作对象为存储模块时,所述可编程存储设备基于所述操作类型和所述操作内容进行存储器操作;所述操作类型包括:单个地址读、单个地址写、多个非连续地址读、多个非连续地址写、连续地址读、以及连续地址写。
  19. 一种内存映射设备,其特征在于,包括:
    寄存器模块,寄存器模块;
    处理模块,用于执行计算机程序以实现如权利要求1至16任一项所述的内存映射方法的步骤。
  20. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至16任一项所述的内存映射方法的步骤。
PCT/CN2023/081751 2022-10-14 2023-03-15 一种内存映射方法、系统、设备及存储介质 WO2024077866A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211260324.XA CN115878512A (zh) 2022-10-14 2022-10-14 一种内存映射方法、系统、设备及存储介质
CN202211260324.X 2022-10-14

Publications (1)

Publication Number Publication Date
WO2024077866A1 true WO2024077866A1 (zh) 2024-04-18

Family

ID=85770427

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081751 WO2024077866A1 (zh) 2022-10-14 2023-03-15 一种内存映射方法、系统、设备及存储介质

Country Status (2)

Country Link
CN (1) CN115878512A (zh)
WO (1) WO2024077866A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116679986A (zh) * 2023-08-02 2023-09-01 苏州浪潮智能科技有限公司 寄存器的访问方法、装置、服务器、系统及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445729A (zh) * 2020-11-30 2021-03-05 深圳开立生物医疗科技股份有限公司 操作地址确定方法、PCIe系统、电子设备及存储介质
CN113179216A (zh) * 2021-04-23 2021-07-27 北京物芯科技有限责任公司 一种寄存器的远程配置方法、计算机设备及存储介质
CN113688072A (zh) * 2020-05-19 2021-11-23 华为技术有限公司 数据处理方法及设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113688072A (zh) * 2020-05-19 2021-11-23 华为技术有限公司 数据处理方法及设备
CN112445729A (zh) * 2020-11-30 2021-03-05 深圳开立生物医疗科技股份有限公司 操作地址确定方法、PCIe系统、电子设备及存储介质
CN113179216A (zh) * 2021-04-23 2021-07-27 北京物芯科技有限责任公司 一种寄存器的远程配置方法、计算机设备及存储介质

Also Published As

Publication number Publication date
CN115878512A (zh) 2023-03-31

Similar Documents

Publication Publication Date Title
CN108600053B (zh) 一种基于零拷贝技术的无线网络数据包捕获方法
WO2023284169A1 (zh) 从axi总线到opb总线的数据写入方法及读取方法
WO2024077866A1 (zh) 一种内存映射方法、系统、设备及存储介质
EP4050491A1 (en) Method for converting avalon bus into axi4 bus
CN104641360A (zh) 对存储器及对等设备的双播PCIe入站写入
US11675744B2 (en) Performing a code conversion in a smaller target encoding space
WO2024082944A1 (zh) 一种多处理器数据交互方法、装置、设备及存储介质
WO2015180650A1 (zh) 在存储网络中的键值生成方法及装置
US20230239358A1 (en) Method for fowarding data, device, storage medium and data transmission system
JP2009123201A (ja) データを処理するためのサーバ‐プロセッサ・ハイブリッド・システムおよび方法
CN111277676A (zh) 一种基于http协议的双栈统一接入方法与系统
CN101848239A (zh) 一种高时效性的分布式服务集成调用系统
US9116881B2 (en) Routing switch apparatus, network switch system, and routing switching method
EP1667404B1 (en) Method for the transmission of structured data using a byte stream
CN111314495A (zh) 基于物联网LoRaWAN的通信方法、装置、设备、存储介质和系统
CN102420749A (zh) 一种网卡发包功能的实现装置和方法
CN114205115B (zh) 一种数据包处理优化方法、装置、设备及介质
CN115495406A (zh) 一种基于PCIe的报文传输方法、装置、设备及存储介质
CN114490459A (zh) 数据传输方法、装置、设备、接收机和存储介质
KR20220032612A (ko) 패킷 네트워크 내에서 플러시 요청들을 프로세싱하기 위한 장치 및 방법
CN111538688B (zh) 数据处理方法、装置、模组及芯片
CN118132472B (zh) 一种基于多接口ddr内存控制器的实现方法及装置
WO2024044976A1 (zh) 数据采集装置、方法、系统、电子设备和存储介质
CN116232779A (zh) 一种usb网卡、数据传输方法、装置及可读存储介质
CN115695176A (zh) 一种配置物理接口芯片的方法及相关装置

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: 23876079

Country of ref document: EP

Kind code of ref document: A1