基于实时系统的时间追踪验证

VIP免费
3.0 侯斌 2024-11-19 5 4 2.51MB 78 页 15积分
侵权投诉
Master’sthesisinControlEngineering
TracebasedTimingVerificationofReal
TimeSystems
Tangxuhua
FacultyforOpticalElectricalandComputerEngineering
UniversityofShanghaiforScienceandTechnology
incooperationwith
TimingArchitectsEmbeddedSystemsGmbH
1st
assessor
Wanhongpin
2nd
assessor
Wangzhengxiang
Advisors
Dr.MichaelDeubzer
AndreasSailer
Matriculationnumber
127680544
Date
March9,2015
I
Abstract
ThethesisservestopushtheprocessoftheprojectZeloS³:Creatingthemodelwhichcan
reflectthetimingbehaviorofaspecificrealtimeoperatingsystem(RTOS)withTAToolSuite,
usingOnchipanalyzertotraceitsrunningprocessandreconstructitwithTAToolSuite,and
finallyusingthecustomizedJavaapplicationtodothecomparisonabouttherunning
behaviorbetweenthem,andfindingoutthereasonthatcausesthedifferences.
Thethesisbeginswiththeintroductionofbasicknowledgeaboutdebuggingtechnologiesin
themarket,andthendoingthecomparisonamongdifferentkindsofdebugging
technologies.Thesecondchapterisabouttheintroductionofthesoftwareandhardware
platformthatareusedinthethesis.Aftercoveringthefoundationalelements,thecoming
chapterisaboutthecontextswitchingresearching.Thefourthchapterisaboutthetasksin
projectZeloS³,themodelingpartandcomparisonpartwillbeintroducedindetailsinthis
chapter.
Thethesiscloseswithasynopsisofboththeexperiencesandproblemsencounteredduring
therealizationprocessandanoutlooktothefuture.
Keywords:RealTimeOperatingSystem,DebuggingTechnology,HardwareTracing,Java
II
Acknowledgments
Bestregardstoallthepeoplewhosupportandhelpmeduringthissixmonths.
Firstandforemost,Iwouldliketogratefullythankmyadvisor,Dr.MichaelDeubzer.Itisyou
thatgivemeachancetofeeltheawesomeandbeautyofGermany.
Furthermore,I’dliketothankmysupervisorAndreassailer,whoisknowledgeableand
patient,givesmehelpsanytimeIneed,givesmedirectionsanytimeIgetlost.
Thankstoallmycolleagues,FelixMartin,MaximilianHempe,andsoon,whogivemehelps
andadvisesintheirbusytime.
Heartfeltthankstomyfamily,youarethereasonwhyIamheretopursuemydream.
Finally,IexpressmydeepappreciationtomygirlfriendAminWangforherencouragement
andlove.TheromantictimeinSwitzerlandwillbeourmutualbeautifulmemoryinourlife.
Tangxuhua
Regensburg,Germany
October2014
III
Contents
1BackgroundKnowledge.......................................................................................................................1
1.1TheIntroductionofEmbeddedSystem........................................................................................1
1.2TheIntroductionofRealTimeOperatingSystem........................................................................1
1.2.1TheMainCharacteristicsofRTOSes......................................................................................2
1.2.2IntroductionofSeveralPopularRTOSProductsOnTheMarket........................................2
1.3TheIntroductionoftheMultiCoreSystems...............................................................................3
1.4DebuggingTechnology.................................................................................................................3
1.4.1TheSoftwareDevelopmentEnvironmentinEmbeddedSystem........................................3
1.4.2IntegratedDevelopmentEnvironmentinEmbeddedSoftware.........................................3
1.4.3CommunicationPortsforCrossDebugging.........................................................................4
1.5TheCategroriesofDebuggingStrategies...................................................................................5
1.5.1SoftwarebasedDebugging...................................................................................................5
1.5.2HardwarebasedDebugging..................................................................................................7
1.5.3TheComparisonoftheDebuggingTechnologies...............................................................10
2IntroductionoftheSoftwareandHardwarePlatform....................................................................12
2.1IntroductionoftheSoftwarePlatform.......................................................................................12
2.1.1IntroductionofTAToolSuite................................................................................................12
2.1.2IntroductionofOSEK............................................................................................................12
2.1.3IntroductionofErikaOS.......................................................................................................13
2.2IntroductionoftheHardwarePlatform.....................................................................................15
2.2.1IntroductionofExperimentalBoard....................................................................................15
2.2.2IntroductionoftheOnchipAnalyzer..................................................................................16
2.3TheComparisonofOnchipAnalyzers.......................................................................................19
3DataTracingResearch........................................................................................................................22
3.1DataTracingConfigurationinOS................................................................................................22
3.2IntroductionoftheContextSwitchinginRTOS........................................................................23
3.2.1TheDefinitionofContextSwitching...................................................................................24
3.3DataHandlinginTAInspector....................................................................................................27
3.4SingleTask..................................................................................................................................30
3.4.1RelatedKnowledgeinErikaOS...........................................................................................30
3.4.2CaseStudy.............................................................................................................................31
3.4.3TheComparisonandConclusion........................................................................................33
3.5MultitaskinginNonPreemptiveKernel...................................................................................34
3.5.1DataHandling.......................................................................................................................34
3.5.2CaseStudy.............................................................................................................................37
3.5.3TheComparisonandConclusion........................................................................................43
3.6InterruptHandling......................................................................................................................43
3.6.1RelatedKnowledgeinErikaOS...........................................................................................43
3.6.2CaseStudy............................................................................................................................44
3.6.3TheComparisonandConclusion........................................................................................48
3.7TasksinMulticoreCondition.....................................................................................................49
3.7.1TaskSchedulingPrincipleinErikaOS..................................................................................49
3.7.2CaseStudy............................................................................................................................49
4ZeloS³Cycle.........................................................................................................................................51
IV
4.1IntroductionofZeloS³andItsObjectives...................................................................................51
4.2TheMainProcessofZeloS³.........................................................................................................51
4.3MyRoleinThisProject................................................................................................................52
4.3.1ModelDesigning...................................................................................................................52
4.3.2JavaProgramming...............................................................................................................56
5Outlook..............................................................................................................................................69
6Conclusion.........................................................................................................................................70
7Appendix.............................................................................................................................................72
1
1BACKGROUNDKNOWLEDGE
Thedebuggingprocessforembeddedsystemsisanimperativestepinasystemdesigning.
Thevastarrayofembeddedsystems,andtheeverincreasingcomplexityofthesystems
structuremakedebuggingagrowingchallenge.Differentdomainsimposedifferent
requirementsonthesystemsandasembeddedsystemspervadeoursociety,
newrequirementsareintroduced.
1.1THEINTRODUCTIONOFEMBEDDEDSYSTEM
Embeddedsystems,refertothededicatedapplicationorientedcomputersystems,whose
hardwareandsoftwarepartscanbetailoredfortheconsiderationoffunctionality,reliability,
cost,powerconsumption,etc.
Itgenerallyconsistsoffourparts:anembeddedmicroprocessor,peripheralhardware
devices,embeddedoperatingsystemsandapplicationsusedinembeddedoperating
systemstoperformspecificfunctions.Withthedevelopmentofsocialeconomyand
informationtechnology,embeddedsystemshavebeenusedmorewidelyinourlives,and
playamoreandmoreimportantroleinthefieldofmilitary,academicsanddaily
lives.Prospectsfortheembeddedsystemscan’tbeunderestimated.
Comparedtogeneralpurposecomputersystems,embeddedsystemshavethefollowing
characteristics:
Embeddedsystemsareoftenapplicationoriented.Thebiggestdifference
betweenembeddedCPUandgeneralpurposeembeddedCPUisthatembeddedCPUis
normallyforspecificusergroups.Ithascharacteristicssuchaslowpowerconsumption,small
size,highintegrationandisabletointegratealotoftaskswhichshouldbefinishedby
generalpurposeCPUboardintothechip,itmakesembeddedsystemssmaller,easierfor
mobilecapability.
Anembeddedsystemistheproductofadvancedcomputertechnology,semiconductor
technology,electronictechnologyandspecificApplicationsindifferentindustries.It
determinesthatitisaninnovativeknowledgeintegratedsystems.
Embeddedsystemdoesnothavebootstrappedcapabilityfordevelopment,evenafterthe
designing,theuserusuallycan’tmodifytheprogramfunction,itonlycanbedevelopedwith
thespecificdevelopmenttoolsandenvironment.
1.2THEINTRODUCTIONOFREALTIMEOPERATINGSYSTEM
“Realtimesystemsarecharacterizedbythesevereconsequencesthatresultiflogicalaswell
astimingcorrectnesspropertiesofthesystemarenotmet.”[2]
RealtimeoperatingsystemsbelongtoRealtimesystem.TherearetwotypesofRTOS:soft
andhard.Thepurposeofthesoftoperatingsystemistogetabalancebetweenthetask
executionspeedandmeetingthetimerequirements.AnRTOSthatcanusually
orgenerallymeetadeadlineisasoftrealtimeOS,butifitcanmeeta
deadlinedeterministicallyitisahardrealtimeOS.[2]
2
1.2.1THEMAINCHARACTERISTICSOFRTOSES
Reliability:Embeddedsystemsmustbereliable.DependingontheApplication,thesystem
mightneedtooperateforlongperiodswithouthumanintervention.Differentdegreesof
reliabilitymayberequired.Forexample,adigitalsolarpoweredcalculatormightresetitselfif
itdoesnotgetenoughlight,yetthecalculatormightstillbeconsideredacceptable.Onthe
otherhand,atelecomswitchcannotresetduringoperationwithoutincurringhighassociated
costsfordowntime.TheRTOSesintheseApplicationsrequiredifferentdegreesof
reliability.Althoughdifferentdegreesofreliabilitymightbeacceptable,ingeneral,areliable
systemisonethatisavailable(continuestoprovideservice)anddoesnotfail.Acommonway
thatdeveloperscategorizehighlyreliablesystemsisbyquantifyingtheirdowntimeperyear.
Predictability:Becausemanyembeddedsystemsarealsorealtimesystems,meetingtime
requirementsisthekeytoensuringproperoperation.TheRTOSusedinthiscaseneedstobe
predictabletoacertaindegree.ThetermdeterministicdescribesRTOSeswithpredictable
behavior,inwhichthecompletionofoperatingsystemcallsoccurswithinknowntimeframes.
Performance:Thisrequirementdictatesthatanembeddedsystemmustperformfastenough
tofulfillitstimingrequirements.Typically,themoredeadlinestobemetandtheshorterthe
timebetweenthemmeansthefasterthesystem'sCPUmustbe.Althoughunderlying
hardwarecandictateasystem'sprocessingpower,itssoftwarecanalsocontributetosystem
performance.Typically,theprocessor'sperformanceisexpressedinmillioninstructionsper
second(MIPS).
Compactness:Applicationdesignconstraintsandcostconstraintshelpdeterminehow
compactanembeddedsystemcanbe.Forexample,acellphoneclearlymustbesmall,
portable,andlowcost.Thesedesignrequirementslimitsystemmemory,whichinturnlimits
thesizeoftheApplicationandoperatingsystem.Insuchembeddedsystems,where
hardwarerealestateislimitedduetosizeandcosts,theRTOSclearlymustbesmalland
efficient.Inthesecases,theRTOSmemoryfootprintcanbeanimportantfactor.Tomeet
totalsystemrequirements,designersmustunderstandboththestaticanddynamicmemory
consumptionoftheRTOSandtheApplicationthatwillrunonit.
Scalability:BecauseRTOSescanbeusedinawidevarietyofembeddedsystems,theymustbe
abletoscaleupordowntomeetApplicationspecificrequirements.Dependingonhowmuch
functionalityisrequired,anRTOSshouldbecapableofaddingordeletingmodular
components,includingfilesystemsandprotocolstacks.
1.2.2INTRODUCTIONOFSEVERALPOPULARRTOSPRODUCTSONTHEMARKET
“VxWorksisaRTOSdevelopedasproprietarysoftwarebyWindRiver.VxWorksisdesigned
foruseinembeddedsystemsrequiringrealtime,deterministicperformanceand,inmany
cases,safetyandsecuritycertification,forindustries,suchasaerospaceanddefense,medical
devices,industrialequipment,robotics,energy,transportation,networkinfrastructure,
automotive,andconsumerelectronics.”[4]
MicroC/OSII(µC/OSIIoruC/OSII),istheacronymforMicroControllerOperatingSystems
Version2.Itisaprioritybasedpreemptiverealtimemultitaskingoperatingsystemkernelfor
microprocessors,writtenmainlyintheCprogramminglanguage.Itisintendedforuse
inembeddedsystems.μC/OSIIcanmanage64tasks,andprovidesthefunctionoftask
3
schedulingandmanagement,memorymanagement,intertasksynchronizationand
communication,timemanagementandinterruptservice.Thecharacteristicsarehigh
efficiency,smallfootprint,excellentrealtimeperformanceandscalabilityandsoon.
μClinuxwasaforkoftheLinuxkernelformicrocontrollerswithoutamemorymanagement
unit.Itwasintegratedintothemainlineofdevelopment.Theprojectcontinuestodevelop
patchesandtoolsformicrocontrollers.
ErikaOSwasusedfortheresearchandtheproject.Thus,itwillbeintroducedindetailsinthe
secondchapter.
1.3THEINTRODUCTIONOFTHEMULTICORESYSTEMS
Amulticoreprocessorisasinglecomputingcomponentwithtwoormoreindependent
actualcentralprocessingunits(called"cores"),whicharetheunitsthatreadand
executeprograminstructions.[5]Manufacturerstypicallyintegratethecoresontoa
singleintegratedcircuitdie,orontomultiplediesinasinglechippackage.SomulticoreCPU
designingrequirelessprintedcircuitboardspacecomparedwithmultichipSMPdesigning.
Multicorechipsperformancewellatlowerenergy.Also,thememoryissharedbetween
differentcores.
InfineonAurixTC298TFtricorecontrollerwasusedasthehardwareplatformintheresearch
andtheproject,thestructurewillbeintroducedastheexampleofmulticoresysteminthe
secondchapter.
1.4DEBUGGINGTECHNOLOGY
Aftertherelatedintroductionbefore,wehavealreadyhadthebasicknowledgeaboutRTOS.
Nowthesoftwaredevelopmentenvironmentandtheimplementmethodofcrossdebugging
andthecharacteristicofsomehardwaredebuggertoolssuchasICE,BDM,andJTAG,which
areusuallyusedinembeddedsystem,willbeintroduced.Andthenallthemethodswillbe
comparedaccordingtotheiradvantagesanddisadvantages.
1.4.1THESOFTWAREDEVELOPMENTENVIRONMENTINEMBEDDEDSYSTEM
Embeddedsystemdevelopingenvironmentismainlycomposedoftwoparts,embedded
operatingsystemsandsoftwaredevelopmenttools.Embeddedoperatingsystemisthecore
inembeddedsoftwaredevelopmentenvironment,andisthedevelopingplatformof
embeddedApplicationsoftware.Softwaredevelopmenttoolsforembeddedsystemmainly
refertothetoolforcompiling,debugging,andsimulatingfortargethardwareplatform.The
diversityofthehardwareenvironmentdeterminesthemultiplatformnatureofthese
toolsinevitably.Socrossdevelopmentmodelhasbecomethefirstchoiceforembedded
systemdevelopment.Anddebuggingplaysaveryimportantroleinembeddedsystems
developmentprocess.
1.4.2INTEGRATEDDEVELOPMENTENVIRONMENTINEMBEDDEDSOFTWARE.
Therearetworolesintheembeddedsystemdevelopmentprocess‐hostandtarget
machines:thehostmachineisthecomputerwhichisusedforcompiling,linking,addressing;
thetargetmachinereferstothehardwareplatformwhichisusedforrunningembedded
摘要:

  Master’s thesis in Control Engineering   Trace‐based Timing Verification of Real‐Time Systems  Tang xuhua  Faculty for Optical‐Electrical and Computer Engineering University of Shanghai for Science and Technology  in cooperation with Timing‐Architects Embedded Systems GmbH  1st assessor Wan hongpi...

展开>> 收起<<
基于实时系统的时间追踪验证.pdf

共78页,预览8页

还剩页未读, 继续阅读

作者:侯斌 分类:高等教育资料 价格:15积分 属性:78 页 大小:2.51MB 格式:PDF 时间:2024-11-19

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 78
客服
关注