ProfessionalMaster’sProgram(PMP)inElectricalEngineering Course:ModernintroductiontoEmbedded&Real-TimeSystems Length:10-week,1-quartercourse History: 2016-2-11:updatedthecoursework|AndrewN.Sloss 2015-7-20:updated&addedequipmentestimate|AndrewN.Sloss 2015-7-15:cleanupandimprovedocument|AndrewN.Sloss 2015-7-12:updateandrestructuredthedocument|AndrewN.Sloss 2015-7-7:startedmodifyingthecoursecontent|AndrewN.Sloss Course GOAL IntroduceEmbedded&Real-TimeSystems MESAUREMENT StudentswillgainanappreciationofEmbedded&Real-TimeSystemsthroughlearninghowto characterizehardwareandsoftware.Thiswillinvolvebeingintroducedtoaspecifichardware platform,exploringreal-timerequirements,computationlimits,analysisofdifferentscheduling algorithms,andtheconfigurationofmemory.Inaddition,studentswillbeintroducedtosome hardersubjectsinEmbedded&Real-TimeSystemsincludingpowermanagement,reliability, safety-criticalsystemsandfinallysimulation.Uponcompletionoftheprogram,studentswill haveafirmunderstandingofrealworldissuesandcharacterizationmethodsandtechniques forEmbedded&Real-TimeSystems. Topicstobecoveredduringthecourse:- 1. Introduction&Characterization 2. Fundamentals 3. Memory 4. Powermanagement 5. CriticalSystemsI-Reliability 6. CriticalSystemsII-Safety-Critical 7. Simulation 8. CourseWork–HardwareCharacterization NOTES ThecourseassumesthestudentunderstandComputerScienceconceptsincludingtheC languageandfundamentalcomputerarchitecture.Theoverarchingaimistoprovidethe studentswithasetofusefulproblem-solvingtoolsfoundintheEmbeddedSystemsIndustry.As wellasrevisitthescientificmethodasitpertainstoEmbedded. Eachlessonwillcompriseaninteractiveportionwherethestudentswillbeencourageto providequestionsespeciallyaroundEmbeddedSystemsandcharacterization. 1.Introduction&Characterization ESTIMATEDLESSON1 GOAL Introducehardware-softwarecharacterization.Explainhowthatcharacterizationisusedto definetherequirementsofafinalEmbedded&Real-TimeSystem. MEASUREMENT Givenarequirementthestudentsshouldbeabletoprovidethecorrecthardware-software configuration.ThislessonwillintroduceEmbedded&Real-time,basicsystemdesign, exceptionsandhandlingexceptions(includinginterrupts),andthetypeofkernel/executives requiredforaspecificsolution.LaterpartofthelessonwillfurtherintroducetheconceptRealTimeandthedifferentmethodstodeterminewhetheraproblemcanbeschedulablethrough RateMonotonic(RMS)andEarliestDeadlineFirstscheduling(EDF). STRUCTURE - IntroductiontoEmbedded&Real-TimeSystems,andtheCharacterizationTheme - Applications,Tasks,ThreadsandProcesses - Exceptions,Interrupts,Stacks,ContextSwitch,Ready-ListandScheduler - Deterministic(Real-Time)andnon-deterministicbehavior - SystemLevelCharacterization - Schedulingalgorithms - Re-entrant/nonre-entrantkernel - Nestedandnon-nestedinterrupthandling - Introduceschedulingalgorithms 1. Shortest-job-first 2. First-come-first-serve 3. Round-robin 4. Priority-scheduling - Introducereal-timeschedulingdesign 1. Askthequestionisthesystemschedulable? 2. RateMonotonicscheduling 3. EarliestDeadlineFirstScheduling 2.Fundamentals ESTIMATEDLESSON1 GOAL FundamentalslessonwillexplaintwoimportantareasinEmbedded,namelythe boot/initializationprocessandtheconstraintsondevelopmenttoolsandenvironmentsfor Embedded&Real-Timesystems. MEASUREMENT Studentswillbeintroducedtoahardwarebootflowforagenerichardwareplatform.Thiswill involvegoingthroughtheorderandthespecificpiecesofhardwarethatarerequiredtobe initializedbeforeanOperatingSystem/Executiveisfunctioning.Onthesoftwaresidestudents willbere-introducedtocompilers,debuggerandintroducedtohardware-assist debugging/traceforEmbedded&Real-Timedevelopment. STRUCTURE - Coveracompletebootprocessofasimpledevice - Re-visitcompilers,debuggersandarchitectures - Covercompileroptimizations - Hardwareassistedtools:JTAGProbes,HardwareTrace,LogicalAnalyzersandOscilloscopes 3.Memory ESTIMATEDLESSONS2 GOAL Provideanoverviewoftheuseofcachesandintroducethedifferentformsofmemory managementwith-respect-toEmbedded&Real-TimeSystems.Coveringsimple microcontrollerstothemoreadvancedmulticoresystems. MEASUREMENT Studentswillbeintroducedtothecomplexitiesofmemorysystems.Afterthesetwolectures theywillhaveabasicunderstandingofcachesandinparticularhowdifferentcachepolicy effecttheoverallperformanceofasystem.Intertwinedistheneedtounderstandthedifferent memorymanagementtechniques-linearmemory,protectedmemoryandfullvirtualmemory. Studentswillhaveagoodunderstandingonthetradeoffsofusingdifferentmemory managementmethods. STRUCTURE - Memorylayout - CachesRevisited • Cachelines • Cachelockdown • VirtualandPhysicalcaches - MemoryProtection • Protectionregions - MemoryManagementUnit • TLB–softwareandhardwareoperations • VirtualMemory • Demandpaging • Loadingandunloadingapplications • Sharedresources - MessagingPassing • Mailboxes(revisitedwithconnectionwithmemorydesign) - DirectMemoryAccess(DMA) - Implicationsontools 4.PowerManagement ESTIMATEDLESSONS1 GOAL Introducethecomplexityofpowermanagementatthehardwarelevel.Powermanagementis particularlyimportantforInternet-of-Things,Mobiledevicesaswellasdormanttethered devices. MEASUREMENT Studentswillbeintroducedtopowermanagementasasubject.Andhowpowermanagement coverseverythingfromtetheredtountethereddevices.Explainthedifferencebetweenpower andenergyefficiencyequationsandwhyfrequencyisfundamentallyimportant.Introduce mobilephonepowerdemands,differenttechniquesusedtosavepowerconsumptionand finallysomebatterycharacteristics. STRUCTURE - Introducepowermanagement • Tetherandnon-tethered(mobile) • Powerstatemachine - - - MobilePowerManagement IntroducethePowerandEnergyequations Processorfeaturesthathelpwithpowercontrol • Voltagescaling • Frequencyscaling • Wait-on-interrupt Peripherals • Ethernet • LCD • Harddrives BasicBatteryCharacteristics • Charging/dischargingofbatteries • Historyeffects PowerTransmission PowerHarvesting DiscussionofthecomplexityofPowerManagement 5.CriticalSystemsI:Reliability ESTIMATEDLESSONS1 GOAL IntroducereliabilityforEmbedded&Real-TimeSystemsandexplainthedifficultieshardware agingincurs. MEASUREMENT Studentwillbeintroducedtoreliabilityasasubjectandtheinterestingareaofwhytechnology fails.ThelessonwillincludedescribingOccam’srazor,hardwareagingandthefundamental reliabilityequations.Explaindifferentmethodsofrecoveryonceadeadlockhasoccurred. Studentwillbeawareofdifferentembeddeddesignsthatcanhelpinreliabilitysuchas,voting, watchdogtimers,andbasicreset. STRUCTURE - IntroducesubjectofReliabilityandrelationshipwithSafety-Critical - ExplainOccam’sRazor - Hardwareagingandthebathtubfailurecurve - Discusswhysystemsfail? - DefinethetermsSLOC,MTTF,MTTR,andMTBF - Availability(Uptime) - FaultTolerance - - Revisitinterrupthandling Describedeadlocks • Deadlockidentification • Deadlockrecovery • Priorityinversion Hardwareassistance • Watchdogtimers(re-visit) BasicReset 6.CriticalSystemII:Safety-Critical ESTIMATEDLESSONS1 GOAL Introducetheaspectsofsafety-criticalforEmbedded&Real-TimeSystems. MEASUREMENT StudentswillbeintroducedtoSafety-Criticalandtheconsequencesoffailure.Thisincludes havingacomprehensiveunderstandingofthephilosophybehindsafety-criticalandthe consequencesofbypassingthephilosophy.Understandthemeaningoftheimportantterms andthedifferentmethodstodesignasafety-criticalsystem.Thestudentswillbeintroducedto onesafety-criticalstandardDO-178B,aswellastheMISRACstandardforsafety-criticalC writingstyle. STRUCTURE - Introducetheconceptofsafety-critical - Describesecurity,integrity,vulnerability,threatandrisk - Complexityanalysis - Consistencychecking - Instrumentingcode - Writingcodetocheckforstackoverflowandunderflow - Redundancy(Byzantinealgorithms) - MISRACStandard - Example:safety-criticalstandardDO-178B 7.Simulation ESTIMATEDLESSONS1 GOAL IntroducetheaspectsofSimulationforEmbedded&Real-TimeSystemsandhowsimulation canbeusedasanimportanttoolfordesignanddevelopment. MEASUREMENTS Introduceandexploretheconceptofsimulation.Includingthedifferencesbetweensimulation andemulationofsystems.Beabletodefinecycleaccurate,cycleapproximateandinstruction levelmodeling.Definetheadvantagesandscopeofsimulationandhencediscusstheproblems thatsimulationintroduces. STRUCTURE - Introducesimulationmodeling o Why? o How? o Cost? - Differenttypesofsimulationmodels o Cycleaccuratemodeling o Cycleapproximatemodeling o Instructionlevelmodeling - Co-design/Co-simulation 8Coursework–HardwareCharacterization GOAL CharacterizeanduseahardwareplatformforEmbedded&Real-TimeDevelopment. MEASUREMENT Takeadevelopmentplatforminitializetheboard,characterize/exploreitsfeaturesandcreate yourownproject(andpresentyourprojectfindings).Thisincludessettingupabootimage, initializingtheWi-Fiandinstallingtelnet/SSH/Samba.Measuringinterruptlatency,memory performance,codeperformance,communicationrequirementsandpotentiallytheabilityto connectsensorsandinterrupts. EQUIPMENT • • • • RaspberryPi2 MiniSDCard16GB Wi-FiUSB PowerSupply