CN114666179B - FlexRay bus deviation correction value calculation method - Google Patents

FlexRay bus deviation correction value calculation method Download PDF

Info

Publication number
CN114666179B
CN114666179B CN202111275675.3A CN202111275675A CN114666179B CN 114666179 B CN114666179 B CN 114666179B CN 202111275675 A CN202111275675 A CN 202111275675A CN 114666179 B CN114666179 B CN 114666179B
Authority
CN
China
Prior art keywords
value
offset
channel
mvalue
ftm
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
CN202111275675.3A
Other languages
Chinese (zh)
Other versions
CN114666179A (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.)
Xian Microelectronics Technology Institute
Original Assignee
Xian Microelectronics Technology Institute
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 Xian Microelectronics Technology Institute filed Critical Xian Microelectronics Technology Institute
Priority to CN202111275675.3A priority Critical patent/CN114666179B/en
Publication of CN114666179A publication Critical patent/CN114666179A/en
Application granted granted Critical
Publication of CN114666179B publication Critical patent/CN114666179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40241Flexray

Abstract

The invention discloses a calculation method of a FlexRay bus deviation correction value, which can process deviation values of a channel A, a channel B and a channel A, B, calculate a rate deviation correction value and an offset deviation correction value of the deviation values, and correct the calculation; the invention adopts a simple method and combines a recursion method to realize a fault-tolerant median algorithm; the method of the present invention may be used in an FPGA or ASIC circuit.

Description

FlexRay bus deviation correction value calculation method
Technical Field
The invention belongs to the field of integrated circuits, and particularly relates to a calculation method of a FlexRay bus deviation correction value.
Background
Since the time-triggered bus FlexRay bus has been proposed, it is gradually used in various systems due to its high reliability and high real-time characteristics. For a distributed communication system, due to time deviation, transmission delay, various interferences and other factors, it is difficult for each node to maintain clock synchronization in the communication process, so it is important how to maintain the synchronization of the system.
Currently, in most distributed systems, a rate correction value and an offset correction value are typically used in clock synchronization. The patent 'method and system for synchronizing FlexRay clock' designs a method and system for synchronizing FlexRay clock, but the method does not consider the calculation of deviation correction value under the simultaneous working of A channel and B channel, and does not correct the final calculation result.
Disclosure of Invention
The invention aims to overcome the defects, and provides a method for calculating the correction value of the FlexRay bus, which effectively solves the problem of calculating the correction value of the clock under the condition of double channels of the FlexRay bus, corrects the calculation result and can better serve for system synchronization.
In order to achieve the above object, the present invention comprises the steps of:
s1, initializing a measurement state, judging whether a synchronous frame deviation value of a channel A or a channel B is received, if the synchronous frame deviation value of the channel A or the channel B is received independently, storing the deviation value, marking a corresponding channel zCh and a parity attribute zEo of the current period, and then executing a set_zPos state of S2; if the synchronous frame deviation values of the channel A and the channel B are received at the same time, firstly storing the synchronous frame deviation value of the channel A, then storing the synchronous frame deviation value of the channel B, executing the calc_offset state of the S3, and simultaneously assigning zPos to be 0;
s2, the offset value is stored in an offset_ data (zCh) (zEo) (zPos), zCh is used for indicating that the offset value is channel A or channel B, zEo is used for indicating that the period is an odd period or an even period, zPos is position information, meanwhile valid_ data (zch) (zEo) (zPos) is marked as 1, zPos is added with 1, and then the measurement state of S1 is returned;
s3, calculating an offset correction value initial value of offset_mvalue, and judging data and validity of the data in the offset_ data (zCh) (zEo) (zPos) and the valid_ data (zCh) (zEo) (zPos); if only the offset value of channel A is valid, the offset value of channel A is stored in the offset_mvalue; if only the offset value of channel B is valid, the offset value of channel B is stored in the offset_mvalue; if the offset values in both channel A and channel B are valid, the smaller one is selected and stored in the offset_mvalue, and the offset_ftm state of S4 is executed; if all the deviation data are processed, the state machine jumps to the calc_offset_done state of S5 and sets zPos to 0, wherein the result indicates that the deviation data of all the synchronous frames are calculated by using a fault-tolerant median algorithm;
s4, starting a fault-tolerant median algorithm, and calculating a deviation value in the offset_mvalue; after the calculation is completed, adding 1 to the value of the array pointer zPos, and returning to the calc_offset state of S3;
s5, correcting the calculated median value ftm_value, and finally executing the calc_rate state of S6, wherein zPos is assigned to 0;
s6, calculating a rate correction value initial value rate_mvalue, judging the validity of data in offset_ data (zCh) (zEo) (zPos) and valid_ data (zCh) (zEo) (zPos), and executing a rate_ftm state of S7;
if all the deviation data are processed, the fact that the deviation data of all the synchronous frames are calculated by using a fault-tolerant median algorithm is indicated, and the calc_rate_next state of S8 is executed, and zPos is set to 0;
s7, starting a fault-tolerant median algorithm, calculating a deviation value in the rate_mvalue, adding 1 to the value of the array pointer zPos after the calculation is completed, and executing a calc_rate state of S6;
s8, carrying out primary correction on the median value ftm_value calculated synchronously, and executing the calc_rate_done state of S9;
and S9, if the absolute value of the vcorrection_mid is smaller than pRateContrectionOut, performing secondary correction on the vcorrection_mid to finish correction.
The range of the position information zPos is 0 to 15.
In S2, offset_ data (zCh) (zEo) (zPos) is used to store the offset values of different channels, different parity periods and different time slots; valid data (zCh) (zEo) (zPos) is used to indicate whether the offset value is valid.
In S4, the specific method for calculating the offset value in the offset_mvalue by the fault tolerant median algorithm is as follows:
defining three sets of values m0, m1 and m2 and three values n0, n1 and n2;
defining an initial value of mvalue_cnt to be 0, and initializing to m0, m1 and m2 and n0, n1 and n2;
calculation was performed using 4 cycles:
cycle 1: if the value of the offset_mvalue is greater than or equal to m2, assigning the value of the offset_mvalue to m2, otherwise assigning the value of the offset_mvalue to n2;
cycle 2: if m2 is greater than m1, the values of m2 and m1 are swapped; if n2 is less than n1, the values of n2 and n1 are swapped;
cycle 3: if m1 is greater than m0, the values of m1 and m0 are swapped; if n1 is less than n0, the values of n1 and n0 are swapped;
cycle 4: if m2 is greater than m1, the values of m2 and m1 are swapped; if n2 is less than n1, the values of n2 and n1 are swapped;
judging the value of mvalue_cnt:
if mvalue_cnt is 0, the calculation result of the fault-tolerant median algorithm is ftm_value 0;
if mvalue_cnt is less than 3 and greater than 0, ftm_value is (n0+m0)/2;
if mvalue_cnt is 3 or more and less than 8, ftm_value is (n1+m1)/2;
if mvalue_cnt is 8 or more, ftm_value is (n2+m2)/2;
returning to the calcoffset state; the value of mvalue_cnt is increased by 1.
The specific method of S5 is as follows:
if the absolute value of the ftm_value is smaller than the pOffsetCorrectionOut, starting to correct the ftm_value; if no external correction is configured, the offset correction value vOffsetcorrection is ftm_value; if an external forward correction is configured, vOffsetcorrection is the sum of ftm_value and pExternOffsetcorrection; if an external reverse correction is configured, vOffsetCorrect is the difference between ftm_value and pExternOffsetCorrect.
In S6, the method for judging the validity is as follows:
if the offset value of the even period of channel a is valid and the offset value of the even period of channel B is valid, the calculation method of the value of rate_mvalue is as follows:
(channel a odd-numbered period-channel a even-numbered period + channel B odd-channel B even-numbered period)/2;
if only the offset value of the even period of channel A is valid and the offset value of the even period of channel A is valid, the value of rate_mvalue is the difference between the odd period of channel A and the even period of channel A;
if only the offset value of the even period of channel B is valid and the offset value of the even period of channel B is valid, the value of rate_mvalue is the difference between the odd period of channel B and the even period of channel B.
In S8, the method of the initial correction is as follows:
if the ftm_value is greater than pClumterDriftDamp, the modified value vcorrection_mid is ftm_value-pClumterDriftDamp; if ftm_value is less than-pClumterDriftDamping, the corrected value vcorrection_mid is ftm_value+pClumterDriftDamping; otherwise vcorrection_mid is 0.
In S9, the method for performing the secondary correction on the vcorrection_mid is as follows:
if no external correction is configured, the Rate correction value vRatecorrection is vcorrection_mid; if forward correction is configured, vRatecorrection is vcorrection_mid+pExternRatecorrection; if reverse correction is configured, vRateCorrect is vCorrect_mid-pExternRateCorrect.
Compared with the prior art, the method and the device can process the deviation values of the channel A, the channel B and the channel A, B, calculate the rate deviation correction value and the offset deviation correction value of the deviation values, and correct the calculation; the invention adopts a simple method and combines a recursion method to realize a fault-tolerant median algorithm; the method of the present invention may be used in an FPGA or ASIC circuit.
Drawings
FIG. 1 is a state machine diagram of the present invention;
fig. 2 is a flowchart of the calcoffset state;
fig. 3 is a flowchart of the calcrate state.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, the state machines include measurement, set _zpos, calc_ offset, offset _ftm, calc_offset_done, calc_rate, rate_ftm, calc_rate_next, and calc_rate_done9 state machines.
The Measurement is used for detecting whether a synchronous frame is received or not;
set zPos is used to save the offset values of channel a and channel B to offset data (zCh) (zEo) (zPos) and set the offset value position to valid data (zCh) (zEo) (zPos);
calc_offset is used to calculate offset_mvalue from the validity of the channel a and channel B offset values;
the offset_ftm is used for calculation using a fault tolerant median algorithm for the offset_mvalue;
the calc_offset_done is used for correcting the calculation result to obtain a final offset correction value vOffsetcorrection;
the calc_rate is used for calculating rate_mvalue according to the deviation value and the effectiveness of the channel A and the channel B;
the rate_ftm is used for calculating for the rate_mvalue using a fault tolerant median algorithm;
calcoffset next is used for first correction for settlement results;
the calc_offset_done is used for carrying out secondary correction on the result of the primary correction to obtain a final rate correction value vRatecorrection;
the invention defines two three-dimensional arrays of offset data (zCh) (zEo) (zPos) and valid data (zCh) (zEo) (zPos), zCh, wherein the offset value is channel A or channel B, zEo indicates that the period is an odd period or an even period, zPos is position information, and the range is 0-15; wherein offset_ data (zCh) (zEo) (zPos) is used to store offset values for different channels, different parity periods, and different time slots; valid data (zCh) (zEo) (zPos) is used to indicate whether the offset value is valid. Meanwhile, a group of state machines are defined for calculating the deviation correcting value, and the process is as follows:
measurement state: initializing a state machine into a measurement, judging whether a synchronous frame deviation value is received, if the synchronous frame deviation value of a channel A or a channel B is received, storing the deviation value into a register, marking a corresponding channel zCh and a parity attribute zEo of the current period, and then jumping the state machine into a set_zPos state; if the synchronous frame deviation values of the channel A and the channel B are received at the same time, firstly, the synchronous frame deviation value of the channel A is stored, and then, the synchronous frame deviation value of the channel B is stored. When the static segment transmission is over, the state machine jumps to the next calcoffset state, while zPos is assigned 0.
set_zpos state: saving the offset value in offset data (zCh) (zEo) (zPos), marking valid data (ch) (zEo) (zPos) as 1, and adding zPos to 1; and then returns the measurement.
calcoffset state: calculating an offset correction value initial value of offset_mvalue, and judging the validity of data in the offset_ data (zCh) (zEo) (zPos) and the valid_ data (zCh) (zEo) (zPos); if only the offset value of channel A is valid, the offset value of channel A is stored in the offset_mvalue; if only the offset value of channel B is valid, the offset value of channel B is stored in the offset_mvalue; if the deviation values in the channel A and the channel B are valid, selecting the smaller one of the deviation values, and storing the smaller one of the deviation values into an offset_mvalue;
the state machine then jumps into offset_ftm; if all the deviation data are processed, the state machine jumps into calcoffset done and sets zPos to 0, wherein the result indicates that the deviation data of all the synchronous frames are calculated by using a fault-tolerant median algorithm;
referring to fig. 2, a specific method for judging validity of data of the channel a and the channel B is as follows:
judging the relation between the channel A deviation data and the channel B deviation data if the channel A and the channel B are valid deviation data, if the deviation data of the channel A is smaller than the channel B, storing the deviation data of the channel A into an offset_mvalue, otherwise, storing the deviation data of the channel B into the offset_mvalue;
if only the channel A is valid deviation data, saving the deviation data of the channel A into an offset_mvalue;
if only the channel B is valid deviation data, saving the deviation data of the channel A into an offset_mvalue;
the state machine then jumps into offset_ftm; if all the deviation data are processed, the state machine jumps into calcoffset done and sets zPos to 0, which indicates that the deviation data of all the synchronous frames have been calculated using a fault tolerant median algorithm.
offset_ftm state: starting a fault-tolerant median algorithm, and calculating a deviation value in the offset_mvalue; after the calculation is completed, adding 1 to the value of the array pointer zPos, and returning to calc_offset;
specifically, starting a fault-tolerant median algorithm to calculate an offset_mvalue, and defining two groups of values m0, m1 and m2 and three values n0, n1 and n2; defining the initial value of mvalue_cnt as 0, and assigning values of m0, m1 and m2 to be-16000 during initialization; n0, n1 and n2 are each assigned a value of 16000;
calculation was performed using 4 cycles:
cycle 1: if the value of the offset_mvalue is greater than or equal to m2, assigning the value of the offset_mvalue to m2, otherwise assigning the value of the offset_mvalue to n2;
cycle 2: if m2 is greater than m1, the values of m2 and m1 are swapped; if n2 is less than n1, the values of n2 and n1 are swapped;
cycle 3: if m1 is greater than m0, the values of m1 and m0 are swapped; if n1 is less than n0, the values of n1 and n0 are swapped;
cycle 4: if m2 is greater than m1, the values of m2 and m1 are swapped; if n2 is less than n1, the values of n2 and n1 are swapped;
judging the value of mvalue_cnt:
if mvalue_cnt is 0, the calculation result of the fault-tolerant median algorithm is ftm_value 0;
if mvalue_cnt is less than 3 and greater than 0, ftm_value is (n0+m0)/2;
if mvalue_cnt is 3 or more and less than 8, ftm_value is (n1+m1)/2;
if mvalue_cnt is 8 or more, ftm_value is (n2+m2)/2;
the state machine returns to calcoffset; the value of mvalue_cnt is increased by 1.
calcoffset done state: correcting the calculated median value ftm_value, and if the value ftm_value is greater than pOffsetCorrectionOut or the value ftm_value is less than-pOffsetCorrectionOut, indicating that the deviation correction value result is out of range; otherwise, judging whether to set for external correction: if the absolute value of the ftm_value is smaller than the pOffsetCorrectionOut, starting to correct the ftm_value; if no external correction is configured, the offset correction value vOffsetcorrection is ftm_value; if an external forward correction is configured, vOffsetcorrection is the sum of ftm_value and pExternOffsetcorrection; if an external reverse correction is configured, vOffsetCorrect is the difference between ftm_value and pExternOffsetCorrect; finally, the state machine jumps to calc_rate, and zPos is assigned 0.
calcrate state: referring to fig. 3, a rate correction value initial value rate_mvalue is calculated, and firstly, the validity of data in offset_ data (zCh) (zEo) (zPos) and valid_ data (zCh) (zEo) (zPos) is judged; if the offset value of the even period of channel A is valid and the offset value of the even period of channel B is valid, the value of rate_mvalue is (channel A odd period-channel A even period + channel B odd period-channel B even period)/2;
if only the offset value of the even period of channel A is valid and the offset value of the even period of channel A is valid, then rate_mvalue is (channel A odd period-channel A even period);
if only the offset value of the even period of channel B is valid and the offset value of the even period of channel B is valid, then rate_mvalue is (channel B odd period-channel B even period);
the state machine then jumps to rate_ftm; if all the deviation data are processed, the state machine jumps into calcrate next and sets zPos to 0, wherein the result indicates that the deviation data of all the synchronous frames are calculated by using a fault-tolerant median algorithm.
rate_ftm state: starting a fault-tolerant median algorithm, and calculating a deviation value in the rate_mvalue; after the calculation is completed, adding 1 to the value of the array pointer zPos, and returning to the calc_rate;
specifically, calculating the rate_mvalue by using a fault-tolerant median algorithm to obtain the ftm_value, wherein the process is similar to that of the offset_ftm, and m0, m1, m2, n0, n1 and n2 are initialized firstly; after the calculation is completed, the state machine returns to the calc_rate.
calcjrate_next state: performing primary correction on the median ftm_value calculated by synchronization: if ftm_value is greater than pclumterdriftsampling, the corrected value vcorrect_mid is the difference between ftm_value and pclumterdriftsampling; if the ftm_value is less than-pClumterDriftDamp, the corrected value vcorrection_mid is the sum of the ftm_value and pClumterDriftDamp; otherwise, vcorrection_mid is 0; the state machine jumps to calcratdone.
calcrate done state: performing secondary correction on vcorrection_mid: if the absolute value of vcorrection_mid is less than pRateContrectionOut, then begin correcting vcorrection_mid: if no external correction is configured, the Rate correction value vRatecorrection is vcorrection_mid; if forward correction is configured, vRatecorrection is the sum of vcorrection_mid and pExternRatecorrection; if reverse correction is configured, vRatecorrection is the difference between vcorrection_mid and pExternRatecorrection.
The invention is applied to the actual measurement of a plurality of SoC circuits, can finish the calculation and correction of the rate correction value and the offset correction value under the conditions of single channel and double channels, and maintains the clock synchronization of all distributed nodes.

Claims (3)

1. A calculation method of a FlexRay bus deviation correction value is characterized by comprising the following steps:
s1, initializing a measurement state, judging whether a synchronous frame deviation value of a channel A or a channel B is received, if the synchronous frame deviation value of the channel A or the channel B is received independently, storing the deviation value, marking a corresponding channel zCh and a parity attribute zEo of the current period, and then executing a set_zPos state of S2; if the synchronous frame deviation values of the channel A and the channel B are received at the same time, firstly storing the synchronous frame deviation value of the channel A, then storing the synchronous frame deviation value of the channel B, executing the calc_offset state of the S3, and simultaneously assigning zPos to be 0;
s2, the offset value is stored in an offset_ data (zCh) (zEo) (zPos), zCh is used for indicating that the offset value is channel A or channel B, zEo is used for indicating that the period is an odd period or an even period, zPos is position information, meanwhile valid_ data (zch) (zEo) (zPos) is marked as 1, zPos is added with 1, and then the measurement state of S1 is returned;
s3, calculating an offset correction value initial value of offset_mvalue, and judging data and validity of the data in the offset_ data (zCh) (zEo) (zPos) and the valid_ data (zCh) (zEo) (zPos); if only the offset value of channel A is valid, the offset value of channel A is stored in the offset_mvalue; if only the offset value of channel B is valid, the offset value of channel B is stored in the offset_mvalue; if the offset values in both channel A and channel B are valid, the smaller one is selected and stored in the offset_mvalue, and the offset_ftm state of S4 is executed; if all the deviation data are processed, the state machine jumps to the calc_offset_done state of S5 and sets zPos to 0, wherein the result indicates that the deviation data of all the synchronous frames are calculated by using a fault-tolerant median algorithm;
s4, starting a fault-tolerant median algorithm, and calculating a deviation value in the offset_mvalue; after the calculation is completed, adding 1 to the value of the array pointer zPos, and returning to the calc_offset state of S3; the specific method for calculating the deviation value in the offset_mvalue by the fault-tolerant median algorithm is as follows:
defining three sets of values m0, m1 and m2 and three values n0, n1 and n2;
defining mvalue_cnt initial value as 0, and at initialization, m0, m1 and m2 and n0, n1 and n2, using 4 cycles for calculation:
cycle 1: if the value of the offset_mvalue is greater than or equal to m2, assigning the value of the offset_mvalue to m2, otherwise assigning the value of the offset_mvalue to n2;
cycle 2: if m2 is greater than m1, the values of m2 and m1 are swapped; if n2 is less than n1, the values of n2 and n1 are swapped;
cycle 3: if m1 is greater than m0, the values of m1 and m0 are swapped; if n1 is less than n0, the values of n1 and n0 are swapped;
cycle 4: if m2 is greater than m1, the values of m2 and m1 are swapped; if n2 is less than n1, the values of n2 and n1 are swapped;
judging the value of mvalue_cnt:
if mvalue_cnt is 0, the calculation result of the fault-tolerant median algorithm is ftm_value 0;
if mvalue_cnt is less than 3 and greater than 0, ftm_value is (n0+m0)/2;
if mvalue_cnt is 3 or more and less than 8, ftm_value is (n1+m1)/2;
if mvalue_cnt is 8 or more, ftm_value is (n2+m2)/2;
returning to the calcoffset state; the value of mvalue_cnt is increased by 1;
s5, correcting the calculated median value ftm_value, and finally executing the calc_rate state of S6, wherein zPos is assigned to 0, and the specific method is as follows:
if the absolute value of the ftm_value is smaller than the pOffsetCorrectionOut, starting to correct the ftm_value; if no external correction is configured, the offset correction value vOffsetcorrection is ftm_value; if an external forward correction is configured, vOffsetcorrection is the sum of ftm_value and pExternOffsetcorrection; if an external reverse correction is configured, vOffsetcorrection is the difference between ftm_value and pExternOffsetcorrection;
s6, calculating a rate correction value initial value rate_mvalue, judging the validity of data in offset_ data (zCh) (zEo) (zPos) and valid_ data (zCh) (zEo) (zPos), and executing a rate_ftm state of S7;
if all the deviation data are processed, the fact that the deviation data of all the synchronous frames are calculated by using a fault-tolerant median algorithm is indicated, and the calc_rate_next state of S8 is executed, and zPos is set to 0; the method for judging the effectiveness comprises the following steps:
if the offset value of the even period of channel a is valid and the offset value of the even period of channel B is valid, the calculation method of the value of rate_mvalue is as follows:
(channel a odd-numbered period-channel a even-numbered period + channel B odd-channel B even-numbered period)/2;
if only the offset value of the even period of channel A is valid and the offset value of the even period of channel A is valid, the value of rate_mvalue is the difference between the odd period of channel A and the even period of channel A;
if only the deviation value of the even period of the channel B is valid and the deviation value of the even period of the channel B is valid, the value of rate_mvalue is the difference between the odd period of the channel B and the even period of the channel B;
s7, starting a fault-tolerant median algorithm, calculating a deviation value in the rate_mvalue, adding 1 to the value of the array pointer zPos after the calculation is completed, and executing a calc_rate state of S6; the method comprises the following specific steps:
calculating the rate_mvalue by using a fault-tolerant median algorithm to obtain an ftm_value, wherein the process is similar to that of an offset_ftm, and m0, m1, m2 and n0, n1 and n2 are initialized firstly; returning the state machine to the calc_rate after the calculation is completed;
s8, carrying out primary correction on the median value ftm_value calculated synchronously, and executing the calc_rate_done state of S9; the method for primary correction is as follows:
if the ftm_value is greater than pClumterDriftDamp, the modified value vcorrection_mid is ftm_value-pClumterDriftDamp; if ftm_value is less than-pClumterDriftDamping, the corrected value vcorrection_mid is ftm_value+pClumterDriftDamping; otherwise, vcorrection_mid is 0;
s9, if the absolute value of the vcorrection_mid is smaller than pRateContrectionOut, performing secondary correction on the vcorrection_mid to finish correction; the method for performing the secondary correction on the vcorrection_mid is as follows:
if no external correction is configured, the Rate correction value vRatecorrection is vcorrection_mid; if forward correction is configured, vRatecorrection is vcorrection_mid+pExternRatecorrection; if reverse correction is configured, vRateCorrect is vCorrect_mid-pExternRateCorrect.
2. The method for calculating a FlexRay bus error correction according to claim 1, wherein the location information zPos ranges from 0 to 15.
3. The method for calculating the offset value of the FlexRay bus according to claim 1, wherein in S2, offset_ data (zCh) (zEo) (zPos) is used for storing offset values of different channels, different parity periods and different time slots;
valid data (zCh) (zEo) (zPos) is used to indicate whether the offset value is valid.
CN202111275675.3A 2021-10-29 2021-10-29 FlexRay bus deviation correction value calculation method Active CN114666179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111275675.3A CN114666179B (en) 2021-10-29 2021-10-29 FlexRay bus deviation correction value calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111275675.3A CN114666179B (en) 2021-10-29 2021-10-29 FlexRay bus deviation correction value calculation method

Publications (2)

Publication Number Publication Date
CN114666179A CN114666179A (en) 2022-06-24
CN114666179B true CN114666179B (en) 2023-06-27

Family

ID=82026025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111275675.3A Active CN114666179B (en) 2021-10-29 2021-10-29 FlexRay bus deviation correction value calculation method

Country Status (1)

Country Link
CN (1) CN114666179B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457685A (en) * 2012-05-29 2013-12-18 中国科学院沈阳自动化研究所 Method for precisely synchronizing time of industrial wireless network on basis of prediction and compensation

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1624620B1 (en) * 2004-08-05 2010-05-05 Robert Bosch Gmbh FlexRay communication controller
EP2064823A2 (en) * 2006-09-06 2009-06-03 Nxp B.V. Cluster coupler unit and method for synchronizing a plurality of clusters in a time-triggered network
DE102015014210B4 (en) * 2015-11-04 2019-04-25 Audi Ag Network management for a two-channel FlexRay network
CN105680977B (en) * 2016-04-18 2018-07-17 湖南工程学院 The method and system of synchronous FlexRay clocks
CN107342834B (en) * 2017-06-30 2019-01-04 西安微电子技术研究所 A kind of multi-channel adaptive clock correction algorithm towards time trigger communication

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457685A (en) * 2012-05-29 2013-12-18 中国科学院沈阳自动化研究所 Method for precisely synchronizing time of industrial wireless network on basis of prediction and compensation

Also Published As

Publication number Publication date
CN114666179A (en) 2022-06-24

Similar Documents

Publication Publication Date Title
CN102998970B (en) High-precision time hack synchronizing method based on CRIO platform
EP3145112B1 (en) Method and device for compensating phase deviation
CN103366714A (en) Synchronous display method and system for tiled display device
US20200366397A1 (en) High-precision time synchronization method
CN105306159A (en) Clock timestamp compensation method and clock timestamp compensation device
CN114666179B (en) FlexRay bus deviation correction value calculation method
CN105680977B (en) The method and system of synchronous FlexRay clocks
JP6261822B2 (en) Time synchronization apparatus, time synchronization system, and time synchronization method
CN112765073A (en) Data sampling method, system, storage medium and computer equipment
CN103414532A (en) Clock synchronization method
US8897289B2 (en) Node system and supervisory node
CN109525347B (en) Method for synchronizing time and device
CN115567143A (en) High precision time synchronization method, apparatus, system and medium for data acquisition system
JP2010074211A (en) Clock synchronization circuit, electronic control unit, onboard network system and clock synchronization method
CN110289929B (en) Network synchronization method
CN108549329B (en) Method and device for realizing uniform pulse output based on FPGA
CN105634638B (en) Synchronous parameter multi-burst joint estimation method and system applied to time division multiplexing burst communication system
US11962677B2 (en) System and method for clock resynchronization
CN116339995A (en) Method, system and terminal for implementing parallel arbitration
CN102064826A (en) All-digital clock generation circuit and all-digital clock generation method
IT202000013222A1 (en) CLOCK RECOVERY PROCESS, CORRESPONDING CIRCUIT AND SYSTEM
TW444482B (en) Clock recovery circuit
CN116961812A (en) Time synchronization method, device, equipment and storage medium
JP2016092632A (en) Data transmission/reception system, data transmission device, data reception device, data transmission/reception method, and program
CN101039174B (en) Method and device for demapping a tributary recovering lower order synchronism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant