hardware-software implementation with model-based design€¦ · solutions for embedded software...
TRANSCRIPT
![Page 1: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/1.jpg)
©20
07 T
he M
athW
orks
, Inc
.
® ®
Hardware-Software Implementation With Model-Based Design
Sudhir SharmaProduct Manager,HDL Code Generation And VerificationThe MathWorks
![Page 2: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/2.jpg)
2
® ®
Agenda
What is the System Design ChallengeSolutions for Embedded Software Development
Automatic Code GenerationVerification
Solutions for Hardware DevelopmentAutomatic Code GenerationVerification
![Page 3: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/3.jpg)
3
® ®
System design to implementation gap
C
Algorithm and System DesignAlgorithm and System DesignAlgorithm and System Design
MCU DSP FPGA ASIC
HDL
![Page 4: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/4.jpg)
4
® ®
Integrated Design Flow for Embedded Software and Hardware
Design, simulate, and validate system models and algorithms in MATLAB and Simulink
Automatically generate production software for embedded processors
Verify the software implementation against the system model
Verify the hardware implementation against the system model C
MATLAB® and Simulink®
Algorithm and System DesignMATLABMATLAB®® and Simulinkand Simulink®®
Algorithm and System DesignAlgorithm and System Design
Real-Time WorkshopEmbedded Coder,
Targets, Links
RealReal--Time WorkshopTime WorkshopEmbedded Coder,Embedded Coder,
Targets, LinksTargets, Links
Verif
y
Simulink HDL CoderCo-simulation links
Simulink HDL CoderSimulink HDL CoderCoCo--simulation linkssimulation links
MCU DSP FPGA ASIC
HDL
Generate
Verif
y
Generate
![Page 5: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/5.jpg)
5
® ®
Case Study: Sobel Edge Detection Algorithm
![Page 6: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/6.jpg)
6
® ®
Floating-Point System Specification
Start by developing a golden specification
![Page 7: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/7.jpg)
7
® ®
Fixed-Point Modeling
Fixed-point model
Fixed-point model
Floating-point model
Floating-point model
![Page 8: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/8.jpg)
8
® ®
Fixed-Point Modeling
Fixed-point model
Fixed-point model
Floating-point model
Floating-point model
![Page 9: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/9.jpg)
9
® ®
Implementation on DSP, GPP, or an FPGA?
Fixed-point model
Fixed-point model
![Page 10: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/10.jpg)
10
® ®
Agenda
What is the System Design ChallengeSolutions for Embedded Software Development
Automatic Code GenerationVerification
Solutions for Hardware DevelopmentAutomatic Code GenerationVerification
![Page 11: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/11.jpg)
11
® ®
Fixed-point modelFixed-point model
Code generation options
and preferences
Code generation options
and preferences
Select target or flavor of generated code
Select target or flavor of generated code
Implementation on DSP and GPP
![Page 12: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/12.jpg)
12
® ®
Build and executeAuto-generate ‘C’ and ASM
Integrate RTOS and scheduler
Create full CCS project
Invoke compiler, linker, and download code
Run on target
Profile code performance
System profiling includes entire DSP
application code
System profiling includes entire DSP
application code Subsystem profilingSubsystem profiling
Code Execution on Target and Profiling
![Page 13: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/13.jpg)
13
® ®
Design Verification and Visualization:Simulink as verification test bench
Processor and hardware-in-the-loop testing, simulation,
visualization, and verification of embedded software with Simulink
Processor and hardware-in-the-loop testing, simulation,
visualization, and verification of embedded software with Simulink
Device or design under test (DUT)Device or design under test (DUT)
Simulink system design embedded on DSP
Simulink system design embedded on DSP
Simulink test benchSimulink test bench
![Page 14: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/14.jpg)
14
® ®
Code GenerationReal Time Workshop – ANSI/ISO C code for rapid prototyping, accelerationReal Time Workshop Embedded Coder – Embedded deployment
LinksLink for Altium TASKING Link for Analog Devices VisualDSP++Link for TI Code Composer Studio
TargetsTarget for TI C6000 DSPTarget for TI C2000 DSPTarget for Infineon C166 MicrocontrollersTarget for Freescale MPC5xx Microcontrollers
New!
Review: Code Generation for Embedded Software
![Page 15: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/15.jpg)
15
® ®
Agenda
What is the System Design ChallengeSolutions for Embedded Software Development
Automatic Code GenerationVerification
Solutions for Hardware DevelopmentAutomatic Code GenerationVerification
![Page 16: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/16.jpg)
16
® ®
Code Generation for Hardware
Simulinkdata path
Stateflowcontrol logic
Generated Verilog codeSimulink HDL Coder
Correct-by-constructionVHDL and Verilog code
![Page 17: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/17.jpg)
17
® ®
Fixed-point model
Fixed-point model
Floating-point model
Floating-point model
Hardware specific model
Hardware specific model
Fixed-Point Implementation on an FPGA
![Page 18: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/18.jpg)
18
® ®
Design Space Exploration
SpeedHow fast can this design run?
AreaCan I use a smaller chip?
PowerCan I target a mobile device?
Implementation AlternativesSum & Product: Linear, Cascade, and TreeGain: Multiplier, CSD, Factored-CSDMinimum/Maximum: Tree and CascadeLookup Table: Inline or hierarchical
![Page 19: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/19.jpg)
19
® ®
Select subsystem, target language, directory
Select subsystem, target language, directory
Select output optionsSelect output options
Check model for errorsCheck model for errors Generate HDL CodeGenerate HDL Code
Code Generation Options
![Page 20: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/20.jpg)
20
® ®
Select reset andclock options
Select reset andclock options
Set language-specific options: input/output datatypes, timescale
directives, …
Set language-specific options: input/output datatypes, timescale
directives, …
More Code Generation Options
![Page 21: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/21.jpg)
21
® ®
Self-checking HDL test bench compares Simulink results to HDL results
Self-checking HDL test bench compares Simulink results to HDL results
Generate HDL Test Bench
![Page 22: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/22.jpg)
22
® ®
1
AutomaticHDL
AutomaticHDL
2
AutomaticHDL
AutomaticHDL
HandCustomized
HDL
HandCustomized
HDLCo-SimulateCo-Simulate
Reference code for HDL engineers
‘Correct-by-construction’Matches Fixed-Point System ModelFaster design implementationReduces verification burden
Benefits Include:
Automatic HDL Code Generation
Rapid FPGA implementation
![Page 23: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/23.jpg)
23
® ®
Verification with system specification
Link for ModelSimLink for ModelSim
![Page 24: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/24.jpg)
24
® ®
Promotes parallelism in design and verification tasksImproves focus on critical areas
Verify InterfacesVerify Interfaces
System metricsSystem metrics
Making full use of the system model
![Page 25: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/25.jpg)
25
® ®
Promotes parallelism in design and verification tasksImproves focus on critical areasAccelerates verification at all levels
Making full use of the system model
![Page 26: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/26.jpg)
26
® ®
Promotes parallelism in design and verification tasksImproves focus on critical areasAccelerates verification at all levelsSupports re-use and “what-if” scenarios
Making full use of the system model
![Page 27: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/27.jpg)
27
® ®
Implementation on an FPGA
![Page 28: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/28.jpg)
28
® ®
Review: Code Generation for Hardware
Code GenerationSimulink® HDL Coder – FPGA and ASIC deployment using VHDL and VerilogFilter Design HDL Coder – Filter implementation from MATLAB
LinksLink for Mentor ModelSimLink for Cadence® Incisive® New!
New!
![Page 29: Hardware-Software Implementation With Model-Based Design€¦ · Solutions for Embedded Software Development Automatic Code Generation Verification Solutions for Hardware Development](https://reader034.vdocument.in/reader034/viewer/2022042318/5f0707fe7e708231d41af443/html5/thumbnails/29.jpg)
29
® ®
C
MATLAB® and Simulink®
Algorithm and System DesignMATLABMATLAB®® and Simulinkand Simulink®®
Algorithm and System DesignAlgorithm and System Design
Real-Time WorkshopEmbedded Coder,
Targets, Links
RealReal--Time WorkshopTime WorkshopEmbedded Coder,Embedded Coder,
Targets, LinksTargets, Links
Verif
y
Simulink HDL CoderLink for ModelSim®
Link for Cadence® Incisive®
Simulink HDL CoderSimulink HDL CoderLink for ModelSimLink for ModelSim®®
Link for CadenceLink for Cadence®® IncisiveIncisive®®
MCU DSP FPGA ASIC
HDL
Generate
Verif
y
Generate
Design and verify software and hardwarefrom MATLAB and Simulink
Accelerate product development using Model-Based Design
Summary