CN111949469A - Method and device for simulating expansion equipment and simulation card - Google Patents

Method and device for simulating expansion equipment and simulation card Download PDF

Info

Publication number
CN111949469A
CN111949469A CN201910414388.2A CN201910414388A CN111949469A CN 111949469 A CN111949469 A CN 111949469A CN 201910414388 A CN201910414388 A CN 201910414388A CN 111949469 A CN111949469 A CN 111949469A
Authority
CN
China
Prior art keywords
configuration file
card
configuration information
simulation card
expansion
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
CN201910414388.2A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910414388.2A priority Critical patent/CN111949469A/en
Publication of CN111949469A publication Critical patent/CN111949469A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/261Functional testing by simulating additional hardware, e.g. fault simulation

Abstract

The invention discloses a method and a device for simulating an extension device and a simulation card, and relates to the technical field of computers. One embodiment of the method comprises: acquiring configuration information of the expansion equipment; exporting a configuration file of the simulation card; editing the configuration file based on the configuration information; importing the edited configuration file into a simulation card; the simulation card is used for testing on the computer side, and the edited configuration file is used for being read in the testing process. The method and the device can simulate the equipment with the same information, reduce the repeated installation or connection process during testing, avoid the requirement competition, and reduce the cost and the error probability of development and testing.

Description

Method and device for simulating expansion equipment and simulation card
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for simulating expansion equipment and a simulation card.
Background
With the progress of science and technology, computer technology is continuously developed, and the wide application of computer technology depends on computer equipment.
When testing and developing computer equipment, development and testing of extension equipment are mostly involved. An expansion device is a device that employs certain bus and interface standards, such as a Peripheral Component Interconnect Express (PCIE) device that employs a PCIE device, a PCI device that employs PCI, and so forth. Expansion devices are typically faster to upgrade and more expensive, such as graphics cards for Artificial Intelligence (AI) operations, graphics architecture processors (Tesla T4 GPUs), and the like.
At present, even if simple information capture is performed, a specific expansion device needs to be installed or connected on a computer device, that is, an actual device is used for completing a test, or a similar device with the same configuration information is used for performing an auxiliary test. In some special scenarios, it may be desirable to display an extended device with certain characteristics or specific criteria in a particular computer system, due to firmware limitations or the like, or for other purposes.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. when actual equipment is used for testing or similar equipment is used for auxiliary testing, the time and labor are consumed in the installation or connection process; the demand on equipment resources is high, and the situation of demand competition is easy to occur; and higher costs of development and testing;
2. when similar equipment is used, the information of the equipment needs to be replaced in computer software or firmware, but information verification cannot be performed, and the error probability is high; and the inability to meet the needs of expansion devices that exhibit certain characteristics or specific characteristics within a particular computer system.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for simulating an expansion device, and a simulation card, which can simulate devices with the same information, reduce repeated installation or connection processes during testing, avoid requirement competition, and reduce development and testing costs and error probability.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of simulating an expansion device.
The method for simulating the expansion equipment comprises the following steps:
acquiring configuration information of the expansion equipment;
exporting a configuration file of the simulation card;
editing the configuration file based on the configuration information;
importing the edited configuration file into the simulation card; wherein the simulation card is used for computer-side testing, and the edited configuration file is used for being read in the testing process.
Alternatively,
the obtaining of the configuration information of the expansion device includes: analyzing a storage file of the expansion equipment by using a logic chip of the analog card, or inquiring the storage file of the expansion equipment by using a viewing tool under a computer system to acquire configuration information of the expansion equipment;
the configuration information includes: the equipment identification number, the manufacturer identification number, the subsystem identification number and the subsystem manufacturer identification number.
Alternatively,
the expansion device is a PCIE device;
the viewing tool is an lspci tool or a debugging tool;
the configuration information further comprises at least one of: capability device code, device state, device control, slot state, slot control, root state, root control, connection state, port number, reserved ports, advanced power management selection compatibility, connection state notification, data layer connection validation, reporting capability, unexpected shutdown and interrupt error reporting, clock power management, exit latency, advanced power management support, maximum connection speed, or maximum connection bandwidth.
Alternatively,
exporting the configuration file of the emulation card includes: exporting a configuration file of a memory of the simulation card through a data interface of the simulation card or under a computer system;
importing the edited configuration file into the simulation card comprises the following steps: and importing the edited configuration file into a memory of the simulation card through a data interface of the simulation card or under a computer system.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for simulating an expansion device.
The device for simulating the extension equipment in the embodiment of the invention comprises:
the acquisition module is used for acquiring the configuration information of the expansion equipment;
the export module is used for exporting the configuration file of the analog card;
the editing module is used for editing the configuration file based on the configuration information;
the import module is used for importing the edited configuration file into the simulation card; wherein the simulation card is used for computer-side testing, and the edited configuration file is used for being read in the testing process.
Alternatively,
the acquisition module is further configured to: analyzing a storage file of the expansion equipment by using a logic chip of the analog card, or inquiring the storage file of the expansion equipment by using a viewing tool under a computer system to acquire configuration information of the expansion equipment;
the configuration information includes: the equipment identification number, the manufacturer identification number, the subsystem identification number and the subsystem manufacturer identification number;
the configuration information further comprises at least one of: capability device code, device state, device control, slot state, slot control, root state, root control, connection state, port number, reserved ports, advanced power management selection compatibility, connection state notification, data layer connection validation, reporting capability, unexpected shutdown and interrupt error reporting, clock power management, exit latency, advanced power management support, maximum connection speed, or maximum connection bandwidth.
Alternatively,
the export module is further to: exporting a configuration file of a memory of the simulation card through a data interface of the simulation card or under a computer system;
the import module is further configured to: and importing the edited configuration file into a memory of the simulation card through a data interface of the simulation card or under a computer system.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an apparatus for simulating an extension device.
The simulation card of the embodiment of the invention, which is applied to the method for simulating the expansion equipment of the embodiment of the invention, is used for the test of the computer side, and comprises the following steps:
the logic chip is used for analyzing a storage file of the expansion equipment to acquire configuration information of the expansion equipment;
the memory is used for storing the configuration file of the analog card;
the data interface is used for exporting the configuration file or importing the configuration file edited based on the configuration information; wherein the edited configuration file is used for being read in the test process;
the golden finger is used for being connected with a slot of a computer;
and the printed circuit substrate is used for connecting the logic chip, the data interface, the golden finger and the memory.
Alternatively,
the logic chip is FPGA or ASIC;
the memory is an EEPROM or OptionROM.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided an electronic device simulating an expansion device.
An electronic device for simulating an expansion device according to an embodiment of the present invention includes: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement a method for simulating an extension device according to an embodiment of the present invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention stores thereon a computer program that, when executed by a processor, implements a method of simulating an extension device of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the configuration information of the expansion equipment is acquired; exporting a configuration file of the simulation card; editing a configuration file based on the configuration information; the technical means of importing the edited configuration file into the simulation card overcomes the time and labor consumption of the test process; the situation of demand competition is easy to occur; the cost of development and testing is high; the technical problems that the requirements for verifying and displaying information cannot be met and the error probability is high are solved, so that the technical effects that equipment with the same information is simulated, repeated installation or connection processes during testing are reduced, requirement competition is avoided, and the development and testing cost and the error probability are reduced are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method of simulating an expansion device according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an emulation card in accordance with an embodiment of the present invention;
FIG. 3 is the structure of the configuration space of a Tesla T4 GPU;
FIG. 4 is a diagram of the configuration space pointed to by the Capability Pointer at 034h in FIG. 3;
FIG. 5 is a structure of the configuration space pointed to by Link Capabilities at 0Ch in FIG. 4;
FIG. 6 is a schematic diagram of the main blocks of an apparatus for simulating expansion devices according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
Expansion devices in a computer system may conform to bus standard specifications, for example PCIE devices conform to the PCIE specification (a high speed serial computer expansion bus standard). When the expansion device is initialized, the computer system reads information in the configuration space of the expansion device as an initialized value, such as a device identification number, a vendor identification number, a subsystem identification number and a subsystem vendor identification number, a maximum connection speed, a maximum connection bandwidth or a time delay. In most processor-based computer systems, the configuration information of the expansion device is stored in its own EEPROM, such as an X86 computer system.
Meanwhile, the expansion devices are designed and developed strictly according to certain standard specifications, and the configuration information acquisition of the expansion devices is generally universal in computer devices, computer management cards and compatibility tests.
Based on this, the method for simulating the expansion device according to the embodiment of the present invention provides that, by obtaining part of configuration information on the existing expansion device, copying and writing the configuration information into the simulation card, and simulating the device with the same information based on the simulation card. The emulation card can be used for computer-side functionality testing or related testing related to the emulated expansion device.
Fig. 1 is a schematic diagram of the main steps of a method of simulating an expansion device according to an embodiment of the present invention. As shown in fig. 1, the method for simulating an expansion device according to the embodiment of the present invention mainly includes the following steps:
step S101: and acquiring configuration information of the expansion equipment.
Expansion devices refer to devices that employ some computer bus standards, such as PCIE devices, PCI devices, and ISA bus devices. Various types of tests for the expansion device are generally performed based on the configuration information thereof, such as compatibility tests, and based on this, when the expansion device is simulated, the configuration information thereof needs to be acquired. ISA is a bus standard established for PC/AT computers.
The configuration information may include: equipment identification number, manufacturer identification number, subsystem manufacturer identification number and the like.
Further, the configuration information may further include: capability device code, device state, device control, slot state, slot control, root state, root control, connection state, port number, reserved ports, advanced power management selection compatibility, connection state notification, data layer connection validation, reporting capability, unexpected shutdown and interrupt error reporting, clock power management, exit latency, advanced power management support, maximum connection speed or maximum connection bandwidth, and the like.
The expansion device follows a specific bus standard specification, the configuration information of the general structure is stored in the configuration space of the expansion device, and the configuration information can be acquired by analyzing or directly querying the storage file of the expansion device based on the characteristics of the expansion device. In the embodiment of the present invention, step S101 may be implemented by the following steps: and analyzing the storage file of the expansion equipment by using a logic chip of the analog card, or inquiring the storage file of the expansion equipment by using a viewing tool under a computer system to acquire the configuration information of the expansion equipment.
The viewing tool may be an lspci tool, a tool for displaying information about the computer bus in the computer system and devices connected to the computer bus, or a debugging tool written by the manufacturer of the extension device.
Step S102: and exporting the configuration file of the simulation card.
To reduce the dependence on actual expansion devices or the like and to reduce the consumption of expansion devices, devices with the same information can be simulated using a simulation card and used for functionality testing or related testing on the computer side in relation to the expansion devices, thereby reducing the repetitive installation or connection process and reducing the cost of development and testing. When the expansion device is simulated, the configuration file of the simulation card can be exported so as to write the information of the simulated expansion device.
In the embodiment of the present invention, step S102 may be implemented by the following steps: the configuration file of the memory of the emulation card is exported through the data interface of the emulation card or under the computer system.
The configuration file is stored in a memory of the analog card, which can be read and accessed via a data interface. The data interface is an interface for exporting or importing data on the analog card. Furthermore, if the emulation card is already connected to the computer system, data can be exported or imported directly under the computer system. The simulation card can be connected with a slot of a computer through a golden finger so as to be connected to the lower part of the computer system.
Step S103: the configuration file is edited based on the configuration information.
After the configuration file is generated, the configuration file of the simulation card can be edited according to the configuration information of the expansion equipment, so that the simulation card has the same information as the expansion equipment to replace the expansion equipment for testing, even information verification. It should be noted that, by editing the configuration file, the simulation card can simulate different expansion devices, so that the occupation of the expansion devices is significantly reduced, and the development and test costs are reduced.
Step S104: and importing the edited configuration file into the simulation card.
After the configuration file is edited, the configuration file is equal to the configuration information of the expansion equipment, and after the simulation card is imported, the simulation card has certain characteristics or specific indexes which are the same as those of the expansion equipment in a computer system or a test environment, so that the simulation of the expansion equipment is completed. The simulation card is used for replacing the expansion equipment to participate in computer-side tests, such as certain functionality tests; the edited configuration file is used to be read during the testing process.
When importing the edited configuration file into the emulation card, the same manner as that for exporting the configuration file can be adopted. In the embodiment of the present invention, step S104 may be implemented by the following steps: and importing the edited configuration file into a memory of the analog card through a data interface of the analog card or under a computer system.
According to the method for simulating the expansion equipment, the configuration information of the expansion equipment is acquired; exporting a configuration file of the simulation card; editing a configuration file based on the configuration information; the technical means of importing the edited configuration file into the simulation card overcomes the time and labor consumption of the test process; the situation of demand competition is easy to occur; the cost of development and testing is high; the technical problems that the requirements for verifying and displaying information cannot be met and the error probability is high are solved, so that the technical effects that equipment with the same information is simulated, repeated installation or connection processes during testing are reduced, requirement competition is avoided, and the development and testing cost and the error probability are reduced are achieved.
FIG. 2 is a schematic diagram of an analog card according to an embodiment of the invention. As shown in fig. 2, the analog card of the embodiment of the present invention includes a logic chip 201, a memory 202, a data interface 203, a gold finger 204, and a printed circuit substrate 205. The simulation card applies the method for simulating the expansion device of the embodiment of the invention, and can be used for computer-side tests, such as certain functionality tests.
The logic chip 201 is configured to: and analyzing the storage file of the expansion device, and after obtaining the storage file of the expansion device, analyzing the storage file by the logic chip 201 to obtain the configuration information of the expansion device. The computer system can edit the configuration file of the simulation card based on the analyzed configuration information, so that the simulation card has certain characteristics or specific indexes which are the same as those of the expansion equipment under the computer system or test environment to replace the expansion equipment for testing.
In the embodiment of the present invention, the logic chip 201 may be a circuit capable of processing PCIe protocol, such as FPGA or ASIC, or a chip simulating PCIe logic. FPGAs are field programmable gate arrays, which are a further product of development on the basis of programmable devices. The FPGA is used as a semi-custom circuit in the field of application-specific integrated circuits, not only solves the defects of the custom circuit, but also overcomes the defect that the number of gate circuits of the original programmable device is limited. An ASIC is an integrated circuit designed for a specific purpose, and refers to an integrated circuit designed and manufactured according to the requirements of a specific user and the needs of a specific electronic system. The ASIC is characterized by facing the requirements of specific users, and compared with a general integrated circuit, the ASIC has the advantages of smaller volume, lower power consumption, improved reliability, improved performance, enhanced confidentiality, reduced cost and the like during batch production.
The memory 202 is used for: the configuration file of the analog card is stored.
In an embodiment of the present invention, the memory 202 may be an EEPROM or an Option ROM. The EEPROM is a charged erasable programmable read-only memory and is a memory chip with no data loss after power failure. OptionROM is a type of code that expands read only memory, storage device initialization, and system boot.
The data interface 203 is used for: exporting the configuration file of the analog card or importing the configuration file edited based on the configuration information; wherein the edited configuration file is used to be read in the test process.
The gold finger 204 is used for: the card is connected with the computer through a slot of the computer, and the card is composed of a plurality of golden conductive contact blades.
The PCB board (printed wiring substrate 205) is used for: the logic chip 201, the data interface 203, the gold finger 204 and the memory 202 are connected. The PCB board is a support for the logic chip 201, the data interface 203, the gold finger 204 and the memory 202, and is also a carrier for electrical connection between the logic chip 201, the data interface 203, the gold finger 204 and the memory 202.
In order to further explain the technical idea of the embodiment of the present invention, the technical solution of the present invention is now described with reference to specific application scenarios.
Assuming that the simulated expansion device is a Graphic Processor (GPU) -Tesla T4 GPU for machine learning and data reasoning, FIGS. 3, 4 and 5 show the structure of the configuration space of the Tesla T4 GPU; the logic chip of the analog card device is FPGA, the memory is EEPROM, and the memory of the analog card can be accessed by reading and writing through a data interface and can also be accessed by reading and writing directly under a computer system.
The method for simulating the extension device according to the embodiment of the present invention may be implemented with reference to the following processes:
1. querying a configuration space (namely a storage file) of a Tesla T4 GPU (graphics processing Unit) by an lspci tool under a computer system to acquire configuration information such as a Device ID, a Vendor ID, a SubSystemID and a SubSystemvendor ID;
it should be noted that the configuration space may also be analyzed by using the FPGA, so as to obtain configuration information such as Device ID, Vendor ID, SubSystem Vendor ID, and the like; and the configuration information corresponds to hexadecimal systems of 1eb8, 10de, 12a2 and 10de respectively.
The meaning of the fields in the configuration space (fig. 3, 4 and 5) of the Tesla T4 GPU is as follows: device ID-Device identification number; vendor ID-Vendor identification number; SubSystem ID-SubSystem identification number; SubSystem Vendor ID-SubSystem Vendor identification number; status-state; command-instruction; class Code-Class Code; revsion ID-version identification; Built-In Self-Test of BIST-build-In Self Test; a Header Type of Header Type- (PCIE structure); base Address Registers-Base Address Registers; a Cardbus CIS Pointer-Card bus Information Structure; expansion ROM Base Address-extended read Only memory Base Address; reserved Captilities Pointer-capability Pointer Reserved bit; interrupt Pin-Interrupt Pin; an Interrupt Line-Interrupt Line; capability Pointer-Capability Pointer; link Capabilities-connectivity; device Capabilities-Device Capabilities; slot Capabilities-Slot Capabilities; a PCI express Capabilities Register-PCIE capability Register; next Cap Pointer-Next capability Pointer; PCI Express Cap ID-PCIE capable device code; device Status-Device Status; device Control-Device Control; slot Status-Slot state; slot Control-Slot position Control; root Status-Root Status; root Control-Root Control; link Control-connection Control; link Status-connected Status; port Number-Number of ports; RsvdP-reserved port; ASPM Optionality company — advanced Power management options compatible; link Bandwidth Notification-connection status Notification; the Data Link Layer Link Active-Data Layer connection takes effect; reporting cable-reporting capability; surrise Down Error Reporting-unexpected shutdown, interrupt Error Reporting; clock Power Management-Clock Power Management; l1 Exit Latency-L1 Exit Latency; l0s Exit Latency-L0s Exit Latency; ASPM Support-advanced power management Support; max Link Speed-maximum connection Speed; maximum Link Width-Maximum connection Bandwidth.
2. Exporting the configuration file in the EEPROM through a data interface of the analog card, and editing the configuration file based on configuration information of a Tesla T4 GPU after exporting the configuration file;
it should be noted that the configuration file in the EEPROM may also be exported under the computer system. In addition, if more Tesla T4 GPU information needs to be simulated, more PCIE configuration information, i.e., other information listed in fig. 4 and 5, can be obtained according to the PCIE specification. In general, configuration information such as a target working rate, a negotiation rate, a target working channel number, a negotiation working channel number, and an IO resource request amount may be obtained by using other information listed in fig. 5.
3. And importing the modified configuration file into the EEPROM of the analog card through a data interface. In the edited profile, the Device ID, the Vendor ID, the SubSystem ID, and the SubSystem Vendor ID correspond to hexadecimal numbers, and are 1eb8, 10de, 12a2, and 10de in this order. Hexadecimal is a format defined in the bus standard specification of the Tesla T4 GPU, and is also adopted in the EEPROM to facilitate recognition by developers and conversion into binary.
4. And resetting the computer system to enable the simulation card to be reinitialized according to the information of the Tesla T4 GPU in the computer system so as to realize the simulation of the Tesla T4 GPU.
Fig. 6 is a schematic diagram of the main blocks of an apparatus for simulating an expansion device according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 for simulating an extension device according to an embodiment of the present invention includes: an acquisition module 601, an export module 602, an edit module 603, and an import module 604.
Wherein the content of the first and second substances,
an obtaining module 601, configured to obtain configuration information of an extension device;
an export module 602, configured to export a configuration file of the emulation card;
an editing module 603, configured to edit the configuration file based on the configuration information;
an import module 604, configured to import the edited configuration file into the analog card; wherein the simulation card is used for computer-side testing, and the edited configuration file is used for being read in the testing process.
In this embodiment of the present invention, the obtaining module 601 may further be configured to: analyzing the storage file of the expansion equipment by using a logic chip of the analog card, or inquiring the storage file of the expansion equipment by using a viewing tool under a computer system to acquire the configuration information of the expansion equipment.
Further, the configuration information includes: the equipment identification number, the manufacturer identification number, the subsystem identification number and the subsystem manufacturer identification number.
Furthermore, the expansion device may be a PCIE device; the viewing tool may be an lspci tool or a debugging tool.
Further, the configuration information may further include at least one of: capability device code, device state, device control, slot state, slot control, root state, root control, connection state, port number, reserved ports, advanced power management selection compatibility, connection state notification, data layer connection validation, reporting capability, unexpected shutdown and interrupt error reporting, clock power management, exit latency, advanced power management support, maximum connection speed, or maximum connection bandwidth.
In an embodiment of the present invention, the deriving module 602 is further configured to: exporting a configuration file of a memory of the simulation card through a data interface of the simulation card or under a computer system; the import module 604 is further configured to: and importing the edited configuration file into a memory of the simulation card through a data interface of the simulation card or under a computer system.
According to the device for simulating the expansion equipment, the configuration information of the expansion equipment is acquired; exporting a configuration file of the simulation card; editing a configuration file based on the configuration information; the technical means of importing the edited configuration file into the simulation card overcomes the time and labor consumption of the test process; the situation of demand competition is easy to occur; the cost of development and testing is high; the technical problems that the requirements for verifying and displaying information cannot be met and the error probability is high are solved, so that the technical effects that equipment with the same information is simulated, repeated installation or connection processes during testing are reduced, requirement competition is avoided, and the development and testing cost and the error probability are reduced are achieved.
Fig. 7 shows an exemplary system architecture 700 to which the method of simulating an expansion device or the apparatus simulating an expansion device of an embodiment of the invention may be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 701, 702, and 703.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 701, 702, and 703. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be noted that the method for simulating an expansion device provided by the embodiment of the present invention is generally performed by the server 705, and accordingly, the apparatus for simulating an expansion device is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that a computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, an export module, an edit module, and an import module. The names of these modules do not in some cases form a limitation on the modules themselves, and for example, the acquiring module may also be described as a "module that acquires configuration information of an expansion device".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: step S101: acquiring configuration information of the expansion equipment; step S102: exporting a configuration file of the simulation card; step S103: editing the configuration file based on the configuration information; step S104: and importing the edited configuration file into the simulation card.
According to the technical scheme of the embodiment of the invention, the configuration information of the expansion equipment is acquired; exporting a configuration file of the simulation card; editing a configuration file based on the configuration information; the technical means of importing the edited configuration file into the simulation card overcomes the time and labor consumption of the test process; the situation of demand competition is easy to occur; the cost of development and testing is high; the technical problems that the requirements for verifying and displaying information cannot be met and the error probability is high are solved, so that the technical effects that equipment with the same information is simulated, repeated installation or connection processes during testing are reduced, requirement competition is avoided, and the development and testing cost and the error probability are reduced are achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method of simulating an expansion device, comprising:
acquiring configuration information of the expansion equipment;
exporting a configuration file of the simulation card;
editing the configuration file based on the configuration information;
importing the edited configuration file into the simulation card; wherein the simulation card is used for computer-side testing, and the edited configuration file is used for being read in the testing process.
2. The method of claim 1,
the obtaining of the configuration information of the expansion device includes: analyzing a storage file of the expansion equipment by using a logic chip of the analog card, or inquiring the storage file of the expansion equipment by using a viewing tool under a computer system to acquire configuration information of the expansion equipment;
the configuration information includes: the equipment identification number, the manufacturer identification number, the subsystem identification number and the subsystem manufacturer identification number.
3. The method of claim 2,
the expansion device is a PCIE device;
the viewing tool is an lspci tool or a debugging tool;
the configuration information further comprises at least one of: capability device code, device state, device control, slot state, slot control, root state, root control, connection state, port number, reserved ports, advanced power management selection compatibility, connection state notification, data layer connection validation, reporting capability, unexpected shutdown and interrupt error reporting, clock power management, exit latency, advanced power management support, maximum connection speed, or maximum connection bandwidth.
4. The method of claim 1,
exporting the configuration file of the emulation card includes: exporting a configuration file of a memory of the simulation card through a data interface of the simulation card or under a computer system;
importing the edited configuration file into the simulation card comprises the following steps: and importing the edited configuration file into a memory of the simulation card through a data interface of the simulation card or under a computer system.
5. An apparatus for simulating an expansion device, comprising:
the acquisition module is used for acquiring the configuration information of the expansion equipment;
the export module is used for exporting the configuration file of the analog card;
the editing module is used for editing the configuration file based on the configuration information;
the import module is used for importing the edited configuration file into the simulation card; wherein the simulation card is used for computer-side testing, and the edited configuration file is used for being read in the testing process.
6. The apparatus of claim 5,
the acquisition module is further configured to: analyzing a storage file of the expansion equipment by using a logic chip of the analog card, or inquiring the storage file of the expansion equipment by using a viewing tool under a computer system to acquire configuration information of the expansion equipment;
the configuration information includes: the equipment identification number, the manufacturer identification number, the subsystem identification number and the subsystem manufacturer identification number;
the configuration information further comprises at least one of: capability device code, device state, device control, slot state, slot control, root state, root control, connection state, port number, reserved ports, advanced power management selection compatibility, connection state notification, data layer connection validation, reporting capability, unexpected shutdown and interrupt error reporting, clock power management, exit latency, advanced power management support, maximum connection speed, or maximum connection bandwidth.
7. The apparatus of claim 5,
the export module is further to: exporting a configuration file of a memory of the simulation card through a data interface of the simulation card or under a computer system;
the import module is further configured to: and importing the edited configuration file into a memory of the simulation card through a data interface of the simulation card or under a computer system.
8. An emulation card for computer-side testing using the method of any of claims 1-4, comprising:
the logic chip (201) is used for analyzing a storage file of the expansion equipment to acquire configuration information of the expansion equipment;
a memory (202) for storing a configuration file for the emulation card;
a data interface (203) for exporting the configuration file or importing the configuration file edited based on the configuration information; wherein the edited configuration file is used for being read in the test process;
the golden finger (204) is used for being connected with a slot of a computer;
a printed wiring substrate (205) for connecting said logic chip (201), said data interface (203), said gold finger (204) and said memory (202).
9. The analog card of claim 8,
the logic chip (201) is an FPGA or an ASIC;
the memory (202) is an EEPROM or OptionROM.
10. An electronic device that simulates an expansion device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
11. A computer-readable medium, having stored thereon a computer program,
the program when executed by a processor implementing the method of any one of claims 1 to 4.
CN201910414388.2A 2019-05-17 2019-05-17 Method and device for simulating expansion equipment and simulation card Pending CN111949469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910414388.2A CN111949469A (en) 2019-05-17 2019-05-17 Method and device for simulating expansion equipment and simulation card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910414388.2A CN111949469A (en) 2019-05-17 2019-05-17 Method and device for simulating expansion equipment and simulation card

Publications (1)

Publication Number Publication Date
CN111949469A true CN111949469A (en) 2020-11-17

Family

ID=73336167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910414388.2A Pending CN111949469A (en) 2019-05-17 2019-05-17 Method and device for simulating expansion equipment and simulation card

Country Status (1)

Country Link
CN (1) CN111949469A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372652A1 (en) * 2013-06-14 2014-12-18 Hon Hai Precision Industry Co., Ltd. Simulation card and i2c bus testing system with simulation card
CN104765664A (en) * 2014-01-08 2015-07-08 鸿富锦精密工业(深圳)有限公司 PCI (Peripheral Component Interface) equipment detection system and method
US20170300402A1 (en) * 2016-04-19 2017-10-19 Sap Se Mock server and extensions for application testing
CN108108801A (en) * 2018-01-04 2018-06-01 西安普瑞米特科技有限公司 A kind of simulating contact Formulas I C cards realize the device and reading/writing method of reading and writing data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372652A1 (en) * 2013-06-14 2014-12-18 Hon Hai Precision Industry Co., Ltd. Simulation card and i2c bus testing system with simulation card
CN104765664A (en) * 2014-01-08 2015-07-08 鸿富锦精密工业(深圳)有限公司 PCI (Peripheral Component Interface) equipment detection system and method
US20170300402A1 (en) * 2016-04-19 2017-10-19 Sap Se Mock server and extensions for application testing
CN108108801A (en) * 2018-01-04 2018-06-01 西安普瑞米特科技有限公司 A kind of simulating contact Formulas I C cards realize the device and reading/writing method of reading and writing data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许军;曹勇;张新喜;: "基于SOPC技术的电路板通用测试插槽设计", 测试技术学报, vol. 24, no. 06, pages 481 - 485 *

Similar Documents

Publication Publication Date Title
CN110337641B (en) Determining application test results using screen shot primitive data
US10540310B2 (en) Selectable peripheral logic in programmable apparatus
US8103993B2 (en) Structure for dynamically allocating lanes to a plurality of PCI express connectors
CN114880977B (en) Software and hardware joint simulation system, method, device, equipment and storage medium
CN113742153A (en) Equipment testing method and device, readable medium and electronic equipment
CN115168130A (en) Chip testing method and device, electronic equipment and storage medium
US9710575B2 (en) Hybrid platform-dependent simulation interface
CN113254284A (en) Chip testing method, device, equipment, storage medium and program product
US10067894B1 (en) Cable-based configuration
CN112154417A (en) Sharing a code base between a stand-alone version and a Web-based version of an application via an emulated network communication channel
US11475191B2 (en) Generating and adding additional control information to logic under test to facilitate debugging and comprehension of a simulation
CN111949469A (en) Method and device for simulating expansion equipment and simulation card
CN107247661B (en) Method and system for supporting automatic verification of installation package of application
CN115544922A (en) PCIe verification IP automatic integration method and system capable of configuring and supporting multiple working modes
CN209132718U (en) A kind of power supply jig of standard PCIE subcard and OCP subcard
CN113656268B (en) Performance test method and device for business service, electronic equipment and storage medium
CN117436405B (en) Simulation verification method and device and electronic equipment
CN112559311B (en) Interface adaptation method and device for mobile terminal automatic test
CN112988250B (en) Multi-mainboard USB service configuration method, system, terminal and storage medium
CN113204494B (en) Terminal remote test platform and method, electronic equipment and readable medium
US20220318469A1 (en) Systems, Methods, and Devices for Virtual Prototyping
CN109471764B (en) Method, device, terminal and storage medium for quickly reading system information
CN115686646A (en) Chip starting method and device, storage medium and chip
CN114090007A (en) Multi-language text generation method, terminal and storage medium suitable for development language
CN117407044A (en) Configuration method, device, equipment and medium of cross-terminal assembly

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