CN101729345B - Message transmitting method and bus controller - Google Patents

Message transmitting method and bus controller Download PDF

Info

Publication number
CN101729345B
CN101729345B CN2008101720625A CN200810172062A CN101729345B CN 101729345 B CN101729345 B CN 101729345B CN 2008101720625 A CN2008101720625 A CN 2008101720625A CN 200810172062 A CN200810172062 A CN 200810172062A CN 101729345 B CN101729345 B CN 101729345B
Authority
CN
China
Prior art keywords
information
bus
message
resource occupied
bus resource
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.)
Expired - Fee Related
Application number
CN2008101720625A
Other languages
Chinese (zh)
Other versions
CN101729345A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2008101720625A priority Critical patent/CN101729345B/en
Publication of CN101729345A publication Critical patent/CN101729345A/en
Application granted granted Critical
Publication of CN101729345B publication Critical patent/CN101729345B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a message transmitting method and a bus controller which belong to the field of communication. The invention solves the problem of transmission delay of an important message caused by transmitting the message in a way of fairly competing bus resources in the prior art. The message transmitting method comprises the following steps of: acquiring priority level information of a message to be transmitted; transmitting bus resource occupying information according to the priority level information and occupying bus resources; and transmitting the message corresponding to the priority level information by using the bus resources. The technical scheme can be applied to equipment, such as wavelength division, metro Ethernet and transmission synchronization digital series and a router.

Description

File transmitting method and bus control unit
Technical field
The present invention relates to the communications field, relate in particular to a kind of file transmitting method and bus control unit.
Background technology
At present; Wavelength-division, metropolitan area ether or transmitting synchronous digit sequence (Synchronous DigitalHierarchy; A large amount of hdlc bus (High LevelData Link Control protocol bus, HDLC bus) that use communicate between the veneer of equipment Sdh).In an equipment, can comprise the HDLC bus more than a group, each veneer is connected on the HDLC bus through HDLC bus controller (HDLC bus controller) and communicates.
In the prior art; When having a plurality of veneers to transmit data simultaneously, fair competition HDLC bus resource between each veneer is in realizing process of the present invention; The inventor finds; When message to be sent on certain veneer was important, the fair competition bus resource may cause said important message transmission lag, and then ether equipment is reduced the response speed of critical event.
Summary of the invention
Embodiments of the invention provide a kind of file transmitting method and bus control unit, can rationally take bus resource to message to be sent.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of file transmitting method comprises: obtain priority of messages information to be sent; Send the bus resource occupied information according to said precedence information, take bus resource; Use said bus resource to send the corresponding message of said precedence information.
A kind of bus control unit comprises:
The precedence information acquiring unit is used to obtain priority of messages information to be sent;
Bus resource occupied information transmitting element is used for sending the bus resource occupied information according to said precedence information, takies bus resource;
Packet sending unit is used to use said bus resource to send the corresponding message of said precedence information.
File transmitting method that the embodiment of the invention provides and bus control unit; Can send the bus resource occupied information according to priority of messages information; Through this bus resource occupied information bus resource is taken; And utilize the bus resource that has taken to send message, and solved prior art and can't take bus resource to the importance of message, cause important message transmission lag and equipment problem to the response speed reduction of critical event.
Description of drawings
The file transmitting method flow chart that Fig. 1 provides for the embodiment of the invention;
Fig. 2 is HDLC bus controller and a HDLC bus syndeton sketch map in the embodiment of the invention;
The file transmitting method flow chart that Fig. 3 provides for another embodiment of the present invention;
Fig. 4 is the HDLC frame structure sketch map that HDLC bus controller sends in the embodiment of the invention;
The bus control unit structural representation one that Fig. 5 provides for embodiment of the invention embodiment;
The bus control unit structural representation two that Fig. 6 provides for embodiment of the invention embodiment.
Embodiment
Send message in order to solve prior art through the mode of fair competition bus resource, cause the problem of important message transmission lag, the embodiment of the invention provides a kind of file transmitting method and bus control unit.
File transmitting method as shown in Figure 1, that the embodiment of the invention provides comprises:
Step 101 is obtained priority of messages information to be sent;
Step 102 is sent the bus resource occupied information according to said precedence information, takies bus resource;
Step 103 uses said bus resource to send the corresponding message of said precedence information.
Present embodiment is through obtaining priority of messages information to be sent; The mode of sending the bus resource occupied information according to this precedence information takies bus resource; And when taking successfully; Utilize said bus resource to send message, solved prior art and can't take bus resource, cause the problem of important message transmission lag according to the importance of message to be sent.
In order to make those skilled in the art can more be expressly understood the technical scheme that the embodiment of the invention provides, the file transmitting method that provides with the embodiment of the invention below is applied in the process through HDLC bus transmission message and is elaborated.
As shown in Figure 2, in the present embodiment, equipment comprises 3 veneer (not shown)s, and said 3 veneers are connected on the HDLC bus through HDLC bus controller A, HDLC bus controller B and HDLC bus controller C respectively and communicate.Wherein, the RCLK/TCLK of each HDLC bus controller is a reception/tranmitting data register, is used for the butt joint transmitting-receiving and sends capable Synchronization Control to; The RXD interface is a receiving interface, is used to receive the data of transmission on the HDLC bus; The TXD interface is a transmission interface, is used for sending data at the trailing edge of TCLK clock to HDLC bus; The CTS interface is the data readback interface, is used for the data of on the rising edge retaking of a year or grade HDLC of TCLK clock bus, transmitting.
When HDLC bus controller A shown in Figure 2 need at first will take bus resource when HDLC bus sends message.File transmitting method as shown in Figure 3, that the embodiment of the invention provides comprises:
Step 301, HDLC bus controller A obtains priority of messages information to be sent.
In the present embodiment, HDLC bus controller A can obtain priority of messages information to be sent through two kinds of methods:
A kind of method is that HDLC bus controller A directly receives priority of messages information to be sent from CPU;
In the present embodiment; CPU can be known this priority of messages information according to the type of message to be sent in advance; When notice HDLC bus controller A sends message; CPU can directly write the register that HDLC bus controller A is used for memory priority level information with priority of messages information to be sent, and HDLCbus controller A obtains priority of messages information to be sent through this register;
Another kind method is, the type information of the message to be sent that HDLC bus controller A sends according to CPU, and the type of message of storage in advance and the corresponding relation of priority obtain said priority of messages information to be sent.
In the present embodiment; HDLC bus controller A is the corresponding relation mapping table of stored messages type and priority in advance; When notice HDLC bus controller A sends message; CPU can write the type information of message to be sent the register that HDLC bus controller A is used for the stored messages type information; Said HDLC bus controller A obtains the type information of message to be sent through this register, and searches and the type information corresponding priorities from the type of message of storage in advance and priority corresponding relation mapping table according to the type information, obtains priority of messages information to be sent.
More than two kinds of methods be merely concrete for example, in the use of reality, HDLC bus controller A can also obtain priority of messages information to be sent through other modes, every kind of situation is not given unnecessary details one by one here.
Step 302, HDLC bus controller A sends the bus resource occupied information according to said precedence information, takies bus resource.
In the prior art, when having a plurality of veneers send data through HDLC bus controller simultaneously, the level of HDLCbus and transmission data are that 0 level is identical; For example: the data of sending as HDLC bus controller A are 0, and the data that HDLC bus controller B sends are 1 o'clock, and the level of HDLC bus is 0; This moment, HDLC bus controller A can pass through the level 0 on the CTS interface retaking of a year or grade HDLC bus, and the data 0 of this level 0 with its transmission are compared, and comparative result is identical; Then data are sent successfully, and HDLC bus controller A can continue to send follow-up data, and HDLC bus controller B is also through the level 0 on the CTS interface retaking of a year or grade HDLC bus; And the data 1 of this level 0 with its transmission are compared; Comparative result is different, and then data are sent failure, and HDLC bus controller B stops to send data.
According to the level nature of above-mentioned HDLC bus, in the present embodiment, said bus resource occupied information is specially 0, and then said step 302 can specifically comprise:
At first, HDLC bus controller A obtains bus resource occupied information figure place to be sent according to message priority and the corresponding relation of bus resource occupied information figure place of said precedence information and storage in advance;
In the present embodiment, the corresponding relation of message priority and bus resource occupied information figure place is: message priority is high more, and the figure place of bus resource occupied information is many more; For example: when 3 messages need transmit; Said 3 priority of messages are respectively 1,2 and 3 from low to high; Priority then can be set in advance be 1 the corresponding bus resource occupied information figure place of message is 1; Priority is that the corresponding bus resource occupied information figure place of 2 message is 2, and priority is that 3 the corresponding bus resource occupied information figure place of message is 3;
Then, HDLC bus controller A sends the bus occupied information according to said bus resource occupied information figure place.In the present embodiment, HDLC bus controller A message priority to be sent is 3, and the bus resource occupied information figure place that this priority 3 is corresponding is 3, and HDLC bus controller A sends 30 couple of HDLC bus to HDLC bus successively through the TXD interface and takies.
In the present embodiment; When HDLC bus controller A sends message; When HDLC bus controller B and HDLC bus controller C also need send message, HDLC bus controller B and HDLC bus controller C also can take through step 301 shown in Figure 3 and 302 pairs of bus resources.
In the present embodiment, HDLC bus controller B message priority to be sent is 2, and the bus resource occupied information figure place that this priority 2 is corresponding is 2, and HDLC bus controller B sends 20 couple of HDLC bus to HDLC bus successively through the TXD interface and takies; HDLC bus controller C message priority to be sent is 1, and the bus resource occupied information figure place that this priority 1 is corresponding is 1, and HDLC bus controller C sends 10 couple of HDLC bus to HDLC bus successively through the TXD interface and takies.According to the level nature of the described HDLC bus of step 302 among Fig. 3, can know that HDLC bus controller A can take bus resource.At this moment, after the said step 302, can also comprise:
Step 303, HDLC bus controller A uses bus resource to send the corresponding message of precedence information.
In the present embodiment, HDLC bus controller A at first obtains message to be sent according to the message length and the initial address of message in memory cell of CPU indication, then, said message is packaged into HDLC frame shown in Figure 4, sends through the TXD interface.Wherein, openingflag is that frame begins sign in the HDLC frame shown in Figure 4, and closing flag is the frame end sign; Said frame begins sign and the frame end sign is used for deciding frame; Address is a destination address, and control is a control field, does not generally use and fixedly inserts specified byte; Information is the message content field, and CRC is a check digit.
Conflict occurs for fear of bus transfer data, can also comprise before the said step 302:
Step 300, HDLC bus controller A judges whether HDLC bus is idle.
Said step 300 can be positioned at before the step 301, also can be positioned at after the said step 301, and in the present embodiment, said step 300 specifically is positioned at before the step 301.
HDLC bus controller A can judge whether HDLC bus is idle according to the data that receive from the CTS interface, when HDLC bus controller A continuously when the CTS interface receives 81, expression HDLC bus be idle, otherwise HDLC bus hurries.When said HDLC bus is the free time, ability execution in step 302.
After step 303 has been sent message; HDLC bus controller A need discharge the HDLCbus bus resource that has taken, and when HDLC bus controller A need continue to send other messages, HDLC bus controller A need continue to judge whether HDLC bus is idle; At this moment; HDLC bus controller A judges whether to receive 10 1 with the CTS interface continuously, when judged result when being, HDLC bus is an idle condition; HDLCbus controller A can continue according to message priority to be sent bus resource to be taken, and after bus resource takies successfully, sends said message.
The file transmitting method that present embodiment provides; Can send the bus resource occupied information according to priority of messages information, bus resource taken, and use bus resource in back sends message taking successfully through this bus resource occupied information; Solved prior art and can't take bus resource to the importance of message; Cause important message transmission lag and the ether equipment problem to the response speed reduction of critical event, technical scheme provided by the invention can make the high message of priority take bus resource earlier and preferentially send, and effectively reduces the transmission lag of high priority message; Improved the response speed of system to critical event; And because technical scheme provided by the invention is not made amendment to existing HDLC frame structure, make and realize simply, be easy to use.
With said method accordingly, as shown in Figure 5, the embodiment of the invention also provides a kind of bus control unit, comprising:
Precedence information acquiring unit 501 is used to obtain priority of messages information to be sent;
Bus resource occupied information transmitting element 502 is used for sending the bus resource occupied information according to said precedence information, takies bus resource;
Packet sending unit 503 is used to use said bus resource to send the corresponding message of said precedence information.
Further, as shown in Figure 6, said precedence information acquiring unit 501 can comprise:
First correspondence relation storage 5011 is used for the corresponding relation of stored messages type and priority;
Type information receiving element 5012 is used to receive the type information of message to be sent;
Acquiring unit 5013 is used for obtaining said priority of messages information to be sent according to said type information and the type of message of storage in advance and the corresponding relation of priority.
Perhaps, said precedence information acquiring unit 501 can comprise:
Precedence information receiving element (not shown) is used for directly receiving priority of messages information to be sent.
Further, as shown in Figure 6, said bus resource occupied information transmitting element 502 can comprise:
Second correspondence relation storage 5021 is used for the corresponding relation of the priority and the bus resource occupied information figure place of stored messages;
Figure place acquiring unit 5022; Be used for the precedence information that obtains according to said precedence information acquiring unit 501; And the message priority of correspondence relation storage 5021 storages and the corresponding relation of bus resource occupied information figure place, obtain bus resource occupied information figure place to be sent;
Transmitting element 5023, the bus resource occupied information figure place that is used for obtaining according to said figure place acquiring unit 5022 is sent the bus occupied information.
Further, as shown in Figure 6, said bus control unit also comprises:
Bus state judging unit 504 is used to judge whether bus is idle;
Then said bus resource occupied information transmitting element 502, the judged result that also is used for when said bus state judging unit 504 is that bus is during the free time, according to said precedence information transmission bus resource occupied information.
The bus control unit that present embodiment provides can send the bus resource occupied information according to priority of messages information, through this bus resource occupied information bus resource is taken; And taking successfully back use bus resource transmission message; Solved prior art and can't take bus resource, caused important message transmission lag, and equipment is to the problem of the response speed reduction of critical event to the importance of message; Technical scheme provided by the invention can make the high message of priority take bus resource earlier and preferentially send; Effectively reduce the transmission lag of high priority message, improved the response speed of system critical event, and owing to technical scheme provided by the invention is not made amendment to existing HDLC frame structure; Make and realize simply, be easy to use.
File transmitting method that the embodiment of the invention provides and bus control unit can be applied in the equipment like wavelength-division, metropolitan area ether, transmitting synchronous digit sequence and router.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to accomplish through program; Described program can be stored in the computer-readable recording medium, like ROM/RAM, magnetic disc or CD etc.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion by said protection range with claim.

Claims (6)

1. a file transmitting method is characterized in that, comprising:
Directly receive priority of messages information to be sent, perhaps, receive the type information of message to be sent,, obtain said priority of messages information to be sent according to said type information and the type of message of storage in advance and the corresponding relation of priority;
Send the bus resource occupied information according to said precedence information, take bus resource;
Use said bus resource to send the corresponding message of said precedence information.
2. file transmitting method according to claim 1 is characterized in that, saidly sends the bus resource occupied information according to said precedence information and comprises:
According to said precedence information, and message priority and the corresponding relation of bus resource occupied information figure place of storage in advance obtain bus resource occupied information figure place to be sent;
Send the bus resource occupied information according to said bus resource occupied information figure place.
3. file transmitting method according to claim 1 is characterized in that, and is said according to before the said precedence information transmission bus resource occupied information, also comprises:
Judge whether bus is idle;
Then saidly send the bus resource occupied information according to said precedence information and comprise:
When judged result is that bus is during the free time, according to said precedence information transmission bus resource occupied information.
4. a packet transmission device is characterized in that, comprising:
The precedence information acquiring unit; Specifically comprise: the precedence information receiving element is used for directly receiving priority of messages information to be sent, perhaps; Said precedence information acquiring unit comprises: first correspondence relation storage; Type information receiving element and acquiring unit, said first correspondence relation storage is used for the corresponding relation of stored messages type and priority; Said type information receiving element is used to receive the type information of message to be sent; Said acquiring unit is used for obtaining said priority of messages information to be sent according to said type information and the type of message of storage in advance and the corresponding relation of priority;
Bus resource occupied information transmitting element is used for sending the bus resource occupied information according to said precedence information, takies bus resource;
Packet sending unit is used to use said bus resource to send the corresponding message of said precedence information.
5. device according to claim 4 is characterized in that, said bus resource occupied information transmitting element comprises:
Second correspondence relation storage is used for the corresponding relation of the priority and the bus resource occupied information figure place of stored messages;
The figure place acquiring unit; Be used for the precedence information that obtains according to said precedence information acquiring unit; And the message priority of correspondence relation storage storage and the corresponding relation of bus resource occupied information figure place, obtain bus resource occupied information figure place to be sent;
Transmitting element, the bus resource occupied information figure place that is used for obtaining according to said figure place acquiring unit is sent the bus occupied information.
6. device according to claim 4 is characterized in that, also comprises:
The bus state judging unit is used to judge whether bus is idle;
Then said bus resource occupied information transmitting element, the judged result that also is used for when said bus state judging unit is that bus is during the free time, according to said precedence information transmission bus resource occupied information.
CN2008101720625A 2008-10-28 2008-10-28 Message transmitting method and bus controller Expired - Fee Related CN101729345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101720625A CN101729345B (en) 2008-10-28 2008-10-28 Message transmitting method and bus controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101720625A CN101729345B (en) 2008-10-28 2008-10-28 Message transmitting method and bus controller

Publications (2)

Publication Number Publication Date
CN101729345A CN101729345A (en) 2010-06-09
CN101729345B true CN101729345B (en) 2012-07-04

Family

ID=42449613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101720625A Expired - Fee Related CN101729345B (en) 2008-10-28 2008-10-28 Message transmitting method and bus controller

Country Status (1)

Country Link
CN (1) CN101729345B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103684739B (en) * 2014-01-09 2017-09-29 北京经纬恒润科技有限公司 A kind of device for realizing that clock is synchronous, device and method
CN114125008B (en) * 2020-09-01 2024-03-08 上海汽车集团股份有限公司 Data transmission method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201114146Y (en) * 2007-06-26 2008-09-10 比亚迪股份有限公司 Tandem type mixing power automobile control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201114146Y (en) * 2007-06-26 2008-09-10 比亚迪股份有限公司 Tandem type mixing power automobile control system

Also Published As

Publication number Publication date
CN101729345A (en) 2010-06-09

Similar Documents

Publication Publication Date Title
CN109600187B (en) Scheduling method and device of time-triggered unified network transmission end system
KR101636844B1 (en) Network system configured for resolving forward error correction during a data mode
US8179918B2 (en) Relay connection unit for vehicle
CN101277196B (en) Communication system, communication method and cable fastener plate based on PCIE switching network
US7602809B2 (en) Reducing transmission time for data packets controlled by a link layer protocol comprising a fragmenting/defragmenting capability
JPH11187051A (en) Method and device for transmitting packet data from medium access controller
CN107770085B (en) Network load balancing method, equipment and system
CN1579064A (en) Method for supporting sdh/sonet aps on ethernet
US20130166800A1 (en) Method and device for transmitting data having a variable bit length
US7643504B2 (en) Credit based flow control in an asymmetric channel environment
CN101277305A (en) Method, apparatus and system for encapsulation of GRE bearing by all-purpose route
CN101848168A (en) Target MAC (Media Access Control) address based flow control method, system and equipment
CN101667959B (en) Method and device for transmitting data in physical layer and data transmission system
CN102377678B (en) Data transmission and processing method and device
WO2010037324A1 (en) Method and device for adjusting the data transmission in the transport network
CN112953683A (en) Adaptive rate SRIO interface data transmission method
CN101729345B (en) Message transmitting method and bus controller
CN103338158A (en) GOOSE message transmission delay jitter suppression method
CN113273149B (en) Data sending method and device and FlexE exchange system
CN1917519B (en) Method and system for parallel transmitting serial data according to high level data link control
KR20190013012A (en) Method for transceiving data between heterogeneous network
US20060230147A1 (en) Asynchronous frame transmission method for strictly ensuring beginning of super frame in residential ethernet
CN101207625A (en) Composite method and composite apparatus as well as sending method and sending apparatus of message
JP3313563B2 (en) Data transmission control method
JP5365417B2 (en) Priority control device and network system using the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120704

Termination date: 20151028

EXPY Termination of patent right or utility model