Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
1 © 2013 The MathWorks, Inc.
Modellbasiertes Echtzeittesten und
automatische Codegenerierung
Richard Pfisterer
Design
with
Simulation
Executable
Specifications
Continuous
Test and
Verification
Automatic
Code Generation
Models
2
Agenda
Introduction to Model-Based Design
Rapid Control Prototyping
Processor in the Loop – PIL
Hardware in the Loop - HIL
3
Model-Based Design Development Process
System-Level
Specification
Rapid Control
Prototyping Subsystem
Integration & Test
SIL/PIL
System-Level
Integration & Test
HIL
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing Requirements
Ve
rifica
tio
n a
nd
Va
lida
tio
n
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
Data
Modeling
Algorithm
Development
Data Analysis
Research
System Design
Physical Components
Environment
Algorithms
Component Design
4
Model-Based Design Development Process
System-Level
Specification
Rapid Control
Prototyping Subsystem
Integration & Test
SIL/PIL
System-Level
Integration & Test
HIL
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing Requirements
Ve
rifica
tio
n a
nd
Va
lida
tio
n
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
Data
Modeling
Algorithm
Development
Data Analysis
Research
System Design
Physical Components
Environment
Algorithms
Component Design
5
Model-Based Design Rapid Prototyping
System-Level
Specification
Rapid Control
Prototyping Subsystem
Integration & Test
SIL/PIL
System-Level
Integration & Test
HIL
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing Requirements
Ve
rifica
tio
n a
nd
Va
lida
tio
n
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
Data
Modeling
Algorithm
Development
Data Analysis
Research
System Design
Physical Components
Environment
Algorithms
Component Design
6
Why do Rapid Prototyping?
Test, verify, validate, and prove your design with
hardware under test
Evaluate new ideas using a production independent
development platform
Reduce costs, shorten time-to-market, and minimize
risks
7
Rapid Controller Prototyping
TARGET DEVICE HOST
Hardware
(Plant/System)
8
Ethernet
1
2
3
Real-time execution of Simulink models
XPC Target workflow
9
Demo – Rapid Control Prototyping
10
Rapid Prototyping
Prove your design
Evaluate new ideas
Reduce costs
Shorten time-to-market
Minimize risks
Hardware
(Plant/System)
11
Model-Based Design Automatic Code Generation
System-Level
Specification
Rapid Control
Prototyping Subsystem
Integration & Test
SIL/PIL
System-Level
Integration & Test
HIL
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing Requirements
Ve
rifica
tio
n a
nd
Va
lida
tio
n
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
Data
Modeling
Algorithm
Development
Data Analysis
Research
System Design
Physical Components
Environment
Algorithms
Component Design
12
Data
Modeling
Algorithm
Development
Data Analysis
Research
Model-Based Design Automatic Code Generation
System-Level
Specification
Subsystem
Design
Subsystem
Integration & Test
System-Level
Integration & Test
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing
System Design
Physical Components
Environment
Algorithms
Requirements
Component Design
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
• C/C++, VHDL/Verilog and PLC Code
• Support for Fixed Point Data Format
• Automatic scaling
• Supported in Simulation and Code
• Easy integration of legacy C/C++ Code
• System development independent
of the target
FPGA ASIC
VHDL, Verilog
DSP
C, C++
MCU
Embedded Coder
(C, C++)
DSP & µC FPGA & ASIC
HDL Coder
(VHDL, Verilog)
PLC PLC Coder
(Structured Text)
PLC
Structured Text
13
Demo – Code Generation
14
Model-Based Design Continuous Verification and Validation
System-Level
Specification
Rapid Control
Prototyping Subsystem
Integration & Test
SIL/PIL
System-Level
Integration & Test
HIL
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing Requirements
Ve
rifica
tio
n a
nd
Va
lida
tio
n
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
Data
Modeling
Algorithm
Development
Data Analysis
Research
System Design
Physical Components
Environment
Algorithms
Component Design
15
Why do Processor in the Loop (PIL)?
Verify numerical output of code
Profiling
– Execution
– Coverage
– Stack
Verify behaviour of target specific code
Investigate compiler settings and optimizations
16
Use PIL Simulation to Verify
Simulink
Embedded
Processor
Seria
l / TC
PIP
Serial / T
CP
IP
PIL Implementation
Code
Generation
Test
Signals Verifications
Controller
Model
Controller
C Code
18
Demo - PIL
19
Why do Processor in the Loop (PIL)?
Verify numerical output of generated (or legacy) code
Coverage, Execution and Stack profiling
Verify behavior of target specific code
Investigate effects of compiler settings and
optimizations
20
Processor in the Loop (PIL)
Verify numerical output of code
Profiling
Verify target specific code
Investigate compiler settings and optimizations
21
Model-Based Design Continuous Verification and Validation
System-Level
Specification
Rapid Control
Prototyping Subsystem
Integration & Test
SIL/PIL
System-Level
Integration & Test
HIL
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing Requirements
Ve
rifica
tio
n a
nd
Va
lida
tio
n
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
Data
Modeling
Algorithm
Development
Data Analysis
Research
System Design
Physical Components
Environment
Algorithms
Component Design
22
Hardware Under Test
Hardware in the Loop
23
Why do Hardware in the Loop (HIL)?
Substitute for unavailable parts of the system
Test the system for safety and performance
Minimize expensive downtime for the rest of the system
Test operation and failure conditions that are difficult to
replicate
24
Conclusion
Model-Based Design
– Core of the Development Process
Rapid Control Prototyping
– Fast Evaluation of Design
Processor in the Loop – PIL
– Early Test and Verification
Hardware in the Loop – HIL
– System level integration test
Design
with
Simulation
Executable
Specifications
Continuous
Test and
Verification
Automatic
Code Generation
Models
25
Model-Based Design
System-Level
Specification
Rapid Control
Prototyping Subsystem
Integration & Test
SIL/PIL
System-Level
Integration & Test
HIL
Complete
Integration
& Test
Code
Verification and
Validation
Integration
testing
User Acceptance
Testing Requirements
Ve
rifica
tio
n a
nd
Va
lida
tio
n
Subsystem
Implementation
DSP FPGA ASIC
Embedded Software
Digital Electronics
C, C++ VHDL, Verilog
Implementation
Integration
MCU
Data
Modeling
Algorithm
Development
Data Analysis
Research
System Design
Physical Components
Environment
Algorithms
Component Design