CN102043738B - Method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices - Google Patents

Method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices Download PDF

Info

Publication number
CN102043738B
CN102043738B CN 200910235676 CN200910235676A CN102043738B CN 102043738 B CN102043738 B CN 102043738B CN 200910235676 CN200910235676 CN 200910235676 CN 200910235676 A CN200910235676 A CN 200910235676A CN 102043738 B CN102043738 B CN 102043738B
Authority
CN
China
Prior art keywords
pci
single function
equipment
register
pci 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
CN 200910235676
Other languages
Chinese (zh)
Other versions
CN102043738A (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.)
Dawning Information Industry Beijing Co Ltd
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry Beijing 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 Dawning Information Industry Beijing Co Ltd filed Critical Dawning Information Industry Beijing Co Ltd
Priority to CN 200910235676 priority Critical patent/CN102043738B/en
Publication of CN102043738A publication Critical patent/CN102043738A/en
Application granted granted Critical
Publication of CN102043738B publication Critical patent/CN102043738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimiles In General (AREA)

Abstract

The invention provides a method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices. The method comprises the following steps of: confirming the quantity of the single-function PCI devices to be simulated into multifunction devices by utilizing a PCI device driver according to a preset parameter; adding the corresponding quantity ofcontrol registers, state registers and interrupt controllers in a single-function PCI device register, wherein the control registers, the state registers and the interrupt controllers are respectively used for operating a simulation interface of each multi-function device; and registering the single-function PCI devices to be the corresponding quantity of multi-function devices to an operating system kernel in the PCI device driver to produce the corresponding quantity of simulation interfaces. According to the invention, the PCI devices with a physical characteristic of single function are simulated to multi-function PCI devices in the PCI device driver to ensure that users can operate and control the single-function PCI devices more easily without changing the using way.

Description

Multi-functional simulation implementation method and the device of single function PCI equipment
Technical field
The present invention relates to PCI device drives field, relating in particular to a kind of the cooperation by software and hardware will be single function PCI equipment is modeled to the controllable PCI multifunctional equipment of application program in driver implementation method and device on the physical characteristics.
Background technology
Continual renovation and development along with computer utility, the bandwidth requirement of data transmission is more and more higher in the computing machine, tradition internal bus bandwidth can not satisfy the needs of these application far away, therefore PCI (abbreviation of Peripheral Component Interconnect means Peripheral Component Interconnect) bus standard has appearred.PCI is widely used in computer system with its high-performance, low cost and good extendability, especially for connecting control CPU (central processing unit) and PCI equipment.Said PCI equipment refers to the equipment of accord with PCI bus standard.Defined a cover configuration space registers in the pci bus standard for the information that reads or arrange PCI equipment.Each PCI equipment has configuration space (Configuration Space) register of oneself.At present, when adopting single function PCI equipment, can not in the operating system user's space, be expressed as multi-functional PCI equipment.Therefore, the user can run into some problems when operation sheet function PCI equipment, for example, to a dual-port network interface card, because the multi-functional support to PCI-E (PCI Express, up-to-date bus and interface standard) is not provided, the user can only use single network interface, as eth0 two ports are controlled, this conflicts with user's use-pattern in the past, uses to the user to bring inconvenience.
FPGA (abbreviation of Field Programmable Gate Array means field programmable gate array) is the product that further develops on the basis of programmable logic array PAL (Programmable Array Logic), gate array logic GAL (Gate Array Logic), programmable logic device (PLD) PLD programming devices such as (Programmable Logic Device).It occurs as a kind of semi-custom circuit in application-specific integrated circuit ASIC (the Application Specific Integrated Circuit) field, both solve the deficiency of custom circuit, overcome the limited shortcoming of original programming device gate circuit number again.FPGA can finish the function of any digital device, goes up to high-performance CPU, down to simple 74 serial circuit, can realize with FPGA.
Summary of the invention
Single function PCI equipment can't be expressed as the PCI multifunctional equipment in the operating system user's space at prior art, use some inconvenient problems that cause to the user, the purpose of this invention is to provide a kind of user and need not to change use-pattern, and single function PCI equipment simulating more convenient to operate becomes the method for multi-functional PCI equipment.
For achieving the above object, according to an aspect of the present invention, a kind of multi-functional simulation implementation method of single function PCI equipment is provided, has comprised the following steps: that the PCI device driver determines that according to the parameter that sets in advance single function PCI equipment will be modeled to the quantity of multifunctional equipment; In single function PCI device register, add control register, status register and the interruptable controller of respective numbers, be respectively applied to the analog interface of each multifunctional equipment is operated; And in the PCI device driver, single function PCI equipment is registered as the multifunctional equipment of respective numbers to operating system nucleus, produce the analog interface of respective numbers.
The parameter that sets in advance is the port at single function PCI equipment.
Operating system is Linux kernel.
Registration is to register by the function interface that calls Linux kernel and provide.
Correspondingly, the invention provides a kind of multi-functional simulation implement device of single function PCI equipment, comprising: determination module is used for determining that single function PCI equipment simulating becomes the quantity of multifunctional equipment; Register module is used for the analog interface of each multifunctional equipment is operated; And Registering modules, be used for single function PCI equipment is registered as the multifunctional equipment of respective numbers to operating system nucleus, produce the analog interface of respective numbers.
Determination module determines that according to the parameter that sets in advance single function PCI equipment will be modeled to the quantity of multifunctional equipment.
In determination module, the parameter that sets in advance is the port at single function PCI equipment.
In Registering modules, operating system is Linux kernel.
In Registering modules, registration is to register by the function interface that calls Linux kernel and provide.
By above-mentioned at least one technical scheme of the present invention, by being that single function PCI equipment is modeled to multi-functional PCI equipment with physical characteristics in driver, thereby make the user need not change use-pattern, operate, control single function PCI equipment more easily.
Description of drawings
Fig. 1 is the process flow diagram of the multi-functional simulation implementation method of a kind of single function PCI equipment of the present invention;
Fig. 2 is the structural representation of the multi-functional simulation implement device of a kind of single function PCI equipment of the present invention.
Embodiment
Referring to shown in Figure 1, a kind of single function PCI equipment simulating of present embodiment becomes the method for multi-functional PCI equipment, specifically comprise following operation steps: S110, the PCI device driver determines that according to the parameter that sets in advance single function PCI equipment will be modeled to the quantity of multifunctional equipment; S120 adds control register, status register and the interruptable controller of respective numbers in single function PCI device register, be respectively applied to the analog interface of each multifunctional equipment is operated; And S130, in the PCI device driver, single function PCI equipment is registered as the multifunctional equipment of respective numbers to operating system nucleus, produce the analog interface of respective numbers.
In step S110, the parameter that sets in advance is the port at single function PCI equipment.The PCI device driver will determine whether that needs become multifunctional equipment with this single function PCI equipment simulating according to parameter, simulate if desired, then determine to be modeled to the quantity of multifunctional equipment.
In step S120, why adding control register, status register and the interruptable controller of respective numbers in single function PCI device register, is the needs of a plurality of analog interfaces that are modeled to a plurality of multi-functional PCI equipment formation being operated respectively in order to satisfy.When realizing single function PCI equipment, only need one 32 interruptable controller just can carry out transmission, the reception operation of message, for example, when network interface card receives message, after storing message descriptor buffer queue into, interruptable controller can be set, and the expression message correctly receives, and needs driver to carry out subsequent treatment.When needs are expressed as a plurality of multifunctional equipments at the operating system user's space, just need use one 32 interruptable controller respectively to each analog interface that each multifunctional equipment forms.Like this, by different interruptable controllers, can know clearly that network interface card receives message and belongs to which analog interface, need driver that this message is stored in the message buffer formation of which analog interface.In like manner, also need corresponding control register and status register for each analog interface.
In step S130, single function PCI equipment is registered as a plurality of multi-functional PCI equipment to operating system nucleus, registration process is exactly to finish the expression of hardware device in operating system, the device type of register method merchandiser function PCI equipment is relevant, different single function PCI equipment, register method are also different.Therefore only but in Linux kernel operating system, provide different function interfaces to different single function PCI equipment, need in driver, call and get final product.For example, at network card equipment, the function interface that Linux kernel provides is register netdev function, driver whenever calls once this function, just can only register a network card equipment, and distribute and to be similar to the such title of eth0, can see a network card equipment interface at user's space then, use it carry out message transmission, receive operation.When repeatedly calling this function, just can register a plurality of network card equipments, and distribution is similar to such titles such as eth0, eth1 successively, can see a plurality of network card equipment interfaces at user's space then, can use these interfaces to carry out transmission, the reception operation of message respectively.
In the above-mentioned steps, need to use hardware FPGA to carry out the logic support, this is because driver can only play effects such as configuration and management, and the support of the realization on the hardware, logic be unable to do without hardware FPGA.Finishing after single function PCI equipment simulating becomes multifunctional equipment, from user's angle, will think the multi-functional PCI equipment of this part, but the operation of in operating system Linux kernel, carrying out and inequality.At real multi-functional PCI equipment, driver can correctly be handled each PCI equipment, and at network card equipment of each PCI facility registration, driver does not need to be concerned about the multi-functional realization details of equipment.Driver can not add revises ground for single function PCI equipment and multi-functional PCI equipment.And when employing becomes multifunctional equipment with single function PCI equipment simulating, driver at first needs to determine whether that according to PCI device port parameter needs become single function PCI equipment simulating the quantity of multifunctional equipment and simulation, simulate if desired, just need some through carrying out above-mentioned special processing.
Correspondingly, the multi-functional simulation implement device of a kind of single function PCI equipment of the present invention comprises: determination module 210 is used for determining that single function PCI equipment simulating becomes the quantity of multifunctional equipment; Register module 220 is used for the analog interface of each multifunctional equipment is operated; And Registering modules 230, be used for single function PCI equipment is registered as the multifunctional equipment of respective numbers to operating system nucleus, produce the analog interface of respective numbers.
Comprise the PCI device driver in the determination module 210, the PCI device driver determines that according to the parameter that sets in advance single function PCI equipment will be modeled to the quantity of multifunctional equipment.Wherein, the parameter that sets in advance is the port at single function PCI equipment.
The control register, status register and the interruptable controller that comprise respective numbers in the register module 220 are respectively applied to the analog interface of each described multifunctional equipment is operated.
In Registering modules 230, operating system is Linux kernel, and registration is to register by the function interface that calls Linuxkernel and provide, and after registration was finished, each multifunctional equipment had an analog interface.The user can use these analog interfaces to carry out the transmission of message respectively and receive operation.
Multi-functional simulation implementation method and the device of single function PCI equipment of the present invention, by being that single function PCI equipment is modeled to multi-functional PCI equipment with physical characteristics in driver, thereby make the user need not change use-pattern, operate, control single function PCI equipment more easily.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. the multi-functional simulation implementation method of single function Peripheral Component Interconnect PCI equipment is characterized in that, comprises the following steps:
The PCI device driver determines that according to the parameter that sets in advance single function PCI equipment will be modeled to the quantity of multifunctional equipment;
In single function PCI device register, add control register, status register and the interruptable controller of corresponding described quantity, be respectively applied to the analog interface of each described multifunctional equipment is operated; And
In described PCI device driver, described single function PCI equipment is registered as the described multifunctional equipment of corresponding described quantity to operating system nucleus, produces the described analog interface of corresponding described quantity.
2. the multi-functional simulation implementation method of single function Peripheral Component Interconnect PCI equipment according to claim 1 is characterized in that, the described parameter that sets in advance is the port at described single function PCI equipment.
3. the multi-functional simulation implementation method of single function Peripheral Component Interconnect PCI equipment according to claim 1 is characterized in that, described operating system is Linux kernel.
4. the multi-functional simulation implementation method of single function Peripheral Component Interconnect PCI equipment according to claim 3 is characterized in that, described registration is to register by the function interface that calls described Linux kernel and provide.
5. the multi-functional simulation implement device of single function Peripheral Component Interconnect PCI equipment is characterized in that, comprising:
Determination module is used for determining that single function PCI equipment simulating becomes the quantity of multifunctional equipment;
Register module is used for the analog interface of each described multifunctional equipment is operated; And
Registering modules is used for described single function PCI equipment is registered as the described multifunctional equipment of corresponding described quantity to operating system nucleus, produces the described analog interface of corresponding described quantity,
Wherein, described determination module determines that according to the parameter that sets in advance described single function PCI equipment will be modeled to the described quantity of described multifunctional equipment, and control register, status register and the interruptable controller of the corresponding determination module of interpolation institute quantification are respectively applied to the analog interface of each multifunctional equipment is operated in single function PCI device register.
6. the multi-functional simulation implement device of single function Peripheral Component Interconnect PCI equipment according to claim 5 is characterized in that, in described determination module, the described parameter that sets in advance is the port at described single function PCI equipment.
7. the multi-functional simulation implement device of single function Peripheral Component Interconnect PCI equipment according to claim 5 is characterized in that, in described Registering modules, described operating system is Linux kernel.
8. the multi-functional simulation implement device of single function Peripheral Component Interconnect PCI equipment according to claim 7 is characterized in that, in described Registering modules, described registration is to register by the function interface that calls described Linux kernel and provide.
CN 200910235676 2009-10-12 2009-10-12 Method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices Active CN102043738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910235676 CN102043738B (en) 2009-10-12 2009-10-12 Method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910235676 CN102043738B (en) 2009-10-12 2009-10-12 Method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices

Publications (2)

Publication Number Publication Date
CN102043738A CN102043738A (en) 2011-05-04
CN102043738B true CN102043738B (en) 2013-10-02

Family

ID=43909888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910235676 Active CN102043738B (en) 2009-10-12 2009-10-12 Method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices

Country Status (1)

Country Link
CN (1) CN102043738B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545038A (en) * 2003-11-10 2004-11-10 威盛电子股份有限公司 Switching extension equipment for computer system
CN101303568A (en) * 2008-06-27 2008-11-12 重庆神州龙芯科技有限公司 Industry control computer system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1545038A (en) * 2003-11-10 2004-11-10 威盛电子股份有限公司 Switching extension equipment for computer system
CN101303568A (en) * 2008-06-27 2008-11-12 重庆神州龙芯科技有限公司 Industry control computer system

Also Published As

Publication number Publication date
CN102043738A (en) 2011-05-04

Similar Documents

Publication Publication Date Title
CN105700732B (en) It is used for transmission the devices, systems, and methods of touch sensor information
US20060253639A1 (en) Control system for controlling a plurality of target computers through portable computer
CN104025050A (en) Changing between virtual machines on a graphics processing unit
CN101354614B (en) Resource sharing apparatus and control method thereof
CN106502930B (en) The method and apparatus of GPIO simulation serial line interface based on windows platform
CN108900770A (en) A kind of method, apparatus, smartwatch and the mobile terminal of the rotation of control camera
CN111338745B (en) Deployment method and device of virtual machine and intelligent device
CN107077186A (en) Low-power is calculated as picture
CN105653353B (en) A kind of multisystem interactive correspondence method and apparatus based on container
CN107678721A (en) A kind of Multi-screen display system
CN103204114A (en) Multisystem vehicle-mounted equipment and use method thereof
CN102222008B (en) interface managing system and method thereof
CN204117142U (en) Electronic device for providing instant switching and sharing of universal serial bus electronic equipment by host
CN105472290B (en) The processing method and processing device of data transmit-receive operational mode
CN110149371A (en) Equipment connection method, device and terminal device
CN102043738B (en) Method and device for realizing multifunction simulation of single-function PCI (Peripheral Component Interconnect) devices
CN108874699B (en) Method and device for using MTP (Multi-time transfer protocol) function by multiple systems and electronic equipment
CN105824682B (en) A kind of monitoring method of virtual machine, device and system
CN103678244A (en) Intelligent device without application processor
CN102591817A (en) Multi-bus bridge controller and implementing method thereof
CN101998691B (en) Method, system and device for data transmission
CN101751197A (en) Multi-level input system, computer program product and method thereof
CN209821808U (en) Touch transmission compatible device and education all-in-one machine
CN203104115U (en) Power network instrument expansion device and intelligent power distribution system
CN205384494U (en) Parallel bus backplate of PLC controller

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100193 Beijing, Haidian District, northeast Wang West Road, building 8, No. 36

Applicant after: Dawning Information Industry (Beijing) Co.,Ltd.

Address before: 100084 No. 6 South Road, Zhongguancun Academy of Sciences, Beijing, Haidian District

Applicant before: Dawning Information Industry (Beijing) Co.,Ltd.

C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220727

Address after: 100089 building 36, courtyard 8, Dongbeiwang West Road, Haidian District, Beijing

Patentee after: Dawning Information Industry (Beijing) Co.,Ltd.

Patentee after: DAWNING INFORMATION INDUSTRY Co.,Ltd.

Address before: 100193 No. 36 Building, No. 8 Hospital, Wangxi Road, Haidian District, Beijing

Patentee before: Dawning Information Industry (Beijing) Co.,Ltd.

TR01 Transfer of patent right