CN116578350A - Communication interface function configuration method, device, communication system, equipment and medium - Google Patents

Communication interface function configuration method, device, communication system, equipment and medium Download PDF

Info

Publication number
CN116578350A
CN116578350A CN202310609587.5A CN202310609587A CN116578350A CN 116578350 A CN116578350 A CN 116578350A CN 202310609587 A CN202310609587 A CN 202310609587A CN 116578350 A CN116578350 A CN 116578350A
Authority
CN
China
Prior art keywords
target
communication interface
current
address information
information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310609587.5A
Other languages
Chinese (zh)
Inventor
陈贝
满宏涛
王硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202310609587.5A priority Critical patent/CN116578350A/en
Publication of CN116578350A publication Critical patent/CN116578350A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The invention relates to the technical field of data communication, and discloses a communication interface function configuration method, a device, a communication system, equipment and a medium; determining current configuration information of a target communication interface based on the type of the target device; the current configuration information includes current base address information; establishing a mapping relation between the current base address information and the device address information of the target device type; the device address information is preset address information which corresponds to each device type respectively; the mapping relation is used for mapping the read-write operation to the current base address information. Therefore, the configuration information of the communication interface can be updated according to the requirements, and the mapping relation between the communication interface and the target equipment is reestablished based on the updated configuration information, so that the flexible configuration of the communication interface function is realized.

Description

Communication interface function configuration method, device, communication system, equipment and medium
Technical Field
The present invention relates to the field of data communications, and in particular, to a method, an apparatus, a communication system, a device, and a medium for configuring a communication interface function.
Background
The high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIe) interface is based on high-speed serial interconnection technology, and can support a variety of devices, such as a display card, a hard disk, and a network card device, and can also be expanded into other interfaces, such as a double-rate synchronous dynamic random access memory (Double Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM) interface, a universal serial bus (Universal Serial Bus, USB) interface, and a display interface. Different devices or interface types may be identified by device numbers of the high-speed serial computer expansion bus standard interface to implement different functions of the high-speed serial computer expansion bus standard interface. In the existing device, configuration information such as a device number of the high-speed serial computer expansion bus interface is not changed after configuration, when the system needs to expand the high-speed serial computer expansion bus interface into devices or interfaces with other functions, the system cannot load corresponding drivers according to the configuration information of the high-speed serial computer expansion bus interface, and an adaptive interface needs to be additionally arranged to complete the expansion of the functions of the high-speed serial computer expansion bus interface, so that the high-speed serial computer expansion bus interface has low flexibility and poor compatibility.
Disclosure of Invention
In view of the above, the present invention provides a method, apparatus, communication system, device and medium for configuring functions of a communication interface, so as to solve the problem that the function cannot be flexibly configured by using a high-speed serial computer expansion bus interface.
In a first aspect, the present invention provides a method for configuring a communication interface function, including:
receiving a target equipment type of a target communication interface sent by a control terminal;
determining current configuration information of a target communication interface based on the type of the target device; the current configuration information includes current base address information;
establishing a mapping relation between the current base address information and the device address information of the target device type; the device address information is preset address information which corresponds to each device type respectively; the mapping relation is used for mapping the read-write operation to the current base address information.
Therefore, the configuration information of the communication interface can be updated according to the requirements, and the mapping relation between the communication interface and the target equipment is reestablished based on the updated configuration information, so that the flexible configuration of the communication interface function is realized.
As an alternative embodiment, determining the current configuration information of the target communication interface based on the target device type includes:
Determining target configuration information of a target communication interface based on the target equipment type;
in response to the function update request, the target configuration information is determined as current configuration information of the target communication interface.
As an alternative embodiment, determining the target configuration information of the target communication interface based on the target device type includes:
determining target equipment information and target address information corresponding to the target equipment type;
and configuring target address space information of the target communication interface based on the target address information.
As an alternative embodiment, the target address information includes target space information and target base address information; determining target address space information of the target communication interface based on the target address information, comprising:
determining the size of a target address space based on the target space information;
based on the target base address information and the size of the address space, an address segment range of a target address space of the target communication interface is determined to determine target address space information.
As an alternative embodiment, determining the target configuration information as the current configuration information of the target communication interface includes:
determining the target equipment information as the current equipment information of the target communication interface;
Determining the target base address information as the current base address information of the target communication interface;
and determining the target address space information as the current address space information of the target communication interface.
In a second aspect, the present invention provides a method for configuring a communication interface function, including:
acquiring a target equipment type of a target communication interface and sending the target equipment type to a communication interface chip;
acquiring current equipment types of a plurality of communication interfaces;
based on the current equipment types of the plurality of communication interfaces, distributing storage space for the plurality of communication interfaces, and establishing a mapping relation between the distributed storage space and the current base address information of the communication interface chip; the mapping relation is used for mapping the read-write operation mapped to the current base address information into the storage space obtained by allocation;
loading device drivers of target devices corresponding to the plurality of communication interfaces based on the current device types of the plurality of communication interfaces; the device driver is used to invoke and operate the target device.
Therefore, the device type of the communication interface can be updated according to the requirements, the storage space is redistributed, and corresponding device drivers are loaded, so that the flexible configuration of the communication interface functions is realized.
As an optional implementation manner, after obtaining the target device type of the target communication interface and sending the target device type to the communication interface chip, before obtaining the current device types of the plurality of communication interfaces, the method further includes:
and stopping the read-write operation of the target communication interface and initiating a function update request to the communication interface chip when the target communication interface finishes the current read-write operation or the target communication interface does not perform the read-write operation.
Therefore, the configuration information of the target communication interface can be fully updated after the current read-write operation of the target communication interface needing to reconfigure the function is completely finished, the integrity of data read-write is guaranteed, and the reliability of the communication interface is improved.
As an optional implementation manner, based on the current device types of the plurality of communication interfaces, allocating storage space for the plurality of communication interfaces, and establishing a mapping relationship between the allocated storage space and the current base address information of the communication interface chip, including:
when updated communication interfaces with inconsistent current equipment types and historical equipment types exist in the plurality of communication interfaces, storage space is allocated for the updated communication interfaces, and a mapping relation is established between the allocated storage space and current base address information of a communication interface chip.
Therefore, only the storage space is allocated for the communication interfaces with the reconfiguration function, the memory space can be allocated reasonably, and the work of other communication interfaces without the reconfiguration function is not influenced.
As an optional implementation manner, based on the current device types of the plurality of communication interfaces, loading device drivers of target devices corresponding to the plurality of communication interfaces includes:
when an updated communication interface with the current device type inconsistent with the historical device type exists in the plurality of communication interfaces, loading the device driver of the target device corresponding to the updated communication interface.
In a third aspect, the present invention provides a communication interface function configuration apparatus, comprising:
the target equipment type receiving module is used for receiving the target equipment type of the target communication interface sent by the control terminal;
the current configuration information determining module is used for determining the current configuration information of the target communication interface based on the type of the target equipment; the current configuration information includes current base address information;
the mapping relation establishing module is used for establishing a mapping relation between the current base address information and the equipment address information of the target equipment type; the device address information is preset address information which corresponds to each device type respectively; the mapping relation is used for mapping the read-write operation to the current base address information. .
In a fourth aspect, the present invention provides a communication interface function configuration apparatus, comprising:
the target equipment type acquisition module is used for acquiring the target equipment type of the target communication interface and sending the target equipment type to the communication interface chip;
the current equipment type acquisition module is used for acquiring the current equipment types of the plurality of communication interfaces;
the memory space allocation module is used for allocating memory spaces for the plurality of communication interfaces based on the current equipment types of the plurality of communication interfaces, and establishing a mapping relation between the allocated memory spaces and the current base address information of the communication interface chip; the mapping relation is used for mapping the read-write operation mapped to the current base address information into the storage space obtained by allocation;
the device driver loading module is used for loading device drivers of target devices corresponding to the plurality of communication interfaces based on the current device types of the plurality of communication interfaces; the device driver is used to invoke and operate the target device.
In a fifth aspect, the present invention provides a communication system, the system comprising a control terminal and a communication interface chip; the communication interface chip is connected with the control end;
the control end obtains the target equipment type of the target communication interface and sends the target equipment type to the communication interface chip;
The communication interface chip establishes a mapping relationship between device address information of the target device type and current base address information of the target device type based on the communication interface function configuration method of the first aspect or any implementation mode corresponding to the first aspect and the target device type, so as to map read-write operations into the current base address information;
the control end allocates storage space for each communication interface based on the communication interface function configuration method of the second aspect or any corresponding implementation mode thereof, and establishes a mapping relation between the allocated storage space and the current base address information so as to map read-write operations mapped into the current base address information into the allocated storage space;
the control end loads the device driver corresponding to each communication interface based on the communication interface function configuration method of the second aspect or any implementation mode corresponding to the second aspect so as to call and operate the device corresponding to each communication interface.
In a sixth aspect, the present invention provides a computer device comprising: the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions, thereby executing the communication interface function configuration method according to the first aspect or the second aspect or any implementation manner corresponding to the first aspect or the second aspect.
In a seventh aspect, the present invention provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the communication interface function configuration method of the first aspect or the second aspect or any implementation manner corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an environment provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a method of configuring communication interface functions according to an embodiment of the present invention;
FIG. 3 is a flow chart of another communication interface function configuration method according to an embodiment of the present invention;
FIG. 4 is a flow chart of yet another method of configuring communication interface functionality according to an embodiment of the invention;
FIG. 5 is a flow chart of a method for configuring a communication interface function according to an embodiment of the present invention;
Fig. 6 is a block diagram of a communication interface function configuration apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram of a communication interface function configuration apparatus according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of an environment provided by an embodiment of the present invention, including a control end 101, a communication interface chip 102, and a plurality of devices 103. The control end 101 can acquire the update requirement of the user on the communication interface function, that is, the target communication interface and the target device type of the target communication interface, and send the update requirement to the communication interface 102. The communication interface 102 updates the configuration information of the target communication interface according to the target communication interface and the target device type of the target communication interface, and meanwhile, the control end 101 reallocates the storage space of the communication interface and loads the device driver of the corresponding device 103, thereby realizing the function switching of the communication interface in the communication interface chip 102.
Specifically, on the one hand, the communication interface chip 102 receives the target device type of the target communication interface sent by the control end 101; determining current configuration information of a target communication interface based on the type of the target device; establishing a mapping relation between the current base address information in the current configuration information and the device address information of the target device type; the device address information is preset address information corresponding to each device type.
On the other hand, the control end 101 acquires a target device type of the target communication interface and sends the target device type to the communication interface chip 102; acquiring current equipment types of a plurality of communication interfaces; based on the current equipment types of the communication interfaces, allocating storage space for the communication interfaces, and establishing a mapping relation between the storage space and the current base address information of the communication interface chip; based on the current device types of the plurality of communication interfaces, device drivers of target devices corresponding to the plurality of communication interfaces are loaded.
As an alternative embodiment, a plurality of communication interfaces may be provided in the communication interface chip 102, and these communication interfaces may be all provided as communication interfaces capable of switching functions, or a part of the communication interfaces may be provided as communication interfaces of a fixed function, and another part of the communication interfaces may be provided as communication interfaces capable of switching functions. The device types of the communication interfaces of these fixed functions may not be acquired every time the control terminal 101 acquires the device types of the communication interfaces in the communication interface chip 102 to reallocate the memory space.
As an optional implementation manner, the number and the function type of the communication interfaces with fixed functions can be determined according to the requirements of the user, or the communication interfaces with more requirements can be selected for setting through requirement investigation in advance.
As an optional implementation manner, the communication interface chip 102 may further include a control module and an address mapping module, where the control module is responsible for determining current configuration information of the target communication interface based on the target device type of the target communication interface sent by the control terminal 101, and the address mapping module is responsible for establishing a mapping relationship between current base address information and device address information of the target communication interface.
As an alternative embodiment, the control terminal 101 may be any integrated circuit, apparatus or device, etc. capable of accessing the communication interface chip 102.
As an alternative embodiment, each device 103 of the plurality of devices 103 may be a different type of device or may be the same type of device.
According to an embodiment of the present invention, there is provided a communication interface function configuration method embodiment, it being noted that the steps shown in the flowcharts of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that herein.
In this embodiment, a communication interface function configuration method is provided, which may be used in the integrated circuit, the apparatus or the device accessing the communication interface chip 102, and fig. 2 is a flowchart of the communication interface function configuration method according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S201, receiving a target device type of a target communication interface sent by a control end.
In the embodiment of the present invention, the communication interface chip 102 is accessed into the control end 101, where the control end 101 is used as a platform for interaction with a user, so that the configuration requirement of the user on the communication interface function can be obtained, and the configuration requirement includes a communication interface needing to update the function, i.e. a target communication interface, and a function needing to update the target communication interface, i.e. a target device type. The control terminal 101 sends the target device type of the target communication interface to the communication interface chip 102, so that the communication interface chip 102 starts to reconfigure and switch the functions of the communication interface based on the target device type of the target communication interface.
Step S202, determining current configuration information of the target communication interface based on the target device type.
In the embodiment of the invention, the current configuration information comprises the current equipment information and the current base address information of the target communication interface. The device information can characterize the device type, i.e. the function type, of the corresponding communication interface, and the device information and its corresponding device type can be shown in table 1 below. One piece of device information, i.e., the target device information of the target device type, can be uniquely determined based on the target device type, and the target device information is taken as the current device information of the target communication interface. Based on the target device type or target device information, current base address information for the target communication interface can be determined.
TABLE 1
Device information Device type
0x00 Undefined device
0x01 Mass storage controller
0x02 Network controller
0x03 Display controller
0x05 Memory controller
0x09 Input device controller
0x0c Serial bus controller
In the embodiment of the present invention, when the control end 101 is started and initialized, a base address information is allocated to each device, where the base address information on one hand establishes a mapping relationship with the device address information inside the communication interface chip 102, on the other hand establishes a mapping relationship with the storage space allocated in the control end 101, so as to establish a mapping relationship as an intermediate address between the device address information inside the communication interface chip 102 and the storage space allocated in the control end 101.
As an alternative embodiment, when the same type of device 103 is not present in the plurality of devices 103, the corresponding base address information can be uniquely determined based on the device information, and then the corresponding target device information and the target base address information can be uniquely determined based on the target device type of the target communication interface.
As an alternative embodiment, when the same type of device 103 exists among the plurality of devices 103, the device information of these same type of devices 103 is the same, but the base address information is different, and the distinction is made by the base address information.
Alternatively, when the target device type of the target communication interface obtained by the control end 101 is a device type in which a plurality of devices 103 exist, if no specific device is specified in the user update requirements obtained by the control end 101, it is possible to search for base address information of a device 103 that is not enabled among the devices 103 whose device type is the target device type, and select one base address information from among them as the target base address information of the target communication interface, that is, select one device 103 to be enabled from among the devices 103 that are not enabled.
Alternatively, when the target device type of the target communication interface obtained by the control end 101 is a device type in which a plurality of devices 103 exist, if a specific device is specified in the user update requirement obtained by the control end 101, for example, the devices of the same device type may be numbered to form a distinction, then the base address information of the specified device may be directly used as the target base address information of the target communication interface.
Step S203, a mapping relationship is established between the current base address information and the device address information of the target device type.
In the embodiment of the invention, the device address information is preset address information respectively corresponding to each device type. The device address information is address information built in the communication interface chip 102, which characterizes the address space base address inside the communication interface chip 102, i.e., the start address of the address space inside the communication interface chip 102, for each device type, i.e., each device.
In the embodiment of the present invention, the communication interface chip 102 establishes a mapping relationship between the current base address information and the device address information corresponding to the target communication interface, so as to map the read-write operation to the current base address information. And then, a mapping relation is established between the current base address information corresponding to the target communication interface and the storage space in the control end 101 through the control end 101, so that a mapping relation is established between the equipment address information of the target communication interface and the storage space in the control end 101, the operation of the target communication interface is mapped into the storage space in the control end 101, and the bus access operation of the target communication interface is mapped onto the corresponding equipment.
According to the communication interface function configuration method provided by the embodiment, the current configuration information of the target communication interface is reconfigured according to the type of the target equipment of the target communication interface, so that the mapping relation is established between the target communication interface and the target equipment again, and flexible configuration of the communication interface function is realized.
In this embodiment, a communication interface function configuration method is provided, which may be used in the integrated circuit, the apparatus or the device accessing the communication interface chip 102, and fig. 3 is a flowchart of another communication interface function configuration method according to an embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
Step S301, receiving a target device type of a target communication interface sent by a control end. Please refer to step S201 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S302, determining current configuration information of the target communication interface based on the target device type.
Specifically, the step S302 includes:
in step S3021, target configuration information of a target communication interface is determined based on a target device type.
In the embodiment of the present invention, since the target communication interface may be performing a read-write operation, at this time, the current configuration information of the target communication interface is directly reconfigured, which may cause interruption of the current read-write operation and cause abnormal read-write operation, so when the communication interface chip 102 receives the target device type of the target communication interface, the configuration information is prepared, but the current configuration information of the target communication interface is not directly updated, that is, the target configuration information of the target communication interface is first determined.
As an alternative embodiment, the step S3021 may include:
and a1, determining target equipment information and target address information corresponding to the target equipment type.
In the embodiment of the invention, firstly, the corresponding target equipment information and target address information are determined based on the type of the target equipment of the target communication interface. The target equipment information is equipment information corresponding to the type of the target equipment; the target address information is address information corresponding to the type of the target device, and is set correspondingly as described in step S202.
And a step a2 of configuring target address space information of the target communication interface based on the target address information.
In the embodiment of the invention, the target address information comprises target space information and target base address information. The space information is the same as the device address information, and is the information built in the communication interface chip 102, each device address information has corresponding space information, and the space size of the address space information of the communication interface is consistent with the space size of the device address information corresponding to the device address information, so that when determining the target address information, the space information of the device address information corresponding to the target device type, that is, the target space information, needs to be determined.
In the embodiment of the present invention, as described in the above step S202, the destination address information of the destination communication interface is determined based on the destination device type.
As an alternative embodiment, the step a2 may include:
step a21, determining the size of the target address space based on the target space information.
In the embodiment of the invention, the target space information characterizes the space size of the device address information corresponding to the target device type, and simultaneously characterizes the space size of the corresponding target address space. Therefore, the space size of the target address space can be determined based on the target space information.
Step a22, determining the address segment range of the target address space of the target communication interface based on the target base address information and the size of the address space to determine the target address space information.
In the embodiment of the invention, the target base address information is used as the initial address of the address segment of the target address space, and then the address segment range of the target address space is determined by combining the size of the address space, so that the target address space information is obtained. All read-write operations mapped in the target address space information range are read-write operations aiming at the target communication interface.
In step S3022, in response to the function update request, the target configuration information is determined as the current configuration information of the target communication interface.
In the embodiment of the present invention, when the current read-write operation of the target communication interface in the control terminal 101 is completed, it indicates that the configuration information of the target communication interface can be updated, and the function of the target communication interface is reconfigured, and at this time, the control terminal 101 generates a function update request. Accordingly, the communication interface chip 102 determines the target configuration information as the current configuration information in response to the function update request to complete the configuration update of the target communication interface.
As an alternative embodiment, a device function register may be provided in the communication interface chip 102, where a reset function bit is provided, and the function update request is implemented through the reset function bit. When the communication interface chip 102 is just started, the reset function bit is enabled, so that the reset function bit is activated, and the assignment of the reset function bit can correctly reflect the requirement of requesting function update.
As an alternative embodiment, when the current read/write operation of the target communication interface in the control terminal 101 is completed, the reset function bit of the device function register is assigned to 1. When the value of the reset function bit is 1, the communication interface chip 102 generates a response, i.e., in response to the function update request, to determine the target configuration information as the current configuration information.
As an alternative embodiment, the current configuration information includes current device information, current base address information, and current address space information corresponding to the target configuration information. Based on this, the step S3022 may include: determining the target equipment information as the current equipment information of the target communication interface; determining the target base address information as the current base address information of the target communication interface; and determining the target address space information as current address space information of the target communication interface.
Step S303, a mapping relationship is established between the current base address information and the device address information of the target device type. Please refer to step S203 in the embodiment shown in fig. 2 in detail, which is not described herein.
According to the communication interface function configuration method provided by the embodiment, the configuration information of the target communication interface is not directly updated, but after the current read-write operation of the target communication interface is completed, the function update request is regenerated successfully, the communication interface chip 102 responds to the function update request, the configuration of the target communication interface is updated, the read-write abnormality caused by the interruption of the current read-write operation is avoided, and the reliability of the communication interface chip 102 is ensured.
In this embodiment, a communication interface function configuration method is provided, which may be used in the integrated circuit, the apparatus or the device accessing the communication interface chip 102, and fig. 4 is a flowchart of another communication interface function configuration method according to an embodiment of the present invention, and as shown in fig. 4, the flowchart includes the following steps:
step S401, a target device type of a target communication interface is acquired, and the target device type is sent to a communication interface chip.
In the embodiment of the present invention, the control end 101, as a platform for interaction with a user, can obtain a configuration requirement of the user on a communication interface function, including a communication interface that needs to update a function, i.e., a target communication interface, and a function that needs to be updated by the target communication interface, i.e., a target device type. The control terminal 101 sends the target device type of the target communication interface to the communication interface chip 102, so that the communication interface chip 102 starts to reconfigure and switch the functions of the communication interface based on the target device type of the target communication interface.
Step S402, a current device type of a plurality of communication interfaces is acquired.
In the embodiment of the present invention, in order to reallocate the storage space in the control end 101, after the communication interface chip 102 reconfigures the current configuration information of the target communication interface, the current device type of each communication interface in the communication interface chip 102 is obtained.
As an alternative implementation manner, after the communication interface chip 102 completes the reconfiguration of the current configuration information of the target communication interface, a signal may be generated by an external power-up manner or the like to inform the control terminal 101 that the communication interface chip 102 has completed the related operation about the functional configuration of the target communication interface, and the control terminal 101 may reallocate the storage space of each communication interface.
Step S403, based on the current device types of the plurality of communication interfaces, allocates storage space for the plurality of communication interfaces, and establishes a mapping relationship between the allocated storage space and the current base address information of the communication interface chip.
In the embodiment of the invention, the storage space can be allocated for each communication interface according to the communication protocol corresponding to the communication interface. Meanwhile, in order to map the bus access operation of the target communication interface onto the corresponding device, a mapping relationship is established between the storage space allocated by the control end 101 and the current base address information corresponding to the target communication interface in the communication interface chip 102, the read-write operation mapped to the current base address information may be mapped into the storage space, so that a mapping relationship is established between the device address information of the target communication interface and the storage space in the control end 101, and thus the operation on the target communication interface is mapped into the storage space in the control end 101.
Step S404, based on the current device types of the plurality of communication interfaces, loading device drivers of the target devices corresponding to the plurality of communication interfaces.
In the embodiment of the present invention, in order to configure the function of the communication interface to the corresponding device, not only a mapping relationship needs to be established between the device address information of the target communication interface and the storage space in the control end 101, but also a device driver of the corresponding target device needs to be loaded, so that the corresponding target device can be invoked and operated, thereby providing a hardware base for the function configuration of the communication interface. Therefore, the device type of the communication interface can be updated according to the requirements, the storage space is redistributed, and corresponding device drivers are loaded, so that the flexible configuration of the communication interface functions is realized.
In this embodiment, a communication interface function configuration method is provided, which may be used in the integrated circuit, the apparatus or the device accessing the communication interface chip 102, and fig. 5 is a flowchart of a further communication interface function configuration method according to an embodiment of the present invention, as shown in fig. 5, where the flowchart includes the following steps:
step S501, a target device type of a target communication interface is acquired, and the target device type is sent to a communication interface chip. Please refer to step S401 in the embodiment shown in fig. 4 in detail, which is not described herein.
Step S502, stopping the read-write operation of the target communication interface and initiating a function update request to the communication interface chip when the target communication interface finishes the current read-write operation or the target communication interface does not perform the read-write operation.
In the embodiment of the present invention, since the target communication interface may be performing a read-write operation, at this time, the current configuration information of the target communication interface is directly reconfigured, which may cause interruption of the current read-write operation and cause abnormal read-write operation, so that the communication interface 102 is informed when to reconfigure the current configuration information of the target communication interface by setting a function update request. Specifically, when the target communication interface finishes the current read-write operation or the target communication interface does not perform the read-write operation, a function update request is initiated to the communication interface chip, and meanwhile, the read-write operation of the target communication interface is stopped, so that the read-write abnormality is avoided.
Therefore, the configuration information of the target communication interface can be fully updated after the current read-write operation of the target communication interface needing to reconfigure the function is completely finished, the integrity of data read-write is guaranteed, and the reliability of the communication interface is improved.
Step S503, obtaining the current device types of the plurality of communication interfaces. Please refer to step S402 in the embodiment shown in fig. 4 in detail, which is not described herein.
Step S504, based on the current equipment types of the plurality of communication interfaces, storage space is allocated for the plurality of communication interfaces, and a mapping relation is established between the allocated storage space and the current base address information of the communication interface chip.
In the embodiment of the present invention, the device types of some of the plurality of communication interfaces are not modified, that is, the current device types of the communication interfaces are consistent with the historical device types, the communication interface chip 102 does not reconfigure the configuration information for the communication interfaces, and then the storage space of the communication interfaces does not need to be reconfigured. When the current device type of the communication interface is inconsistent with the historical device type, namely when an updated communication interface with the inconsistent current device type and the historical device type exists in the plurality of communication interfaces, the configuration information of the updated communication interface is obtained in a reconfiguration mode, at the moment, a storage space is required to be allocated for the updated communication interface, and a mapping relation is established between the storage space and the current base address information of the communication interface chip. Therefore, only the storage space is allocated for the communication interfaces with the reconfiguration function, the memory space can be allocated reasonably, and the work of other communication interfaces without the reconfiguration function is not influenced.
As an alternative implementation manner, the communication interfaces are updated, that is, the target communication interfaces described above, but the control end 101 cannot directly know which of the plurality of communication interfaces in the communication interface chip 102 is the current communication interface with the configuration information reconfigured, but can only acquire the current device type of the communication interfaces, and determines which communication interfaces have the configuration information changed according to the current device type and the historical device type of the communication interfaces, thereby determining the communication interfaces needing to reallocate the storage space, that is, the updated communication interfaces, or the target communication interfaces.
As an alternative implementation, when the function of the communication interface is reconfigured, the memory space occupied by the communication interface before being reconfigured is released, and the stored data is cleared; i.e. the originally occupied memory space of the target communication interface or the updated communication interface is released and the originally stored data is cleared.
As an alternative implementation manner, when the storage space is allocated, the memory may be allocated for each target communication interface or updated communication interface directly according to the communication protocol corresponding to the communication interface.
As an alternative implementation manner, when the storage space is allocated, the storage space occupied by the target communication interface or the updated communication interface before being reconfigured may be used as the storage space of the corresponding device before the target communication interface or the updated communication interface is not reconfigured, and when the function of the other communication interface is configured as the device, the storage space is re-enabled.
In step S505, based on the current device types of the plurality of communication interfaces, device drivers of the target devices corresponding to the plurality of communication interfaces are loaded.
In the embodiment of the present invention, the device types of some of the plurality of communication interfaces are not modified, that is, the current device types of the communication interfaces are consistent with the historical device types, the communication interface chip 102 does not reconfigure the configuration information for the communication interfaces, and then the storage space of the communication interfaces does not need to be reconfigured. When the current device type of the communication interface is inconsistent with the historical device type, namely when an updated communication interface with the inconsistent current device type and the historical device type exists in the plurality of communication interfaces, the configuration information of the updated communication interface is obtained through reconfiguration, and at the moment, a device driver corresponding to the updated communication interface needs to be loaded to provide a hardware basis for the functional configuration of the communication interface.
As an alternative embodiment, a security authentication may also be established between the communication interface chip 102 and the control terminal 101. Specifically, the initial device information and the vendor information of a part of the communication interfaces in the communication interface chip 102 may be set to 0xff, and when the communication interface chip 102 is connected to the control terminal 101, the control terminal 101 cannot normally identify the device types of the communication interfaces, and thus cannot use the communication interfaces. Meanwhile, a key is set in the communication interface chip 102 or the control terminal 101 to perform security verification, and a third party interface, such as a universal asynchronous receiver Transmitter (Universal Asynchronous Receiver/Transmitter, UART) interface, is introduced, through which communication between the control terminal 101 and the communication interface chip 102 is established, so that security verification of the key is completed, and after the security verification is passed, the target device type and the target vendor type of the communication interface in the communication interface chip 102 by the control terminal 101 are still transmitted to the communication interface chip 102 through the third party interface, so that the communication interface chip 102 configures a corresponding communication interface according to the target device type, thereby opening the communication interface to the control terminal 101. By establishing a security verification between the communication interface chip 102 and the control terminal 101, a specific communication interface can be enabled after the security verification is passed, and the security and reliability of the communication interface chip 102 are improved.
The embodiment also provides a communication interface function configuration device, which is used for implementing the above embodiment and the preferred implementation manner, and is not described in detail. As used below, the terms "module," "unit" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a communication interface function configuration apparatus, as shown in fig. 6, including:
a target device type receiving module 601, configured to receive a target device type of a target communication interface sent by a control end;
a current configuration information determining module 602, configured to determine current configuration information of the target communication interface based on the target device type; the current configuration information includes current base address information;
a mapping relationship establishing module 603, configured to establish a mapping relationship between the current base address information and device address information of the target device type; the device address information is preset address information which corresponds to each device type respectively; the mapping relation is used for mapping the read-write operation to the current base address information.
As an alternative embodiment, the current configuration information determining module 602 includes:
a target configuration information determining unit for determining target configuration information of the target communication interface based on the target device type;
and the current configuration information determining unit is used for responding to the function updating request and determining the target configuration information as the current configuration information of the target communication interface.
As an alternative embodiment, the target configuration information determining unit includes:
a target device information determining subunit, configured to determine target device information and target address information corresponding to a target device type;
and the target address space information determining subunit is used for configuring the target address space information of the target communication interface based on the target address information.
As an alternative embodiment, the target address information includes target space information and target base address information; a target address space information determination subunit comprising:
a target address space determining sub-module for determining the size of the target address space based on the target space information;
and the target address space information determining submodule is used for determining the address segment range of the target address space of the target communication interface based on the target base address information and the size of the address space so as to determine the target address space information.
As an alternative embodiment, the current configuration information determining unit includes:
a current device information determining subunit, configured to determine the target device information as current device information of the target communication interface;
a current base address information determining subunit, configured to determine the target base address information as current base address information of the target communication interface;
and the current address space information determining subunit is used for determining the target address space information as the current address space information of the target communication interface.
The present embodiment provides a communication interface function configuration apparatus, as shown in fig. 7, including:
a target device type obtaining module 701, configured to obtain a target device type of a target communication interface, and send the target device type to a communication interface chip;
a current device type obtaining module 702, configured to obtain current device types of the plurality of communication interfaces;
a memory space allocation module 703, configured to allocate memory spaces for the plurality of communication interfaces based on current device types of the plurality of communication interfaces, and establish a mapping relationship between the allocated memory spaces and current base address information of the communication interface chip; the mapping relation is used for mapping the read-write operation mapped to the current base address information into the storage space obtained by allocation;
A device driver loading module 704, configured to load device drivers of target devices corresponding to the multiple communication interfaces based on current device types of the multiple communication interfaces; the device driver is used to invoke and operate the target device.
As an alternative embodiment, the device further comprises:
and the function update request initiating module is used for stopping the read-write operation of the target communication interface and initiating a function update request to the communication interface chip when the target communication interface finishes the current read-write operation or the target communication interface does not perform the read-write operation.
As an alternative embodiment, the storage space allocation module 703 includes:
and the storage space allocation unit is used for allocating storage space for the updated communication interfaces when updated communication interfaces with inconsistent current equipment types and historical equipment types exist in the plurality of communication interfaces, and establishing a mapping relation between the allocated storage space and current base address information of the communication interface chip.
As an alternative embodiment, the device driver loading module 704 includes:
and the device driver loading unit is used for loading the device driver of the target device corresponding to the updated communication interface when the updated communication interface with the current device type inconsistent with the historical device type exists in the plurality of communication interfaces.
In this embodiment, a communication system is also provided, where the system includes a control terminal and a communication interface chip, and the communication interface chip is connected to the control terminal. The communication system may employ the communication interface function configuration method described above to configure and switch the functions of the communication interfaces in the communication interface chip.
Specifically, the control end obtains the type of the target device of the target communication interface and sends the type of the target device to the communication interface chip. The communication interface chip establishes a mapping relation between the device address information of the target device type and the current base address information of the target device type based on the communication interface function configuration method and the target device type so as to map the read-write operation into the current base address information; the control terminal allocates storage space for each communication interface based on the communication interface function configuration method, and establishes a mapping relation between the allocated storage space and the current base address information so as to map read-write operation mapped into the current base address information into the allocated storage space. The control terminal loads the device drivers corresponding to the communication interfaces based on the communication interface function configuration method so as to call and operate the devices corresponding to the communication interfaces.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 8, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 8.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (14)

1. A method for configuring a communication interface function, the method comprising:
receiving a target equipment type of a target communication interface sent by a control terminal;
determining current configuration information of the target communication interface based on the target equipment type; the current configuration information comprises current base address information;
establishing a mapping relation between the current base address information and the device address information of the target device type; the device address information is preset address information which corresponds to each device type respectively; the mapping relation is used for mapping the read-write operation to the current base address information.
2. The method of claim 1, wherein the determining current configuration information of the target communication interface based on the target device type comprises:
determining target configuration information of the target communication interface based on the target equipment type;
And in response to a function update request, determining the target configuration information as current configuration information of the target communication interface.
3. The method of claim 2, wherein determining target configuration information for the target communication interface based on the target device type comprises:
determining target equipment information and target address information corresponding to the target equipment type;
and configuring target address space information of the target communication interface based on the target address information.
4. A method according to claim 3, wherein the target address information comprises target space information and target base address information; the determining, based on the target address information, target address space information of the target communication interface includes:
determining the size of a target address space based on the target space information;
and determining an address segment range of a target address space of the target communication interface based on the target base address information and the size of the address space to determine the target address space information.
5. The method of claim 4, wherein said determining the target configuration information as current configuration information of the target communication interface comprises:
Determining the target equipment information as current equipment information of the target communication interface;
determining the target base address information as the current base address information of the target communication interface;
and determining the target address space information as the current address space information of the target communication interface.
6. A method for configuring a communication interface function, the method comprising:
acquiring a target equipment type of a target communication interface and sending the target equipment type to a communication interface chip;
acquiring current equipment types of a plurality of communication interfaces;
based on the current equipment types of the plurality of communication interfaces, distributing storage space for the plurality of communication interfaces, and establishing a mapping relation between the distributed storage space and the current base address information of the communication interface chip; the mapping relation is used for mapping the read-write operation mapped to the current base address information into the storage space obtained by allocation;
loading device drivers of target devices corresponding to the plurality of communication interfaces based on the current device types of the plurality of communication interfaces; the device driver is used to invoke and operate the target device.
7. The method of claim 6, wherein after the obtaining the target device type of the target communication interface and sending the target device type to the communication interface chip, before the obtaining the current device types of the plurality of communication interfaces, further comprises:
and stopping the subsequent read-write operation of the target communication interface and initiating a function update request to the communication interface chip when the target communication interface finishes the current read-write operation or the target communication interface does not perform the read-write operation.
8. The method according to claim 6, wherein the allocating storage space for the plurality of communication interfaces based on the device types of the plurality of communication interfaces and establishing a mapping relationship between the allocated storage space and current base address information of a communication interface chip includes:
when updated communication interfaces with inconsistent current equipment types and historical equipment types exist in the plurality of communication interfaces, the storage space is allocated for the updated communication interfaces, and a mapping relation is established between the allocated storage space and current base address information of the communication interface chip.
9. The method of claim 6, wherein loading device drivers for the target devices corresponding to the plurality of communication interfaces based on the current device types of the plurality of communication interfaces, comprises:
and loading the device driver of the target device corresponding to the updated communication interface when the updated communication interface with the inconsistent current device type and the historical device type exists in the plurality of communication interfaces.
10. A communication interface function configuration apparatus, the apparatus comprising:
the target equipment type receiving module is used for receiving the target equipment type of the target communication interface sent by the control terminal;
the current configuration information determining module is used for determining the current configuration information of the target communication interface based on the type of the target equipment; the current configuration information comprises current base address information;
the mapping relation establishing module is used for establishing a mapping relation between the current base address information and the equipment address information of the target equipment type; the device address information is preset address information which corresponds to each device type respectively; the mapping relation is used for mapping the read-write operation to the current base address information.
11. A communication interface function configuration apparatus, the apparatus comprising:
the target equipment type acquisition module is used for acquiring the target equipment type of a target communication interface and sending the target equipment type to the communication interface chip;
the current equipment type acquisition module is used for acquiring the current equipment types of the plurality of communication interfaces;
the storage space allocation module is used for allocating storage spaces for the plurality of communication interfaces based on the current equipment types of the plurality of communication interfaces, and establishing a mapping relation between the allocated storage spaces and the current base address information of the communication interface chip; the mapping relation is used for mapping the read-write operation mapped to the current base address information into the storage space obtained by allocation;
the device driver loading module is used for loading device drivers of target devices corresponding to the plurality of communication interfaces based on the current device types of the plurality of communication interfaces; the device driver is used to invoke and operate the target device.
12. A communication system, the system comprising a control terminal and a communication interface chip; the communication interface chip is connected with the control end;
The control end obtains a target equipment type of a target communication interface and sends the target equipment type to the communication interface chip;
the communication interface chip establishes a mapping relationship between device address information of the target device type and current base address information of the target device type based on the communication interface function configuration method of any one of claims 1 to 5 and the target device type, so as to map read-write operations into the current base address information;
the control end allocates a storage space for each communication interface based on the communication interface function configuration method according to any one of claims 6 to 9, and establishes a mapping relationship between the allocated storage space and the current base address information so as to map read-write operations mapped into the current base address information into the allocated storage space;
the control end loads the device driver corresponding to each communication interface based on the communication interface function configuration method according to any one of claims 6 to 9 so as to call and operate the device corresponding to each communication interface.
13. A computer device, comprising:
A memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the communication interface function configuration method of any one of claims 1 to 5 or 6 to 9.
14. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the communication interface function configuration method of any one of claims 1 to 5 or 6 to 9.
CN202310609587.5A 2023-05-25 2023-05-25 Communication interface function configuration method, device, communication system, equipment and medium Pending CN116578350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310609587.5A CN116578350A (en) 2023-05-25 2023-05-25 Communication interface function configuration method, device, communication system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310609587.5A CN116578350A (en) 2023-05-25 2023-05-25 Communication interface function configuration method, device, communication system, equipment and medium

Publications (1)

Publication Number Publication Date
CN116578350A true CN116578350A (en) 2023-08-11

Family

ID=87533837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310609587.5A Pending CN116578350A (en) 2023-05-25 2023-05-25 Communication interface function configuration method, device, communication system, equipment and medium

Country Status (1)

Country Link
CN (1) CN116578350A (en)

Similar Documents

Publication Publication Date Title
CN112087493B (en) Request processing method, system on chip and public cloud management component
US10162646B2 (en) System for programmably configuring a motherboard
CN109324991B (en) Hot plug device, method, medium and system of PCIE (peripheral component interface express) equipment
EP3518097A2 (en) Firmware updating method and electronic device using the same
US10037170B2 (en) Motherboard and a method for boot-up
US20090100198A1 (en) Addressing multiple devices on a shared bus
EP3208723A1 (en) Usb wireless network card configuration method, host, usb wireless network card and communication system
CN110099095B (en) Software deployment method and device, electronic equipment and computer-readable storage medium
KR101821016B1 (en) Apparatus, system and method for allocating identifiers to components of a control system
CN110502282B (en) Loading method, device and equipment of multi-channel NTB card and readable storage medium
CN103412838B (en) A kind of expanding system, communication means, address configuration method, equipment and device
CN114389947A (en) Data transmission method, system and computer readable storage medium
KR102352156B1 (en) Slave device for performing address resolution protocol and operation method thereof
CN110874297B (en) Data access method, device and host
CN117762455A (en) Updating method and device of BIOS firmware file, storage medium and electronic equipment
CN116578350A (en) Communication interface function configuration method, device, communication system, equipment and medium
CN112860595B (en) PCI (peripheral component interconnect express) equipment or PCIE (peripheral component interconnect express) equipment, data access method and related assembly
CN113268253A (en) Distributed database deployment method and related equipment
JP7501808B2 (en) IC chip
CN114579198B (en) Memory chip starting method and device, computer equipment and storage medium
US20180167489A1 (en) Method and apparatus for deploying computer networks
CN117687703B (en) Method, device and system for starting server, storage medium and electronic equipment
US10803008B2 (en) Flexible coupling of processor modules
CN115729600A (en) NVDIMM (non-volatile memory Module) upgrading method and device, electronic equipment and computer storage medium
CN117891530A (en) Driver method and device, storage media, and electronic device for server bus device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination