CN103853683A - Method for realizing multi-serial-port data communication - Google Patents

Method for realizing multi-serial-port data communication Download PDF

Info

Publication number
CN103853683A
CN103853683A CN201410082158.8A CN201410082158A CN103853683A CN 103853683 A CN103853683 A CN 103853683A CN 201410082158 A CN201410082158 A CN 201410082158A CN 103853683 A CN103853683 A CN 103853683A
Authority
CN
China
Prior art keywords
port
serial
linux
datas
many
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
CN201410082158.8A
Other languages
Chinese (zh)
Other versions
CN103853683B (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 Chaoyue CNC Electronics Co Ltd
Original Assignee
Shandong Chaoyue Numerical Control Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Chaoyue Numerical Control Electronics Co Ltd filed Critical Shandong Chaoyue Numerical Control Electronics Co Ltd
Priority to CN201410082158.8A priority Critical patent/CN103853683B/en
Publication of CN103853683A publication Critical patent/CN103853683A/en
Application granted granted Critical
Publication of CN103853683B publication Critical patent/CN103853683B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

The invention discloses a method for realizing multi-serial-port data communication. The method comprises an X86 architecture computer Linux system, a PCIe multi-serial-port card driver, a serial port driver, a Linux driver and a home-made platform computer Linux operating system. The design of the invention is based on the Linux operating system of an X86 architecture computer platform, and the relation among the PCIe multi-serial-port data communication card driver, the serial port driver and a Linux kernel is analyzed. The application of the PCIe multi-serial-port data communication card driver, the serial port driver and the Linux kernel to the home-made platform computer is realized according to the structure of a Linux equipment driver, and the multi-serial-port identification and data communication functions of the home-made platform computer are perfected. The method can be taken as a debugging method in the multi-serial-port data communication and debugging of the home-made platform computer, and has the characteristics of high universality, easiness, controllability, high cost performance and the like. By adopting the method, multi-serial-port data communication can be finished smoothly, the problem of customization of serial ports on the home-made platform computer is solved, waste of resources is prevented, and the cost performance is improved.

Description

A kind of many serial datas communication implementation method
Technical field
The present invention relates to the many serial datas communication technique field under linux operating system, comprise the equipment such as desk-top desktop computer, terminal, charge computing machine; Relate in particular to many serial datas mechanics of communication and method based on Domestic Platform computing machine.
Technical background
The communication of many serial datas is an important branch of computer utility direction, and mainly research is the collection of many serial ports, the Storage and Processing of data.Many serial datas address card based on pci bus technology is the focus that pursue in market always.In bussing technique, PCI local bus relies on its excellent data transmission performance, becomes the main flow of microcomputer bus.Along with the development of informatization on nation defence, the many serial datas communication based on Domestic Platform computing machine becomes a kind of demand gradually.
The present invention's design has been carried out research to many serial datas of PCIe mechanics of communication, based on X86-based linux operating system, analyze linux kernel and the relation with device driver thereof, ensured that according to the structure of Linux device drives many serial datas of PCIe address card can be applied to the linux operating system of Domestic Platform computing machine.The present invention's design can complete the data communication of many serial ports smoothly, and solution Domestic Platform computer user customizes the problem of serial ports, avoids the wasting of resources, has improved cost performance.
Summary of the invention
The technical problem to be solved in the present invention is: in order to realize many serial datas of production domesticization computing machine communication function, solve the problem that Domestic Platform computer user customizes serial ports, the present invention designs the linux operating system based on X86-based computer platform, has analyzed the relation of the driving of many serial datas of PCIe address card, serial port drive and linux kernel; According to the structure of Linux device drives, realize the driving of many serial datas of PCIe address card, serial port drive and the application of linux kernel on Domestic Platform computing machine, and many serial ports identifications, the data communication facility of perfect Domestic Platform computing machine.
The technical solution adopted in the present invention is:
A kind of many serial datas communication implementation method, comprise by X86-based computer linux system, the driving of PCIe multi-serial-port card, serial port drive, linux and driving and Domestic Platform computing machine linux operating system, linux operating system based on X86-based computer platform, has analyzed the relation of the driving of many serial datas of PCIe address card, serial port drive and linux kernel; According to the structure of Linux device drives, realize the driving of many serial datas of PCIe address card, serial port drive and the application of linux kernel on Domestic Platform computing machine, and many serial ports identifications, the data communication facility of perfect Domestic Platform computing machine;
Described method performing step is as follows:
1), by X86-based computer linux system, analyze linux kernel, serial port drive and the relation with many serial datas of PCIe address card driver thereof;
According to the structure of Linux device drives, in linux kernel, many serial datas of patch PCIe address card drives, and realizes many serial datas of PCIe communication function under X86-based computer linux system;
According to many serial datas Principle of Communication under X86-based computer linux system, many serial datas of PCIe address card is driven and is transplanted in the linux kernel of Domestic Platform computing machine, according to the structure of linux kernel serial port drive, realize many serial datas communication function of Domestic Platform computing machine.
2) complete the many serial datas communication function under Domestic Platform computing machine linux system according to step 1), in order to facilitate the application of user to the communication of many serial datas, need to identify optimization to customization serial ports, this just need to configure relevant CPU serial ports in kernel serial port drive:
#ifdef?CONFIG_CPU_UART
PORT_LOONGSON3(CPU_UART0_MEM_BASE,?CPU_UART0_MAP_BASE,
UART_CLK_33M),
PORT_LOONGSON3(CPU_UART1_MEM_BASE,?CPU_UART1_MAP_BASE,
UART_CLK_33M),
The configuration of SUPERIO extended serial port:
static?struct?plat_serial8250_port?loongson3a_data[]?=?{
PORT(0x3f8,?9),
PORT(0x2f8,?7),
PORT(0x338,?4),
PORT(0x238,?3),
PORT(0x3e8,?4),
PORT(0x2e8,?3),
//PORT_M(58,0xffffffffbfe001e8),
//PORT_M(21,0xffffffffb80002f8),
//PORT_M(21,0xffffffffb80003f8),
{?},
};
Be optimized, thereby retain serial ports according to actual needs, realize many serial ports identification and optimize.
Beneficial effect of the present invention is:
In many serial datas of Domestic Platform computing machine communication debugging, this invention can be used as a kind of adjustment method, there is highly versatile, simply controlled, cost performance high, can complete smoothly the data communication of many serial ports, solve the problem that Domestic Platform computer user customizes serial ports, avoid the wasting of resources, improved cost performance.
Brief description of the drawings
Fig. 1 is that the communication of many serial datas realizes block diagram;
Fig. 2 is many serial datas communication realization flow figure.
Embodiment
With reference to the accompanying drawings, by embodiment, the present invention is further described:
A kind of many serial datas communication implementation method, as shown in Figure 1, comprise by X86-based computer linux system, the driving of PCIe multi-serial-port card, serial port drive, linux and driving and Domestic Platform computing machine linux operating system, linux operating system based on X86-based computer platform, has analyzed the relation of the driving of many serial datas of PCIe address card, serial port drive and linux kernel; According to the structure of Linux device drives, realize the driving of many serial datas of PCIe address card, serial port drive and the application of linux kernel on Domestic Platform computing machine, and many serial ports identifications, the data communication facility of perfect Domestic Platform computing machine; Described method performing step is as follows:
1) as shown in Figure 2,, by X86-based computer linux system, analyze linux kernel, serial port drive and the relation with many serial datas of PCIe address card driver thereof;
According to the structure of Linux device drives, in linux kernel, many serial datas of patch PCIe address card drives, and realizes many serial datas of PCIe communication function under X86-based computer linux system;
According to many serial datas Principle of Communication under X86-based computer linux system, many serial datas of PCIe address card is driven and is transplanted in the linux kernel of Domestic Platform computing machine, according to the structure of linux kernel serial port drive, realize many serial datas communication function of Domestic Platform computing machine.
2) complete the many serial datas communication function under Domestic Platform computing machine linux system according to step 1), in order to facilitate the application of user to the communication of many serial datas, need to identify optimization to customization serial ports, this just need to configure relevant CPU serial ports in kernel serial port drive:
#ifdef?CONFIG_CPU_UART
PORT_LOONGSON3(CPU_UART0_MEM_BASE,?CPU_UART0_MAP_BASE,
UART_CLK_33M),
PORT_LOONGSON3(CPU_UART1_MEM_BASE,?CPU_UART1_MAP_BASE,
UART_CLK_33M),
The configuration of SUPERIO extended serial port:
static?struct?plat_serial8250_port?loongson3a_data[]?=?{
PORT(0x3f8,?9),
PORT(0x2f8,?7),
PORT(0x338,?4),
PORT(0x238,?3),
PORT(0x3e8,?4),
PORT(0x2e8,?3),
//PORT_M(58,0xffffffffbfe001e8),
//PORT_M(21,0xffffffffb80002f8),
//PORT_M(21,0xffffffffb80003f8),
{?},
};
Be optimized, thereby retain serial ports according to actual needs, realize many serial ports identification and optimize.

Claims (1)

1. the implementation method of serial data communication more than a kind, comprise that X86-based computer linux system, the driving of PCIe multi-serial-port card, serial port drive, linux drive and Domestic Platform computing machine linux operating system, it is characterized in that: the linux operating system based on X86-based computer platform, the relation of the driving of many serial datas of analysis PCIe address card, serial port drive and linux kernel; According to the structure of Linux device drives, realize the driving of many serial datas of PCIe address card, serial port drive and the application of linux kernel on Domestic Platform computing machine, and many serial ports identifications, the data communication facility of perfect Domestic Platform computing machine; Described method performing step is as follows:
1), by X86-based computer linux system, analyze linux kernel, serial port drive and the relation with many serial datas of PCIe address card driver thereof;
According to the structure of Linux device drives, in linux kernel, many serial datas of patch PCIe address card drives, and realizes many serial datas of PCIe communication function under X86-based computer linux system;
According to many serial datas Principle of Communication under X86-based computer linux system, many serial datas of PCIe address card is driven and is transplanted in the linux kernel of Domestic Platform computing machine, according to the structure of linux kernel serial port drive, realize many serial datas communication function of Domestic Platform computing machine;
2) complete the many serial datas communication function under Domestic Platform computing machine linux system according to step 1), customization serial ports identified to optimization, relevant CPU serial ports in kernel serial port drive is configured:
#ifdef?CONFIG_CPU_UART
PORT_LOONGSON3(CPU_UART0_MEM_BASE,?CPU_UART0_MAP_BASE,
UART_CLK_33M),
PORT_LOONGSON3(CPU_UART1_MEM_BASE,?CPU_UART1_MAP_BASE,
UART_CLK_33M),
The configuration of SUPERIO extended serial port:
static?struct?plat_serial8250_port?loongson3a_data[]?=?{
PORT(0x3f8,?9),
PORT(0x2f8,?7),
PORT(0x338,?4),
PORT(0x238,?3),
PORT(0x3e8,?4),
PORT(0x2e8,?3),
//PORT_M(58,0xffffffffbfe001e8),
//PORT_M(21,0xffffffffb80002f8),
//PORT_M(21,0xffffffffb80003f8),
{?},
};
Be optimized, retain according to actual needs serial ports, realize many serial ports identification and optimize.
CN201410082158.8A 2014-03-07 2014-03-07 A kind of Multi-serial port data communication implementation method Active CN103853683B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410082158.8A CN103853683B (en) 2014-03-07 2014-03-07 A kind of Multi-serial port data communication implementation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410082158.8A CN103853683B (en) 2014-03-07 2014-03-07 A kind of Multi-serial port data communication implementation method

Publications (2)

Publication Number Publication Date
CN103853683A true CN103853683A (en) 2014-06-11
CN103853683B CN103853683B (en) 2017-09-15

Family

ID=50861355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410082158.8A Active CN103853683B (en) 2014-03-07 2014-03-07 A kind of Multi-serial port data communication implementation method

Country Status (1)

Country Link
CN (1) CN103853683B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273129A (en) * 2017-06-16 2017-10-20 深圳市智微智能科技开发有限公司 A kind of method for supporting Multi-serial port, device and terminal device
WO2017193898A1 (en) * 2016-05-09 2017-11-16 广州广电运通金融电子股份有限公司 Serial port mapping method and device based on linux or unix kernel operating system
CN109062542A (en) * 2018-03-15 2018-12-21 山东超越数控电子股份有限公司 A kind of method that domestic ten thousand Broadcom realizes network communication

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023874A (en) * 2009-09-14 2011-04-20 联芯科技有限公司 Dual Linux core processing device and method for starting core of Linux system
CN102866966A (en) * 2012-08-28 2013-01-09 大唐移动通信设备有限公司 Device driver control method and device for Linux operating system
CN103294509A (en) * 2013-05-17 2013-09-11 深圳市亿威尔信息技术股份有限公司 Multi-serial equipment driving process for VxWorks operating system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023874A (en) * 2009-09-14 2011-04-20 联芯科技有限公司 Dual Linux core processing device and method for starting core of Linux system
CN102866966A (en) * 2012-08-28 2013-01-09 大唐移动通信设备有限公司 Device driver control method and device for Linux operating system
CN103294509A (en) * 2013-05-17 2013-09-11 深圳市亿威尔信息技术股份有限公司 Multi-serial equipment driving process for VxWorks operating system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017193898A1 (en) * 2016-05-09 2017-11-16 广州广电运通金融电子股份有限公司 Serial port mapping method and device based on linux or unix kernel operating system
CN107273129A (en) * 2017-06-16 2017-10-20 深圳市智微智能科技开发有限公司 A kind of method for supporting Multi-serial port, device and terminal device
CN109062542A (en) * 2018-03-15 2018-12-21 山东超越数控电子股份有限公司 A kind of method that domestic ten thousand Broadcom realizes network communication

Also Published As

Publication number Publication date
CN103853683B (en) 2017-09-15

Similar Documents

Publication Publication Date Title
Liu et al. Parallel finite-difference time-domain method
WO2013006265A3 (en) Intermediation of hypervisor file system and storage device models
EP1686465A3 (en) System and method for a context-awareness platform
AU2017399399B2 (en) Method and system for optimizing database system, electronic device, and storage medium
WO2006026857A8 (en) Testing systems and methods for a resource constrained device
WO2007073558A3 (en) Techniques to generate context information
CN103853683A (en) Method for realizing multi-serial-port data communication
CN103218555A (en) Logging-in method and device for application program
CN103902302A (en) Software installation system and method for virtual machine
CN103178962B (en) General-purpose fingerprint authentication method and device
Busu et al. Factors of adoption intention for near field communication mobile payment
CN204044694U (en) A kind of low cost expanded type GPU blade server
CN103986797A (en) Network card sequence adjusting method based on Linux operation system
CN204462752U (en) A kind of signal acquiring processing system
WO2014055220A3 (en) Cloud-based skip tracing application
CN103309690A (en) Data processing method and electronic equipment
CN105045694A (en) Method for automatically testing Nitrox accelerator card
RU2012110187A (en) DATA TRANSMISSION METHOD, DATA TRANSFER SYSTEM, SERVER AND SOFTWARE
CN104133726A (en) Process context mandatory access control method
CN103795857A (en) Information processing method and electronic equipment
CN103514123B (en) The recognition methods of a kind of USB equipment connection port and system
CN204129738U (en) Sequencing data analytical work station system
CN202443464U (en) USB (Universal Serial Bus) to multi-interface conversion device
CN105068911A (en) Method for optimizing network card performance aiming at CPU kernel
WO2023103705A1 (en) Circuit serialization for parameterized circuit simulation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 250100, No. 2877, fairway, Sun Town, Ji'nan hi tech Zone, Shandong

Patentee after: SHANDONG CHAOYUE CNC ELECTRONICS Co.,Ltd.

Address before: 250100, No. 2877, fairway, Sun Town, Ji'nan hi tech Zone, Shandong

Patentee before: SHANDONG CHAOYUE NUMERICAL CONTROL ELECTRONIC Co.,Ltd.