CN114372017B - Enumeration method without affecting normal operation of CXP equipment - Google Patents

Enumeration method without affecting normal operation of CXP equipment Download PDF

Info

Publication number
CN114372017B
CN114372017B CN202210002281.9A CN202210002281A CN114372017B CN 114372017 B CN114372017 B CN 114372017B CN 202210002281 A CN202210002281 A CN 202210002281A CN 114372017 B CN114372017 B CN 114372017B
Authority
CN
China
Prior art keywords
enumeration
cxp
interface
state
equipment
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.)
Active
Application number
CN202210002281.9A
Other languages
Chinese (zh)
Other versions
CN114372017A (en
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.)
Beijing Daheng Image Vision Co ltd
China Daheng Group Inc Beijing Image Vision Technology Branch
Original Assignee
Beijing Daheng Image Vision Co ltd
China Daheng Group Inc Beijing Image Vision Technology Branch
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 Beijing Daheng Image Vision Co ltd, China Daheng Group Inc Beijing Image Vision Technology Branch filed Critical Beijing Daheng Image Vision Co ltd
Priority to CN202210002281.9A priority Critical patent/CN114372017B/en
Publication of CN114372017A publication Critical patent/CN114372017A/en
Application granted granted Critical
Publication of CN114372017B publication Critical patent/CN114372017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • 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)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

The application discloses an enumeration method which does not influence the normal work of CXP equipment, and the enumeration method is suitable for a host to enumerate the interface state of an interface in any CXP equipment connected with the host, and comprises the following steps: step 1, when an enumeration instruction is received, acquiring the number of interfaces and the number of equipment connections, and generating an enumeration temporary record table, wherein the enumeration temporary record table records the interface states of CXP equipment; and 2, comparing the enumeration temporary record table with an enumeration information table at the last enumeration, and taking the enumeration information table at the last enumeration as an enumeration information table corresponding to the current enumeration instruction when the enumeration temporary record table is judged not to change. By the technical scheme, the problem that equipment response is abnormal when the host adopts the CoaXPress interface protocol to enumerate the equipment is solved.

Description

Enumeration method without affecting normal operation of CXP equipment
Technical Field
The application relates to the technical field of image acquisition equipment, in particular to an enumeration method which does not influence the normal operation of CXP equipment.
Background
CoaXPress (CXP for short) is an asymmetric high-speed point-to-point serial communication digital interface protocol, mainly defined as a protocol for communication between a host and a device, by combining simple coaxial cables with the latest high-speed serial technology, each cable allowing 12.5Gbps of data to be transmitted and device control and power to be supplied on the same cable.
In the prior art, the protocol specifies how the host sends the command to the CXP device and how the CXP device feeds back after receiving the command, but the protocol does not specify the timing of the host sending the command to the CXP device, which results in the possibility that the CXP device cannot operate normally, especially for an enumeration instruction, when the Connection of the CXP device is unchanged, the host sends a Connection reset write 1 command to enumerate the device, and a phenomenon that the normal CXP device stops operating will occur.
In addition, in some special industrial situations, enumeration needs to be performed on CXP devices connected with the CoaXPress interface at any time, which results in abnormal response that the CXP devices stop working in the situation, and a host adopting the CoaXPress interface protocol cannot be well compatible with multiple CXP devices.
Disclosure of Invention
The application aims at: the problem that the device response is abnormal when the host adopts the CoaXPress interface protocol to enumerate the devices is solved, and the compatibility of the CoaXPress interface protocol is improved.
The technical scheme of the application is as follows: the enumeration method is suitable for a host to enumerate the interface states of interfaces in any CXP device connected with the host, and the enumeration method comprises the following steps: step 1, when an enumeration instruction is received, acquiring the number of interfaces and the number of equipment connections, and generating an enumeration temporary record table, wherein the enumeration temporary record table records the interface states of CXP equipment; and 2, comparing the enumeration temporary record table with an enumeration information table at the last enumeration, and taking the enumeration information table at the last enumeration as an enumeration information table corresponding to the current enumeration instruction when the enumeration temporary record table is judged not to change.
In any of the above technical solutions, further, a PCIE acquisition card is provided in the host, the CXP device is a CXP device based on output data of a CoaXPress interface, the number of interfaces at least includes a maximum connection number of the acquisition card and a maximum connection number of the device, the PCIE acquisition card has a register for querying the maximum connection number of the acquisition card and the maximum connection number of the device, and step 1 further includes: step 11, determining enumeration partitions according to the maximum connection number of the acquisition cards and the maximum connection number of the devices, and connecting CXP devices according to the sequence in the enumeration partitions; and step 12, according to the received interface state of the equipment and the enumeration partition, generating an enumeration temporary record table.
In any of the above solutions, further, the enumeration method further includes: step 3, when the current enumeration temporary record table is judged to be changed, judging whether the interface states contained in the enumeration partition in the enumeration temporary record are changed in sequence, if so, executing step 4, and if not, taking the interface state of the corresponding enumeration partition in the enumeration information table at the last enumeration as the interface state of CXP equipment in the enumeration partition at the current enumeration; step 4, obtaining the topological relation between the host and the CXP devices, and enumerating the interface states of the CXP devices in the current enumeration partitions according to the topological relation; and 5, generating an enumeration information table in the current enumeration according to the interface states of CXP devices in each enumeration partition.
In any of the above solutions, further, step 4 further includes: step 41, obtaining the topological relation between the host and a plurality of CXP devices based on a reset command and a CoaXPress protocol; step 42, determining the number of interfaces of CXP devices in each enumeration partition currently according to the topological relation and the set maximum connection number of the devices; and step 43, determining packet length information, output bit rate/speed and equipment information between the PCIE acquisition card and the CXP equipment according to the number of interfaces of the CXP equipment in each enumeration partition, wherein the equipment information comprises SN, model name and the like of the CXP equipment.
In any of the above technical solutions, further, the interface states include at least three types, and the interface states include a protocol undefined state, a protocol defined state, and a custom state.
In any of the above technical solutions, further, the interface state is determined by a state register and a value in a connection power supply state register, and when it is determined that the value in the state register is a protocol undefined state and the value in the connection power supply state register is a power supply, the interface state is a custom state; when the value in the state register is determined to be a protocol undefined state and the value in the connection power supply state register is determined to be no power supply, the interface state is the protocol undefined state; when the value in the status register is determined to be the protocol definition status, the interface status is the protocol definition status.
The beneficial effects of the application are as follows:
according to the technical scheme, an enumeration temporary record table is generated based on the number of interfaces and the number of equipment connections, the enumeration temporary record table is compared with an enumeration information table in the last enumeration, and when the enumeration temporary record table is judged to change, whether the included interface state changes is judged to realize enumeration of the interface state of CXP equipment, and the enumeration information table is updated. The problem that the host computer has abnormal equipment response when performing CXP equipment enumeration based on the CoaXPress interface protocol is solved, the effect and performance of CXP equipment interface state enumeration are optimized, the compatibility of the CoaXPress interface protocol is improved, and the following functions are realized:
1. under the condition that CXP equipment connection is unchanged, an enumeration flow defined by a CoaXPress interface protocol is not executed, so that enumeration time is reduced, and the influence on other normal working equipment is eliminated;
2. when multiple CXP devices are connected to the PCIE acquisition card of the same host, a user calls an enumeration interface, and enumeration is only carried out on CXP devices with changed connection (such as hot plug and connection disconnection of the user), so that normal work of other CXP devices cannot be influenced;
3. without a connection, enumeration is not performed.
Drawings
The advantages of the foregoing and/or additional aspects of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a schematic diagram of a connection between a host and a device using a CoaXPress interface;
FIG. 2 is a schematic flow diagram of an enumeration method that does not affect the proper operation of CXP devices according to one embodiment of the application;
FIG. 3 is a schematic diagram of a CXP device enumeration method process according to one embodiment of the application;
fig. 4 is a schematic diagram of an illustration of the number of interfaces according to one embodiment of the application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will be more clearly understood, a more particular description of the application will be rendered by reference to the appended drawings and appended detailed description. It should be noted that, without conflict, embodiments of the present application and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, however, the present application may be practiced in other ways than those described herein, and the scope of the application is therefore not limited to the specific embodiments disclosed below.
As shown in fig. 1, the CoaXPress interface in this embodiment is a point-to-point expandable interface, and the physical medium is 75 ohm coaxial cable. A CoaXPress interface comprises a main connection and a plurality of extension connections, the extension connections being optional, the connections together forming a Link connection. Each Link connection corresponds to a coaxial cable, wherein the connection at the device end is numbered, 0 is the main connection, and n-1 connections 1 to n-1 are expansion connections.
Since the connection mode of single-host multi-CXP device connection is not considered, when enumeration is performed on CXP devices which are normally connected/operated, abnormal responses possibly generated by the enumeration devices, such as stopping operation, are enumerated. Taking a camera as an example, a conventional device enumeration flow under the CoaXPress interface protocol (CXP protocol for short) is as follows:
1. the Host informs the device to reset, matches the bit rate/speed of the device (camera) and Host acquisition card;
2. the host searches the topology of the device and enumerates the device, and confirms how the device is connected to the host through an algorithm in the CXP protocol;
3. protocol version packet length and other information used by the host and the device;
4. the host and device negotiate and switch transmission bit rate/rates.
Therefore, as shown in fig. 2 and fig. 3, the present embodiment provides an enumeration method that does not affect the normal operation of CXP devices, where the enumeration method is applicable to a host to enumerate interface states of a plurality of devices connected to the host, where a PCIE acquisition card is disposed in the host, and the devices are CXP devices, such as cameras, that output data based on a CoaXPress interface. The method comprises the following steps:
step 1, when an enumeration instruction is received, acquiring the number of interfaces and the number of equipment connections, and generating an enumeration temporary record table, wherein the enumeration temporary record table records the interface states of the equipment;
specifically, an enumeration instruction is generally initiated actively by a user, when a host receives the enumeration instruction, a basic windowsAPI program is called first to obtain the number of PCIE acquisition cards connected to the current host, and then an enumeration operation is performed on all CXP devices under each PCIE acquisition card by adopting a cyclic enumeration operation.
In order to realize enumeration operation of CXP equipment in normal working state, an enumeration temporary record table is introduced, and whether the interface state of CXP equipment changes is judged by comparing the current enumeration operation with an enumeration information table in the last enumeration. When the CXP equipment interface state is judged, an enumeration partition is determined according to the maximum connection number of the acquisition card and the maximum connection number of the equipment, so that the partition enumerates the CXP equipment.
In this embodiment, the number of interfaces at least includes the maximum connection number of the acquisition card and the maximum connection number of the device, and the number of interfaces is determined by querying the register provided by the PCIE acquisition card, that is, the PCIE acquisition card in this embodiment has the register for querying the maximum connection number of the acquisition card and the maximum connection number of the device, so the step 1 further includes:
step 11, determining enumeration partitions according to the maximum connection number of the acquisition cards and the maximum connection number of the devices, and connecting CXP devices according to the sequence in the enumeration partitions;
specifically, the maximum connection number MaxPortSupport supported by the PCIE acquisition card and the device maximum connection number MaxDevConnectionSupport allowed by each PCIE acquisition card to connect a single device to the PCIE acquisition card are read.
As shown in fig. 4, if maxportsupport=8, maxdevconnectionsupport=4: indicating that the PCIE acquisition card has 8 ports, which indicates that each device uses 4 ports at most; if device a has 8 ports, but at most only 4 of them can be used.
By reading the data in the two registers, the maximum connection number of the acquisition card and the maximum connection number of the device can be obtained, and then an enumeration area is determined, for example:
1) Maxportsupport=4, maxdevconnection support=4, indicating that the current acquisition card supports only 1 device, the maximum number of connections per device to the current acquisition card being 4;
2) Maxportsupport=4, maxdevconnection support=2, indicating that the current acquisition card supports only 2 devices, the maximum number of connections per device to connect to the current acquisition card being 2;
3) Maxportsupport=4, maxdevconnection support=1, indicating that the current acquisition card supports only 4 devices, the maximum number of connections to each device to the current acquisition card being 1;
4) Maxportsupport=8, maxdevconnection support=2, indicating that the current acquisition card supports only 4 devices, the maximum number of connections per device to the current acquisition card being 2;
after the enumeration area of the response is partitioned, it is necessary to connect the CXP devices in order. For example: maxportsupport=8, maxdevconnectionsupport=2, i.e. PCIE acquisition card has 8 ports, the first 4 ports can only connect to the same CXP device, and the last 4 ports can connect to another CXP device, which cannot be cross-connected. However, only one CXP device may be connected, and in this case, the first 4 interface ports may be used, or the last 4 interface ports may be used.
In this embodiment, based on the number of connections included in one CoaXPress interface in the PCIE acquisition card in the host, interface states Port0State, port1State, …, and PortnState are defined, the number of which is the maximum number of interfaces MaxPortSupport-1, and the above interface states are now defined, as shown in table 1.
TABLE 1
It should be noted that, the interface states defined in the existing CoaXPress interface protocol are only two (outstanding/Detected), when the device is powered by the power chip of the PCIE acquisition card, the acquisition card queries the states of all connections by querying the register provided by the power chip.
In this embodiment, research on the CoaXPress interface protocol, the host (PCIE acquisition card) and the CXP device by a researcher finds that, when the CXP device needs PCIE acquisition card to supply power, the poc xp power supply module in the CXP device needs to provide a register to allow the host to query whether the current port interface is connected with the CXP device, so an interface state is added, and the added interface state is: connected indicates that the current port interface is Connected to the CXP device, but because the bit rate/rate of the CXP device is unknown, no data can be sent. That is, if the device is in the interface state, but the device rate connection does not match, the acquisition card modifies the state of the corresponding PORT to the Connected state.
The states of the port interface are now described as follows:
when the host reads the port state, if the POCXP power supply module does not report that the corresponding port interface has connection, the current port state is regarded as the Undelected; otherwise, consider the current port as Detected;
then, the bit rate/speed of the port interface with connection needs to be paired with the host, if the pairing is successful, the port state is marked as Connected;
when the state of the port is Connected, if a user pulls out one of the port interface connections, and the connection exceeds a preset time, such as 100ms, and cannot receive data, the port interface state is adjusted to be uncovered or Detected according to whether connection change occurs and reported by the POCXP power supply module.
The embodiment achieves the following effects by adding a port interface state:
1) Under the condition that the connection is unchanged, an enumeration flow defined by CXP protocol is not executed so as to reduce enumeration time;
2) When multiple CXP devices are connected to the same host acquisition card, a user calls an enumeration interface, and enumerates only CXP devices with changed connection (user hot plug and connection disconnection), so that other CXP devices which can not affect normal work can be enumerated;
3) Without a connection, enumeration is not performed.
And step 12, according to the received interface state of the device, generating an enumeration temporary record table according to the enumeration partition, wherein the interface state comprises a protocol undefined state, a protocol defined state and a custom state.
Specifically, the interface states of all the interface ports are circularly read, and an enumeration temporary record table is generated according to the enumeration partition, and the specific process is not repeated.
And 2, comparing the enumeration temporary record table with an enumeration information table at the last enumeration, and taking the enumeration information table at the last enumeration as an enumeration information table corresponding to the current enumeration instruction when the enumeration temporary record table is judged not to change.
It should be noted that, if enumeration is not executed before, that is, in the initial state, the interface states of all the interface ports in the enumeration information table are unrelected, and no connection is marked; if the enumeration is executed once, the state of the interface port in the enumeration information table is the state marked in the last enumeration.
Specifically, the interface port state of the enumeration temporary record table is used to compare with the previous enumeration information table according to the partitioned enumeration partition. If the interface states of all the interface ports are unchanged, the fact that the physical connection of the interface ports in all the enumeration partitions is unchanged is indicated, based on the consideration of the operation reliability of CXP equipment, the enumeration operation is stopped at the moment, the subsequent enumeration operation cannot be executed again, otherwise normal operation functions of the connected CXP equipment are affected, and meanwhile, an enumeration information table at the last enumeration is used as an enumeration information table corresponding to a current enumeration instruction and is responded to the enumeration instruction sent by a user.
In a preferred implementation of this embodiment, the enumeration method further includes:
step 3, when the current enumeration temporary record table is judged to be changed, judging whether the interface states contained in the enumeration partition in the enumeration temporary record are changed in sequence, if so, executing step 4, and if not, taking the interface state of the corresponding enumeration partition in the enumeration information table at the last enumeration as the interface state of the enumeration partition at the current enumeration;
specifically, when maxportsupport=4 and maxdevconnectionsupport=2, it indicates that the current PCIE acquisition card only supports 2 CXP devices, that is, interface port1 and interface port2 are enumeration partitions of one CXP device, and interface port3 and interface port4 are enumeration partitions of another CXP device.
Circularly checking whether the interface states of the interface port1 and the interface port2 of the current enumeration partition are changed, if the states of the interface port1 and the interface port2 are not changed, all connections of the current enumeration partition do not need to execute enumeration operation, taking the interface state of the corresponding enumeration partition in an enumeration information table at the last enumeration as the interface state of the enumeration partition at the current enumeration, generating an enumeration information table, and checking the interface port3 and the interface port4 in the next enumeration partition; otherwise, both interface port1 and interface port2 (all interface ports) of the entire partition need to perform enumeration operations.
Step 4, obtaining topological relations between a host and a plurality of CXP devices, and enumerating the interface states of the CXP devices in each enumeration partition currently according to the topological relations;
it should be noted that, to cope with the requirements of different distances and rates, since CXP devices provide different rates and CXP devices have multiple connections, the CoaXPress interface protocol provides a DefaultConnectionConfig register (one register contains two pieces of information) for querying the number and rate of connections that the device desires. However, the actual number of connections may be selected as desired, thus providing a ConnectionConfig register for modifying and activating the actual number and rate of connections actually used by the CXP device.
In the CoaXPress interface protocol, if the user wants to modify the actual value of the ConnectionCOnfig register, only by modifying the value of the DefaultConnectionConfig register first, and then indirectly modifying the value of ConnectionCOnfig through a program enumeration stage, so as to realize the matching of different rates, the operation is more complicated, and a certain knowledge is required to the CoaXPress interface protocol and the underlying code.
In this embodiment, the user does not need to modify the DefaultConnectionConfig register, and only needs to add or reduce the connection between the CXP device and the PCIE acquisition card. In this embodiment, the step 4 specifically includes:
step 41, obtaining the topological relation between the host and a plurality of CXP devices based on a reset command and a CoaXPress protocol;
specifically, the host sends a device reset command to a response interface port in the PCIE acquisition card in the current enumeration partition, the CXP device responds normally, and the host waits 200ms to expect discovery of completion of enumeration of the CXP device.
At enumeration, a topology relationship between a host and a plurality of CXP devices is acquired using an acquire topology relationship command specified by the CoaXPress protocol. By means of the topology, it can be found that several CXP devices are connected in the enumeration partition, each CXP device having several connections, each connection being connected to which interface port/ports.
Step 42, determining the number of interfaces of CXP devices in each enumeration partition currently according to the topological relation and the set maximum connection number of the devices;
according to the CoaXPress interface protocol, the CXP device provides a DefaultConnectionConfig interface that indicates the "desired" number of connections for the CXP device, i.e., the number of connections at which the CXP device will have maximum efficacy. Therefore, it is necessary to determine the number of interfacing connections of the CXP device based on the concept of the maximum number of connections, the desired number of connections, and the actual number of connections of the device.
And checking the topological relation by related software installed on the host computer, and checking whether the expected connection number, the actual connection number and the maximum connection number of the CXP equipment are consistent with those of the equipment supported by the enumeration partition so as to determine the interface number of the CXP equipment in each enumeration partition currently.
When software in the host finds that the expected number of expected connections expected by the CXP device is greater than the maximum number of connection MaxDev ConnectionSupport, the host software sets the CXP device to only use the maximum number of connection MaxDev ConnectionSupport connection interfaces;
if the host software inquires that the actual connection number of the interfaces in the current CXP device is smaller than the maximum connection number MaxDev connection support of the device supported by the enumeration partition, the number of the interfaces is judged to be normal, and the current actual connection number is used for connecting the interfaces.
It should be noted that, if the connection between the CXP device interface and the host does not meet the connection design requirement described in the present embodiment, the current enumeration partition is skipped, that is, the current enumeration partition is regarded as having no CXP device.
In this embodiment, each partition manages only 1 CXP device, and each CXP device has at most a maximum number of MaxDevConnectionSupport interfaces for device connections to the current enumeration partition.
The number of interfaces for actual connection of the CXP device may be smaller than the set maximum number of device connections maxdevconnection support.
In this embodiment, the number of interfaces of the CXP device is the minimum value of the maximum number of connections of the device and the actual number of connections, where the actual number of connections is determined by the topology relationship.
And step 43, determining packet length information, output bit rate/speed and equipment information between the PCIE acquisition card and the CXP equipment according to the number of interfaces of the CXP equipment in each enumeration partition, wherein the equipment information comprises SN, model name and the like of the CXP equipment.
Specifically, after determining the number of interfaces of the CXP device in each enumeration partition, the host software may set the real output bit rate/rate of the CXP device by using the information such as the CXP protocol and the packet length used by both the host software and the CXP device through the PCIE acquisition card based on the CoaXPress interface protocol.
Taking maximum connection number maxportsupport=4 supported by PCIE acquisition card, device maximum connection number maxdevconnectionsupport=2 as an example, the following is summarized again:
A. the device expects 4, actually 4, at this time, the number of connections used by the CXP device is set to 4;
B. device expect 4, actual 2, at which time the number of connections used by the CXP device is set to 2;
C. device expect 4, actual 1, at which time the number of connections used by the CXP device is set to 1;
D. the device expects 2, actually 2, at this time, the number of connections used by the CXP device is set to 2;
E. device expect 2, actual 1, at which time the number of connections used by the CXP device is set to 1;
F. the device expects 1, actually 1, at which time the number of connections used by the CXP device is set to 1;
and then, the host software reads information such as SN (serial number), model name and the like of the CXP device through the PCIE acquisition card as device information, takes the device information, the packet length information and the output bit rate/speed as enumeration information, completes the enumeration operation of the current CXP device, and enumerates the interface states of the CXP device in each enumeration partition.
And 5, generating an enumeration information table during current enumeration according to the interface states of the enumeration partitions.
Specifically, the host software sends a command for inquiring the port state, and after receiving the command, the PCIE acquisition card performs the following operations.
Firstly, reading a state register of each Port of the FPGA, and identifying that the current interface state is unprotected or detected; then, reading a connection power supply state register of the POCXP managed by the firmware program itself; finally, according to the read values in the two registers, the state of each PORT is judged and output to the host, and the corresponding relation is shown in table 1.
TABLE 1
Status register Connecting power supply status registers Output state
undetected Power supply Connected
undetected No power supply Undetected
Detected Power supply, no power supply Detected
Specifically, when the value in the state register is determined to be the undefined state of the protocol and the value in the connection power supply state register is determined to be the power supply, the output interface state is a custom state Connected;
when the value in the state register is judged to be the undefined state of the protocol and the value in the power supply connection state register is judged to be the undefined state of the protocol, the output interface state is the undefined state of the protocol;
when the value in the status register is determined to be the protocol definition status Detected, the output interface status is the protocol definition status Detected.
The technical scheme of the application is explained in detail above with reference to the accompanying drawings, and the application provides an enumeration method which does not affect the normal operation of CXP equipment, the enumeration method is suitable for a host to enumerate the interface state of an interface in any CXP equipment connected with the host, and the enumeration method comprises the following steps: step 1, when an enumeration instruction is received, acquiring the number of interfaces and the number of equipment connections, and generating an enumeration temporary record table, wherein the enumeration temporary record table records the interface states of CXP equipment; and 2, comparing the enumeration temporary record table with an enumeration information table at the last enumeration, and taking the enumeration information table at the last enumeration as an enumeration information table corresponding to the current enumeration instruction when the enumeration temporary record table is judged not to change. By the technical scheme, the problem that equipment response is abnormal when the host adopts the CoaXPress interface protocol to enumerate the equipment is solved.
The steps in the application can be sequentially adjusted, combined and deleted according to actual requirements.
The units in the device can be combined, divided and deleted according to actual requirements.
Although the application has been disclosed in detail with reference to the accompanying drawings, it is to be understood that such description is merely illustrative and is not intended to limit the application of the application. The scope of the application is defined by the appended claims and may include various modifications, alterations and equivalents of the application without departing from the scope and spirit of the application.

Claims (5)

1. An enumeration method which does not affect normal operation of CXP devices, wherein the CXP devices are CXP devices outputting data based on a CoaXPress interface, the enumeration method is suitable for a host to enumerate interface states of interfaces in any CXP device connected to the host, and the enumeration method comprises:
step 1, when an enumeration instruction is received, acquiring the number of interfaces and the number of equipment connections, and generating an enumeration temporary record table, wherein the enumeration temporary record table records the interface states of CXP equipment;
step 2, comparing the enumeration temporary record table with an enumeration information table in the last enumeration, and taking the enumeration information table in the last enumeration as an enumeration information table corresponding to a current enumeration instruction when judging that the enumeration temporary record table is not changed;
step 3, when the current enumeration temporary record table is judged to be changed, judging whether the interface states contained in the enumeration partition in the enumeration temporary record are changed in sequence, if so, executing step 4, and if not, taking the interface state of the corresponding enumeration partition in the enumeration information table at the last enumeration as the interface state of CXP equipment in the enumeration partition at the current enumeration;
step 4, obtaining topological relations between a host and a plurality of CXP devices, and enumerating the interface states of the CXP devices in each enumeration partition currently according to the topological relations;
and 5, generating an enumeration information table in the current enumeration according to the interface states of CXP devices in each enumeration partition.
2. The enumeration method of claim 1, wherein a PCIE acquisition card is provided in the host, the number of interfaces includes at least a maximum number of connections of the acquisition card and a maximum number of connections of the device, the PCIE acquisition card has a register for querying the maximum number of connections of the acquisition card and the maximum number of connections of the device, and the step 1 further includes:
step 11, determining enumeration partitions according to the maximum connection number of the acquisition cards and the maximum connection number of the devices, and connecting the CXP devices according to the sequence in the enumeration partitions;
and step 12, generating the enumeration temporary record table according to the enumeration partition and the received interface state of the equipment.
3. The enumeration method of claim 2, wherein the step 4 further comprises:
step 41, obtaining the topological relation between the host and a plurality of CXP devices based on a reset command and a CoaXPress protocol;
step 42, determining the number of interfaces of CXP devices in each enumeration partition currently according to the topological relation and the set maximum connection number of the devices;
and step 43, determining packet length information, output bit rate/speed and equipment information between the PCIE acquisition card and the CXP equipment according to the number of interfaces of the CXP equipment in each enumeration partition, wherein the equipment information comprises SN, model name and the like of the CXP equipment.
4. A method of enumeration as claimed in any one of claims 1 to 3, wherein said interface states include at least three, said interface states including a protocol undefined state, a protocol defined state and a custom state.
5. The enumeration method of claim 4, wherein the interface status is determined by values in a status register and a connection power status register,
when the numerical value in the state register is judged to be the undefined state of the protocol and the numerical value in the connected power supply state register is judged to be the power supply, the interface state is a self-defined state;
when the value in the state register is judged to be the undefined state of the protocol and the value in the connection power supply state register is judged to be the undefined state of the protocol, the interface state is judged to be the undefined state of the protocol;
and when the numerical value in the state register is judged to be the protocol definition state, the interface state is the protocol definition state.
CN202210002281.9A 2022-01-04 2022-01-04 Enumeration method without affecting normal operation of CXP equipment Active CN114372017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210002281.9A CN114372017B (en) 2022-01-04 2022-01-04 Enumeration method without affecting normal operation of CXP equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210002281.9A CN114372017B (en) 2022-01-04 2022-01-04 Enumeration method without affecting normal operation of CXP equipment

Publications (2)

Publication Number Publication Date
CN114372017A CN114372017A (en) 2022-04-19
CN114372017B true CN114372017B (en) 2023-12-12

Family

ID=81142035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210002281.9A Active CN114372017B (en) 2022-01-04 2022-01-04 Enumeration method without affecting normal operation of CXP equipment

Country Status (1)

Country Link
CN (1) CN114372017B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246428A (en) * 2007-02-12 2008-08-20 希捷科技有限公司 Method for initiating re-enumeration of a device
US8190798B1 (en) * 2011-03-09 2012-05-29 Apple Inc. Client device configuration based on information stored by host device
CN103514122A (en) * 2012-06-29 2014-01-15 中国船舶重工集团公司第七0九研究所 USB equipment identification enhancing method in VxWorks operation system
WO2015188586A1 (en) * 2014-06-11 2015-12-17 西安中兴新软件有限责任公司 Data transmission method, electronic equipment, usb equipment and storage medium
CN105320616A (en) * 2014-06-24 2016-02-10 腾讯科技(深圳)有限公司 External device control method and device
CN105573939A (en) * 2014-10-10 2016-05-11 深圳市中兴微电子技术有限公司 Method for carrying out data transmission on the basis of universal serial bus, and terminal
CN113721994A (en) * 2021-07-30 2021-11-30 苏州浪潮智能科技有限公司 PCIe enumeration method, system, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7493438B2 (en) * 2001-10-03 2009-02-17 Intel Corporation Apparatus and method for enumeration of processors during hot-plug of a compute node
US8709712B2 (en) * 2010-05-06 2014-04-29 University Of Witwatersrand, Johannesburg Method for identifying bacteria in a sample

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246428A (en) * 2007-02-12 2008-08-20 希捷科技有限公司 Method for initiating re-enumeration of a device
US8190798B1 (en) * 2011-03-09 2012-05-29 Apple Inc. Client device configuration based on information stored by host device
CN103514122A (en) * 2012-06-29 2014-01-15 中国船舶重工集团公司第七0九研究所 USB equipment identification enhancing method in VxWorks operation system
WO2015188586A1 (en) * 2014-06-11 2015-12-17 西安中兴新软件有限责任公司 Data transmission method, electronic equipment, usb equipment and storage medium
CN105224483A (en) * 2014-06-11 2016-01-06 西安中兴新软件有限责任公司 Data transmission method, electronic equipment and universal serial bus device
CN105320616A (en) * 2014-06-24 2016-02-10 腾讯科技(深圳)有限公司 External device control method and device
CN105573939A (en) * 2014-10-10 2016-05-11 深圳市中兴微电子技术有限公司 Method for carrying out data transmission on the basis of universal serial bus, and terminal
CN113721994A (en) * 2021-07-30 2021-11-30 苏州浪潮智能科技有限公司 PCIe enumeration method, system, device and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CMOS-based intelligent camera for high-end inspection applications;Joost Van Kuijk;《Advanced Manufacturing Technology》;1-12 *
基于COAXPRESS的图像采集系统;任强;《制造业自动化》;112-117 *
基于EZ-USB的电机换向器跳动量检测系统的设计;赵海洋;《中国优秀硕士学位论文全文数据库》;I140-452 *

Also Published As

Publication number Publication date
CN114372017A (en) 2022-04-19

Similar Documents

Publication Publication Date Title
US7206875B2 (en) Expander device capable of persistent reservations and persistent affiliations
EP3758317B1 (en) Method, apparatus and computer readable storage medium for supporting communication among chips
CN112328440B (en) Hard disk physical position determining method and device
US9584268B2 (en) Device level enablement of a communications protocol
CN112055096A (en) Method and device for automatically setting communication address of equipment
CN106066842A (en) A kind of method of switch mode, SOC(system on a chip) and base station
CN116627861B (en) Data processing method and system based on expander, electronic equipment and storage medium
CN111176164B (en) Method, device and medium for expanding multiple remote input and output modules
CN111930574A (en) SSD test system and SSD test method
CN115033515A (en) Master-slave SPI communication method
CN113419983A (en) Serial server and implementation method thereof
CN117093438A (en) test system
CN114372017B (en) Enumeration method without affecting normal operation of CXP equipment
CN117271412A (en) Automatic dialing method, system, computer equipment and storage medium
CN103488505B (en) Patch method, equipment and system
CN114201439B (en) Server signal identification optimization method, system and storage medium
CN216772401U (en) Main equipment main control function implementation system
CN116009785A (en) Hard disk management method and computing device
CN115033186B (en) Dual-port NVMe controller and read-write command processing method
CN216014148U (en) Server and server backboard
CN117591378B (en) Temperature control method, system, equipment and storage medium of server
CN113886290B (en) Device and server for preventing circuit fault caused by hot plug of external plug card
CN112613081B (en) Memory chip sequence code generation method and device, electronic equipment and storage medium
CN118503174A (en) Hard disk connection topology identification method, main board, hard disk backboard and readable storage medium
CN117950362A (en) Multi-bus fusion PLC control system and control method thereof

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
GR01 Patent grant
GR01 Patent grant