MATLAB And Simulink For Embedded System Design

2y ago
35 Views
3 Downloads
1.73 MB
31 Pages
Last View : 3d ago
Last Download : 3m ago
Upload by : Kamden Hassan
Transcription

Pieter J. 4595596597598599600/* Logic: ' S3 /either' */rtb either power window con B.passenger control b power window con B.passenger control a;/* Logic: ' S13 /allow action' incorporates:* Inport: ' Root /driver up'* Logic: ' S13 /overrule'*/rtb temp34 power window con U.driver up&& (!(rtb either));Senior Research ScientistThe MathWorks, Inc. 2007 The MathWorks, Inc.MATLAB and Simulink forEmbedded System Design

Introduction Increasing complexity of embedded systemsComplexity– Intricacy– SizeRaising the Level of AbstractionCompilers to handle the complexity because ofsize2

Agenda The System Design ChallengeSoftware Design FlowHardware Design FlowSummary3

The System Design Challenge We design, simulate, andvalidate system models andalgorithms in MATLAB and/or Simulink How can we implement andverify designs on DSPs andGPPs? How can we implement andverify designs on FPGAs andASICs?MATLAB and Simulink Algorithm and System DesignHDLCMCUDSPFPGAASIC4

Integrated Design Flow forEmbedded Software and Hardware Verify hardware and softwareimplementations against thesystem and algorithm modelsHDLCMCUSimulink HDL CoderLink for ModelSimLink for Cadence IncisiveGenerateAutomatically generate C andHDLReal-Time WorkshopEmbedded Coder,Targets, LinksGenerate MATLAB and Simulink Algorithm and System DesignVerifyDesign, simulate, and validatesystem models and algorithms inMATLAB and SimulinkVerify DSPFPGAASIC5

Agenda The System Design ChallengeSoftware Design FlowHardware Design FlowSummary6

Integrated Design Flow forEmbedded Software Implementation–––HDLCMCUSimulink HDL CoderLink for ModelSimLink for Cadence IncisiveGenerate–Real-Time WorkshopEmbedded Coder,Targets, LinksGenerate–Floating- and fixed-point codeIntegration with downstreamIDEs and toolsLinks to verificationDevice driversOptimization optionsMATLAB and Simulink Algorithm and System DesignVerifyImplementation withautomatic C code generationVerify DSPFPGAASIC7

Representative Application – Video Video system design and implementation–Encapsulates challenges: complexity,convergence, time-to-market–Sophisticated algorithms–Floating- and fixed-point issues–DSP or FPGA/ASIC implementationsEmbedded SoftwareCase Study:Video Edge Detectionon a DSPDesign flows and steps shown directlyapplicable to other signal processingapplicationsLiveMATLABDemo8

Example: Video Edge Detection Floating point video edge detection system based onPrewitt algorithmCompositing original image with detected edgesUtilizes blocks from Video and Image Processing Blockset9

Converting to Fixed-Point Polymorphic blocks capable of floating- and fixed-pointoperation8-bit input datatype – blocks inherit fixed-point dataSimulink Accelerator provides fast fixed-point simulation8-bit fixed-point input10

Automatic Code Generationfor Implementation on GPPs and DSPsFixed-point modelCode generationoptionsand preferencesSelect target or flavorof generated code11

Code Generation ReportHTML reportLinks to code filesfrom HTML reportLinks to Simulinkmodel fromgenerated codeReadable,commented code12

Video Edge DetectionEmbedded Software System on TI 6000TMTCP/IP Blocks13

Target Code Generation OptionsHigh-Speed RTDXInline Signal ProcessingBlockset functionsIncorporateDSP/BIOS14

Code Execution on Target and Profiling Build and execute– Auto-generate C and ASM–Integrate RTOS andscheduler–Create full CCS project–Invoke compiler, linker, anddownload code–Run on targetProfile code performanceSystem profilingincludes entire DSPapplication codeSubsystem profiling15

Code Optimization Options Utilize target-specific blocks––––– C-callable assembler librariesSimulate bit-true in SimulinkGenerate calls to hand-optimizedassembler librariesHighly optimized implementationof core functionalityC62x and C64x fixed-point DSPsManual optimization by user16

Design Verification and Visualization:MATLAB as software test benchVisualize and debug embeddedsoftware with MATLABInput videoMATLAB script(test bench)Capturedvideo17

Design Verification and Visualization:Simulink as software test benchProcessor and hardware-in-theloop testing, simulation,visualization, and verification ofembedded software with SimulinkSimulink test benchDevice or designunder test (DUT)Simulink system designembedded on DSP18

Review: Integrated Design Flow forEmbedded Software Use code profiles to identifyand optimize bottlenecks Verify code with Links toIDEs and processorsHDLCMCUSimulink HDL CoderLink for ModelSimLink for Cadence IncisiveGenerateQuickly create completeworking code baseReal-Time WorkshopEmbedded Coder,Targets, LinksGenerate MATLAB and Simulink Algorithm and System DesignVerifyDrive system developmentwith an executablespecificationVerify DSPFPGAASIC19

Agenda The System Design ChallengeSoftware Design FlowHardware Design FlowSummary20

Integrated Design Flow for Hardware(FPGA and ASIC) Implementation––HDLCMCUSimulink HDL CoderLink for ModelSimLink for Cadence IncisiveGenerate–Real-Time WorkshopEmbedded Coder,Targets, LinksGenerate–HDL code generation(VHDL and Verilog)test bench generationLinks to verificationIntegration withsynthesis toolsMATLAB and Simulink Algorithm and System DesignVerifyDesign elaborationVerify DSPFPGAASIC21

What We Will Show In This Case Study Behavioral modeling and simulationFixed-point modeling and simulationDesign elaborationHDL generationCo-simulation using Link for ModelSimHardware Case Study:Video Edge Detectionon an FPGALiveMATLABDemo22

Executable Specification23

Design ElaborationAutomatically generateVerilog or VHDL code fromelaborated models24

HDL Code Generation Using GUISelect subsystem, targetlanguage, directorySelect output optionsCheck model for errorsGenerate HDL Code25

More Code Generation OptionsSelect reset andclock optionsSet language-specificoptions: input/outputdatatypes, timescaledirectives, 26

Automatically Generate Test BenchSelf-checking HDL test bench comparesSimulink results to HDL results27

Co-simulate Generated HDLLink for ModelSimHDL code executing onModelSim simulator28

Review:Integrated Design Flow for Hardware Verify code with Links toRTL simulators andsynthesis toolsHDLCMCUSimulink HDL CoderLink for ModelSimLink for Cadence IncisiveGenerateQuickly create completeworking HDL code baseand test benchesReal-Time WorkshopEmbedded Coder,Targets, LinksGenerate MATLAB and Simulink Algorithm and System DesignVerifyDrive system developmentwith an executablespecificationVerify DSPFPGAASIC29

Agenda The System Design ChallengeSoftware Design FlowHardware Design FlowSummary30

SummaryHDLCMCUSimulink HDL CoderLink for ModelSimLink for Cadence IncisiveVerifyReal-Time WorkshopEmbedded Coder,Targets, LinksGenerateDesign and verify softwareand hardware from MATLABand SimulinkMATLAB and Simulink Algorithm and System DesignGenerate Accelerate development usingModel-Based Design– Generate Real-Time Workshop Simulink HDL Coder– Verify Link for CadenceIncisiveVerify DSPFPGAASIC31

MATLAB and Simulink Automatically generate C and HDL Verify hardware and software implementations against the system and algorithm models C MATLAB and Simulink Algorithm and System Design Real-Time Workshop Embedded Coder, Targets, Links V e r i f y Simulink HDL Coder Link for ModelSim Li

Related Documents:

ES360 Introduction to Controls Engineering MATLAB and SIMULINK Help Page 2 of 6 Starting SIMULINK SIMULINK can be started by: 1) Opening a SIMULINK model file (model files use the .mdl extension). 2) Starting MATLAB and clicking on the icon in the tool bar. The SIMULINK Library Browser SIMULINK

4) Simulink . Simulink is a program for simulating signals and dynamic systems. As an extension of Matlab, Simulink adds many features specific to the simulation of dynamic systems while retaining all of Matlab’s general purpose functionality. Simulink has two phases of use: mode

Test Driven Development powered by MATLAB and Simulink 45 Model-Based Design –Simulink and Stateflow Manage Requirements –Simulink Requirements Author and Execute Tests –Simulink Test Measure Test Completeness –Simulink Coverage Refactor and Verify Compliance –Simulink Check

6. Vision implementation in Matlab/Simulink 16 6.1 Matlab 16 6.1.1 Results 16 6.2 Simulink 17 7. Conclusion 19 8. References 20 Appendix A: Explanation of Matlab functions 21 Appendix B: Matlab code for color definition 22 Appendix C: Matlab code for pixel labeling 23 Appendix D: Matlab code for object recognition 24

Simulink and LEGO MINDSTORMS EV3 9 P a g e Project 1: Explore Simulink and LEGO MINDSTORMS EV3 P1.1 Get Started: Program EV3 Status Light with Simulink Motivation At the end of this project you will be able to program an EV3 brick from Simulink. Objective Create first model in Simulink Check hardware and software installation

Introduction to Simulink Todd Atkins tatkins@mathworks.com. 4 Outline What is Simulink? Working with Simulink. How Simulink works. Continuous and discrete models Componentizing models. 5 Simulink Applications. 6 Simulink

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

Safety-sensitive employees of city, county or other public transit services are subject to alcohol and drug testing requirements under rules issued by the Federal Transit Administration (FTA), a DOT agency. Additionally, employees who operate a vehicle requiring a commercial driver's license (CDL) are subject to substance abuse testing. This expansion of the scope of the Federal Motor Carrier .