CN102981986A - System and method of data interaction - Google Patents

System and method of data interaction Download PDF

Info

Publication number
CN102981986A
CN102981986A CN2012104345100A CN201210434510A CN102981986A CN 102981986 A CN102981986 A CN 102981986A CN 2012104345100 A CN2012104345100 A CN 2012104345100A CN 201210434510 A CN201210434510 A CN 201210434510A CN 102981986 A CN102981986 A CN 102981986A
Authority
CN
China
Prior art keywords
data interaction
data
computing machine
pointer
spa
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
CN2012104345100A
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.)
Quectel Wireless Solutions Co Ltd
Original Assignee
Quectel Wireless Solutions 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 Quectel Wireless Solutions Co Ltd filed Critical Quectel Wireless Solutions Co Ltd
Priority to CN2012104345100A priority Critical patent/CN102981986A/en
Publication of CN102981986A publication Critical patent/CN102981986A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Optical Communication System (AREA)

Abstract

The invention discloses a system and a method of data interaction, and is used for controlling an external device and a computer to carry out data interaction. The method of the data interaction comprise the follow procedures of closing a data channel interrupt and stopping a direct memory access (DMA) transmission in the computer;applying for a temporary storage area in the computer, and setting a pointer pointing to an Rx buffer to point to the temporary storage area;opening the data channel interrupt and the DMA transmission; controlling the external device and the computer to carry out data interaction through the DMA transmission. The system and the method of data interaction can use the temporary storage area to replace the Rx buffer, and therefore can achieve carrying out data interaction between the external device and the computer by replacing a hardware stream control mode with a lesser data transmission quantity, and can improve transmission efficiency, at the same time correct transmission can be guaranteed.

Description

Data interaction system and method
Technical field
The present invention relates to a kind of data interaction system and method, particularly relate to the enough scratchpad area (SPA)s of a kind of energy and replace Rx buffer to realize data interaction system and a kind of data interactive method that utilizes this data interaction system to realize of the alternative hardware Flow Control of data.
Background technology
Present external unit and computing machine carry out data interaction dual mode, without Flow Control and hardware flow control.Wherein high without Flow Control mode data transfer efficient, but can not guarantee to transmit accurately, and the hardware flow control mode can guarantee correct transmission, but transfer efficiency is relatively low.Therefore when data interaction, adopt which kind of mode all can not guarantee simultaneously accurate and have high-transmission efficient, and all adopt the correctness that just can't guarantee the transmission of data without the Flow Control mode when externally equipment and computing machine carry out than the data transmission under the small data quantity.
Summary of the invention
The technical problem to be solved in the present invention is in order to overcome the defective of the correctness that can't guarantee the data transmitted when prior art peripheral equipment and computing machine carry out than the data interaction under the small data quantity, to provide the enough scratchpad area (SPA)s of a kind of energy to replace Rx(to receive) the buffer(buffer register) realize data interaction system and a kind of data interactive method that utilizes this data interaction system to realize of the hardware flow control of data.
The present invention solves above-mentioned technical matters by following technical proposals:
The invention provides a kind of data interactive method, its characteristics are that it is used for control one external unit and a computing machine carries out data interaction, and this data interactive method may further comprise the steps:
S 1, in this computing machine, close data channel and interrupt and stop the DMA(direct memory access) transmission;
S 2, in this computing machine application one scratchpad area (SPA), and the pointer that points to Rx buffer is set to point to this scratchpad area (SPA);
S 3, open that this data channel is interrupted and the DMA transmission;
S 4, control this external unit and this computing machine and carry out data interaction by the DMA transmission.
Wherein, by at step S 1In close data channel and interrupt, just can prevent from receiving MSG_ID_UART_READY_TO_READ_IND message (belonging to the message that drives layer), and then just can prevent that also bottom has information reporting with this scratchpad area (SPA) replacement Rx buffer the time.And step S 2This scratchpad area (SPA) of middle application, memory capacity is changeable, can come stepped application according to computer system performance, as can first to file 100KB(kilobyte), if the unsuccessful 90KB etc. that then applies for, by that analogy.
And, be set to point to this scratchpad area (SPA) by the pointer that originally pointed to Rx buffer, just realized substituting Rx buffer with this scratchpad area (SPA), and then also just realized under than the small data transmission amount carrying out data interaction between this external unit and this computing machine in alternative hardware Flow Control mode, and can adopt the DMA transmission to carry out data transmit-receive when mutual, the known technology that this belongs to this area just repeats no more at this, thereby has also promoted transfer efficiency when guaranteeing correct transmission.
Preferably, step S 2In the span of memory capacity of this scratchpad area (SPA) be 50-100KB.
Preferably, step S 4In after data interaction is finished, also this pointer is set to again point to Rxbuffer.
The present invention also provides a kind of data interaction system, and its characteristics are that it is used for control one external unit and a computing machine carries out data interaction, and this data interaction system comprises that a control module, a pointer arrange module and a data interaction module;
This control module is used at first closing data channel at this computing machine and interrupts and stop DMA transmitting, and arrange at this pointer that module is applied for a scratchpad area (SPA) in this computing machine, after the pointer that points to Rx buffer is set to point to this scratchpad area (SPA), open this data channel interruption and DMA transmission, this data interaction module is used for this external unit of control and this computing machine carries out data interaction by the DMA transmission again.
Preferably, the span of memory capacity of this scratchpad area (SPA) of module application is set is 50-100KB to this pointer.
Preferably, this pointer arranges module and is used for also that this pointer is set to again point to Rx buffer after this external unit and this computing machine are finished data interaction.
Positive progressive effect of the present invention is: the present invention can substitute Rx buffer in enough scratchpad area (SPA)s, and then also just can be implemented in than carrying out data interaction between external unit and the computing machine in alternative hardware Flow Control mode under the small data transmission amount, when guaranteeing correct transmission, also promoted transfer efficiency.
Description of drawings
Fig. 1 is the structural drawing of the data interaction system of a preferred embodiment of the present invention.
Fig. 2 is the process flow diagram of the data interactive method of a preferred embodiment of the present invention.
Embodiment
Provide preferred embodiment of the present invention below in conjunction with accompanying drawing, to describe technical scheme of the present invention in detail.
As shown in Figure 1, data interaction system of the present invention comprises that a control module 1, a pointer arrange module 2 and a data interaction module 3.
Data interaction system of the present invention can be controlled the data interaction between external unit and the computing machine, and at first this control module 1 can be closed the data channel interruption and be stopped the DMA transmission in this computing machine, then, this pointer arranges 2 application one scratchpad area (SPA)s in this computing machine of module, and the pointer that points to Rx buffer is set to point to this scratchpad area (SPA), this control module 1 can be opened this data channel again and interrupted and open the DMA transmission afterwards, and this data interaction module 3 is just controlled this external unit and transmitted by DMA with this computing machine and carry out data interaction at last.
Interrupt by closing data channel, just can prevent from receiving MSG_ID_UART_READY_TO_READ_IND message, and then just can prevent that also bottom has information reporting when replacing Rx buffer with this scratchpad area (SPA).And that this pointer arranges the memory capacity of this scratchpad area (SPA) of module 2 application is changeable, the span of memory capacity can be arranged on 50-100KB in the present embodiment, specifically can come stepped application according to computer system performance, as can first to file 100KB, if the unsuccessful 90KB etc. that then applies for, by that analogy.
And, be set to point to this scratchpad area (SPA) by the pointer that originally pointed to Rx buffer, just realized substituting Rx buffer with this scratchpad area (SPA), and then also just realized under than the small data transmission amount carrying out data interaction between this external unit and this computing machine in alternative hardware Flow Control mode, and can adopt the DMA transmission to carry out data transmit-receive when mutual, the known technology that this belongs to this area just repeats no more at this, thereby has also promoted transfer efficiency when guaranteeing correct transmission.
Wherein, this pointer arranges module 2 and can also be set to again point to Rx buffer by this pointer after this external unit and this computing machine are finished data interaction.
As shown in Figure 2, the present invention utilizes the data interactive method of the data interaction system realization of present embodiment may further comprise the steps:
Step 100, in this computing machine, close data channel and interrupt and stop the DMA transmission.
Step 101, in this computing machine application one scratchpad area (SPA), and the pointer that points to Rx buffer is set to point to this scratchpad area (SPA).
Step 102, open that this data channel is interrupted and the DMA transmission;
Step 103, control this external unit and this computing machine and carry out data interaction by the DMA transmission, this pointer was set to again point to Rx buffer, then process ends after data interaction was finished.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited by appended claims.Those skilled in the art can make various changes or modifications to these embodiments under the prerequisite that does not deviate from principle of the present invention and essence, but these changes and modification all fall into protection scope of the present invention.

Claims (6)

1. a data interactive method is characterized in that, it is used for control one external unit and a computing machine carries out data interaction, and this data interactive method may further comprise the steps:
S 1, in this computing machine, close data channel and interrupt and stop the DMA transmission;
S 2, in this computing machine application one scratchpad area (SPA), and the pointer that points to Rx buffer is set to point to this scratchpad area (SPA);
S 3, open that this data channel is interrupted and the DMA transmission;
S 4, control this external unit and this computing machine and carry out data interaction by the DMA transmission.
2. data interactive method as claimed in claim 1 is characterized in that, step S 2In the span of memory capacity of this scratchpad area (SPA) be 50-100KB.
3. data interactive method as claimed in claim 2 is characterized in that, step S 4In after data interaction is finished, also this pointer is set to again point to Rx buffer.
4. a data interaction system is characterized in that, it is used for control one external unit and a computing machine carries out data interaction, and this data interaction system comprises that a control module, a pointer arrange module and a data interaction module;
This control module is used at first closing data channel at this computing machine and interrupts and stop DMA transmitting, and arrange at this pointer that module is applied for a scratchpad area (SPA) in this computing machine, after the pointer that points to Rx buffer is set to point to this scratchpad area (SPA), open this data channel interruption and DMA transmission, this data interaction module is used for this external unit of control and this computing machine carries out data interaction by the DMA transmission again.
5. data interaction system as claimed in claim 4 is characterized in that, the span of memory capacity that this pointer arranges this scratchpad area (SPA) of module application is 50-100KB.
6. data interaction system as claimed in claim 5 is characterized in that, this pointer arranges module and is used for also that this pointer is set to again point to Rx buffer after this external unit and this computing machine are finished data interaction.
CN2012104345100A 2012-11-02 2012-11-02 System and method of data interaction Pending CN102981986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104345100A CN102981986A (en) 2012-11-02 2012-11-02 System and method of data interaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104345100A CN102981986A (en) 2012-11-02 2012-11-02 System and method of data interaction

Publications (1)

Publication Number Publication Date
CN102981986A true CN102981986A (en) 2013-03-20

Family

ID=47856033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104345100A Pending CN102981986A (en) 2012-11-02 2012-11-02 System and method of data interaction

Country Status (1)

Country Link
CN (1) CN102981986A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109307159A (en) * 2018-08-21 2019-02-05 湖南大学 A kind of pipe network model alarm method based on water consumption optimal prediction model
CN110336869A (en) * 2019-06-28 2019-10-15 上海移远通信技术股份有限公司 The test method and system of data interaction

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3676846A (en) * 1968-10-08 1972-07-11 Call A Computer Inc Message buffering communication system
CN101149717A (en) * 2007-11-16 2008-03-26 威盛电子股份有限公司 Computer system and direct RAM access transmission method
CN101261611A (en) * 2008-02-15 2008-09-10 威盛电子股份有限公司 Peripheral apparatus data-transmission apparatus and transmission method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3676846A (en) * 1968-10-08 1972-07-11 Call A Computer Inc Message buffering communication system
CN101149717A (en) * 2007-11-16 2008-03-26 威盛电子股份有限公司 Computer system and direct RAM access transmission method
CN101261611A (en) * 2008-02-15 2008-09-10 威盛电子股份有限公司 Peripheral apparatus data-transmission apparatus and transmission method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109307159A (en) * 2018-08-21 2019-02-05 湖南大学 A kind of pipe network model alarm method based on water consumption optimal prediction model
CN110336869A (en) * 2019-06-28 2019-10-15 上海移远通信技术股份有限公司 The test method and system of data interaction
CN110336869B (en) * 2019-06-28 2022-08-30 上海移远通信技术股份有限公司 Data interaction test method and system

Similar Documents

Publication Publication Date Title
CN102122271B (en) NAND flash memory controller and control method thereof
CN103034603B (en) Multi-channel flash memory card control device and control method thereof
CN106067321A (en) Be suitable to the controller that memory program suspends-recovers
CN104050114A (en) Systems, methods, and apparatuses for synchronizing port entry into a low power state
CN109256162A (en) Semiconductor storage unit and its programmed method
CN206021242U (en) The FPGA programs configuration controlled based on CPLD and firmware encrypting system
WO2009111174A1 (en) Piecewise erasure of flash memory
CN106371807A (en) Method and device for extending processor instruction set
CN105116975A (en) Computer onboard hard disk and implementation method thereof
CN104991736A (en) Method and device for typing in data and storage equipment
CN104808759A (en) Method, apparatus and system for performing voltage margining
CN106327832A (en) Real-time meter reading method adopting wireless concentrator
CN101452393A (en) DSP2812 program on-line upgrading method based on PCI bus
CN102981986A (en) System and method of data interaction
CN103543982B (en) A kind of clock frequency management method and mobile device
CN104571942A (en) Data storage system and method analyzing non-signal
CN204166522U (en) A kind of high-speed high capacity FLASH veneer memory circuit plate
CN204423920U (en) The radiation-resistant SRAM self-refresh circuit of a kind of high availability
CN202205195U (en) Equipment for reading and writing physical memory of computer through IEEE 1394 interface
CN103984569A (en) HBA card acceleration method
CN102591825B (en) Transmitting device and method between SATA (Serial Advanced Technology Attachment) controller and flash controller based on SYNC mechanism
CN103713908A (en) Method for designing digital quantity input functional unit driving program of CPCI (compact peripheral component interface) bus under VxWorks operating system
CN107273314A (en) Built-in multimedia chip data read method, equipment and system
CN105446863A (en) Electronic device with recording capability and circuit status recording method
CN202632285U (en) Solid state disk (SSD) controller applying intelligent direct memory access (DMA)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130320