ID_020L_Ramseyer_SH2A_MBD_Virtualization

Download Report

Transcript ID_020L_Ramseyer_SH2A_MBD_Virtualization

020L: Superior SH2A Design Process
using Model Based Design (MBD),
Virtualization and Hardware-inLoop (HIL) Systems Lab
Renesas Electronics America Inc.
Mark Ramseyer
Staff Application Engineer
13 October 2010
Rev. 1.3
© 2010 Renesas Electronics America Inc. All rights reserved.
Mr. Mark Ramseyer
 Powertrain Applications Engineer




Model Based Development (MBD)
Virtualization
Co-simulation
HIL simulation
 20 Years Embedded Microcontroller Development







Microcontroller specification
IC design and verification
IC simulation and timing
Controller system design
Software and firmware development
Compilers and software tools
Calibration and data acquisition tools
 Ford Motor Co., Ford Microelectronics, Visteon, General
Motors
 BS in Computer & Electrical Engineering from
2
© 2010 Renesas Electronics America Inc.
All rights reserved.
Renesas Technology and Solution Portfolio
Microcontrollers
& Microprocessors
#1 Market share
worldwide *
ASIC, ASSP
& Memory
Advanced and
proven technologies
Solutions
for
Innovation
Analog and
Power Devices
#1 Market share
in low-voltage
MOSFET**
* MCU: 31% revenue
basis from Gartner
"Semiconductor
Applications Worldwide
Annual Market Share:
Database" 25
March 2010
** Power MOSFET: 17.1%
on unit basis from
Marketing Eye 2009
(17.1% on unit basis).
3
© 2010 Renesas Electronics America Inc.
All rights reserved.
Renesas Technology and Solution Portfolio
Microcontrollers
& Microprocessors
#1 Market share
worldwide *
Solutions
for
Innovation
ASIC, ASSP
& Memory
Advanced and
proven technologies
Analog and
Power Devices
#1 Market share
in low-voltage
MOSFET**
* MCU: 31% revenue
basis from Gartner
"Semiconductor
Applications Worldwide
Annual Market Share:
Database" 25
March 2010
** Power MOSFET: 17.1%
on unit basis from
Marketing Eye 2009
(17.1% on unit basis).
4
© 2010 Renesas Electronics America Inc.
All rights reserved.
Microcontroller and Microprocessor Line-up
Superscalar, MMU, Multimedia
High Performance CPU, Low Power
High Performance CPU, FPU, DSC
 Up to 1200 DMIPS, 45, 65 & 90nm process
 Video and audio processing on Linux
 Server, Industrial & Automotive
 Up to 500 DMIPS, 150 & 90nm process
 600uA/MHz, 1.5 uA standby
 Medical, Automotive & Industrial
 Up to 165 DMIPS, 90nm process
 500uA/MHz, 2.5 uA standby
 Ethernet, CAN, USB, Motor Control, TFT Display
 Legacy Cores
 Next-generation migration to RX
General Purpose
 Up to 10 DMIPS, 130nm process
 350 uA/MHz, 1uA standby
 Capacitive touch
5
© 2010 Renesas Electronics America Inc.
All rights reserved.
Ultra Low Power
Embedded Security
 Up to 25 DMIPS, 150nm process  Up to 25 DMIPS, 180, 90nm process
 190 uA/MHz, 0.3uA standby
 1mA/MHz, 100uA standby
 Application-specific integration  Crypto engine, Hardware security
MBD, Virtualization & HIL Simulation
Superior Design Process
“The Space Station consists of 70
separate major components and hundreds
of minor ones, all of which will be
assembled for the first time in space.”
pbs.org
Intel Core 2 Duo
291M transistors
6
© 2010 Renesas Electronics America Inc.
All rights reserved.
PCB circuit simulation
MBD, Virtualization & HIL Simulation
 Model based development (MBD) is imperative.
 Virtualization is effective.
 Simulation is critical.
 Hardware in the Loop (HIL) systems are practical and
compelling.
 Testing and Verification are safer and more efficient.
 These technologies are available now.
7
© 2010 Renesas Electronics America Inc.
All rights reserved.
Agenda
 Introductions
 MBD, Virtualization & HIL Simulation Discussion
 Strategy Development Lab
 Code Generation Lab
 Verification on Virtual Platform Lab
 Verification on Real-time Platform Lab
8
© 2010 Renesas Electronics America Inc.
All rights reserved.
Key Takeaways
 Understand benefits and efficiencies of model based
development
 Appreciate capability and effectiveness of code generation
tools
 Understand virtualization, co-simulation and HIL simulation
methodologies
 Recognize the accuracy, visibility and savings from a virtual
development platform
 Value the confidence and savings of a real-time development
platform
 Appreciate the improved efficiency and controllability of
testing and verification
9
© 2010 Renesas Electronics America Inc.
All rights reserved.
Introductions
 Amrit Vivekanand – Renesas Electronics America
 011C: Velocity Lab Ecosystem – Tues morning
 52AP: Model Based Development – Mon afternoon




Bob Chamberlain – Renesas Electronics America
Rich Union – Renesas Electronics America
John Mills – SimuQuest
Chris Myers – SimuQuest
 024C: Auto Code Generation – Tues afternoon
 021L: Model Based Dev. & Auto Code Gen. using R8C – Tues
afternoon
 Ray Turin – SimuQuest
 023C: Model Based Control Design – Tues morning
 Marcella Haghgooie – Applied Dynamics, International
 020C: Hardware in the Loop: System Testing without the
System – Wed morning
 Everett Lumpkin – consultant
 021C: Virtual Microcontroller and System Modeling – Wed morn
10
© 2010 Renesas Electronics America Inc.
All rights reserved.
MBD, Virtualization & HIL Simulation Discussion
11
© 2010 Renesas Electronics America Inc.
All rights reserved.
Traditional Development Platform
where we were
Plant
Controller
+
Driver Code
+
drvr.c
Strategy Code
+
strat.c
• fuel & exhaust considerations
• fixed, inflexible
• innately
hardware
tied to micro
• tremendous
family
effort required
• real, functional •loads
required
debug
limitations
• detailed due
interface
to hard,
•knowledge
implementation may obscure
• errors can be dangerous
real time platform
required
strategy
• many interdependent
systems
• limited
visibility
• significant time or money to
• expensive prototypes
create
• challenging repeatability
12
© 2010 Renesas Electronics America Inc.
All rights reserved.
Typical Model Based Development Platform
where we are
Simulator running
Plant Model
Controller
+
Strategy Model
in Simulink
Driver Code
+
drvr.c
+
• difficulties with physical
• same controller
plant
• same
are
handwritten
hardware •driver
implementation
code
at algorithm
eliminated
level
• real-time behavior is retained
• faster development
• development costs are significantly
• easily simulated
reduced
• code generation is mature
• development hardware can be reused
13
© 2010 Renesas Electronics America Inc.
All rights reserved.
Full Model Based and Virtualized Development
Platform – where we need to be
Plant Model
in Simulink
Micro Model in VaST
/ ASTC / CoWare
+
+
Generated
Driver Code
Strategy Model
in Simulink
+
• no physical plant
• cycle
issues
•accurate
production
micro
level
model
code• generation
same strategy model
• no hardware is•required
micro• peripheral
seamless interface
models included
with strategy model
• completely portable and
• no visibility
need for and
detailed
repeatability
micro knowledge or
configurable • complete
spec
• completely portable and configurable
• complete access to all source
• same debugger GUI
14
© 2010 Renesas Electronics America Inc.
All rights reserved.
Summary of Implementation Options
Hardware
Implementations
Plant
Production
type platform
Controller
Production
type platform
Microprocessor
Hardware realEvaluation
time simulator
Board
Software
Implementations
Drivers
Strategy
Code
Code
Tool / Code
Generator
Model
Software
Software
(virtual) model (virtual) model
A development platform includes at least a plant and strategy
option, and may include a controller and driver option.
15
© 2010 Renesas Electronics America Inc.
All rights reserved.
Effort Comparison
Traditional
Development where we were
Plant
(Test Env.)
Controller
HIL simulator
Typical Model
Plant on HIL Controller
Based
sim.
Development where we are
Fully generated
drivers
16
Virtual Verification
Virtual Controller
Driver Code
© 2010 Renesas Electronics America Inc.
All rights reserved.
Strategy Code
Verification
Functional model
instead of code
HIL simulator instead
of physical plant
Driver Code
Strategy
Model
No API or driver
integration
Strat.
Model
Virtual Plant
Full Model
Based &
Virtualized
Development where we need
to be
Driver Code
Verification
Questions
 What are the main benefits of a
model based design?
 What are the main benefits of a
virtual development environment?
 What are the main benefits of an HIL simulation?
 Audience questions?
17
© 2010 Renesas Electronics America Inc.
All rights reserved.
Benefits of MBD, Virtualization & HIL Simulation
 Shorter Development Schedule
 Less Development Expense
 Complete Configurability and Portability
 Focused on Strategy Algorithms, not implementation details
 Better Visibility, Controllability & Repeatability
 Fully Auto Coded Solutions
 Higher Reliability with More Confidence
 Virtual Development Platform
 Real-Time Development Platform Verification
 More Efficient and Controlled Testing and Verification
18
© 2010 Renesas Electronics America Inc.
All rights reserved.
Strategy Development Lab
19
© 2010 Renesas Electronics America Inc.
All rights reserved.
Strategy Development Lab
Develop / Procure
Plant Model
Ignore Controller
Details
Ignore Micro Details
(No Drivers)
Develop / Procure
Strategy Model
Debug / Verify in
Matlab / Simulink
Plant
Controller
Drivers
Strategy
Production Production
Code
Code
Real-time
simulator
Tool / Code
Gen.
Model
Eval. Bd
Software Software
model
model
20
© 2010 Renesas Electronics America Inc.
All rights reserved.
See Lab Procedure
Strategy Development Lab – Results
Vehicle Speed
Engine RPM
Mass Air Flow
Manifold Pressure
Oxygen Sensor
Throttle Position
Active Gear
Key On Signal
21
© 2010 Renesas Electronics America Inc.
All rights reserved.
Scope in
Matlab / Simulink
Strategy Development Lab – Answers
 Final speed is ~ 13 MPH.
 The interface uses physical units like
°C, MPH, Pascals.
 The brake_pedal, average_torque,
and throttle_characteristics models
are actual algorithms and are not S-functions.
 spark = base_spark – spark_corr
fuel_pulse_width = base_fuel_pulse * fuel_trim_factor
 Changing the shifter logic via the saturation block forced the
simulation to always be in 1st gear.
 Audience questions?
22
© 2010 Renesas Electronics America Inc.
All rights reserved.
Code Generation Lab
23
© 2010 Renesas Electronics America Inc.
All rights reserved.
Code Generation Lab
Plant Model N/A
Controller N/A
Configure / Generate
Driver Code
Strategy Model
Compile / Link
All in Matlab /
Simulink GUI
Plant
Controller
Drivers
Strategy
Production Production
Code
Real-time
simulator
Eval. Bd
Tool / Code
Model
Gen.
Software
model
Software
model
24
© 2010 Renesas Electronics America Inc.
All rights reserved.
Code
See Lab Procedure
Code Generation Lab - Results
Matlab Command/Log Window
Simulink Code
Generation
Report
Compiling
Linking
Generated Driver
Code Status
(window displayed
only if run manually)
25
© 2010 Renesas Electronics America Inc.
All rights reserved.
Completion
All in Matlab
/
Simulink GUI
Code Generation Lab – Answers
 digital input, engine state input,
engine management task, fuel ouput
spark output, PWM output,
digital output
 conversion every 1.00 millisecond
 8.05 microseconds to convert the group
 No register or bitfield info is required
 clocks are 20 MHz, 5MHz, 5MHz, 645.16219KHz
 can be selected by either QuantiPhi (auto) or the user
(manual)
 Audience Questions?
26
© 2010 Renesas Electronics America Inc.
All rights reserved.
Verify on Virtual Platform Lab
27
© 2010 Renesas Electronics America Inc.
All rights reserved.
Verify on Virtual Platform Lab
Plant Model in
Simulink
Micro Model in CoMET
Simulink / CoMET
Cosimulation
CoMET
Configure / Generate
Driver Code
Strategy Model
Debug with
Renesas HEW
Virtual Platform
Plant
Controller
Drivers
Strategy
Production Production
Code
Real-time
simulator
Tool / Code
Model
Gen.
Eval. Bd
Software Software
model
model
28
© 2010 Renesas Electronics America Inc.
All rights reserved.
Code
See Lab Procedure
Verify on Virtual Platform Lab - Results
Simulink scope of inputs to
micro model
29
© 2010 Renesas Electronics America Inc.
All rights reserved.
Simulink scope of outputs
from micro model
Simulink scope overall
co-simulation
Verify on Virtual Platform Lab – Answers
 Input source is Enginuity plant model
 Enginuity uses physical units
 The signals go to the micro model
 The micro requires low level electrical signals
 The scaling is needed to interface between the real world
and the digital world
 Spark 0 is connected to micro port F pin 0 (PF0). It is
connected to Simulink input LogicPlantModelerIn[0]
 About 33 engine cycles were completed in the last 2 seconds
of simulation
 Audience Questions?
30
© 2010 Renesas Electronics America Inc.
All rights reserved.
Verify on Real-time Platform Lab
31
© 2010 Renesas Electronics America Inc.
All rights reserved.
Verify on Real-time Platform Lab
Plant Model in
Simulink
Micro Evaluation
Board
interface
cable
Configure / Generate
Driver Code
Strategy Model
Debug with
Renesas E10A/HEW
ADI rtX Simulator
Real-time Platform
Plant
Controller
Drivers
Strategy
Production Production
Code
Real-time
Eval. Bd
simulator
Tool / Code
Model
Gen.
Software
model
32
Software
model
© 2010 Renesas Electronics America Inc.
All rights reserved.
Code
See Lab Procedure
Verify on Real-time Platform Lab - Results
ADvantageVI Custom Panel Interface
ADvantage SIMplotter Chart
33
© 2010 Renesas Electronics America Inc.
All rights reserved.
Verify on Real-time Platform Lab – Answers
 internal_control subsystem &
external_control subsystem
 fuel_pulse_width is generated from
the HIL simulator physically measuring
the actual electrical signal created by
the SH2A micro. (The previous control
strategy is now executing on the SH2A micro.)
 The ADvantageDE build compiles the Simulink generated
code and the HIL control software (which interacts with the
HIL real-time operating system and HIL hardware I/O cards)
together into a single executable for the HIL.
34
© 2010 Renesas Electronics America Inc.
All rights reserved.
Verify on Real-time Platform Lab – Answers (2)
 Block Diagram of HIL system:
HIL Simulator
Engine
Plant
Model
External
Strategy
Interface
Hardware
I/O Cards
mux
Internal
Strategy
35
© 2010 Renesas Electronics America Inc.
All rights reserved.
Micro Eval Board
External
Strategy
SH2A Micro
Conclusion
36
© 2010 Renesas Electronics America Inc.
All rights reserved.
Summary
 Full Model Based Development (MBD) is real and effective.
 Production I/O driver generation is real and effective.
 Virtualization has accuracy, visibility, controllability and
repeatability.
 HIL simulation is hard real-time and a practical verification
method.
 Full simulation is required and critical to today’s designs.
 Simulation provides more efficient and controlled testing and
verification.
 These technologies greatly reduce development effort and
costs.
 These technologies offer better reliability with more
confidence.
 These technologies are available now.
 Renesas pulls all of these technologies together with our
partners into Velocity Lab™.
37
© 2010 Renesas Electronics America Inc.
All rights reserved.
Questions?
38
© 2010 Renesas Electronics America Inc.
All rights reserved.
Feedback Form
 Please fill out the feedback form!
 Please raise your hand if you do not have one.
39
© 2010 Renesas Electronics America Inc.
All rights reserved.
Appendix
40
© 2010 Renesas Electronics America Inc.
All rights reserved.
Model Structures
Strategy
Development
Plant
Code
Generation
41
© 2010 Renesas Electronics America Inc.
All rights reserved.
Strategy
Driver
Strategy
Model Structures (2)
Virtual
Platform
Plant
Sensor/
Actuator
Real-time
Platform
Plant
Sensor/
Actuator
42
© 2010 Renesas Electronics America Inc.
All rights reserved.
HIL
Hardware
Micro
Periph.
Driver
Strategy
Micro
Periph.
Driver
Strategy
Renesas Electronics America Inc.