CN103647682B - A kind of analogue system simulating the synchronization of switching Ethernet clock - Google Patents

A kind of analogue system simulating the synchronization of switching Ethernet clock Download PDF

Info

Publication number
CN103647682B
CN103647682B CN201310664838.6A CN201310664838A CN103647682B CN 103647682 B CN103647682 B CN 103647682B CN 201310664838 A CN201310664838 A CN 201310664838A CN 103647682 B CN103647682 B CN 103647682B
Authority
CN
China
Prior art keywords
frame
state
node
data
module
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
CN201310664838.6A
Other languages
Chinese (zh)
Other versions
CN103647682A (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201310664838.6A priority Critical patent/CN103647682B/en
Publication of CN103647682A publication Critical patent/CN103647682A/en
Application granted granted Critical
Publication of CN103647682B publication Critical patent/CN103647682B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a kind of analogue system simulating the synchronization of switching Ethernet clock, this analogue system includes Ethernet protocol instruction database, intervalometer, node and link attribute configuration module, synchronizes Topology g eneration module, state management module, State Transferring module, data processing module, fault detect and processing module, clock correcting module and result output module.Ethernet protocol instruction database and intervalometer are to meet in IEEE802.3ISO/IEC8802 3 standard criterion and SAEAS6802 pointed instruction, state relation information.Carry out emulating role's configuration by node and link attribute configuration module and obtain synchronization topology;Then to each nodes for state Role Management in synchronization topology, and data process, clock correction and fault detect are carried out with different conditions role;Thus output state and clock correction result.Analogue system of the present invention, relative to existing analogue system, is set up aspect in network model and is shown higher extensibility, it is simple to Clock Synchronization Procedure is carried out significantly more efficient analysis.

Description

A kind of analogue system simulating the synchronization of switching Ethernet clock
Technical field
The present invention relates to a kind of analogue system based on Ethernet, more particularly, refer to a kind of simulation switch type ether The analogue system Tong Bu with maintaining clock set up by net.By this system, user can simulate switching Ethernet according to demand and exist The process that under different situations, clock synchronizes.
Background technology
Ethernet (Ethernet) is the LAN (technology) that a class meets a set of standard criterion.So-called a set of mark Quasi-specification is primarily referred to as IEEE802.3ISO/IEC8802-3, IEEE802.12ISO/IEC8802-12 or IEEE802.11ISO/ The series of standards such as IEC8802-11, HiperLAN2;So-called computer system in referring to this regional area many computers by this The data communication contact network that set protocol specification couples together.Write with reference to " ethernet technology and application " Wang Tingyao, 2005 1 The moon the 1st edition, page 4 to the 7th page.About in the composition example block diagram of Ethernet, an Ethernet at least includes server (Server), switch (Frame Switcher), router (Router) and AP node (Access Point Equipment).
Switching Ethernet refers to have employed the Ethernet of switching technology, and connecting node is exactly switch.With reference to " ten thousand megabits Ethernet and practical technique thereof " Ao Zhi just writes, the 1st printing July in 2007, and page 82.
Avionics system, as a kind of task and Safety-Critical System, needs have the guarantee of completely deterministic time. At present, the large aircraft of advanced person both domestic and external all uses avionic full-duplex switched-type Ethernet (Avionics Full Duplex Switched Ethernet, AFDX) as airborne electronic equipment system synthesisization interconnection backbone, AFDX network proposes The mechanism of time determinability, and introduce the mechanism of flow-control, make the speed of communication task suffer restraints, be referred to as speed and be subject to Limit (Rate Constraint, RC) flow, but, RC flow through multistage multiplexing and queue up after, exist certain time delay and Delay variation.Therefore, the concept of a kind of Time Triggered is arisen at the historic moment.Time Triggered Ethernet (Time Triggered Ethernet, TTE) on the basis of AFDX network, introduce transparent clock and the concept of clock synchronization, and the time that have employed touches Send out (Time Triggered, TT) flow and transmit the key message in avionics system.In TTE network, Mei Gejie Point (described node can be switch, end system) maintains the time scheduling table of the TT flow of self, and all behaviors are all by solid Fixed time scheduling table-driven.Owing to each node in time-trigged system realizes theirs according to their local clock Behavior, the clock between distributed node synchronizes just to be particularly important.
In order to preferably study transmission and the mixed traffic such as TT flow, RC flow of TT flow in clock synchronous ethernet Transmission, need to set up the platform that a network providing time synchronized transmits as above-mentioned flow, accordingly, it would be desirable to the time with The process of step is effectively simulated and emulates.Main about the analog simulation of Time Triggered ethernet clock synchronization mechanism Being realized by FPGA or common CP U, these emulation modes typically require the fixing model of design and topological structure, node Time delay value was determined by hardware itself with the propagation delay time on line, there will be certain conflict or lose during actual transmissions Bag phenomenon, can only set up the clock synchronization being limited to level of hardware, it is impossible at short notice simulation process is carried out random repairing Changing, motility is poor.
Summary of the invention
A kind of analogue system simulating the synchronization of switching Ethernet clock, this analogue system are the purpose of the present invention is to propose to The mode utilizing the scheduling of discrete event achieves the emulation synchronizing switching Ethernet clock.In analogue system of the present invention, Carry out emulating actor model configuration according to configuration information, obtain synchronization topology;Then to each in synchronization topology Nodes for state Role Management, and carry out data process, clock correction and fault detect with different conditions role;Thus it is defeated Do well and clock correction result.Analogue system of the present invention, relative to existing analogue system, sets up aspect table in network model Reveal higher extensibility, it is simple to Clock Synchronization Procedure is carried out significantly more efficient analysis.
The present invention is a kind of analogue system simulating the synchronization of switching Ethernet clock, and this analogue system includes that Ethernet is assisted View instruction database, intervalometer, node and link attribute configuration module (10), synchronization Topology g eneration module (20), condition managing Module (30), State Transferring module (40), data processing module (60), fault detect and processing module (70), clock correction mould Block (80) and result output module (50).
Node and link attribute configuration module (10) according to end system, switch and the end system in actual Ethernet and Physical connection between switch, configures required emulation configuration information D10
Synchronize Topology g eneration module (20) and be used for generating synchronization topology, and export synchronization topology information D20
State management module (30), for being managed the execution behavior of angle of rotation of joint normal complexion node state.
State Transferring module (40), for switching over node state, described node state is respectively integrated state, different Step state, waiting state, flood state, enabled state and synchronous regime.
Data processing module (60) completes the generation of Frame according to present node state, sends, receives, solidifies, presses Contracting.And during carrying out data process, act on the most whether state management module notice state management module receives number According to frame and the type information of Frame;Clock correcting module is acted on after data write or compression complete, will solidification or pressure The Frame contracted passes to clock correcting module;In data processing, fault detect and processing module are acted on, by number Fault detect and processing module is passed to according to the information of frame.By data frame generating unit (601), Frame transmitting element (602), Data frame receipt unit (603), Frame solidified cell (604), Frame compression unit (605) are constituted.
Fault detect and processing module (70), be used for data frame check and carry out fault processing;The situation of conglomeration is entered Row detection and process;Detection to simulation run situation processes.By Frame check errors processing unit (701), synchronize conglomeration Detection is constituted with processing unit (703) and software anomaly processing unit (704) with processing unit (702), asynchronous conglomeration detection.
Clock correcting module (80), for revising the local clock of node role.By Frame select unit (801), time Clock corrected Calculation unit (802) and clock correction performance element (803) are constituted.
Result output module (50), current for by result, clock correction value size and the node of current state information Local clock exports with the formatted file of xml formatted file or excel.
The present invention simulates the advantage of the analogue system that switching Ethernet clock synchronizes and is:
1. the present invention uses the process that the mode analog network clock of the scheduling of discrete event synchronizes, and is not limited by hardware platform System, can change topological structure and the scale of phantom, flexibly and easily as required, it is easy to implement.
2. the present invention uses the mode not limited by particular hardware to realize the function that clock synchronizes, and is calculating Compression Correction value Time, can as often as possible take the solidification moment point of the Frame received in solidification queue, the clock more increased can be reached Synchronization accuracy.
3. the present invention arranges the time precision in simulation process according to user's request, can be that upper stream amount transmitting procedure carries For the synchronizing network platform under different clocks granularity, and the clock matches of application, thus it is effectively guaranteed the time of TT flow Definitiveness.
4. the emulation platform synchronized by TTE network clocking, it is possible to achieve the optimization to TTE network clocking synchronizing process sets Meter, by optimization and the configuration of clock synchronization parameters synchronizing topology, it is thus achieved that the situation that under different situations, clock synchronizes, permissible It is compared analysis, thus revises configuration, optimize the performance that TTE network clocking synchronizes.
5. by TTE network clocking synchronization simulation, the critical condition being difficult to obtain can be predicted in real network Analyze, it is thus achieved that the critical condition that TTE network clocking synchronizes.
6. the analogue system that the present invention can be utilized to design carries out based on what-if it is assumed that for network difference mistake Situation emulates, and analyzes the fault freedom of network.
7. the analogue system that the present invention designs can be utilized to build multiple network scene (the most different synchronization topology knot Structure), utilize different parameter configuration, it is thus achieved that the convergence of each sight lower network synchronization and precision, it is simple to it is compared.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of analogue system of the present invention.
Fig. 2 is the present invention any one synchronization topology figure.
Fig. 3 is the processing procedure figure of data processing module in the present invention.
Fig. 3 A is the PCF form schematic diagram that in the present invention, data frame generating unit is generated.
Fig. 3 B is the flow chart of Frame transmitting element in the present invention.
Fig. 3 C is the flow chart of data frame receipt unit in the present invention.
Fig. 3 D is the flow chart of Frame solidified cell in the present invention.
Fig. 3 E is the concrete mode that Frame carries out in the present invention curing operation.
Fig. 3 F is the flow chart of Frame compression unit in the present invention.
Fig. 3 G is the sequential chart calculating compression moment point in the present invention.
Fig. 4 is the flow chart that in the present invention, Frame selects unit.
Fig. 5 is that the corresponding conditions that in the present invention, State Transferring module is transmitted according to state management module carries out State Transferring Flow chart.
Detailed description of the invention
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Shown in Figure 1, the invention provides a kind of analogue system simulating switching Ethernet Clock Synchronization Procedure, should Analogue system includes Ethernet protocol instruction database, intervalometer, node and link attribute configuration module 10, synchronizes Topology g eneration Module 20, state management module 30, State Transferring module 40, data processing module 60, fault detect and processing module 70, clock Correcting module 80 and result output module 50.
In the present invention, Ethernet protocol instruction database be based on IEEE802.3ISO/IEC8802-3 standard criterion and SAEAS6802(Time Triggered Ethernet) in pointed instruction, state relation information architecture obtain.Described Ethernet protocol refers to Make the different instruction in data base, state relation information can by modules (i.e. node and link attribute configuration module 10, with Step Topology g eneration module 20, state management module 30, State Transferring module 40, data processing module 60, fault detect and process Module 70, clock correcting module 80) called.
In the present invention, intervalometer is based on IEEE802.3ISO/IEC8802-3 standard criterion and SAEAS6802(time Trigger Ethernet) in pointed time command build and obtain.For the ease of Clock Synchronization Procedure is carried out significantly more efficient point Analysis, customizes information association in time to ensure in simulation process to call temporal information by intervalometer.
In the present invention, node and link attribute configuration module 10 according to the end system in actual Ethernet, switch with And the physical connection between end system and switch, configure required emulation configuration information D10
In the present invention, synchronize Topology g eneration module 20 and be used for generating synchronization topology, and export synchronization topology information D20
In the present invention, synchronize Topology g eneration module 20 to realize according to the physical topology read in configuration information read module Information generates the function synchronizing topology, and the node role that initial configuration is different, and all of node is configured to Synchronization Control The role of device;Then configuring the role of switching node, switching node is configured to compress controller or sync client, same Only configuring a compression controller on one channel, other switching node on same channel is configured to sync client.Specifically Executive mode is that some node device from channel starts to configure each node, and node is configured to Synchronization Control Device, and as isochronous controller obtain node corresponding configuration information (postpone, send and receive on port speed, line delays, hold Mouthful internal processing time and the clock drift of equipment simulated), continue traversal physical link configuration equipment afterwards, when for exchanging During node, and when being first switching node on channel, it is configured to compression controller, and obtain conduct as compression controller During switching node, the corresponding configuration information of equipment is (when postponing, send and receive delay, port inter-process on port speed, line Between and the clock drift of equipment simulated), for other switching node on channel, it is configured to sync client, with Sample as sync client obtain as during switching node node corresponding configuration information (postpone on port speed, line, send and Receive postpone, port internal processing time and the clock drift of equipment simulated).
In the present invention, state management module 30, for being managed the execution behavior of angle of rotation of joint normal complexion node state.
In the present invention, state management module 30 generates by this shape user configured according to intervalometer when different The intervalometer of state correspondence duration;Act on data processing module and carry out the process of Frame;Act on clock correcting module to trigger Correction to node local clock;Act on the fault that analogue system is likely to occur by fault detect and processing module to detect With process.
In the present invention, State Transferring module 40 is for switching over node state, and exports node state to knot Really output module 50.
In the present invention, data processing module 60 completes the generation of Frame according to present node state, sends, connects Receive, solidify, compress.Solid by data frame generating unit 601, Frame transmitting element 602, data frame receipt unit 603, Frame Change unit 604, Frame compression unit 605 is constituted.
In the present invention, data processing module 60 realizes data according to effect to it under state management module corresponding state The generation of frame, send, receive, solidify, squeeze operation;And it is logical to act on state management module during carrying out data process Know the most whether state management module receives the type information of Frame and Frame;After data write or compression complete Act on clock correcting module, the Frame solidified or compressed is passed to clock correcting module;In data processing, Act on fault detect and processing module, the information of Frame is passed to fault detect and processing module.
In the present invention, fault detect and processing module 70, it is used for data frame check and carries out fault processing;To conglomeration Situation detect and process;Detection to simulation run situation processes.By Frame check errors processing unit 701, together Step conglomeration detection is constituted with processing unit 703 and software anomaly processing unit 704 with processing unit 702, asynchronous conglomeration detection.
In the present invention, clock correcting module 80, for revising the local clock of node role.Unit is selected by Frame 801, clock corrected Calculation unit 802 and clock correction performance element 803 are constituted.
In the present invention, result output module 50, for by present node state, clock correction value size and revised Local clock exports with the formatted file of xml formatted file or excel.
The analogue system of present invention design is by node and link attribute configuration module 10 and result output module 50 and use Family realizes mutual.
Ethernet protocol instruction database
In order to make the analogue system of the present invention of design meet IEEE802.3ISO/IEC8802-3 standard criterion, also can simultaneously Meet the needs of avionics system user, have employed SAE(Society of Automotive Engineers) U.S.'s machine The SAEAS6802(Time Triggered Ethernet that motor-car SE works out) in the information such as pointed instruction, state, these letters Breath constructs the Ethernet protocol instruction database of analogue system of the present invention.
In the present invention, node state threshold valueInclude isochronous controller SMBFrom integrated state to synchronous regime Threshold valueCompression controller CMBThreshold value from integrated state to synchronous regimeSync client SCBThreshold value from integrated state to synchronous regimeIsochronous controller SMBThresholding from asynchronous mode to synchronous regime ValueCompression controller CMBThreshold value from asynchronous mode to synchronous regimeIsochronous controller SMBFrom same Step state is to the threshold value of asynchronous modeCompression controller CMBThreshold value from synchronous regime to asynchronous modeIsochronous controller SMBMaintain the threshold value of synchronous regimeCompression controller CMBMaintain synchronous regime Threshold valueSync client SCBMaintain the threshold value of synchronous regimeEmploying aggregate form is expressed as A 0 User = ITS SM B A , ITS CM B A , ITS SC B A , ATS S M B A , ATS CM B A , STA SM B A , STA CM B A , STS SM B A , STS CM B A , STS SC B A .
In the present invention, node role BUserInclude isochronous controller SMB, compression controller CMB, sync client SCB;Aggregate form is used to be expressed as BUser={ SMB,CMB,SCB}。
In the present invention, data frame transfer role MBUserInclude the isochronous controller SSM of source nodeB, the pressure of source node Contracting controller SCMB, the isochronous controller DSM of destination nodeB, the compression controller DCM of destination nodeB, the synchronization of destination node Client DSCB, sync client MSC of intermediate nodeB;Aggregate form is used to be expressed as MBUser={ SSMB,SCMB,DSMB, DCMB,DSCB,MSCB}。
In the present invention, the node physical delay timeInclude and distribute TD time delayC, send time delay TSC, line Upper propagation delay time TWC, receive time delay TRC;Employing aggregate form is expressed as C 0 User = { TD C , TS C , TW C , TR C } .
In the present invention, node state VUserInclude integrated stateAsynchronous modeData message receives Process statusWaiting stateEnabled stateSynchronous regimeEmploying aggregate form is expressed as V User = { Z IN User , Z AS User , Z FL User , Z WT User , Z EA User , Z SY User } .
Intervalometer
In the present invention, in order to ensure analogue system synchronization in time, application intervalometer carries out time customization and manages The operation of reason state.
Node and link attribute configuration module 10
Shown in Figure 1, in the present invention, node and link attribute configuration module 10 first aspect call Ethernet protocol In instruction databaseConfigure link information
In the present invention, according to the thing between end system, switch and end system and the switch in actual Ethernet Reason connects, and configures the configuration link information met needed for analogue system of the present inventionTopology the most shown in Figure 2 with Too web frame schematic diagram.
Node and link attribute configuration module 10 second aspect are called in Ethernet protocol instruction databaseTDC,TSC,TWC,TRC,Carry out initial assignment, obtain the emulation after assignment and join Confidence ceases P 10 User , D 10 User , D max - 10 User , f 10 User , TD 10 C , TS 10 C , TW 10 C , TR 10 C , E 10 User , G 10 User ; Employing aggregate form is expressed For D ass 10 = { P 10 User , D 10 User , D max - 10 User , f 10 User , TD 10 C , TS 10 C , TW 10 C , TR 10 C , E 10 User , G 10 User } ;
In the present invention, node and link attribute configuration module 10 output are designated as to the information synchronizing Topology g eneration module 20 Configuration information D is used in emulation10, use aggregate form to be expressed as
Synchronize Topology g eneration module 20
Shown in Figure 1, in the present invention, synchronize Topology g eneration module 20 first aspect and be used for receiving D 10 = { D link 10 , D ass 10 } ;
Synchronize Topology g eneration module 20 second aspect and call the node role B in Ethernet protocol instruction databaseUserWithNode role's configuration is carried out according to synchronization modeObtain synchronization topology, such as Fig. 2 institute Show;
Described synchronization mode refers to that the end system needed for emulating, switch carry out synchronizing role's configuration, Ji Jiangduan System is configured to the role of isochronous controller, and switch is configured to compression controller or sync client;Then according to node Role configuresIn conjunction with Ethernet structure, generate virtual link
In the present invention, if there are multiple switch on same channel, the most on the same channel one of them is exchanged Machine is configured to compression controller, and remaining switch on same channel is configured to sync client.
Shown in Figure 2, in the topology diagram of analogue system in the present invention, the first isochronous controller is designated as 211, Second isochronous controller be designated as the 212, the 3rd isochronous controller be designated as the 213, the 4th isochronous controller be designated as the 214, the 5th synchronization control Device processed is designated as the 215, the 6th isochronous controller and is designated as the 216, first sync client and is designated as the 221, second sync client and is designated as 222, compression controller is designated as 231.
If using isochronous controller (211~216) as source node, sync client (221,222) as intermediate node, pressure Contracting controller (231) carries out information (Protocol Control frame) transmission as destination node.The protocol integrated test system of described synchronization-compression At least transparent clock in frame
If using compression controller (231) as source node, sync client (221,222) as intermediate node, synchronizing control Device processed (211~216) carries out information transmission as destination node.In the Protocol Control frame of described compression-synchronization the most saturating Bright clock
Synchronize Topology g eneration module 20 third aspect and call the node state threshold value in Ethernet protocol instruction databaseIn conjunction withObtain the status threshold values after the assignment of each node
Synchronize Topology g eneration module 20 fourth aspect foundation D ass 10 = { P 10 User , D 10 User , D max - 10 User , f 10 User , TD 10 C , TS 10 C , TW 10 C , TR 10 C , E 10 User , G 10 User } InAnd combine the calculation delay of compression controllerGenerate timing length TO and size W of windowingb;Described
In the present invention, timing length TO includes all timing titles described in intervalometer, uses aggregate form table Reach for TO={TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ}。
In the present invention, the synchronization topology information synchronizing Topology g eneration module 20 output is designated as D20, use aggregate form table Reach for D 20 = { D VL 20 , D queue 20 , D state 20 , TO , W b } .
In the present invention, make to synchronize Topology g eneration module according to the configuration information of node and link attribute configuration module 10 20 generate synchronization topology, start time and physical parameter according to the configuration read for node each in synchronization topology Information carries out assignment, and described physical parameter includes postponing, send and receive delay, end on the line of port speed, institute's connecting channel The data of mouthful internal processing time and the clock drift of node simulated have been the most also each node initializing some Queue, in order to subsequent operation, the data queue maintained in node includes that data transmit queue, data receiver queue, VL receive Queue, data write queue, data compression queue (for being configured to the node of compression controller), data collection queue.Just During beginningization, queue is empty, again each queue is carried out concrete operations in indwelling subsequent process, and FIFO is chosen in queue Model, each element in queue includes the Frame of encapsulation, enters the node class belonging to queue current time value, data queue Type and title.For each the channel comprising multiple isochronous controller, need to produce 2 times VL(Virtual Link, virtual Link).
State management module 30
Seeing shown in Fig. 1, Fig. 3, Fig. 3 A~Fig. 3 G, state management module 30 acts on intervalometer when different; State management module 30 according to node role (synchronizing Topology g eneration module 20 to produce) and node state, (produce by State Transferring module 40 Raw) act on data processing module 60 and carry out the process of Frame;Act on clock correcting module 80 when triggering node this locality The correction of clock;Act on the fault that analogue system is likely to occur by fault detect and processing module 70 to detect and process.
In the present invention, the management of state is by state management module 30:
First aspect, according to the D synchronizing Topology g eneration module 2020, State Transferring module 40, data processing module 60, therefore Barrier detection and the information in processing module 70 and clock correcting module 80, comprehensively analyze, generate the joint with State Transferring module 40 The execution behavior that dotted state matches.
Second aspect, first aspect the execution behavior obtained is passed to described in the execution behavior that matches refer to, when When the node state of State Transferring module 40 transmission is integrated state: isochronous controller SMBExecution behavior in integrated stateCompression controller CMBExecution behavior in integrated stateSync client SCBHolding of integrated state Every trade is
When the node state of State Transferring module 40 transmission is synchronous regime: isochronous controller SMBIn synchronous regime Execution behaviorCompression controller CMBExecution behavior in synchronous regimeSync client SCBSynchronizing The execution behavior of state
When the node state of State Transferring module 40 transmission is asynchronous mode: isochronous controller SMBAt asynchronous mode Execution behaviorCompression controller CMBExecution behavior at asynchronous mode
When the node state of State Transferring module 40 transmission is waiting state: isochronous controller SMBIn waiting state Execution behaviorCompression controller CMBExecution behavior in waiting state
When the node state of State Transferring module 40 transmission is flood state: isochronous controller SMBHolding in flood state Every trade isWhen the node state of State Transferring module 40 transmission is enabled state: compression controller CMBEnabling shape The execution behavior of stateEmploying aggregate form is expressed as D ACT 30 = ACT SM B IN , ACT CM B IN , ACT SC B IN , ACT SM B SY , ACT CM B SY , ACT SC B SY , ACT SM B AS , ACT CM B AS , ACT SM B WT , ACT CM B WT , ACT SM B FL , ACT CM B EA .
Concrete, according to the difference of node role configuration, introduce set successivelyIn each element concrete in Hold.
The node of isochronous controller it is configured to firstly, for role:
(A) described isochronous controller SMBExecution behavior in integrated stateRefer to: at A timing TAIn, state The data write queue Q that data processing module 60 is transmitted by management module 30permIn element judge, it is judged that the most whether There is data element, if had, determining whether the type of the Frame FR received: if CA frame, then trigger State Transferring mould Node state is converted to waiting state by block 40, and triggers synchronization conglomeration detection with processing unit 702 by MsyncIt is set to 1.If For IN frame, then continue to judge to synchronize whether member variable reaches status threshold valuesIf reaching, then trigger State Transferring Node state is converted to synchronous regime by module 50, and starts trigger data processing module 60 above-mentioned IN frame carries out record profit The process to IN frame is performed with data processing module 60;If not up to, then triggering State Transferring module 50 node state to be changed For waiting state.If A is timing TAAfter end, data write queue QpermIt is still empty, then triggers State Transferring module 40 by node State Transferring is asynchronous regime, and timing length is set to TB, data frame generating unit in trigger data processing module 60 601, start to generate CS frame, operate according to the unit order in data processing module 60 afterwards, initiate handshake procedure.
(B) described isochronous controller SMBExecution behavior at asynchronous modeRefer to: at B timing TBIn, logarithm Data write queue Q according to processing module 60 transmissionpermIn element judge, it is judged that the most whether have data element, as Fruit has, and determines whether the data frame type received: if CS(ColdStart Frame) frame, then trigger State Transferring mould Node state is converted to flood state by block 40;If CA frame, then trigger State Transferring module 40 and node state is converted to Waiting state, and trigger synchronization conglomeration detection with processing unit 702 by MsyncIt is set to 1;If IN frame, then continue to judge to synchronize Whether member variable reachesReach if node synchronizes member variableThen trigger State Transferring module Node state is converted to synchronous regime by 40, and starts trigger data processing module 60 and record it and process mould in data Block 60 performs the process to IN frame;If not up to, then triggering State Transferring module 40 node state is converted to waiting state.As Really B timing TBAfter end, the data write queue Q of nodepermIt is still empty, then triggers State Transferring module 40 and node state is turned It is changed to asynchronous regime, now, the data frame generating unit 601 in trigger data processing module 60, start to generate CS frame, afterwards Operate according to the unit order in data processing module 60, initiate handshake procedure.
(C) described isochronous controller SMBExecution behavior in flood stateRefer to: state management module 30 The variable configuration information current according to node sets timing length.
Described variable configuration information includes that flood_recv and closed_window(the two value is bool type variable, just 0 it is set to) during beginningization.
At C timing TCIn, the data write queue Q to data processing module 60 transmissionpermThe element of middle addition is sentenced Disconnected, it is judged that the most whether to have data element, if it has, then determine whether the PCF frame type received: if CS frame, then touch Node state is set to flood state by hair-like state modular converter 40 again;
If CA frame, and being 1 in flood_recv value, closed_window value is under the configuring condition of 0, then trigger Node state is converted to waiting state by State Transferring module 40.
At C timing TCAfter end, the data write queue Q of nodepermBe still empty, then judge flood_recv value and Closed_window value, if be all 0, then trigger State Transferring module 40 and node state is set to flood state again, And trigger data processing module 60 sends CA frame, meanwhile, flood_recv is entered as 1;
If flood_recv value is 1, when closed_window value is 0, then at I timing TIIn, continue data are processed The data write queue Q of module 60 transmissionpermIn element judge, it is judged that the most whether have data element, if it did not, Then trigger State Transferring module 40 and node state is set to again flood state, do not carry out State Transferring;
If flood_recv value and closed_window value are all 1, then at J timing TJIn, continue data are processed The data write queue Q of module 60 transmissionpermIn element judge, it is judged that the most whether have data element, if it did not, Then trigger State Transferring module 40 and node state is converted to asynchronous regime, by flood_recv value and closed_window Value is assigned to 0.
(D) described isochronous controller SMBExecution behavior in waiting stateRefer to: at E timing TEIn, logarithm Data write queue Q according to processing module 60 transmissionpermIn element judge, it is judged that the most whether have data element, as Fruit has, then determine whether the data frame type received: if CS frame, then trigger State Transferring module 40 and node state turned It is changed to flood state;If CA frame, then trigger State Transferring module 40 and node state is remained in waiting state, and Trigger and synchronize conglomeration detection with processing unit 702 by MsyncIt is set to 1;If data receiver queue QrecvFor sky, and the basis of node Ground member value reaches status threshold valuesThen trigger State Transferring module 40 and node state is converted to synchronous regime, with Time trigger data processing module 60 in data frame generating unit 601, start to generate IN frame (this locality of newcomer=node in frame Member value), to initiate synchronizing process;If the local member value of node is not reaching to status threshold valuesThe most then trigger Node state is converted to asynchronous mode by State Transferring module 40.
(E) described isochronous controller SMBExecution behavior in synchronous regimeRefer to: under this state, cold open Moving shakes hands successfully, and the clock difference of each node is maintained in the range of set clock accuracy.State management module 30 exists The starting point trigger data processing module 60 in each integrated cycle generates IN frame, and it be transmitted, receive, the operation such as solidification; Trigger clock correcting module 80 and receive the IN frame laggard row clock correction being cured;Trigger fault detect and processing module 70 Running is monitored, utilizes fault detect conglomeration detection synchronization with processing module 70 and processing unit 702 and different Walk conglomeration detection with processing unit 703 to whether synchronizing process occurring, the situation of conglomeration detects, and handle it.Same Step state, data processing module 60 is by the data write queue Q of transmissionpermThe element of middle addition feeds back to state management module 30 Judge, if IN frame, be then continually maintained in synchronous regime, continue subsequent operation;If CA frame, then imply that current Occur in that nonsynchronous situation, trigger State Transferring module 40 and node state is converted to waiting state, start waiting for again sending out Play synchronizing process.The problem detected is reported to state management module 40 by fault detect and processing module 70, when synchronizing conglomeration When detection and processing unit 702 or asynchronous conglomeration detection detect the situation of conglomeration with processing unit 703, situation about will appear from is converged Offering state management module 30, state management module 30 triggers State Transferring module 40 and node state is converted to asynchronous mode. Described conglomeration situation refers to SAEAS6802(Time Triggered Ethernet) middle regulation.
For being configured to the node of compression controller: carry out according to the different status information of State Transferring module 40 transmission Discuss.
(A) described compression controller CMBExecution behavior in integrated stateRefer to: at D timing TDIn, logarithm Data write queue Q according to processing module 60 transmissionpermIn element judge, it is judged that the most whether have data element, as Fruit has, and determines whether the data frame type received: if CS or CA frame, is then considered as situation about should not occur, the most right Frame abandons;If IN frame, then continue to judge to synchronize whether member variable reaches status threshold valuesIf Synchronize member variable and reach status threshold valuesThen trigger State Transferring module 40 to be converted to node state synchronize shape State, and start trigger data processing module 60 and record and utilize data processing module 60 and clock correcting module 80 to enter it Row corresponding operating;If not up to, then Frame being abandoned.If D is timing TDAfter end, the data write queue of node QpermIt is still empty, then enters triggering State Transferring module 40 and node state is converted to asynchronous mode.
(B) described compression controller CMBExecution behavior at asynchronous modeRefer to: to data processing module 60 The data write queue Q of the node of transmissionpermIn element judge, it is judged that the most whether have data element, if had, Determine whether the data frame type received: if CS frame, or for CA frame and the member value information of CA frame that receives More than status threshold valuesThen trigger State Transferring module 40 and node state is converted to enabled state, and trigger Data processing module 60 utilizes data frame generating unit 601 to generate CS or CA frame, and according to the step in data processing module 60 Suddenly Frame is generated and sent away.If IN frame, and the value of the newcomer of IN frame is more than status threshold valuesAfter then node state is converted to synchronous regime, and trigger data processing module 60 by triggering State Transferring module 40 Continuous process.If data write queue QpermBe empty, then node rests on asynchronous mode always always.
The described step in data processing module 60 includes: due to the Frame generated and the Frame lattice received Formula is basically identical, therefore, when generating new Frame, and the method taking the PCF internal structure received is modified, repair The transparent clock territory changing this frame is 0, and adds new VL(in data processing by its source address and destination address exchange) Information, sends back to corresponding destination node according to the subsequent step in data processing module 60.
(C) described compression controller CMBExecution behavior in enabled stateRefer to: at F timing TFIn, logarithm Data write queue Q according to processing module 60 transmissionpermIn element judge, it is judged that the most whether have data element, as Fruit has, and determines whether the data frame type received: if CS or IN frame, be then considered as the situation of mistake, directly to data Frame abandons, not operation;If receiving CA frame, then will carry out this CA frame forwarding operation, trigger data processing module 60 generate CA frame, and are sent by Frame according to the step in data processing module 60.In this case, one is often received CA frame, is carried out forwarding behavior, owing to the Frame generated is basically identical with the data frame format received, therefore, is giving birth to During the Frame of Cheng Xin, the method taking the PCF content received is modified, revise the transparent clock territory of this frame, and Data handling procedure is added new VL(its source address and destination address are exchanged), according in data processing module 60 Subsequent step sends back to corresponding destination node, and in this kind of situation (i.e. receiving the situation of Frame), node continues to stop Stay current state, do not carry out State Transferring.If at F timing TFAfter end, node data receiving queue QrecvIt is still empty, i.e. Do not receive new data, then trigger State Transferring module 40 and node state is converted to waiting state.
(D) described compression controller CMBExecution behavior in waiting stateRefer to: at G timing TGIn, logarithm Data write queue Q according to processing module 60 transmissionpermIn element judge, it is judged that the most whether have data element, as Fruit has, and determines whether the data frame type received: if CS or CA frame, be then considered as the situation of mistake, directly to data Frame abandons, not operation;If IN frame, and the state of value threshold value of the newcomer of IN frameThen trigger Node state is converted to synchronous regime by State Transferring module 40, and trigger data processing module 60 and clock correcting module 80 right Received Frame operates.If G is timing TGAfter end, the data write queue Q of nodepermIn be empty always, i.e. Do not receive new data, then trigger State Transferring module 40 and node state is converted to asynchronous mode.
(E) described compression controller CMBExecution behavior in synchronous regimeRefer to: when being in this state, Illustrating that cold start-up is shaken hands successfully, the clock difference of each node is maintained in the range of set clock accuracy.Condition managing mould Block 30 carries out corresponding operating according to the Frame that data processing module 60 is fed back: if receiving CS or CA after solidification Frame, then be considered as the situation of mistake, directly abandon Frame, not operation;If receiving the IN frame after solidification, then touch Sending out the Frame compression unit 605 in data processing module 60, be collected IN frame, compression etc. operates, and utilizes clock to repair Positive module 80 carries out clock correction, utilize fault detect conglomeration detection synchronization with in processing module 70 and processing unit 702 and Asynchronous conglomeration detection and processing unit 703 are to whether occurring in synchronizing process that the situation of conglomeration detects, and handle it.Therefore The problem detected is reported to state management module 30 with processing module 70 by barrier detection, when synchronizing conglomeration detection and processing unit When 702 or asynchronous conglomeration detections and processing unit 703 detect the situation of conglomeration, the situation report-back that will appear from is to condition managing mould Block 30, state management module 30 triggers State Transferring module 40 and current state is converted to integrated state, thus resumes waiting for out Begin the process synchronized of shaking hands;If it is not detected that the situation of conglomeration, then it is continually maintained in synchronous regime, simultaneously according further to data Processing module 60 processes the locally configured information of corresponding situation more new node during data.
For being configured to the node of sync client: carry out according to the different status information of State Transferring module 40 transmission Discuss.
(A) described sync client SCBExecution behavior in integrated stateRefer to: first data are processed mould The data write queue Q of block 60 transmissionpermIn element judge, it is judged that the most whether having data element, if had, entering One step judges the data frame type received: if IN frame, then determine whether that it synchronizes whether member variable reaches state door Limit valueIf it is, trigger State Transferring module 40, node state is converted at synchronous regime, and trigger data Reason module 60, processes it according to method when receiving IN frame in data processing module 60, and the local letter to node Breath carries out certain renewal;If it is not, i.e. fail to reach status threshold valuesThen illustrate also do not have to reach same The state of step, continues trigger data processing module 60, performs corresponding data and forwards operation.If the PCF type received is CS or CA frame, also continues to trigger data processing module 60, performs corresponding data and forwards operation.
(B) described sync client SCBExecution behavior in synchronous regimeRefer to: state management module 30 is touched Send out data processing module 60, clock correcting module 80 etc. the IN frame received is processed, and during to node current local Clock is modified, and meanwhile, triggers fault detect with processing module 70 to whether occurring that conglomeration situation detects, if there is, Then trigger State Transferring module 40 and node state is converted to integrated state;Otherwise, synchronous regime is stilled remain in.Meanwhile, right The current configuration information of node is revised accordingly.
State Transferring module 40
Shown in Figure 5, State Transferring module 40 experiences altogether 6 node states during setting up synchronization, described Node state is respectively integrated stateAsynchronous modeWaiting stateFlood stateEnable shape State(not shown in Fig. 5) and synchronous regimeFirst five state is asynchronous state.When in above-mentioned state Under, State Transferring module 40 i.e. starts to play a role, and completion status is changed, and waits the instruction next time triggering State Transferring. The information of the relevant Rule of judgment shown in figure is passed to State Transferring module 40 by state management module 30.
Shown in Figure 5, in the present invention, isochronous controller SMBAfter a node turns, initially enter integrated state, sentence Disconnected A timing TAThe most whether receiving Frame, if received, then continuing to judge its type;Without receiving, enter asynchronous shape State.If the data frame type received is IN frame, then whether the local member value continuing decision node reaches status threshold valuesIf not IN frame, then determine whether CA frame.When the above-mentioned PCF received is IN frame, if node Local member value reach status threshold valuesThen enter synchronous regime;If it is not, then entrance waiting state.For The above-mentioned Frame received is not the situation of IN frame, if the PCF received is CA frame, then enters waiting state;If it is not, then Enter asynchronous regime.
For at the State Transferring of asynchronous mode: judge whether equally at B timing TBReceive Frame, if received, then Determine whether the data frame type received;Without receiving, then remain in asynchronous mode.If CA frame, then enter Waiting state;If it is not, then further determine whether as CS frame.If CS frame, then enter flood state;If it is not, It is IN frame, then enters synchronous regime.
State Transferring for waiting state: judge whether that E is at timing T equallyEInside receive Frame, if received, then Remain in waiting state, if it is not, then whether the local member value of decision node reaches status threshold valuesAs Really node this locality member value reaches status threshold valuesThen enter synchronous regime;Without reaching status threshold valuesThen enter asynchronous mode.
For at the State Transferring of flood state: judge whether equally at the timing length in state management module 30 Inside receiving PCF, if received, then continuing the type of the PCF that judgement receives;Without receiving, then judge whether to meet to join Put information condition (about the configuration of flood_recv and closed_window value).For receiving PCF's in the above-mentioned stipulated time Situation, whether the PCF continuing to judge to receive is CS frame;If it is, be continually maintained in flood state;If it is not, then sentence Whether disconnected is CA frame.If CA frame, then enter waiting state;If it is not, then judge whether that meeting configuration information condition (has Close the configuration of flood_recv and closed_window value).For the above-mentioned not timing length in state management module 30 Inside receive the situation of PCF, if meeting configuration information condition, then entering asynchronous mode, if be unsatisfactory for, then remaining in Flood state.Described timing length and configuration information condition are according under flood state in state management module 30In Depending on.
For at the State Transferring of synchronous regime: to whether detecting conglomeration situation and data receiving queue QrecvWhether receive Judge to CA frame, if be detected that showed the situation of conglomeration, then enter asynchronous regime;If it is not, continue to keep In synchronous regime.If receiving CA frame, then enter waiting state;If it is not, be maintained at synchronous regime.Described conglomeration feelings Condition refers to SAEAS6802(Time Triggered Ethernet) middle regulation.
In the present invention, compression controller CMBAfter a node turns, integrated state is initially entered, it is judged that at condition managing Timing length D timing T in module 30DThe size the most whether receiving newcomer reaches status threshold valuesIN frame, as Fruit is then to enter synchronous regime;Otherwise, asynchronous regime is entered.
For at the State Transferring of asynchronous mode: it is first determined whether receive the value of CS frame or newcomer more than state door Limit valueCA frame, if it is, enter enabled state;If it is not, then continue to determine whether to receive the big of newcomer Little reach status threshold valuesIN frame.If the size receiving newcomer reaches status threshold valuesIN Frame, then enter synchronous regime;Without receiving, then remain in asynchronous mode.
For at the State Transferring of enabled state: judge F timing TFThe most whether receive Frame, if it is, still stop In enabled state;If it is not, then entrance waiting state.
For at the State Transferring of waiting state: judge G timing TGThe size the most whether receiving newcomer reaches state door Limit valueIN frame, if it is, enter synchronous regime;If it is not, then entrance asynchronous regime.
For at the State Transferring of synchronous regime: to whether occurring that conglomeration situation detects, if there is conglomeration situation, Then enter integrated state;If it is not, remain in synchronous regime.
In the present invention, sync client SCBAfter a node turns, integrated state is initially entered, it may be judged whether receive new The size of member reaches status threshold valuesIN frame, if it is, be i.e. transferred into synchronous regime;Otherwise, remain in Integrated state.
For at the State Transferring of synchronous regime: to whether occurring that conglomeration situation detects, if there is conglomeration situation, Then enter integrated state;If it is not, remain in synchronous regime.
Data processing module 60
Shown in Figure 3, data processing module 60 mainly includes data frame generating unit 601, Frame transmitting element 602, data frame receipt unit 603, Frame solidified cell 604 and Frame compression unit 605.
Data processing module 60 is after receiving Frame, according to node state V User = { Z IN User , Z AS User , Z FL User , Z WT User , Z EA User , Z SY User } In any one state and call Ethernet protocol instruction Data frame transfer role MB in data baseUser={ SSMB,SCMB,DSMB,DCMB,DSCB,MSCBAny one node role enters The process of row Frame, it is achieved the generation of Frame, send, receive, solidify, compress.
Data processing module 60 configures according to node roleBuild data handling queuesDescribedIncluding There is data transmit queue Qsend, data receiver queue Qrecv, VL receiving queue QVLrecv, data write queue Qperm, data compression queue Qcomp、 Data collection queue Qcoll;Employing aggregate form is expressed as D queue 20 = { Q send , Q recv , Q VLrecv , Q perm , Q comp , Q coll } .
In the present invention, described data compression queue QcompOnly use in compression controller.
Data frame generating unit 601
Data frame generating unit 601 first aspect is according to data frame transfer role MBUser={ SSMB,SCMB,DSMB,DCMB, DSCB,MSCBSSM in }B,SCMBDynamically generate Protocol Control frame FR;
Described Protocol Control frame FR includes source node address, destination node address and its transmission to be experienced VL(Virtual Link, virtual link) information
The type of described FR meets node state V User = { Z IN User , Z AS User , Z FL User , Z WT User , Z EA User , Z SY User } In The regulation of different conditions.
Seeing shown in Fig. 3 A, second aspect is dynamically generated Protocol Control frame according to status information and state behavioural information PCF.Wherein, the PCF generated is divided into cold start-up (CS, ColdStart) frame, cold start-up to confirm (CA, ColdStart Acknowledge) frame and integrated (IN, Integrate) frame three types.
Described PCF is the standard ethernet frame with minimum load (46bytes), and its ethernet type is 0x891d. In data frame generating unit 601, firstly generate 28bytes is applicable to the PCF that clock synchronizes, and distributes after retaining 18bytes. The structure chart of PCF is as shown in Figure 3A;
Concrete, in the frame structure of PCF,
Integrated cycle IpcfThe integrated periodic quantity of=node i
Newcomer is the variable of a 32bit, xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx;Given birth to The newcomer of the PCF become is worth SpcfThis new indexing of the local member value of=sending node should change
The maximum isochronous controller number that can carry in the switching Ethernet simulated is 32, during initialization, The local member value of the node being configured to isochronous controller is identical with the sequence number of self isochronous controller, synchronizes control with the 3rd As a example by the initial member value of device processed, time initial, the local member value of this node is 0,000 0,000 0,000 0,000 0000 0000 0,000 0100, therefore, the newcomer in the PCF sent first=0,000 0,000 0,000 0,000 0,000 0000 0000 0100;
Synchronize the synchronization priority residing for priority=sending node;
Synchronization field residing for synchronization field=sending node;
Transparent clock territory part is mainly used to record the time experienced from the PCF generation moment through each process.PCF Transparent clock when entering current processing unit is designated asTransparent clock when PCF leaves current processing unit is designated asIf the node generating Frame is source node, then the transparent clock value of the PCF in data frame generating unit 601 TC out 601 = 0 .
Frame transmitting element 602
Frame transmitting element 602 first aspect is according to data frame transfer role MBUser={ SSMB,SCMB,DSMB,DCMB, DSCB,MSCBMSC in }BCarry out forwarding data frame and receive the Frame that unit 603 receives;Then the 4th and the 5th aspect is performed;
Frame transmitting element 602 second aspect is according to data frame transfer role MBUser={ SSMB,SCMB,DSMB,DCMB, DSCB,MSCBSSM in }B,SCMBCarry out the FR of receiving data frames signal generating unit 601 output;
The third aspect, the delivery time point of record FRFourth aspect, and FR is added to node data send team Row QsendIn.Wherein, FR joins the team and goes out team and uses the mode of FIFO.
5th aspect, record data distribute TD time delayCWith transmission TS time delayC, and change transparent clock in FR Value.Then, TD time delay is distributed according to dataC, send time delay TSCAnd formula Obtain leaving the transparent clock of Frame transmitting element 602
Data frame receipt unit 603
Fig. 3 B is the flow chart of data frame receipt unit 603.Data frame receipt unit 603 sends single for receiving data frames The Frame FR that unit 602 sends, and the Frame received is deposited into data receiver queue QVLrecv
First aspect, it is judged that VL receiving queue Q of nodeVLrecvWhether be empty, if not being empty, then explanation have received Frame, if sky, then returns original state, waits the arrival of Frame;
Second aspect, for above-mentioned VL receiving queue QVLrecvThe situation of non-NULL, whether first determine whether to receive is effective Frame, if it is, Frame is carried out information retrieval process;If it is not, then trigger fault detect and processing module 70 do discard processing.
It is extraction source node and destination node address information that described information retrieval processes, and the time of reception put T in recordr, record Propagation delay time TW on internodal line during being sent to present node by a upper nodeC, receive TR time delayC, more Change transparent clock value
The mode of described change transparent clock value is according to propagation delay time TW on lineC, receive time delay TRCAnd public affairs FormulaObtain leaving the transparent clock value of data frame receipt unit 603
The third aspect carries out operations described below.The source node extracted according to second aspect and destination node address information, and Data frame transfer role MBUser={ SSMB,SCMB,DSMB,DCMB,DSCB,MSCBDSM in }B,DCMBJudge that present node is No is the destination node consistent with destination node address information, if it is, explanation data frame transfer completes, and by Frame FR and the time of reception receiving FR put TrDeposit the data receiver queue Q of ingressrecvIn, trigger data frame solidified cell 604, proceed by and it is carried out curing operation;If not destination node, then Frame FR is passed to the number of present node According to frame transmitting element 602, continue data transmission procedure, send Frame FR to destination node.
Frame solidified cell 604
Fig. 3 C is the flow chart of Frame solidified cell 604.Frame solidified cell 604 realizes receiving destination node Frame FR carry out the function reset.By Frame solidified cell 604, destination node can obtain and send according to source node One group of Frame of time sequencing arrangement.
First aspect, the data receiver queue Q to noderecvJudge, it is judged that whether node have received Frame, If receiving i.e. data receiver queue QrecvIt is not empty, then starts moment point T to the Frame receivedrProcess, take Go out head member in data receiver queue (containing time and data frame information), it is carried out curing operation, to obtain the solidification moment Point Tp;If sky, then return original state, and continue waiting for data receiver queue QrecvIt it is not empty situation.
Second aspect, for data receiver queue QrecvIt is not empty situation, first determines whether according to the frame in Frame FR Type portions determines whether IN frame, if it is, by the IN frame being cured and its solidification moment point TpAccording to solidification moment point Order deposit the data write queue Q of ingressperm;If it is not, then disregard.
The third aspect, for data receiver queue QrecvThe type of middle Frame is the situation of IN frame, further according to node Character types BUserSelect, if node role is compression controller, then enters Frame compression unit 605, start number Process according to squeeze operation;Otherwise, i.e. node role is isochronous controller or sync client, then enter clock correcting module 80, start to revise the local clock of node.
The mode of described curing operation is as shown in FIGURE 3 E.First, maximum delay is transmitted according to dataWith Frame FR Value TC of transparent clockn(assume that destination node is the n-th node, TCnStart to arrive mesh from source node transmission for Frame FR Total time of being experienced of node) calculate the solidification delay time.The solidification delay time is
It is then possible to utilize formulaIt is calculated solidification moment point Tp.Then, root is continued Judge whether the data frame type solidified is IN frame according to the frame type information in Frame FR structure, if it is, will calculate The Frame of overcuring moment point and calculated solidification moment point Tp, according to solidification moment point TpSequencing (time is more Little more before queue) insert the data write queue Q of nodeperm, it is simple to carry out next step operation.Then judge that purpose saves Whether some role's configuration is compression controller, if it is, enter Frame compression unit 605, starts to perform subsequent operation;As Not, then explanation is configured to isochronous controller or sync client to fruit, then enter clock correcting module 80, it is possible to use solidification Frame in queue is for the correction operation of local clock.
Frame compression unit 605
Fig. 3 D show the flow chart of Frame compression unit 605.Frame compression unit 605 mainly realizes Frame Hardening time put the function that is compressed, be the whole network critically important unit of setting up in the time reference of the overall situation.
First aspect, Frame compression unit 605 is according to the Frame after the solidification obtained by Frame solidified cell 604 FR is collected operation.The described mode collecting operation is to be not more than at one(wherein, OW, observed Window, for watch window, by formulaBe calculated) time window data are collected, each node MaintainIndividual enumerator, is used for recording the number of Frame collected in each OW, and idiographic flow is as shown in Figure 3 D (in figure, withAs a example by).
According to the data write queue Q obtained by Frame solidified cell 604permIn header element Qperm[0] comprise in Solidification moment point Tp-0Starting to start Frame compression unit 605, this solidification moment point the earliest is Frame compression unit The starting point of 605 time windows opened, is designated as Tstart(wherein, Tstart=Tp-0), and save it in the compression team of node Row QcompIn, the value of enumerator 1 is set to 1, then, it is judged that data write queue QpermWhether it is the most whether sky (need to take out Frame), if sky, then judge that current time is the most more than Tstart+ 3 × OW, if exceeded, then does not continues to receive Collection Frame, is directly entered data calculation stages, calculates compression moment point;If not being empty, then continue to take out current curing team The header elements of row, it is thus achieved that it solidifies moment point Tp-i, and obtained time value is judged, it may be judged whether meet Tp-i≤ Tstart+OW.If meeting Tp-i≤Tstart+ OW, then illustrate that this Frame meets the requirements, deposited into data compression queue Qcomp, continue data write queue QpermIn whether there is Frame and judge;If being unsatisfactory for Tp-i≤Tstart+ OW, then Judge that whether the value of this hour counter 1 is more than 1.If the value of enumerator 1 is not more than 1, then explanation collection phase terminates, and currently receives To Frame be mistake Frame, abandoned, and entered data calculation stages, utilized data compression queue QcompIn The solidification moment point of Frame calculates compression moment point;If the value of enumerator 1 is more than 1, then opens second and receive window, right Solidification moment point is at (Tstart+OW,Tstart+ 2 × OW] in the range of Frame be collected.If solidification moment point is at (Tstart +OW,Tstart+ 2 × OW] in the range of, then by the number of enumerator 2 record solidification moment point Frame in this range, and will It is deposited into data compression queue Qcomp, continue data write queue QpermIn whether there is Frame and judge;If no In this range, then judge that whether the value of this hour counter 2 is more than or equal to 1.If the value of enumerator 2 is less than 1, then illustrate to collect Stage terminates, and the Frame being currently received is the Frame of mistake, is abandoned, and enters data calculation stages, utilizes data pressure Contracting queue QcompIn Frame solidification moment point calculate compression moment point;If the value of this hour counter 2 is more than or equal to 1, then Open the 3rd and receive window, to solidification moment point at (Tstart+2×OW,Tstart+ 3 × OW] in the range of Frame receive Collection.If solidification moment point is at (Tstart+2×OW,Tstart+ 3 × OW] in the range of, then deposited into data compression queue Qcomp, continue data write queue QpermIn whether there is Frame and judge;If not in this range, then explanation connects Receive is the Frame of mistake, is abandoned, and enters data calculation stages, utilizes data compression queue QcompIn data The solidification moment point of frame calculates compression moment point.Repeat said process, until the time exceedes (in the present embodiment withAs a example by, i.e. until the time exceedes (Tstart+ 3 × OW)).In above process, at time window The Frame inside collected will be stored in the data compression queue Q of node according to the order of solidification moment pointcompIn, often by one Frame puts into data compression queue Qcomp, just revise the local member variable value=current local member variable value of a minor node+ Newcomer's (PCF inner parameter), thus obtain new local member variable value.
Second aspect, after collection process terminates, initially enters calculation stages.According to the solidification collected during collecting Moment point Tp-i(Tp-iRepresent the value of i-th (i >=0) individual solidification moment point) calculate Compression Correction value
The calculation of described Compression Correction value is to calculate according to following calculating formula:
When only one of which inputs, Compression Correction value
Two inputs: D comp _ corr 605 = ( T p - 0 + T p - 1 ) / 2 - T p - 0
Three inputs: D comp _ corr 605 = T p - 1 - T p - 0
Four inputs: D comp _ corr 605 = ( T p - 1 + T p - 2 ) / 2 - T p - 0
Five inputs: D comp _ corr 605 = ( T p - 1 + T p - 2 + T p - 3 ) / 2 - T p - 0
The input of more than five: D comp _ corr 605 = Σ k = 1 n - 2 T p - k / ( n - 2 ) - T p - 0 ( f 0 User = 2 In the case of)
The third aspect, according to second aspect calculated Compression Correction valueCalculate compression moment point
See shown in Fig. 3 G, after having collected all available Frames, calculate according to calculated Compression Correction value The time delay of compression process D comp _ func 605 = ( f 0 User + 1 ) × OW + BD 0 User + D comp _ corr 605 , It is possible to further calculate Obtain compressing moment pointThen, the compression moment that Frame compression unit 605 will calculate PointPass to clock correcting module 80, trigger clock correcting module 80 and carry out the follow-up process about revising local clock.
Fault detect and processing module 70
Described fault detect and processing module 70 realize to data frame check and carry out fault processing, situation to conglomeration is entered Row detects and processes, detects simulation system software operation conditions and the function of the process to mistake.Fault detect and process Simulation run process is detected and carries out and the process corresponding to type of error according to different type of errors by module 70, and The error situation occurred is passed to state management module 40, data processing module 60, clock correcting module 80, result output Module 90.Described conglomeration situation refers to SAEAS6802(Time Triggered Ethernet) middle regulation.
Shown in Figure 1, fault detect and processing module 70 mainly include Frame check errors processing unit 701, with Step conglomeration detection and processing unit 702, asynchronous conglomeration detection and processing unit 703 and software anomaly processing unit 704.Fault is examined Survey and all running during processing module 70 after a node turns whole, be responsible for detection whole during be likely to occur Mistake, and mistake is processed.
Frame check errors processing unit 701: when destination node receives Frame, it is judged that whether data frame format Correctly, if mistake, then entering this unit, the Frame for mistake directly carries out discard processing.
Synchronize conglomeration detection and processing unit 702: detect the conglomeration situation being likely to occur in switching Ethernet, to prevent Occur that the situation that part of nodes synchronizes occurs in switching Ethernet.First aspect, synchronizes conglomeration detection and exists with processing unit 702 (i.e. receive window and close the moment point of window) after Frame selects unit 801 to terminate and select selected by unit 801 according to Frame Conglomeration situation is detected by the value of the newcomer within optimal data frame.Wherein, each node has a local variable Msync, it is used for recording Frame and selects the value of the newcomer within optimal data frame selected by unit 801.Second aspect, with The result that Tong Bu conglomeration is detected by step conglomeration detection with processing unit 702, size M of the most above-mentioned newcomersync, with status threshold Value(when role is configured to isochronous controller) or status threshold values(when role is configured to compression controller) Or status threshold values(when role is configured to sync client) compares, thus the process made is determined conversion to State management module 30.Acted on State Transferring module 40 by state management module 30 node state is changed.General, If synchronizing conglomeration to detect successfully (i.e. newcomer's size is less than threshold value), then there is the situation of conglomeration in explanation, i.e. illustrates to synchronize There is a problem, starting to be reported to state management module 30, state management module 30 triggers State Transferring module 40 by node shape State is return as asynchronous state, waits and again initiates to synchronize suitable opportunity.
Asynchronous conglomeration detection and processing unit 703: the conglomeration situation being likely to occur in detection network, to prevent network The situation that middle part of nodes synchronizes.First aspect, utilizing a size is array M of 2async[2] expection in record different cycles The number of outer Frame.Frame that Frame outside described expection i.e. refers to fail to receive in data selection window and That receive in data selection window that but in Frame, integrated number of cycles is inconsistent with the integrated cycle of present node number According to frame.In the present invention, utilize MasyncFrame number outside the even number integrated cycle expection of [even number] record, utilizes Masync[odd number] Frame number outside the expection of record odd number integrated cycle.Within the whole integrated cycle, asynchronous conglomeration detection performs the most all the time.Second Aspect, the node that isochronous controller and sync client are configured to for role, distribute moment point at FrameAccording to institute Frame number M outside the expection of recordasync[even number] (or Masync[odd number]) and status threshold valuesCompare; Role is configured to the node of compression controller, after Frame selection unit 801 terminates (when i.e. reception window closes window Point), according to Frame number M outside the expection recordedasync[even number] (or Masync[odd number]) and status threshold valuesCompare, if it is expected that outer Frame number Masync[even number] (or Masync[odd number]) more than status threshold Value, then illustrate that asynchronous conglomeration detects successfully, i.e. synchronizes there is a problem, starts to be reported to state management module 30, condition managing Module 30 triggers State Transferring module 50 and node current state is return as asynchronous state, waits that suitable opportunity is sent out again Rise and synchronize.
Software anomaly processing unit 704: this unit mainly processes various situations when software occurs abnormal, when software goes out Now during exception, this unit can be utilized to report to the police, quote error reason, and be shown to user, it is simple to user learns and makes mistakes Situation, meanwhile, also can be switched to result output module 50, export accordingly result, and automatically terminate software running process.
Clock correcting module 80
Seeing shown in Fig. 1, Fig. 4, described clock correcting module 80 realizes the function being modified the local clock of node, The data frame information obtained by data processing module 60 is processed, thus local clock is modified;After correction terminates Correction result and the moment point completing to revise are passed to state management module 30, and state management module 30 will be according to obtained information Act on other module to trigger and the behavior corresponding to present node state;In the case of user's request, clock correction is tied Fruit passes to result output module 50 and exports it;Frame and the temporal information of clock makeover process are passed to fault Detection processes with processing module 70.
Entering clock correcting module after 80s, first node utilizes Frame to select unit 801 to select optimal Frame FRbest(in i.e. receiving window, newcomer is worth maximum Frame);And by this Frame FRbestAnd moment point is when passing to Clock corrected Calculation unit 802, trigger clock corrected Calculation unit 802 utilize selected optimum data frame solidification moment point (when When node is configured to isochronous controller or sync client) or compress moment point (when node is configured to compress controller Time) carry out the calculating of clock correction value, it is thus achieved that the size of clock correction value, and pass it to clock correction performance element 803, Clock correction performance element 803 utilizes the clock correction value obtained to perform moment point in clock correction and performs local clock Revise.Through the oversampling clock correcting module 80 correction to node local clock, local clock error between each node in network Can reach in sufficiently small scope, thus the clock that can reach the overall situation synchronizes.
Frame shown in Figure 4 chooses the flow chart of optimum data frame.Destination node role is configured to synchronize Controller or the situation of sync client, after Frame solidified cell 604 performs to terminate, initially enter clock correcting module 80 In Frame select unit 801.
First aspect, every channel (channel number is designated as j, and total number of channels is designated as J) that node is connected, first determine whether The data write queue Q of nodepermWhether it is empty, if sky, then returns Frame solidified cell 604, wait solidification to be received Good IN frame;If not being empty, then take out data write queue QpermHeader element Qperm[0], its solidification moment point T is recordedp
Second aspect, for data write queue QpermIt is not empty situation, it is judged that the IN frame after the solidification obtained Solidification moment point TpWhether in the reception window ranges of node and determine whether integrated cycle of the IN frame after this solidification with The node current integrated cycle is the most consistent, if it is, effective IN frame that explanation is available with, continues to determine whether it is to receive The IN frame of first received in window;If it is not, then trigger fault detect and processing module 703.
The third aspect, receives the IN frame in window ranges and optimum data frame selecting method according to second aspect, selects The optimum data frame FR of this channelbest-j.The mode of described optimum data frame selecting method is: if the IN frame being currently received Be to receive in window effective IN frame of first received, be then deposited into node relief area, and as reference frame with The IN frame received the most on the same channel compares;If it is not, then can be by its direct and upper ginseng obtained Compare according to frame.If the value of the newcomer of current IN frame is less than reference frame, then abandon current IN frame;Otherwise, i.e. present frame The value of newcomer more than or equal to the value of newcomer of reference frame, then abandon reference frame, preserve current data frame, and as New reference frame.
Fourth aspect, by selected optimal IN frame FRbest-jAnd FRbest-jSolidification moment point Tp-best-jDeposit into number According to Collection Queue Qcoll(aforesaid operations is carried out for each channel), and the assignment again of current integrated cycle to node. If the IN frame that the IN frame after the solidification obtained is not in receiving window ranges or in receiving window but after this solidification The integrated cycle current with node in integrated cycle is the most consistent, then trigger fault detect and processing module 703.
When destination node role is configured to compression controller, after Frame compression unit 605 performs to terminate, Initially enter the Frame in clock correcting module 80 and select unit 801.
First aspect, it is judged that the data compression queue Q of nodecompWhether it is empty, if sky, then returns Frame compression Unit 605, waits the Frame that compression to be received is good;If not being empty, then take out data compression queue QcompHeader element Qcomp [0], its solidification moment point T is recordedq
Second aspect, for data compression queue QcompIt is not empty situation, it is judged that during the compression of the Frame obtained Punctum TqThe integrated cycle of the IN frame in the reception window ranges of node and after determining whether this solidification works as with node The front integrated cycle is the most consistent, if it is, effective IN frame that explanation is available with, it may be judged whether it is to receive reception in window The IN frame of first arrived;If it is not, then trigger fault detect and processing module 703.
The third aspect, receives the IN frame in window ranges and optimum data frame selecting method according to second aspect, selects The optimum data frame FR of this channelbest.The mode of described optimum data frame selecting method is: if the IN frame being currently received is Receive in window effective IN frame of first received, be then deposited into node relief area, and as reference frame therewith After the IN frame received on the same channel compare;If it is not, then can be by its direct and upper reference obtained Frame compares.If the value of the newcomer of current IN frame is less than a upper reference frame obtained, then abandon current IN frame;No Then, i.e. the value of newcomer is more than or equal to the value of the newcomer of reference frame, then abandon a Frame, preserves current data frame, And as new reference frame.
Fourth aspect, by selected optimal IN frame FRbestAnd FRbestCompression moment point Tq-bestDeposit into data Collection Queue Qcoll(aforesaid operations is carried out for each channel), and the assignment again of current integrated cycle to node.As The collection of the IN frame not in receiving window ranges or in receiving window but after this solidification of the IN frame after the compression that fruit is obtained The integrated cycle current with node in one-tenth cycle is the most consistent, then trigger fault detect and processing module 703., then fault detect is triggered With processing module 703.
When destination node role is configured to isochronous controller or sync client: first, following formula is utilized to calculate Go out moment point T of intended recipientschd(it can be appreciated that moment point that local clock is now): T schd = T dp 602 + 2 × E 0 User + D comp _ func 605 + TD C ; Each node is in intended recipient moment point TschdNeighbouring unlatching one Individual a length ofReception window, i.e. receive window ranges beWhen receiving After the IN frame that Frame solidified cell 604 is cured, start to judge solidification moment point T of IN framepWhether at the model receiving window In enclosing, if it is continue to operate on it, if not in receiving window ranges, then abandoning IN frame.Represent FR's Delivery time point,Represent data transmission maximum delay time,Represent the compression calculated according to solidification moment point Correction value, TDCRepresent and distribute time delay.
When destination node is configured to compression controller, when Frame compression unit 605 perform terminate after, start into Enter the Frame in clock correcting module 80 and select unit 801.First, following formula is utilized to calculate the node intended recipient moment to IN frame Point, Tschd(it can be appreciated that moment point that local clock is now): T schd = T dp + E 0 User + D comp _ func 605 + TD C , (wherein, TdpThe start time point of the arbitrary IN frame for receiving) each node open near intended recipient moment point one long Degree isReception window, i.e. receive window ranges beWhen receiving data After the IN frame that frame compression unit 605 has compressed, start to judge whether the time of IN frame is receiving in the range of window, if it is Continue to operate on it, if not in receiving window ranges, then abandoning IN frame.
When destination node is configured to isochronous controller or sync client:
First aspect, selects the data collection queue Q obtained in unit 801 according to FramecollJudge.Judge number According to Collection Queue QcollWhether it is empty, if sky, then illustrates that each internodal clock jitter is too big, operation wouldn't be performed, Enter waiting state;If not being empty, then utilize data collection queue QcollThe solidification moment point of the optimum frame collected by Tp-best-jClock correction value is calculated.Wherein, described data collection queue QcollStorage has in each channel optimal IN frame (there is the value of newcomer of maximum), the optimal solidification moment point of jth channel is Tp-best-j).
Second aspect, utilizes formulaCalculate clock correction valueAnd by clock Correction valuePass to clock correction performance element 803.
When purpose role is configured to compression controller, owing to the present invention being set in each channel acquiescence Only one compression controller of configuration, so, do not exist for the problem of Channel assignment, data collection present in isochronous controller Queue the most only can collect a data element, it is possible to directly utilize this optimal data element and (i.e. have The IN frame of big newcomer's value), it is thus achieved that in this optimal data element with the time T of compression moment pointq-best, it Rear calculating clock correction value And by clock correction valuePass to clock correction hold Row unit 803.
First aspect, clock correction performance element 803 selects the T of unit transmission according to FrameschdWith calculation delay valueObtain clock correction moment point Tclock-corr, and from clock correction moment point Tclock-corrStart to revise local clock tlocal
The calculation of described clock correction moment point is:
Second aspect, node is in clock correction moment point Tclock-corr, to local clock tlocalDoing size isRepair Just, revised local clock is designated as Dtlocal, then clock value is
The third aspect, when being configured to compression controller for destination node role, clock correction performance element 803 exists After clock correction is terminated, at Tq-bestMoment reenters data frame generating unit 601, generates by compression controller as source The Frame of node.
Result output module 50
Shown in Figure 1, result output module 50: main present node state DV being responsible for output nodeUser, clock repaiies On the occasion ofWith revised local clock DtlocalInformation result.
In the present invention, result output module 50 can be civilian with the form of xml formatted file or excel by above-mentioned information Part exports.The formatted file of output is for being directly passed to the routine interface on upper strata, it is simple to upper procedure obtains whether clock is same The information such as step.

Claims (11)

1. simulating the analogue system that switching Ethernet clock synchronizes, this analogue system includes Ethernet protocol director data Storehouse, intervalometer;Described Ethernet protocol instruction database and intervalometer are based on IEEE 802.3 ISO/IEC 8802-3 standard Instruction, state relation information architecture pointed in specification and SAEAS 6802 obtain;It is characterized in that: also include node and Link attribute configuration module (10), synchronize Topology g eneration module (20), state management module (30), State Transferring module (40), Data processing module (60), fault detect and processing module (70), clock correcting module (80) and result output module (50);
Node and link attribute configuration module (10) are according to end system, switch and the end system in actual Ethernet and exchange Physical connection between machine, configures required emulation configuration information D10
Synchronize Topology g eneration module (20) and be used for generating synchronization topology, and export synchronization topology information D20
State management module (30), for being managed the execution behavior of angle of rotation of joint normal complexion node state;
State Transferring module (40) is for switching over node state;Described node state is respectively integrated state, asynchronous shape State, waiting state, flood state, enabled state and synchronous regime;
Data processing module (60) completes the generation of Frame according to present node state, sends, receives, solidifies, compresses;And During carrying out data process, act on the most whether state management module notice state management module receives Frame Type information with Frame;After data write or compression complete, act on clock correcting module, will solidify or compress Frame pass to clock correcting module;In data processing, fault detect and processing module are acted on, by Frame Information pass to fault detect and processing module;By data frame generating unit (601), Frame transmitting element (602), data Frame receives unit (603), Frame solidified cell (604), Frame compression unit (605) composition;
Fault detect and processing module (70), be used for data frame check and carry out fault processing;The situation of conglomeration is examined Survey and process;Detection to simulation run situation processes;By Frame check errors processing unit (701), synchronize conglomeration detection Constitute with processing unit (703) and software anomaly processing unit (704) with processing unit (702), asynchronous conglomeration detection;
Clock correcting module (80), for revising the local clock of node role;Unit (801), clock is selected to repair by Frame Positive computing unit (802) and clock correction performance element (803) are constituted;
Result output module (50), for by current this locality of result, clock correction value size and the node of current state information Clock value exports with the formatted file of xml formatted file or excel;
Described node and link attribute configuration module (10) first aspect are called in Ethernet protocol instruction databaseCome Configuration link informationSecond aspect is called in Ethernet protocol instruction database TDC,TSC,TWC,TRC,Carry out initial assignment, obtain the simulation configurations information after assignment
For internodal physical connection, the identification number of any one node is designated as node;
For the clock accuracy arranged during operating simulation system;
For the integrated Cycle Length arranged during operating simulation system;
For the integrated number of cycles of maximum arranged during operating simulation system;
For the network fault tolerance number arranged during operating simulation system;
TDCFor distributing time delay;
TSCFor sending time delay;
TWCFor the propagation delay time on line;
TRCFor receiving time delay;
Maximum delay time is transmitted for data;
For the clock drift arranged during operating simulation system;
Described synchronization Topology g eneration module (20) first aspect is used for receivingSecond aspect calls ether Node role B in fidonetFido instruction databaseUserWithNode role is carried out according to synchronization mode ConfigurationObtain synchronization topology.
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: state turns After die change block (40) receives the information that state management module (30) is transmitted:
Isochronous controller SMBAfter a node turns, integrated state is initially entered, it is judged that A timing TAThe most whether receive Frame, as Fruit receives, then continue to judge its type;Without receiving, enter asynchronous mode;If the data frame type received is IN Frame, then whether the local member value continuing decision node reaches status threshold valuesIf not IN frame, then judgement is No for CA frame;When the above-mentioned PCF received is IN frame, if the local member value of node reaches status threshold valuesThen enter synchronous regime;If it is not, then entrance waiting state;It not IN frame for the above-mentioned Frame received Situation, if the PCF received is CA frame, then enters waiting state;If it is not, then entrance asynchronous regime;
For at the State Transferring of asynchronous mode: judge whether equally at B timing TBReceive Frame, if received, the most further Judge the data frame type received;Without receiving, then remain in asynchronous mode;If CA frame, then enter and wait shape State;If it is not, then further determine whether as CS frame;If CS frame, then enter flood state;If it is not, be IN Frame, then enter synchronous regime;
State Transferring for waiting state: judge whether that E is at timing T equallyEInside receiving Frame, if received, the most still stopping In waiting state, if it is not, then whether the local member value of decision node reaches status threshold valuesIf node Local member value reaches status threshold valuesThen enter synchronous regime;Without reaching status threshold values Then enter asynchronous mode;
For at the State Transferring of flood state: judge whether equally in the timing length in state management module (30) Receiving PCF, if received, then continuing the type of the PCF that judgement receives;Without receiving, then judge whether to meet configuration Information condition;When receiving PCF in the above-mentioned stipulated time, whether the PCF continuing to judge to receive is CS frame;If It is then to be continually maintained in flood state;If it is not, then determine whether CA frame;If CA frame, then enter waiting state; If it is not, then judge whether to meet configuration information condition;During for the above-mentioned not timing in state management module (30) Receive the situation of PCF in length, if meeting configuration information condition, then entering asynchronous mode, if be unsatisfactory for, then remaining in Flood state;Described timing length and configuration information condition are according under flood state in state management module (30) Depending in;
For at the State Transferring of synchronous regime: to whether detecting conglomeration situation and data receiving queue QrecvWhether receive CA Frame judges, if be detected that showed the situation of conglomeration, then enters asynchronous mode;If it is not, be continually maintained in synchronization State;If receiving CA frame, then enter waiting state;If it is not, be maintained at synchronous regime;For synchronizing control Device SM processedBExecution behavior in integrated state;
Compression controller CMBAfter a node turns, integrated state is initially entered, it is judged that the timing in status processing module (30) Duration D timing TDThe size the most whether receiving newcomer reaches status threshold valuesIN frame, if it is, enter synchronize State;Otherwise, asynchronous mode is entered;For at the State Transferring of asynchronous mode: it is first determined whether receive CS frame or newly become The value of member is more than status threshold valuesCA frame, if it is, enter enabled state;If it is not, then continue judgement it is The size of the no newcomer of receiving reaches status threshold valuesIN frame;If the size receiving newcomer reaches state door Limit valueIN frame, then enter synchronous regime;Without receiving, then remain in asynchronous mode;For enabling shape The State Transferring of state: judge F timing TFThe most whether receive Frame, if it is, remain in enabled state;If it is not, Then enter waiting state;For at the State Transferring of waiting state: judge G timing TGThe size the most whether receiving newcomer reaches Status threshold valuesIN frame, if it is, enter synchronous regime;If it is not, then entrance asynchronous mode;For The State Transferring of synchronous regime: to whether occurring that conglomeration situation detects, if there is conglomeration situation, then enter integrated shape State;If it is not, remain in synchronous regime;
Sync client SCBAfter a node turns, integrated state is initially entered, it may be judged whether the size receiving newcomer reaches shape State threshold valueIN frame, if it is, be i.e. transferred into synchronous regime;Otherwise, integrated state is remained in;For same The State Transferring of step state: to whether occurring that conglomeration situation detects, if there is conglomeration situation, then enter integrated state; If it is not, remain in synchronous regime.
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: Frame Signal generating unit (601) first aspect is according to data frame transfer role MBUser={ SSMB,SCMB,DSMB,DCMB,DSCB,MSCBIn } SSMB,SCMBDynamically generate Protocol Control frame FR;Second aspect is dynamically generated according to status information and state behavioural information Protocol Control frame PCF;
SSMBFor the isochronous controller for transmitting data frame as source node;
SCMBFor the compression controller for transmitting data frame as source node;
DSMBFor the isochronous controller for transmitting data frame as destination node;
DCMBFor the compression controller for transmitting data frame as destination node;
DSCBFor the sync client for transmitting data frame as destination node;
MSCBFor the sync client for transmitting data frame as intermediate node;
Frame transmitting element (602) first aspect is according to data frame transfer role MBUser={ SSMB,SCMB,DSMB,DCMB, DSCB,MSCBMSC in }BCarry out forwarding data frame and receive the Frame that unit (603) receives;Then the 4th and the 5th side is performed Face;Second aspect is according to data frame transfer role MBUser={ SSMB,SCMB,DSMB,DCMB,DSCB,MSCBSSM in }B,SCMB Carry out the FR that receiving data frames signal generating unit (601) exports;The third aspect, the delivery time point of record FRFourth aspect, and FR is added to the data transmit queue Q of nodesendIn;5th aspect, record data distribute TD time delayCPostpone with sending Time TSC, and change transparent clock in FRValue;Then, TD time delay is distributed according to dataC, send time delay TSCAnd formulaObtain leaving the transparent clock of Frame transmitting element (602)
Frame FR that data frame receipt unit (603) sends for receiving data frames transmitting element (602), and will receive Frame is deposited into data receiver queue QVLrecv;First aspect, it is judged that VL receiving queue Q of nodeVLrecvWhether it is empty, if Be not empty, then explanation have received Frame, if sky, then returns original state, waits the arrival of Frame;Second party Face, for above-mentioned VL receiving queue QVLrecvThe situation of non-NULL, whether first determine whether to receive is effective Frame, if It is then Frame to be carried out information retrieval process;If it is not, then trigger fault detect to abandon place with processing module (70) Reason;It is extraction source node and destination node address information that described information retrieval processes, and the time of reception put T in recordr, record is by upper one Node propagation delay time TW on internodal line during being sent to present nodeC, receive TR time delayC, change transparent Clock valueThe mode of described change transparent clock value is according to propagation delay time TW on lineC, receive time delay TRC And formulaObtain leaving the transparent clock value of data frame receipt unit (603)The third aspect carries out operations described below;The source node extracted according to second aspect and destination node address information, sum Role MB is transmitted according to frameUser={ SSMB,SCMB,DSMB,DCMB,DSCB,MSCBDSM in }B,DCMBWhether judge present node For the destination node consistent with destination node address information, if it is, explanation data frame transfer completes, and by Frame FR T is put with the time of reception receiving FRrDeposit the data receiver queue Q of ingressrecvIn, trigger data frame solidified cell (604), proceed by it is carried out curing operation;If not destination node, then Frame FR is passed to present node Frame transmitting element (602), continues data transmission procedure, sends Frame FR to destination node;
The function that the Frame FR that Frame solidified cell (604) realizes receiving destination node resets;Pass through data Frame solidified cell (604), destination node can obtain the one group of Frame sending time sequencing arrangement according to source node;First party Face, the data receiver queue Q to noderecvJudge, it is judged that whether node have received Frame, if receiving several According to receiving queue QrecvIt is not empty, then starts moment point T to the Frame receivedrProcess, take out data receiver queue Middle head member, carries out curing operation to it, to obtain solidification moment point Tp;If sky, then return original state, and continue Wait data receiver queue QrecvIt it is not empty situation;Second aspect, for data receiver queue QrecvIt is not empty situation, first First judge to determine whether IN frame according to the frame-type portion in Frame FR, if it is, consolidated with it by the IN frame being cured Change moment point TpThe data write queue Q of ingress is deposited according to the order of solidification moment pointperm;If it is not, then not locate Reason;The third aspect, for data receiver queue QrecvThe type of middle Frame is the situation of IN frame, further according to the role class of node Type BUserSelect, if node role is compression controller, then enters Frame compression unit (605), start data pressure The process of contracting operation;Otherwise, i.e. node role is isochronous controller or sync client, then enter clock correcting module (80), start to revise the local clock of node;
Frame compression unit (605) mainly realizes putting the function being compressed the hardening time to Frame, is whole network Set up the critically important unit in the time reference of the overall situation;First aspect, Frame compression unit (605) is according to solid by Frame Change the Frame FR after the solidification that unit (604) obtains and be collected operation;Second aspect, after collection process terminates, starts Enter calculation stages;According to solidification moment point T collected during collectingp-iCalculate Compression Correction value3rd Aspect, according to second aspect calculated Compression Correction valueCalculate compression moment point
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: described event Barrier detection and processing module (70) realization to data frame check and carry out fault processing, situation to conglomeration detects and locates Manage, simulation system software operation conditions detected and the function of the process to mistake;
Frame check errors processing unit (701): when destination node receives Frame, it is judged that data frame format is the most just Really, if mistake, then entering this unit, the Frame for mistake directly carries out discard processing;
Synchronize conglomeration detection and processing unit (702): detect the conglomeration situation being likely to occur in switching Ethernet, to prevent out There is the situation that part of nodes synchronizes in existing switching Ethernet;
First aspect, synchronizes conglomeration detection and processing unit (702) foundation Frame after Frame selects unit (801) to terminate Conglomeration situation is detected by the value selecting the newcomer within optimal data frame selected by unit (801);
Wherein, each node has a local variable Msync, it is used for recording Frame and selects selected by unit (801) The value of the newcomer within excellent Frame;
Second aspect, synchronizes the result that Tong Bu conglomeration is detected by conglomeration detection with processing unit (702), and the most above-mentioned newcomer's is big Little Msync, with status threshold valuesOr status threshold valuesOr status threshold valuesCompare, thus The process made is determined that conversion is to state management module (30);State Transferring module is acted on by state management module (30) (40) node state is changed;General, detect successfully if synchronizing conglomeration, then there is the state of conglomeration in explanation, i.e. says Bright synchronization there is a problem, starts to be reported to state management module (30), and state management module (30) triggers State Transferring module (40) node state is return as asynchronous state, wait and again initiate to synchronize suitable opportunity;
Asynchronous conglomeration detection and processing unit (703): the conglomeration situation being likely to occur in detection network, to prevent in network The situation that part of nodes synchronizes;
First aspect, array M utilizing a size to be (2)async[2] Frame outside the interior expection of record different cycles is individual Number;Frame outside described expection i.e. refers to the Frame failing to receive in data selection window and in data selection window That receive that but in Frame, integrated number of cycles is inconsistent with the integrated cycle of present node Frame;Utilize Masync Frame number outside the even number integrated cycle expection of [even number] record, utilizes MasyncOutside the odd number integrated cycle expection of [odd number] record Frame number;Within the whole integrated cycle, asynchronous conglomeration detection performs the most all the time;
Second aspect, the node that isochronous controller and sync client are configured to for role, distribute moment point at FrameAccording to Frame number M outside the expection recordedasync[even number] or Masync[odd number] and status threshold values Compare;Role is configured to the node of compression controller, after Frame selects unit (801) to terminate, according to being remembered Frame number M outside the expection of recordasync[even number] or Masync[odd number] and status threshold valuesCompare, if Frame number M outside expectionasync[even number] or Masync[odd number] is more than status threshold values, then illustrate that asynchronous conglomeration detects into Merit, i.e. synchronizes there is a problem, starting to be reported to state management module (30), state management module (30) triggers State Transferring mould Node state is return as asynchronous state by block (40), waits and again initiates to synchronize suitable opportunity;
Software anomaly processing unit (704): this unit mainly processes various situations when software occurs abnormal, when software occurs Time abnormal, this unit can be utilized to report to the police, quote error reason, and be shown to user, it is simple to user learns feelings of makeing mistakes Condition, meanwhile, also can be switched to result output module (50), export accordingly result, and automatically terminate software running process.
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: clock is repaiied Positive module (80) realizes the function being modified the local clock of node, to the Frame obtained by data processing module (60) Information processes, thus is modified local clock;Revise and after terminating, correction result and the moment point completing to revise are passed Pass state management module (30);
When destination node role is configured to isochronous controller or sync client, when Frame solidified cell (604) After execution terminates, initially enter the inner Frame of clock correcting module (80) and select unit (801);First aspect, for node Every the channel connected, first determines whether the data write queue Q of nodepermWhether it is empty, if sky, then returns Frame Solidified cell (604), waits the IN frame being cured to be received;If not being empty, then take out data write queue QpermHeader element Qperm[0], its solidification moment point T is recordedp;Second aspect, for data write queue QpermIt is not empty situation, it is judged that obtained Solidification moment point T of the IN frame after the solidification obtainedpWhether in the reception window ranges of node and after determining whether this solidification Integrated cycle current with node in integrated cycle of IN frame the most consistent, if it is, effective IN frame that explanation is available with, Continue to determine whether it is to receive in window the IN frame of first received;If it is not, then trigger fault detect and process mould Block (703);The third aspect, receives the IN frame in window ranges and optimum data frame selecting method according to second aspect, selects The optimum data frame FR of this channelbest-j;Fourth aspect, by selected optimal IN frame FRbest-jAnd FRbest-jSolidification time Punctum Tp-best-jDeposit into data collection queue Qcoll, and the assignment again of current integrated cycle to node;If obtained The integrated cycle of the IN frame not in receiving window ranges or in receiving window but after this solidification of the IN frame after solidification and joint The point current integrated cycle is the most consistent, then trigger fault detect and processing module (703).
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: clock is repaiied Positive module (80) realizes the function being modified the local clock of node, to the Frame obtained by data processing module (60) Information processes, thus is modified local clock;Revise and after terminating, correction result and the moment point completing to revise are passed Pass state management module (30);
When destination node role is configured to compression controller, after Frame compression unit (605) performs to terminate, open Begin to enter the inner Frame of clock correcting module (80) and select unit (801);First aspect, it is judged that the data compression queue of node QcompWhether it is empty, if sky, then returns Frame compression unit (605), wait the Frame that compression to be received is good;If no For sky, then take out data compression queue QcompHeader element Qcomp[0], its solidification moment point T is recordedq;Second aspect, for number According to compression queue QcompIt it is not empty situation, it is judged that compression moment point T of the Frame obtainedqWhether at the reception window of node In the range of Kou and determine whether that the integrated cycle current with node in integrated cycle of the IN frame after this solidification is the most consistent, if It is that the effective IN frame being available with then is described, it may be judged whether be to receive in window the IN frame of first received;If no It is then to trigger fault detect and processing module (703);The third aspect, according to second aspect receive the IN frame in window ranges and Optimum data frame selecting method, selects the optimum data frame FR of channelbest;Fourth aspect, by selected optimal IN frame FRbestAnd FRbestCompression moment point Tq-bestDeposit into data collection queue Qcoll, and the weight of current integrated cycle to node New assignment;If the IN frame after the compression obtained is not in receiving window ranges or in receiving window but after this solidification The integrated cycle current with node in integrated cycle of IN frame is the most consistent, then trigger fault detect and processing module (703).
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: clock is repaiied Positive module (80) realizes the function being modified the local clock of node, to the Frame obtained by data processing module (60) Information processes, thus is modified local clock;Revise and after terminating, correction result and the moment point completing to revise are passed Pass state management module (30);
When destination node role is configured to isochronous controller or sync client: first, following formula is utilized to calculate anticipated connecing Moment point T receivedschd:Each node is in intended recipient moment point Tschd Neighbouring unlatching one is a length ofReception window, i.e. receive window ranges beWhen After receiving the IN frame that Frame solidified cell (604) is cured, start to judge solidification moment point T of IN framepWhether receiving In the range of window, if it is continue to operate on it, if not in receiving window ranges, then abandoning IN frame;
Represent the delivery time point of FR;
Represent data transmission maximum delay time;
Represent the Compression Correction value calculated according to solidification moment point;
TDCRepresent and distribute time delay.
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: clock is repaiied Positive module (80) realizes the function being modified the local clock of node, to the Frame obtained by data processing module (60) Information processes, thus is modified local clock;Revise and after terminating, correction result and the moment point completing to revise are passed Pass state management module (30);
When destination node is configured to compression controller, when Frame compression unit (605) perform terminate after, start into Enter the inner Frame of clock correcting module (80) and select unit (801);First, following formula is utilized to calculate node intended recipient to IN frame Moment point, Tschd:Each node is opened near intended recipient moment point Open one a length ofReception window, i.e. receive window ranges beWork as reception After the IN frame that Frame compression unit (605) has compressed, start to judge whether the time of IN frame is receiving in the range of window, If it is continue to operate on it, if not in receiving window ranges, then abandoning IN frame.
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: clock is repaiied Positive module (80) realizes the function being modified the local clock of node, to the Frame obtained by data processing module (60) Information processes, thus is modified local clock;Revise and after terminating, correction result and the moment point completing to revise are passed Pass state management module (30);
When destination node is configured to isochronous controller or sync client, first aspect, select single according to Frame The data collection queue Q obtained in unit (801)collJudge;Judge data collection queue QcollWhether it is empty, if sky, Then illustrate that each internodal clock jitter is too big, operation wouldn't be performed, enter waiting state;If not being empty, then utilize number According to Collection Queue QcollSolidification moment point T of the optimum frame collected byp-best-jClock correction value is calculated;Second Aspect, utilizes formulaCalculate clock correction valueAnd by clock correction valueTransmission To clock correction performance element (803).
The analogue system that simulation switching Ethernet clock the most according to claim 1 synchronizes, it is characterised in that: clock Correcting module (80) realizes the function being modified the local clock of node, to the data obtained by data processing module (60) Frame information processes, thus is modified local clock;Revise correction result and the moment point completing correction after terminating Pass to state management module (30);
When purpose role is configured to compression controller, due to acquiescence only configuration one compression control in each channel Device processed, so, do not exist for the problem of Channel assignment present in isochronous controller, data collection queue the most only can be received Collection is to a data element, it is possible to directly utilize this optimal data element, it is thus achieved that in this optimal data element With the time T of compression moment pointq-best, calculate clock correction value afterwards And will Clock correction valuePass to clock correction performance element (803);First aspect, clock correction performance element (803) foundation Frame selects the T of unit transmissionschdWith calculation delay valueObtain clock correction moment point Tclock-corr, and from clock Revise moment point Tclock-corrStart to revise local clock tlocal;Second aspect, node is in clock correction moment point Tclock-corr, To local clock tlocalDoing size isCorrection, revised local clock is designated as Dtlocal, then clock value isThe third aspect, when being configured to compression controller for destination node role, clock correction is held Row unit (803) is after terminating clock correction, at Tq-bestMoment reenters data frame generating unit (601), generates by pressing Contracting controller is as the Frame of source node.
The analogue system that 11. simulation switching Ethernet clocks according to claim 1 synchronize, it is characterised in that state pipe The management of state is by reason module (30):
First aspect, according to the D synchronizing Topology g eneration module (20)20, State Transferring module (40), data processing module (60), Fault detect and the information in processing module (70) and clock correcting module (80), comprehensively analyze, generate and State Transferring module (40) the execution behavior that the node state in matches;
Second aspect, first aspect the execution behavior obtained is passed to described in the execution behavior that matches refer to, work as state When the node state that modular converter (40) transmits is integrated state: isochronous controller SMBExecution behavior in integrated stateCompression controller CMBExecution behavior in integrated stateSync client SCBHolding of integrated state Every trade is
When the node state that State Transferring module (40) is transmitted is synchronous regime: isochronous controller SMBExecution in synchronous regime BehaviorCompression controller CMBExecution behavior in synchronous regimeSync client SCBIn synchronous regime Execution behavior
When the node state that State Transferring module (40) is transmitted is asynchronous mode: isochronous controller SMBExecution at asynchronous mode BehaviorCompression controller CMBExecution behavior at asynchronous mode
When the node state that State Transferring module (40) is transmitted is waiting state: isochronous controller SMBExecution in waiting state BehaviorCompression controller CMBExecution behavior in waiting state
When the node state that State Transferring module (40) is transmitted is flood state: isochronous controller SMBHolding in flood state Every trade isWhen the node state that State Transferring module (40) is transmitted is enabled state: compression controller CMBMake The execution behavior of energy state
The node of isochronous controller it is configured to firstly, for role:
(A) described isochronous controller SMBExecution behavior in integrated stateRefer to: at A timing TAIn, condition managing mould The data write queue Q that data processing module (60) is transmitted by block (30)permIn element judge, it is judged that the most whether have Data element, if had, determines whether the type of the Frame FR received: if CA frame, then trigger State Transferring module (40) node state is converted to waiting state, and triggers synchronization conglomeration detection with processing unit (702) by MsyncIt is set to 1;As Fruit is IN frame, then continue to judge to synchronize whether member variable reaches status threshold valuesIf reaching, then the state that triggers turns Node state is converted to synchronous regime by die change block (40), and starts trigger data processing module (60) and remember above-mentioned IN frame Record and utilize data processing module (60) to perform the process to IN frame;Will joint if not up to, then triggering State Transferring module (40) Dotted state is converted to waiting state;If A is timing TAAfter end, data write queue QpermIt is still empty, then triggers State Transferring mould Node state is converted to asynchronous regime by block (40), and timing length is set to TB, in trigger data processing module (60) Data frame generating unit (601), starts to generate CS frame, carries out according to the unit order in data processing module (60) afterwards Operation, initiates handshake procedure;
(B) described isochronous controller SMBExecution behavior at asynchronous modeRefer to: at B timing TBIn, data are processed The data write queue Q that module (60) is transmittedpermIn element judge, it is judged that the most whether have data element, if had Then determine whether the data frame type received: if CS frame, then trigger State Transferring module (40) and node state is changed For flood state;If CA frame, then trigger State Transferring module (40) and node state is converted to waiting state, and trigger Synchronize conglomeration detection with processing unit (702) by MsyncIt is set to 1;If IN frame, then continue to judge whether synchronize member variable ReachReach if node synchronizes member variableThen trigger State Transferring module (40) by node state Be converted to synchronous regime, and start trigger data processing module (60) and it is recorded and performs at data processing module (60) Process to IN frame;If not up to, then triggering State Transferring module (40) node state is converted to waiting state;If B is fixed Time TBAfter end, the data write queue Q of nodepermIt is still empty, then triggers State Transferring module (40) and node state is converted to Asynchronous mode, now, the data frame generating unit (601) in trigger data processing module (60), start to generate CS frame, press afterwards Operate according to the unit order in data processing module (60), initiate handshake procedure;
(C) described isochronous controller SMBExecution behavior in flood stateRefer to: state management module 30 is according to joint The variable configuration information setting timing length that point is current;
Described variable configuration information includes flood_recv and closed_window;
At C timing TCIn, the data write queue Q that data processing module (60) is transmittedpermThe element of middle addition judges, Judge the most whether have data element, if it has, then determine whether the PCF frame type received: if CS frame, then trigger shape Node state is set to flood state by state modular converter (40) again;
If CA frame, and being 1 in flood_recv value, closed_window value is under the configuring condition of 0, then trigger state Node state is converted to waiting state by modular converter (40);
At C timing TCAfter end, the data write queue Q of nodepermIt is still empty, then judges flood_recv value and closed_ Window value, if be all 0, then trigger State Transferring module (40) and node state is set to flood state again, and trigger Data processing module (60) sends CA frame, meanwhile, flood_recv is entered as 1;
If flood_recv value is 1, when closed_window value is 0, then at I timing TIIn, continue data processing module (60) the data write queue Q transmittedpermIn element judge, it is judged that the most whether have data element, if it is not, Trigger State Transferring module (40) and node state is set to again flood state, do not carry out State Transferring;
If flood_recv value and closed_window value are all 1, then at J timing TJIn, continue data processing module (60) the data write queue Q transmittedpermIn element judge, it is judged that the most whether have data element, if it is not, Trigger State Transferring module (40) and node state is converted to asynchronous mode, by flood_recv value and closed_window value It is assigned to 0;
(D) described isochronous controller SMBExecution behavior in waiting stateRefer to: at E timing TEIn, data are processed The data write queue Q that module (60) is transmittedpermIn element judge, it is judged that the most whether have data element, if it has, Then determine whether the data frame type received: if CS frame, then trigger State Transferring module (40) and node state is changed For flood state;If CA frame, then trigger State Transferring module (40) and node state is remained in waiting state, and Trigger and synchronize conglomeration detection with processing unit (702) by MsyncIt is set to 1;If data receiver queue QrecvFor sky, and node Local member value reaches status threshold valuesThen trigger State Transferring module (40) to be converted to node state synchronize shape State, the data frame generating unit (601) in trigger data processing module (60), starts to generate newcomer in IN frame, i.e. frame simultaneously The local member value of=node, to initiate synchronizing process;If the local member value of node is not reaching to status threshold valuesThe most then trigger State Transferring module (40) and node state is converted to asynchronous mode;
(E) described isochronous controller SMBExecution behavior in synchronous regimeReferring to: under this state, cold start-up is held Successfully, the clock difference of each node is maintained in the range of set clock accuracy hands;State management module (30) is often Starting point trigger data processing module (60) in individual integrated cycle generates IN frame, and it be transmitted, receive, the operation such as solidification; Trigger clock correcting module (80) and receive the IN frame laggard row clock correction being cured;Trigger fault detect and processing module (70) running is monitored, utilize fault detect conglomeration detection synchronization with processing module (70) and processing unit (702) and asynchronous conglomeration detection with processing unit (703) to whether synchronizing process occurring, the situation of conglomeration detects, and do Go out to process;In synchronous regime, data processing module (60) is by the data write queue Q of transmissionpermThe element of middle addition feeds back to State management module (30) judges, if IN frame, is then continually maintained in synchronous regime, continues subsequent operation;If CA frame, then imply that and currently occur in that nonsynchronous situation, triggers State Transferring module (40) and is converted to node state wait State, starts waiting for again initiating synchronizing process;The problem detected is reported to state by fault detect and processing module (70) Management module (30), detects with processing unit (703) with processing unit (702) or asynchronous conglomeration detection when synchronizing conglomeration detection During the situation of conglomeration, the situation report-back that will appear from triggers State Transferring to state management module (30), state management module (30) Current state is converted to asynchronous mode by module (40);
For being configured to the node of compression controller: beg for according to the different status information that State Transferring module (40) is transmitted Opinion;
(A) described compression controller CMBExecution behavior in integrated stateRefer to: at D timing TDIn, data are processed The data write queue Q that module (60) is transmittedpermIn element judge, it is judged that the most whether have data element, if had Then determine whether the data frame type received: if CS or CA frame, be then considered as situation about should not occur, directly to data Frame abandons;If IN frame, then continue to judge to synchronize whether member variable reaches status threshold valuesIf synchronizing Member variable reaches status threshold valuesThen trigger State Transferring module (40) and node state be converted to synchronous regime, And start trigger data processing module (60) and it is recorded and utilizes data processing module (60) and clock correcting module (80) corresponding operating is carried out;If not up to, then Frame being abandoned;If D is timing TDAfter end, the data write of node Queue QpermIt is still empty, then enters triggering State Transferring module (40) and node state is converted to asynchronous mode;
(B) described compression controller CMBExecution behavior at asynchronous modeRefer to: data processing module (60) is passed The data write queue Q of the node passedpermIn element judge, it is judged that the most whether having data element, if had, entering One step judges the data frame type that receives: if CS frame, or big for CA frame and the member value information of CA frame that receives In status threshold valuesThen trigger State Transferring module (40) and node state is converted to enabled state, and trigger number Data frame generating unit (601) is utilized to generate CS or CA frame according to processing module (60), and according in data processing module (60) Step Frame is generated and sent away;If IN frame, and the value of the newcomer of IN frame is more than status threshold valuesThen trigger State Transferring module (40) and node state is converted to synchronous regime, and trigger data processing module (60) subsequent treatment;If data write queue QpermBe empty, then node rests on asynchronous mode always always;For Compression controller CMBThreshold value from asynchronous mode to synchronous regime;
The described step in data processing module (60) includes: due to the Frame generated and the data frame format received Basically identical, therefore, when generating new Frame, the method taking the PCF internal structure received is modified, amendment The transparent clock territory of this frame is 0, and adds new VL information in data processing, according in data processing module (60) Subsequent step sends back to corresponding destination node;
(C) described compression controller CMBExecution behavior in enabled stateRefer to: at F timing TFIn, data are processed The data write queue Q that module (60) is transmittedpermIn element judge, it is judged that the most whether have data element, if had Then determine whether the data frame type received: if CS or IN frame, be then considered as the situation of mistake, directly Frame entered Row abandons, not operation;If receiving CA frame, then will carry out this CA frame forwarding operation, trigger data processing module (60) Generate CA frame, and according to the step in data processing module (60), Frame is sent;In this case, one is often received CA frame, is carried out forwarding behavior, owing to the Frame generated is basically identical with the data frame format received, therefore, is giving birth to During the Frame of Cheng Xin, the method taking the PCF content received is modified, revise the transparent clock territory of this frame, and Data handling procedure is added new VL, sends back to corresponding purpose joint according to the subsequent step in data processing module (60) Point, in the case of receiving Frame, node remains in current state, does not carry out State Transferring;If at F timing TF After end, node data receiving queue QrecvBe still empty, i.e. do not receive new data, then triggering State Transferring module (40) will joint Dotted state is converted to waiting state;
(D) described compression controller CMBExecution behavior in waiting stateRefer to: at G timing TGIn, data are processed The data write queue Q that module (60) is transmittedpermIn element judge, it is judged that the most whether have data element, if had Then determine whether the data frame type received: if CS or CA frame, be then considered as the situation of mistake, directly Frame entered Row abandons, not operation;If IN frame, and the state of value threshold value of the newcomer of IN frameThe state that then triggers turns Node state is converted to synchronous regime by die change block (40), and trigger data processing module (60) and clock correcting module (80) right Received Frame operates;If G is timing TGAfter end, the data write queue Q of nodepermIn be empty always, i.e. Do not receive new data, then trigger State Transferring module (40) and node state is converted to asynchronous regime;
(E) described compression controller CMBExecution behavior in synchronous regimeRefer to: when being in this state, explanation Cold start-up is shaken hands successfully, and the clock difference of each node is maintained in the range of set clock accuracy;State management module (30) Frame fed back according to data processing module (60) carries out corresponding operating: if receiving CS or CA after solidification Frame, then be considered as the situation of mistake, directly abandon Frame, not operation;If receiving the IN frame after solidification, then touch Sending out the Frame compression unit (605) in data processing module (60), be collected IN frame, compression etc. operates, and when utilizing Clock correcting module (80) carries out clock correction, utilizes fault detect detect with the synchronization conglomeration in processing module (70) and process list Unit (702) and asynchronous conglomeration detection with processing unit (703) to whether synchronizing process occurring, the situation of conglomeration detects, and Handle it;The problem detected is reported to state management module (30) by fault detect and processing module (70), when synchronizing knot When group's detection and processing unit (702) or asynchronous conglomeration detection detect the situation of conglomeration with processing unit (703), will appear from Situation report-back triggers State Transferring module (40) node state changed to state management module (30), state management module (30) For integrated state, thus resume waiting for starting the process synchronized of shaking hands;If it is not detected that the situation of conglomeration, then continue to keep In synchronous regime, locally configured according further to corresponding situation more new node when processing data in data processing module (60) simultaneously Information;
For being configured to the node of sync client: beg for according to the different status information that State Transferring module (40) is transmitted Opinion;
(A) described sync client SCBExecution behavior in integrated stateRefer to: first to data processing module (60) The data write queue Q of transmissionpermIn element judge, it is judged that the most whether have data element, if had, further Judge the data frame type received: if IN frame, then determine whether that it synchronizes whether member variable reaches status threshold valuesIf it is, trigger State Transferring module (40) node state is converted to synchronous regime, and trigger data processes Module (60), processes it according to method when receiving IN frame in data processing module (60), and this locality to node Information carries out certain renewal;If it is not, i.e. fail to reach status threshold valuesThen illustrate also do not have to reach same The state of step, continues trigger data processing module (60), performs corresponding data and forwards operation;If the PCF type received For CS or CA frame, also continue to trigger data processing module (60), perform corresponding data and forward operation;
(B) described sync client SCBExecution behavior in synchronous regimeRefer to: state management module (30) triggers number According to processing module (60), clock correcting module (80) etc., the IN frame received is processed, and during to node current local Clock is modified, and meanwhile, triggers fault detect with processing module (70) to whether occurring that conglomeration situation detects, if gone out Existing, then trigger State Transferring module (40) and current state is converted to integrated state;Otherwise, synchronous regime is stilled remain in;With Time, the current configuration information of node is revised accordingly.
CN201310664838.6A 2013-12-09 2013-12-09 A kind of analogue system simulating the synchronization of switching Ethernet clock Active CN103647682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310664838.6A CN103647682B (en) 2013-12-09 2013-12-09 A kind of analogue system simulating the synchronization of switching Ethernet clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310664838.6A CN103647682B (en) 2013-12-09 2013-12-09 A kind of analogue system simulating the synchronization of switching Ethernet clock

Publications (2)

Publication Number Publication Date
CN103647682A CN103647682A (en) 2014-03-19
CN103647682B true CN103647682B (en) 2016-08-10

Family

ID=50252843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310664838.6A Active CN103647682B (en) 2013-12-09 2013-12-09 A kind of analogue system simulating the synchronization of switching Ethernet clock

Country Status (1)

Country Link
CN (1) CN103647682B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986601B (en) * 2014-05-16 2017-10-10 北京东土科技股份有限公司 A kind of message transmissions time delay acquisition methods and device
CN104009893B (en) * 2014-06-16 2017-03-29 北京航空航天大学 A kind of method that can strengthen clock synchronous fault-tolerant suitable for monitoring inside compression main controller
CN104660477A (en) * 2015-03-02 2015-05-27 中国航空无线电电子研究所 Star topology network constructing method based on time triggered bus
CN106059701B (en) * 2016-08-17 2018-06-08 北京航空航天大学 A kind of clock that Ethernet is triggered by capturing the Protocol Control frame testing time synchronizes the device of correction value
CN106877967B (en) * 2017-03-21 2019-07-16 中车株洲电力机车研究所有限公司 IEEE1588 transparent clock residence time measurement method and its device
CN107342833B (en) * 2017-06-15 2019-03-15 西安微电子技术研究所 A kind of time trigger Ethernet exchanging control method
CN107359952B (en) * 2017-06-15 2019-02-22 西安微电子技术研究所 A kind of clock Dynamic Compression towards time-triggered network
CN107453939B (en) * 2017-06-15 2021-03-23 西安微电子技术研究所 Time-triggered Ethernet solidification point parallel monitoring device
CN109150559B (en) * 2017-06-15 2022-05-31 中国航空工业集团公司洛阳电光设备研究所 Time-triggered Ethernet simulation system
CN107147465B (en) * 2017-06-30 2019-03-01 西安微电子技术研究所 A kind of exchange clock isochronous controller and control method towards time-triggered network
CN107342834B (en) * 2017-06-30 2019-01-04 西安微电子技术研究所 A kind of multi-channel adaptive clock correction algorithm towards time trigger communication
CN108429595B (en) * 2018-01-21 2019-06-21 西安电子科技大学 Switching equipment clock synchronization apparatus and method based on AS6802 standard
CN109150354B (en) * 2018-08-03 2020-01-10 湖南华芯通网络科技有限公司 Method for calculating compression correction value in time-triggered Ethernet
CN110176976B (en) * 2019-06-28 2021-02-09 中车青岛四方车辆研究所有限公司 Train time calibration system and method and time calibration equipment
CN113541991B (en) * 2020-04-20 2022-09-27 中车唐山机车车辆有限公司 Train network control system and communication control method based on time sensitive network
CN111641470B (en) * 2020-05-08 2022-08-02 哈尔滨工程大学 Time consistency synchronization method for distributed simulation
CN112073981B (en) * 2020-08-27 2023-12-22 中国航空无线电电子研究所 Network system integrating uTTE and uAFDX communication modes
CN114006853B (en) * 2021-11-12 2022-12-27 西安云维智联科技有限公司 TTE network switch clock synchronization test method
CN114006852B (en) * 2021-11-12 2022-12-23 西安云维智联科技有限公司 TTE network end node clock synchronization test method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201740864U (en) * 2009-09-30 2011-02-09 广东电网公司电力科学研究院 Digital electric energy meter check device based on simulate traceability method
CN102665237A (en) * 2012-04-24 2012-09-12 北京邮电大学 Simulative Ir interface protocol conformance testing device and interoperability testing method
CN202815819U (en) * 2012-07-30 2013-03-20 中国航天科工集团第三研究院第八三五七研究所 Distributed testing device based on LXI (LAN extensions for instrumentation) bus architecture

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050192788A1 (en) * 2004-02-27 2005-09-01 Hobson Louis B. Simulating processor performance states
US8302043B2 (en) * 2009-09-17 2012-10-30 International Business Machines Corporation Verification of logic circuit designs using dynamic clock gating

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201740864U (en) * 2009-09-30 2011-02-09 广东电网公司电力科学研究院 Digital electric energy meter check device based on simulate traceability method
CN102665237A (en) * 2012-04-24 2012-09-12 北京邮电大学 Simulative Ir interface protocol conformance testing device and interoperability testing method
CN202815819U (en) * 2012-07-30 2013-03-20 中国航天科工集团第三研究院第八三五七研究所 Distributed testing device based on LXI (LAN extensions for instrumentation) bus architecture

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AFDX实时流量的时间确定性中间件接入模型研究;易娟,何锋,王彤;《电光与控制》;20130716;第20卷(第7期);全文 *
一种AFDX网络虚拟链路的路由配置算法;刘成,何锋,王彤,周立;《电光与控制》;20110309;第17卷(第12期);全文 *

Also Published As

Publication number Publication date
CN103647682A (en) 2014-03-19

Similar Documents

Publication Publication Date Title
CN103647682B (en) A kind of analogue system simulating the synchronization of switching Ethernet clock
CN106059701B (en) A kind of clock that Ethernet is triggered by capturing the Protocol Control frame testing time synchronizes the device of correction value
CN111740924B (en) Traffic shaping and routing planning scheduling method of time-sensitive network gating mechanism
CN105991384B (en) The space flight ethernet communication method of compatible time trigger Ethernet and 1553B
CN101645813B (en) Distributed semi-physical network simulation system and controlling method of semi-physical port thereof
CN104660477A (en) Star topology network constructing method based on time triggered bus
CN106850279B (en) Distributed avionics system network collocating method and system, emulator and hardware system
CN109995675A (en) A kind of adaptive industrial ethernet gateway System and method for based on software definition
CN106161117B (en) A kind of analogue system and emulation mode of AFDX network
CN109194433A (en) The implementation method united when based on gigabit AFDX network high-precision time service
Rubin et al. Message delay analysis of multiclass priority TDMA, FDMA, and discrete-time queueing systems
CN107257311A (en) A kind of time triggered communication blended data based on virtual link sends dispatching method
CN108809466A (en) A kind of method of synchronous TTE networks and TTP bus network clocks
Abuteir et al. Simulation environment for time-triggered ethernet
CN103746878B (en) Simulation system for measuring transmission time of SpaceWire data packets
CN101719876A (en) Network communication dispatching method and system
CN105515835B (en) A kind of aerospace TTE network system grade gateways with communication integrity audit function
CN102412954A (en) Clock frequency synchronization method in packet based network
CN103973489A (en) Centralized monitoring system for heterogeneous devices
CN103685248A (en) Process layer tri-play message transport real-time scheduling method
CN108566343A (en) The traffic management of switching port time fire wall based on time triggered interchanger
CN102045256A (en) COTS (Commercial Off-The-Shelf) based bandwidth predistribution guarantee network function demonstration system
CN109104312A (en) A kind of configurable AFDX bus data frame latency device and AFDX data frame time-delay method
Fu et al. Fenglin-i: An open-source time-sensitive networking chip enabling agile customization
Mills et al. Highball: a high speed, reserved-access, wide area network

Legal Events

Date Code Title Description
PB01 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