Option .Scope Automated Physical Layer Analysis with CAPL
Transcript of Option .Scope Automated Physical Layer Analysis with CAPL
2019-03-12
Automated Physical Layer Analysis with CAPL
Option .Scope
u Use Cases
Product Concept
Hardware Prerequisites
Trigger Overview
CAPL Functions
Test Workflow
Agenda
2/26
u Analysis and triggering of CAN FD, FlexRay und LIN
u Detection and triggering protocol errors (e.g. CAN Error Frames)
u Analysis of PSI5- and SENT-signals (VT-System)
u Use IO-Triggers for arbitrary waveforms of signals (pulse- / edge trigger)
u ECU conformance tests according to OEM specifications
u Proof of network design concepts (bus topology, cable capabilities, termination resistors)
u Tracing EMC problems and other physical effects (reflections, ringing, crosstalk)
u Automated analysis using eye diagrams, serial bitmask analysis and time transition measurements
(edges)
Use Cases in Automotive Development
Use Cases
3/26
Use Cases
u Product Concept
Hardware Prerequisites
Trigger Overview
CAPL Functions
Test Workflow
Agenda
4/26
Option .Scope integrated in CANoe/CANalyzer
Product Concept
Delays
Timebase-Controller
CAN_H
CAN_L
CAN_H
CAN_L
CAN-Bus
CANoe / CANalyzer
u Trace logical bus data
u Debugging
u Test Environment
RRS-BitIdentifier 0x64
0 0 0 0S1 11 0 0 0 0 0
Scope HW
u Time Base, Sampling Rate
u Measure Voltage, Trigger
u Optional Frame Parser(CAN,CANFD…)
Timebase-Oscilloscope
CAN Interface HW
u Time Base
u HW Sync
u Logical Interpretation(0,1,0,0,1,1,1..)
Trigger Time SYNC
Timebase-Controller
RRS-BitIdentifier 0x64
0 0 0 0S1 11 0 0 0 0 0
Timebase-Controller
RRS-BitIdentifier 0x64
0 0 0 0S1 11 0 0 0 0 0
5/26
Use Cases
Product Concept
u Hardware Prerequisites
Trigger Overview
CAPL Functions
Test Workflow
Agenda
6/26
u Vector PicoScope 5444D-034
u 4 Channels (e.g. 2xCAN, 4xLIN)
u 200 MHz Bandwidth
u USB 3.0
u 500 MS/s sampling rate (for 2 channels, e.g. 1xCAN )
u Up to 512 MS buffer
u BNC-DSUB9 Bus Probe 300 MHz
u Compatible to Vector HW
u Scope Trigger Y-Cable with HW sync connector
u Indispensable for time synchronization
u Trigger on messages in CANoe / CANalyzer
u Trigger on waveform of external IO-signals
u Compatible to all Vector VNxx network interfaces
u Example: VH6501 with 1 CAN channel
Capabilities to inject analog and digital disturbances
Scope Hardware connected to CAN Disturbance Interface (VH6501)
Hardware Prerequisites
7/26
u CANoe / CANalyzer> Analyze data link and physical layer
u CAN Disturbance Interface (VH6501)> HW Sync connector (time sync)
> DSUB9: CANBus (1channel)
> USB
u PicoScope 5444D-034> Ext. In/Out trigger channel
> Gen. Out (AWG)
> USB
u Y-Trigger cable (time sync)> Sync connector
> Ext. connector BNC
> Gen. connector BNC
u Bus Probe Connector 300 MHz> DSUB9, BNC connectors
u USB Hub, USB cables
Cabelling PicoScope 5444D-034 / VH6501
Hardware Prerequisites
time sync!
8/26
Use Cases
Product Concept
Hardware Prerequisites
u Trigger Overview
CAPL Functions
Test Workflow
Agenda
9/26
u Triggers are used to synchronize the bus interface with scope device (Sync-Line)
u All scope analysis is reflected to trigger time stamp
u Time Drift Compensation (HW-Clock-Drifts, Transceiver delays, USB-latencies)
u Reflect analysis to time base of network interface
u Overlay physical scope data with logic controller data
u Trigger Types
u Bus-Triggers: CAN, CAN FD, LIN, FlexRay, SENT, PSI5..
u IO-Trigger (Waveforms, Edges and Pulses)
u Trigger Modes
u Manual (snapshot)
u Protocol specific trigger conditions (single / repeat mode)
u Protocol errors
Trigger Overview
GUI Configurable Trigger Conditions
10/26
u Directly stimulate triggers in CAPL with scopeTriggerNow()
u On “*message” event handlers
u On “*sysvar” changed event handlers
u Trigger on test results in Test Modules (pass/fail)
u Complex CAPL triggers, consisting of several conditions
with AND / OR combinations
u Indirectly raise GUI defined triggers from
CAPL
u scopeActivateTrigger()
u scopeDeactivateTrigger()
CAPL Configurable Trigger Conditions
Trigger Overview
11/26
Use Cases
Product Concept
Hardware Prerequisites
Trigger Overview
u CAPL Functions
Test Workflow
Agenda
12/26
Required CAPL functions for Analysis
CAPL Functions
Function Name Use case
scopeConnect Connect scope hardware
testWaitForScopeEvent Wait for scope state transition(e.g. disconnected->connected)
testWaitScopeAnalyseSignal Bit analysis for a CAN signal
testWaitScopeGetMaskViolation Request violations found in frame or node
testWaitScopePerformEdgeAnalysis Measure different edge parameters (e.g. transition time)
testReportAddWindowCapture Screenshot for test report
testWaitScopeExportData Export scope data in mat, csv, mdf; csfx for entire measurement
scopeDisconnect Disconnect scope hardware
13/26
Use Cases
Product Concept
Hardware Prerequisites
Trigger Overview
CAPL Functions
u Test Workflow
Agenda
14/26
u Test Artefact: Physical Layer Integrity Test for CAN network
u Prerequisits:> Software: CANoe, vTestStudio
> Hardware: Network Interface (e.g. VN1630)
> Scope Hardware: PicoScope 5444D-034
u Test Cases:> Test Case 1: Serial Bit Mask Analysis
> Test Case 2: Edge Analysis (Analyse rising/falling edges of bus signal)
u Trigger Conditions> Trigger on CAN messages directly in CAPL
u Test Environment> Test Automation Editor (TAE) (deprecated)
> vTestStudio
u Documentation of results> Test Report
> Scope Data exports: CSV, MAT, MDF
> Entire Measurement export: CSFX
Define what you need for your Test
Test Workflow
Test Setup Test Cases Test Environment
15/26
u Goal: Debugging issues on the physical /datalink layer of CAN networks
u Think about impacts like Ringing, Crosstalk, Reflections, Delays, Glitches> ECU-Controller settings (Sample point, Time Quantas, …
> Send and receive behaviour of CAN-tranceivers
> Network topology (Line, Star, Mixed)
> Bus termination (120Ω || 120Ω)
> Cable capabilities (Impedance; L, C, R)
> Electromagnetic compability (EMC)
u Test and Verify CAN-protocol conformance of ECU‘s> Is decode of CAN-messages ok ?
> Is decode of CAN-errors possible (e.g. error active/passive flags)
u Test and Verify your CAN-Controller settings> Bit-Timings / Sample Point, Baudrate…
u Test and Verify your network physics> Topology, Cable Length, Termination, Node Count….
Fields of application for Serial Bit Analysis and Edge Analysis
Test Workflow
Test Setup Test Cases Test Environment
16/26
u Sporadic CANErrors. What should we do ?
u We took a handish snapshot of
physical layer (CAN)
u We recognize a glitch at left bit
u How can issues be tracked
automatically?
u Which analysis does fit here ?
Test Case 1: Serial Bit Analysis – Error Detection
Test Workflow
Test Setup Test Cases Test Environment
17/26
Test Case 1: Serial Bit Analysis – Program Flow
Test Workflow
Start
ConfigureFunction
Wait Frame Trigger
Start Analysis
Request Results
Archive Results
End
- Define CAN-message to be analyzed- Select analysis range. Use provided frame fields(e.g. ID->CRC)- Define proprietrary bit mask as polygon- Define thresholds for dominant and recessive voltage levels (900/500mV)
Wait to trigger on a specific CAN/CANFD message, System Variable orsignal.
testWaitScopeAnalyseSignal()The algorithm automatically extends bitmasks to dominant and recessivevoltage level of bits. The intention is to detect bit mask violations even ifsignal voltage does immediately dip !
testWaitScopeGetMaskViolation()Acquire all bit mask violations occurred. Violations are detected when signalcrosses mask at any point.
Write all gathered results to an HTML-based test report file. User canembed text and pictures. (e.g. screenshot with depicted analysis range and highlighted edges)
Test Setup Test Cases Test Environment
18/26
Test Case 1: Serial Bit Analysis – Get Results
Test Workflow
testWaitScopeGetMaskViolation testWaitScopeShowMask
u Gather results for analysis
u Frame-Field: e.g. DataByte1, CRC, ID….
u Bit Number: Index within Bit-Field
u Bit start time (reference)
u Start time of disturbance
u End time of disturbance
u Sample Point Voltage for dom./rec. bits
u Absolute time values inside frames can
be calculated with knowledge of SOF
timestamp!
recessive
dominant
dominant glitch detected
undefined
Test Setup Test Cases Test Environment
recessive
19/26
Test Case 2: Transition Time Measurement
Test Workflow
Test Setup Test Cases Test Environment
u Measure transition time betweenrecessive and dominant
u User defines thresholds 10%....90%
from voltage difference of
consecutive sample points
u Thresholds can also be defined in [mV]
2000
0
Sample Point
Secant Points
20/26
Test Case 2: Transition Time Measurement - Program Flow
Test Workflow
Start
Configure Function
Wait Frame Trigger
Start Analysis
Request Results
Archive Results
End
- Define analysis variant (e.g. transition time, settling time)- Define Frame or Node analysis- Select analysis range. Use provided frame fields and related bit indices (ID[2]-CRC[5])- Define edge type (rising, falling)- Define thresholds between dominant and recessive voltage level [% or mV]
Wait to trigger on a specific CAN / CANFD message
testWaitScopePerformEdgeAnalysis(out ScopeEdgeAnalyseResult parameter[])
Analyzes all edges for frame(s) in defined range. Obtain results via ScopeEdgeAnalyseResult
Verify obtained results with user defined test verdicts .
Write all gathered results to an HTML-based test report file. User can embed text and pictures. (e.g. screenshot with depicted analysis range and highlighted edges)
Test Setup Test Cases Test Environment
21/26
u Gather results for Transition Time Measurement
u Time analysis for rising/falling edges can be extended by following measurements
u Slew Rate, Dalay Time, Half Time, Compensation Time, Response Time, Settling Time
Test Case 2: Transition Time Measurement – Get Results
Test Workflow
Value Description
Avg Median of transition time
Min Minimum of all transition times
Max Maximum of all transition times
StdDeviation Standard Deviation of median
CountAnalyzedEdges Number of analyzed edges
CountAnalyzedFrames Number of analyzed CAN-messages
ScopeSamplingPeriod Sampling period of measurement
Test Setup Test Cases Test Environment
22/26
Tasks of several components
Test Workflow
Test Setup Test Cases Test Environment
Automatic Test Environment
Vector/ScopeHardware
CANoe
vTestStudio
u Components of the automated test environment
u CANoe (Analysis):> Receives all messages of networks (data link)
> Trigger on messages
> Trigger the oscilloscope
> Perform time synchronization with scope device
> Does all analysis tasks
u vTestStudio (Test Design):> Design the entire test procedure
> Define reproducible test sequences
> Provide test verdicts
> Generate test reports
u Scope Hardware (Measure data):> Trigger on Ext. channel
> Capture data of network
23/26
Summary: Option .Scope is a single chain analysis tool
Test Workflow
Test Setup Test Cases Test Environment
CANoe
vTestStudio
Vector/ScopeHardware
u All components work together in one chain
u Easily define test cases in vTestStudio
u Test cases can be changed and recompiled on the fly
u Test Reports are automatically generated for all testcases
u Granular test verdict evaluation -> Pass/Warning/Failed
u Option .Scope achieves a high degree of
u Automation
u Reproducibility
u Documentation
u Conclusion: Vector CANoe + vTestStudio + Option.Scope is a high integrated physical layer test machinethat extends existent concepts of data link layer analysis
24/26
© 2019. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector. | 2019-03-12
Author:
Vector Germany
For more information about Vectorand our products please visit
www.vector.com