logo资料库

AUTOSAR_SWS_TimeSyncOverEthernet.pdf

第1页 / 共110页
第2页 / 共110页
第3页 / 共110页
第4页 / 共110页
第5页 / 共110页
第6页 / 共110页
第7页 / 共110页
第8页 / 共110页
资料共110页,剩余部分请下载后查看
1 Introduction and functional overview
2 Acronyms, Abbreviations and Definitions
3 Related documentation
3.1 Input documents
3.2 Related specification
4 Constraints and assumptions
4.1 Limitations
4.2 Accuracy
4.3 Applicability to car domains
5 Dependencies to other modules
5.1 File structure
5.1.1 Code file structure
6 Requirements Tracing
7 Functional specification
7.1 Overview
7.1.1 General
7.1.2 VLAN Support
7.2 Initialization
7.3 Handling of different Virtual Local Time sources
7.4 Debounce Time
7.5 Pdelay Protocol for Latency Calculation
7.5.1 Pdelay Message Transmission
7.5.2 Pdelay Message Reception
7.6 Message Format
7.6.1 Sync and Follow_Up acc. to IEEE 802.1AS
7.6.2 Sync and Follow_Up acc. to AUTOSAR
7.6.2.1 Follow_Up Message Header [AUTOSAR]
7.6.2.2 AUTOSAR TLV Sub-TLV's
7.7 Acting as Time Master
7.7.1 Message processing
7.7.1.1 Runtime Error detection
7.7.1.2 Frame Debouncing
7.7.1.3 Immediate Time Synchronization
7.7.1.4 Secure Time Synchronization
7.7.2 Link State and Transmission Mode
7.7.3 Message Field Calculation and Assembling
7.7.3.1 SGW Calculation
7.7.3.2 OFS Calculation
7.7.3.3 CRC Calculation
7.7.3.4 Sequence Counter (sequenceId) Calculation
7.7.3.5 ICV Generation
7.7.3.6 Message Assembling
7.8 Acting as Time Slave
7.8.1 Message processing
7.8.1.1 Runtime Error detection
7.8.1.2 Frame Debouncing
7.8.1.3 Secure Time Synchronization
7.8.2 Message Field Validation and Disassembling
7.8.2.1 SGW Calculation
7.8.2.2 OFS Calculation
7.8.2.3 CRC Validation
7.8.2.4 Sequence Counter (sequenceId) Validation
7.8.2.5 ICV Verification
7.8.2.6 Message Disassembling
7.9 Time Recording
7.9.1 Time Validation
7.9.1.1 Recording of Pdelay Measurement
7.10 Security Events
7.11 Error Classification
7.11.1 Development Errors
7.11.2 Runtime Errors
7.11.3 Transient Faults
7.11.4 Production Errors
7.11.5 Extended Production Errors
8 API specification
8.1 API
8.1.1 Imported types
8.1.2 Type definitions
8.1.2.1 EthTSyn_ConfigType
8.1.2.2 EthTSyn_TransmissionModeType
8.1.3 Function definitions
8.1.3.1 EthTSyn_Init
8.1.3.2 EthTSyn_GetVersionInfo
8.1.3.3 EthTSyn_SetTransmissionMode
8.1.3.4 EthTSyn_SetProtocolParam
8.1.3.5 EthTSyn_GetProtocolParam
8.1.4 Call-back notifications
8.1.4.1 EthTSyn_RxIndication
8.1.4.2 EthTSyn_TxConfirmation
8.1.4.3 EthTSyn_TrcvLinkStateChg
8.1.4.4 EthTSyn_IcvGenerationIndication
8.1.4.5 EthTSyn_IcvVerificationIndication
8.1.5 Scheduled functions
8.1.5.1 EthTSyn_MainFunction
8.1.6 Expected Interfaces
8.1.6.1 Mandatory Interfaces
8.1.6.2 Optional Interfaces
9 Sequence diagrams
9.1 EthIf_EnableEgressTimeStamp
9.2 Time Synchronization Sequence
9.3 Pdelay Measurement Sequence
9.4 EthTSyn Egress Timestamping
9.5 EthTSyn Ingress Timestamping
9.6 Time measurement with Switches
9.6.1 Time Aware Bridge with GTM as Management CPU - Tx
9.6.2 Time Aware Bridge without GTM as Management CPU - Tx
9.6.3 Time Aware Bridge without GTM as Management CPU - Rx
9.7 Secure Time Synchronization Sequence
10 Configuration specification
10.1 How to read this chapter
10.2 Containers and configuration parameters
10.2.1 EthTSyn
10.2.2 EthTSynGeneral
10.2.3 EthTSynSecurityEventRefs
10.2.4 EthTSynGlobalTimeDomain
10.2.5 EthTSynGlobalTimeFollowUpDataIDList
10.2.6 EthTSynGlobalTimeFollowUpDataIDListElement
10.2.7 EthTSynPortConfig
10.2.8 EthTSynPortRole
10.2.9 EthTSynPdelayConfig
10.2.10 EthTSynGlobalTimeMaster
10.2.11 EthTSynCrcTimeFlagsTxSecured
10.2.12 EthTSynGlobalTimeTxIcvGeneration
10.2.13 EthTSynGlobalTimeSlave
10.2.14 EthTSynCrcFlagsRxValidated
10.2.15 EthTSynGlobalTimeRxIcvVerification
10.3 Constraints
10.4 Published Information
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 Document Title Document Owner Specification of Time Synchronization over Ethernet AUTOSAR Document Responsibility AUTOSAR Document Identification No 676 Document Status published Part of AUTOSAR Standard Classic Platform Part of Standard Release R22-11 Document Change History Date Release Changed by 2022-11-24 R22-11 AUTOSAR Release Management 2021-11-25 R21-11 AUTOSAR Release Management 2020-11-30 R20-11 AUTOSAR Release Management corrections corrected requirments Description • Support for "Secured Time • AUTOSAR TLV processing enhanced • Several minor clarifications and Synchronization" added • Origin Time Stamp calculation • Sync reception delay corrected • Sequence Counter specified • Removed De-Init and re-Init • New parameter for handling of Sequence Counter jumps introduced • Migration to Latex Based document • Clarification of Follow_Up information TLV message • Clarification of Safety validation • Sequence Counter specified • Improvement the structure of the • Clarification of EthTSynPortConfig Error classification service interface 1 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 • Time Validation (draft) • Clarification regarding cyclic operation entry after timebase startup and reception of User Bytes • Clarification regarding transmission • Clarified SGW value handling for • Changed Document Status from missing Sub-TLVs Final to published • Modifications to enhance precision of • Split into FO Protocol Spec and CP Global Time Synchronization SWS unexpected Sub-TLVs • Clarification of handling of • Clarification for configuration • Clarification of handling FUP parameter messages switches added • Resident time compensation for • AUTOSAR specific TLV added • Interface to StbM and EthIf reworked (incl. support for immediate Timesync message transmission) • Various enhancements and corrections (e.g. postbuild configuration) • TSyn_SetTransmissionMode • Call of StbM_UpEthSetGlobalTime() changed to return "void" added - sequence diagrams corrected • ’const’ added to input arguments passed by pointer • Initial release 2019-11-28 R19-11 AUTOSAR Release Management 2018-10-31 4.4.0 2017-12-08 4.3.1 AUTOSAR Release Management AUTOSAR Release Management 2016-11-30 4.3.0 AUTOSAR Release Management 2015-07-31 4.2.2 2014-10-31 4.2.1 AUTOSAR Release Management AUTOSAR Release Management 2 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 Disclaimer This work (specification and/or software implementation) and the material contained in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the companies that have contributed to it shall not be liable for any use of the work. The material contained in this work is protected by copyright and other types of intel- lectual property rights. The commercial exploitation of the material contained in this work requires a license to such intellectual property rights. This work may be utilized or reproduced without any modification, in any form or by any means, for informational purposes only. For any other purpose, no part of the work may be utilized or reproduced, in any form or by any means, without permission in writing from the publisher. The work has been developed for automotive applications only. developed, nor tested for non-automotive applications. It has neither been The word AUTOSAR and the AUTOSAR logo are registered trademarks. 3 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 Contents 1 Introduction and functional overview 2 Acronyms, Abbreviations and Definitions 3 Related documentation 3.1 3.2 Input documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Constraints and assumptions 4.1 4.2 4.3 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applicability to car domains . . . . . . . . . . . . . . . . . . . . . . . . 5 Dependencies to other modules 5.1 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 6 Requirements Tracing 7 Functional specification 7.2 7.3 7.4 7.5 7.6 Message Format 7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.1 7.1.2 VLAN Support . . . . . . . . . . . . . . . . . . . . . . . . . . Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handling of different Virtual Local Time sources . . . . . . . . . . . . . Debounce Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pdelay Protocol for Latency Calculation . . . . . . . . . . . . . . . . . 7.5.1 Pdelay Message Transmission . . . . . . . . . . . . . . . . . Pdelay Message Reception . . . . . . . . . . . . . . . . . . . 7.5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sync and Follow_Up acc. to IEEE 802.1AS . . . . . . . . . . Sync and Follow_Up acc. to AUTOSAR . . . . . . . . . . . . Follow_Up Message Header [AUTOSAR] . . . . . . AUTOSAR TLV Sub-TLV’s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message processing . . . . . . . . . . . . . . . . . . . . . . . Runtime Error detection . . . . . . . . . . . . . . . . Frame Debouncing . . . . . . . . . . . . . . . . . . . Immediate Time Synchronization . . . . . . . . . . . Secure Time Synchronization . . . . . . . . . . . . . Link State and Transmission Mode . . . . . . . . . . . . . . . Message Field Calculation and Assembling . . . . . . . . . . SGW Calculation . . . . . . . . . . . . . . . . . . . . OFS Calculation . . . . . . . . . . . . . . . . . . . . CRC Calculation . . . . . . . . . . . . . . . . . . . . Acting as Time Master 7.7.1 7.6.2.1 7.6.2.2 7.7.1.1 7.7.1.2 7.7.1.3 7.7.1.4 7.7.3.1 7.7.3.2 7.7.3.3 7.6.1 7.6.2 7.7 7.7.2 7.7.3 7 9 10 10 10 11 11 12 12 13 15 15 16 21 21 21 21 21 22 22 23 23 24 25 25 26 26 26 27 27 29 29 30 30 32 33 33 33 33 4 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 7.8 7.9 7.8.2 7.8.1.1 7.8.1.2 7.8.1.3 7.7.3.4 7.7.3.5 7.7.3.6 Sequence Counter (sequenceId) Calculation . . . . ICV Generation . . . . . . . . . . . . . . . . . . . . . Message Assembling . . . . . . . . . . . . . . . . . . Acting as Time Slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.8.1 Message processing . . . . . . . . . . . . . . . . . . . . . . . Runtime Error detection . . . . . . . . . . . . . . . . Frame Debouncing . . . . . . . . . . . . . . . . . . . Secure Time Synchronization . . . . . . . . . . . . . Message Field Validation and Disassembling . . . . . . . . . SGW Calculation . . . . . . . . . . . . . . . . . . . . OFS Calculation . . . . . . . . . . . . . . . . . . . . CRC Validation . . . . . . . . . . . . . . . . . . . . . Sequence Counter (sequenceId) Validation . . . . . ICV Verification . . . . . . . . . . . . . . . . . . . . . Message Disassembling . . . . . . . . . . . . . . . . Time Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Time Validation . . . . . . . . . . . . . . . . . . . . . . . . . . 7.9.1 . . . . . . . . . . 7.10 Security Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.11 Error Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Development Errors . . . . . . . . . . . . . . . . . . . . . . . Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . Production Errors . . . . . . . . . . . . . . . . . . . . . . . . Extended Production Errors . . . . . . . . . . . . . . . . . . . 7.8.2.1 7.8.2.2 7.8.2.3 7.8.2.4 7.8.2.5 7.8.2.6 Recording of Pdelay Measurement 7.11.1 7.11.2 7.11.3 7.11.4 7.11.5 7.9.1.1 8 API specification 8.1 8.1.3 8.1.2.1 8.1.2.2 8.1.3.1 8.1.3.2 8.1.3.3 8.1.3.4 8.1.3.5 API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Imported types . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 8.1.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . EthTSyn_ConfigType . . . . . . . . . . . . . . . . . . EthTSyn_TransmissionModeType . . . . . . . . . . . Function definitions . . . . . . . . . . . . . . . . . . . . . . . EthTSyn_Init . . . . . . . . . . . . . . . . . . . . . . EthTSyn_GetVersionInfo . . . . . . . . . . . . . . . . EthTSyn_SetTransmissionMode . . . . . . . . . . . EthTSyn_SetProtocolParam . . . . . . . . . . . . . . EthTSyn_GetProtocolParam . . . . . . . . . . . . . . Call-back notifications . . . . . . . . . . . . . . . . . . . . . . EthTSyn_RxIndication . . . . . . . . . . . . . . . . . EthTSyn_TxConfirmation . . . . . . . . . . . . . . . EthTSyn_TrcvLinkStateChg . . . . . . . . . . . . . . EthTSyn_IcvGenerationIndication . . . . . . . . . . . EthTSyn_IcvVerificationIndication . . . . . . . . . . . Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . EthTSyn_MainFunction . . . . . . . . . . . . . . . . 8.1.4.1 8.1.4.2 8.1.4.3 8.1.4.4 8.1.4.5 8.1.5.1 8.1.5 8.1.4 34 34 34 34 34 37 37 38 40 40 40 40 41 41 41 41 41 43 45 45 46 46 46 46 47 48 48 48 49 49 49 49 49 50 50 51 52 52 53 54 54 55 56 56 57 5 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 8.1.6 9 Sequence diagrams 10 Configuration specification 9.1 9.2 9.3 9.4 9.5 9.6 9.7 Expected Interfaces . . . . . . . . . . . . . . . . . . . . . . . Mandatory Interfaces . . . . . . . . . . . . . . . . . . Optional Interfaces . . . . . . . . . . . . . . . . . . . 8.1.6.1 8.1.6.2 EthIf_EnableEgressTimeStamp . . . . . . . . . . . . . . . . . . . . . . Time Synchronization Sequence . . . . . . . . . . . . . . . . . . . . . Pdelay Measurement Sequence . . . . . . . . . . . . . . . . . . . . . . EthTSyn Egress Timestamping . . . . . . . . . . . . . . . . . . . . . . EthTSyn Ingress Timestamping . . . . . . . . . . . . . . . . . . . . . . Time measurement with Switches . . . . . . . . . . . . . . . . . . . . . 9.6.1 Time Aware Bridge with GTM as Management CPU - Tx . . Time Aware Bridge without GTM as Management CPU - Tx . 9.6.2 9.6.3 Time Aware Bridge without GTM as Management CPU - Rx Secure Time Synchronization Sequence . . . . . . . . . . . . . . . . . 57 57 57 60 60 61 63 64 65 67 67 69 70 71 72 72 10.1 How to read this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . 72 10.2 Containers and configuration parameters . . . . . . . . . . . . . . . . . 72 EthTSyn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 EthTSynGeneral . . . . . . . . . . . . . . . . . . . . . . . . . 78 EthTSynSecurityEventRefs . . . . . . . . . . . . . . . . . . . 79 EthTSynGlobalTimeDomain . . . . . . . . . . . . . . . . . . 82 EthTSynGlobalTimeFollowUpDataIDList . . . . . . . . . . . . 84 EthTSynGlobalTimeFollowUpDataIDListElement . . . . . . . 85 EthTSynPortConfig . . . . . . . . . . . . . . . . . . . . . . . 87 EthTSynPortRole . . . . . . . . . . . . . . . . . . . . . . . . 88 EthTSynPdelayConfig . . . . . . . . . . . . . . . . . . . . . . 91 EthTSynGlobalTimeMaster . . . . . . . . . . . . . . . . . . . 96 EthTSynCrcTimeFlagsTxSecured . . . . . . . . . . . . . . . EthTSynGlobalTimeTxIcvGeneration . . . . . . . . . . . . . 98 EthTSynGlobalTimeSlave . . . . . . . . . . . . . . . . . . . . 100 EthTSynCrcFlagsRxValidated . . . . . . . . . . . . . . . . . 106 EthTSynGlobalTimeRxIcvVerification . . . . . . . . . . . . . 108 10.3 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 10.4 Published Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 10.2.1 10.2.2 10.2.3 10.2.4 10.2.5 10.2.6 10.2.7 10.2.8 10.2.9 10.2.10 10.2.11 10.2.12 10.2.13 10.2.14 10.2.15 6 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 1 Introduction and functional overview The EthTSyn module handles the Time Synchronization Protocol on Ethernet as spec- ified in [1, PRS-TimeSyncProtocol]. In addition to what is specified in [1, PRS Time Synchronization Protocol] the EthTSyn module supports the following features: • Debouncing of Timesync PDUs to avoid that a PDU with higher priority blocks those with lower priority • "Immediate" transmission of Time Synchronization messages for fast (re-) syn- chronization of a Time Master and a Time Slave The EthTSyn is tightly coupled to the Synchronized Time-Base Manager (StbM; refer to [2, SWS-SynchronizedTimeBaseManager]), which is responsible for interpolating (a local instance of) a Synchronized Time Base between the reception of 2 consecutive Sync messages for that Time Base. The StbM also provides the service interface for Time Synchronization to the application. Figure 1 shows the Time Synchronization related modules in the AUTOSAR Layered Architecture. Figure 1.1: Timesync modules in the AUTOSAR Layered Architecture The EthTSyn supports securing the global net communication bus. time messages on the Ether- The figure below shows the time provider mod- 7 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
Specification of Time Synchronization over Ethernet AUTOSAR CP R22-11 ules interface with the security modules in the AUTOSAR Layered Architecture. Figure 1.2: Timesync modules interface with security modules in the AUTOSAR Layered Architecture 8 of 110 Document ID 676: AUTOSAR_SWS_TimeSyncOverEthernet
分享到:
收藏