CN112100111A - Control method of multiple AWG board cards - Google Patents

Control method of multiple AWG board cards Download PDF

Info

Publication number
CN112100111A
CN112100111A CN202010963655.4A CN202010963655A CN112100111A CN 112100111 A CN112100111 A CN 112100111A CN 202010963655 A CN202010963655 A CN 202010963655A CN 112100111 A CN112100111 A CN 112100111A
Authority
CN
China
Prior art keywords
awg
board card
interface
item
pcie
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.)
Granted
Application number
CN202010963655.4A
Other languages
Chinese (zh)
Other versions
CN112100111B (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.)
Shandong Inspur Science Research Institute Co Ltd
Original Assignee
Jinan Inspur Hi Tech Investment and Development 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 Jinan Inspur Hi Tech Investment and Development Co Ltd filed Critical Jinan Inspur Hi Tech Investment and Development Co Ltd
Priority to CN202010963655.4A priority Critical patent/CN112100111B/en
Publication of CN112100111A publication Critical patent/CN112100111A/en
Application granted granted Critical
Publication of CN112100111B publication Critical patent/CN112100111B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • 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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/409Mechanical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Systems (AREA)

Abstract

A control method of multiple AWG board cards, HASH _ FIND _ INT interface through AWG board card number ID, return different HASH table entry map _ item, when carrying on the trigger mode setting operation to the board card again, the apparatus handle has already been upgraded to the AWG board card expecting to control successfully at this moment, can realize the control of multiple board cards successfully, through imbedding the Hash data structure, utilize mode of Hash key-value pair to carry on inserting of PCIe apparatus handle, look for the operation, has solved and inserted the problem that the multiple AWG board cards can't be controlled normally on the computer chassis at the same time.

Description

Control method of multiple AWG board cards
Technical Field
The invention relates to the field of waveform generator control, in particular to a control method of a multi-AWG board card.
Background
The AWG (arbitrary Waveform Generator) is used as a signal generating device, can generate complex time-varying multipath signals, can measure performance indexes of equipment such as complex radars, electronic reconnaissance, friend or foe identification and the like in the military field, and provides various digital modulation signals; the method is widely applied in the field of scientific research, and particularly in some advanced scientific and technological research fields, the method needs to support the cooperative work of a plurality of AWG boards.
At present, new equipment handles are returned every time equipment is opened, so that the multiple paths of board cards cannot be correctly controlled, the control of the board cards is invalid, the waveform transmission fails, only the operation of a single AWG board card can be carried out, and the research, development and working efficiency are greatly reduced. Therefore, it is urgently needed to realize a control method for multiple AWG boards.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method for realizing simultaneous control by simultaneously inserting a plurality of AWG boards into a computer.
The technical scheme adopted by the invention for overcoming the technical problems is as follows:
a control method of a multi-AWG board card comprises the following steps:
a) inserting N AWG boards into PCIe slots of a mainboard on a computer, wherein N is a positive integer greater than or equal to 2;
b) installing a PCIe Xilinx DMA driver in a Windows system, and acquiring the number of AWG boards inserted into a current chassis by the Windows system;
c) the Windows system detects whether an AWG board card exists in a designated PCIe slot, if the matched AWG board card is not detected in the corresponding PCIe slot, error information is printed, and if the matched AWG board card is detected in the corresponding PCIe slot, the PCIe device is opened, and a device handle of the device is returned;
d) utilizing the uthash C code to dynamically create a hash table entry map _ item by using a malloc function, setting a key of the map _ item as the serial number ID of the AWG board card, and setting the value of the map _ item as the equipment handle of the AWG board card;
e) inserting the newly created hash table entry map _ item into the hash table map _ table to complete the insertion of new equipment;
f) when a user needs to operate the AWG board card in the appointed PCIe slot, the bottom layer code of the Windows system receives a slot number parameter of the PCIe slot transmitted from the upper layer, converts the slot number into a key value corresponding to the AWG board card, and searches a HASH table entry map _ item corresponding to the key value in a HASH table map _ table by using a HASH _ FIND _ INT interface;
g) the Windows system calls a ReadFile () interface, sets the interface parameter dev _ user as the value of a hash table entry map _ item, and sets the interface parameter address as the state or the vacant register address of an XDMA IP inner core to be read;
h) the Windows system calls a WriteFile () interface, sets the interface parameter dev _ user as the value of a hash table entry map _ item, sets the interface parameter address as the state or the vacant register address of an XDMA IP inner core to be read, and sets the interface parameter data as the written data;
i) when the slot number on the appointed case is switched, the HASH _ FIND _ INT interface returns different HASH table entry map _ item through the AWG card number ID.
Further, in the step b), the Windows system obtains the number of AWG boards inserted into the current chassis through the get _ devices () interface, identifies all PCIe devices by using the GUID identifier, fills the serial number of each device into the array at a time, and calls the get _ devices () interface to return the number of AWG boards inserted into the chassis successfully.
Further, the Windows system in step c) detects whether the AWG card exists in the designated PCIe slot by calling a check _ device _ exist () interface.
Further, the Windows system in step c) opens the PCIe device by calling the CreateFile () interface.
Further, the Windows system in step e) inserts the newly created HASH table entry map _ item into the map _ table using the HASH _ ADD _ INT () interface.
The invention has the beneficial effects that: the HASH _ FIND _ INT interface returns different HASH table entry map _ item through the AWG board card serial number ID, when the trigger mode setting operation is carried out on the board card again, the equipment handle is successfully updated to the AWG board card which is expected to be controlled at the moment, the control of multiple board cards can be successfully realized, through embedding the Hash data structure, the PCIe equipment handle is inserted and the operation is checked in a Hash key-value pair mode, and the problem that a plurality of AWG board cards cannot be normally controlled when being inserted into the computer case at the same time is solved.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The invention is further described below with reference to fig. 1.
A control method of a multi-AWG board card comprises the following steps:
a) inserting N AWG boards into PCIe slots of a mainboard on a computer, wherein N is a positive integer greater than or equal to 2;
b) installing a PCIe Xilinx DMA driver in a Windows system, and acquiring the number of AWG boards inserted into a current chassis by the Windows system;
c) the Windows system detects whether an AWG board card exists in a designated PCIe slot, if the matched AWG board card is not detected in the corresponding PCIe slot, error information is printed, and if the matched AWG board card is detected in the corresponding PCIe slot, the PCIe device is opened, and a device handle of the device is returned;
d) utilizing the uthash C code to dynamically create a hash table entry map _ item by using a malloc function, setting a key of the map _ item as the serial number ID of the AWG board card, and setting the value of the map _ item as the equipment handle of the AWG board card;
e) inserting the newly created hash table entry map _ item into the hash table map _ table to complete the insertion of new equipment;
f) when a user needs to operate the AWG board card in the appointed PCIe slot, the bottom layer code of the Windows system receives a slot number parameter of the PCIe slot transmitted from the upper layer, converts the slot number into a key value corresponding to the AWG board card, and searches a HASH table entry map _ item corresponding to the key value in a HASH table map _ table by using a HASH _ FIND _ INT interface;
g) the Windows system calls a ReadFile () interface, sets the interface parameter dev _ user as the value of a hash table entry map _ item, and sets the interface parameter address as the state or the vacant register address of an XDMA IP inner core to be read;
h) the Windows system calls a WriteFile () interface, sets the interface parameter dev _ user as the value of a hash table entry map _ item, sets the interface parameter address as the state or the vacant register address of an XDMA IP inner core to be read, and sets the interface parameter data as the written data;
i) when the slot number on the appointed case is switched, the HASH _ FIND _ INT interface returns different HASH table entry map _ item through the AWG card number ID.
The HASH _ FIND _ INT interface returns different HASH table entry map _ item through the AWG board card serial number ID, when the trigger mode setting operation is carried out on the board card again, the equipment handle is successfully updated to the AWG board card which is expected to be controlled at the moment, the control of multiple board cards can be successfully realized, through embedding the Hash data structure, the PCIe equipment handle is inserted and the operation is checked in a Hash key-value pair mode, and the problem that a plurality of AWG board cards cannot be normally controlled when being inserted into the computer case at the same time is solved.
Further, in the step b), the Windows system obtains the number of AWG boards inserted into the current chassis through the get _ devices () interface, identifies all PCIe devices by using the GUID identifier, fills the serial number of each device into the array at a time, and calls the get _ devices () interface to return the number of AWG boards inserted into the chassis successfully.
Further, the Windows system in step c) detects whether the AWG card exists in the designated PCIe slot by calling a check _ device _ exist () interface.
Further, the Windows system in step c) opens the PCIe device by calling the CreateFile () interface.
Further, the Windows system in step e) inserts the newly created HASH table entry map _ item into the map _ table using the HASH _ ADD _ INT () interface.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (5)

1. A control method of a multi-AWG board card is characterized by comprising the following steps:
a) inserting N AWG boards into PCIe slots of a mainboard on a computer, wherein N is a positive integer greater than or equal to 2;
b) installing a PCIe Xilinx DMA driver in a Windows system, and acquiring the number of AWG boards inserted into a current chassis by the Windows system;
c) the Windows system detects whether an AWG board card exists in a designated PCIe slot, if the matched AWG board card is not detected in the corresponding PCIe slot, error information is printed, and if the matched AWG board card is detected in the corresponding PCIe slot, the PCIe device is opened, and a device handle of the device is returned;
d) utilizing the uthash C code to dynamically create a hash table entry map _ item by using a malloc function, setting a key of the map _ item as the serial number ID of the AWG board card, and setting the value of the map _ item as the equipment handle of the AWG board card;
e) inserting the newly created hash table entry map _ item into the hash table map _ table to complete the insertion of new equipment;
f) when a user needs to operate the AWG board card in the appointed PCIe slot, the bottom layer code of the Windows system receives a slot number parameter of the PCIe slot transmitted from the upper layer, converts the slot number into a key value corresponding to the AWG board card, and searches a HASH table entry map _ item corresponding to the key value in a HASH table map _ table by using a HASH _ FIND _ INT interface;
g) the Windows system calls a ReadFile () interface, sets the interface parameter dev _ user as the value of a hash table entry map _ item, and sets the interface parameter address as the state or the vacant register address of an XDMA IP inner core to be read;
h) the Windows system calls a WriteFile () interface, sets the interface parameter dev _ user as the value of a hash table entry map _ item, sets the interface parameter address as the state or the vacant register address of an XDMA IP inner core to be read, and sets the interface parameter data as the written data;
i) when the slot number on the appointed case is switched, the HASH _ FIND _ INT interface returns different HASH table entry map _ item through the AWG card number ID.
2. The method of controlling a multiple AWG board card of claim 1, wherein: in the step b), the Windows system acquires the number of AWG boards inserted into the current case through the get _ devices () interface, all PCIe devices are identified by the GUID, the serial number of each device is filled into the array at one time, and the get _ devices () interface calls the number of AWG boards inserted into the case successfully.
3. The method of controlling a multiple AWG board card of claim 1, wherein: and c), the Windows system detects whether the AWG board card exists in the appointed PCIe slot by calling a check _ device _ exist () interface.
4. The method of controlling a multiple AWG board card of claim 1, wherein: in step c), the Windows system opens the PCIe device by calling the CreateFile () interface.
5. The method of controlling a multiple AWG board card of claim 1, wherein: in the step e), the Windows system inserts the newly created HASH table entry map _ item into the map _ table by using a HASH _ ADD _ INT () interface.
CN202010963655.4A 2020-09-15 2020-09-15 Control method of multiple AWG board cards Active CN112100111B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010963655.4A CN112100111B (en) 2020-09-15 2020-09-15 Control method of multiple AWG board cards

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010963655.4A CN112100111B (en) 2020-09-15 2020-09-15 Control method of multiple AWG board cards

Publications (2)

Publication Number Publication Date
CN112100111A true CN112100111A (en) 2020-12-18
CN112100111B CN112100111B (en) 2022-04-26

Family

ID=73751610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010963655.4A Active CN112100111B (en) 2020-09-15 2020-09-15 Control method of multiple AWG board cards

Country Status (1)

Country Link
CN (1) CN112100111B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416444A (en) * 2020-11-17 2021-02-26 济南浪潮高新科技投资发展有限公司 Board switching control method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650698A (en) * 2009-08-28 2010-02-17 曙光信息产业(北京)有限公司 Method for realizing direct memory access
US20140372657A1 (en) * 2013-06-14 2014-12-18 National Instruments Corporation Hidden Base Address Register Programming in Peripheral Component Interconnect Express Buses
CN106778249A (en) * 2017-01-23 2017-05-31 湖南文盾信息技术有限公司 A kind of construction method and constructing system of the credible performing environment of java applet
CN110287043A (en) * 2019-07-01 2019-09-27 山东浪潮人工智能研究院有限公司 A kind of AWG control method and AWG control system
CN110311843A (en) * 2018-03-27 2019-10-08 北京深鉴智能科技有限公司 Communication means, device, electronic equipment, storage medium based on PCIe link

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650698A (en) * 2009-08-28 2010-02-17 曙光信息产业(北京)有限公司 Method for realizing direct memory access
US20140372657A1 (en) * 2013-06-14 2014-12-18 National Instruments Corporation Hidden Base Address Register Programming in Peripheral Component Interconnect Express Buses
CN106778249A (en) * 2017-01-23 2017-05-31 湖南文盾信息技术有限公司 A kind of construction method and constructing system of the credible performing environment of java applet
CN110311843A (en) * 2018-03-27 2019-10-08 北京深鉴智能科技有限公司 Communication means, device, electronic equipment, storage medium based on PCIe link
CN110287043A (en) * 2019-07-01 2019-09-27 山东浪潮人工智能研究院有限公司 A kind of AWG control method and AWG control system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
3YL: "HID 设备读写 STM32 hid收发 readfile writefile", 《CSDN》 *
徐开洁: "Linux下算法加密卡的PCIe接口的驱动研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
潘海鸿等: "多块硬件配置相同的PCI板卡识别方法", 《组合机床与自动化加工技术》 *
王晓雯: "基于FPGA的Host-FTL固态硬盘控制器的设计", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416444A (en) * 2020-11-17 2021-02-26 济南浪潮高新科技投资发展有限公司 Board switching control method, device, equipment and medium
CN112416444B (en) * 2020-11-17 2023-07-07 山东浪潮科学研究院有限公司 Board switching control method, device, equipment and medium

Also Published As

Publication number Publication date
CN112100111B (en) 2022-04-26

Similar Documents

Publication Publication Date Title
US20070204069A1 (en) Port number emulation for wireless usb connections
JPH02204851A (en) Inherent address-assigning method for modular computer and modular computer apparatus
CN106101984B (en) A kind of the security module management method and terminal of NFC Mobile payment terminal
CN112100111B (en) Control method of multiple AWG board cards
CN106096386A (en) Update the method and system of software
CN111143446A (en) Data structure conversion processing method and device of data object and electronic equipment
CN103618710A (en) Individual processing method and device of file between mobile device and computing device
CN106445548A (en) Test pack issuing method and device
CN1890627A (en) Buffer management via non-data symbol processing for a point to point link
US8539048B2 (en) Electronic device and method for loading configuration files using the same
US5568647A (en) Serial control apparatus with a single chip select signal
CN116339927B (en) Equipment determining method, device, storage medium and electronic device
CN111142885B (en) eSIM equipment management method, device, equipment and storage medium
CN102402598B (en) Application file system access
CN101127787B (en) Memory device positioning device and method in data storage system
CN115543460A (en) Initialization method and device of server mainboard
CN103428397A (en) Image information processing method and device
CN112416444B (en) Board switching control method, device, equipment and medium
CN111581578B (en) Interface request processing method and device
US7925724B2 (en) Volume mapping by blade slot
CN115687223A (en) Method and device for serial port communication of embedded equipment, embedded equipment and storage medium
US10749934B1 (en) Removable hardware for increasing computer download speed
CN109359384B (en) Method and device for calling silk-screen mark into printed circuit board
CN102111446B (en) Device connection handling method, combination equipment and host equipment
KR20100073520A (en) Spi communication system and method for communicating between main board and expansion board

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
TA01 Transfer of patent application right

Effective date of registration: 20220323

Address after: 250104 No. 1036, Gaoxin Inspur Road, Jinan City, Shandong Province

Applicant after: INSPUR GROUP Co.,Ltd.

Address before: 250104 1st floor, R & D building, No. 2877, Suncun Town, Licheng District, Jinan City, Shandong Province

Applicant before: JINAN INSPUR HIGH-TECH TECHNOLOGY DEVELOPMENT Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230419

Address after: 250000 building S02, No. 1036, Langchao Road, high tech Zone, Jinan City, Shandong Province

Patentee after: Shandong Inspur Scientific Research Institute Co.,Ltd.

Address before: 250104 No. 1036, Gaoxin Inspur Road, Jinan City, Shandong Province

Patentee before: INSPUR GROUP Co.,Ltd.

TR01 Transfer of patent right