wcet analysis for a java processor
DESCRIPTION
WCET Analysis for a Java Processor. Martin Schoeberl TU Vienna, Austria Rasmus Pedersen CBS, Denmark. Outline. Motivation WCET analysis The Java processor JOP Results Conclusion, future work Demo. Motivation. Schedule analysis For (hard) real-time Execution time numbers needed - PowerPoint PPT PresentationTRANSCRIPT
WCET Analysis for a WCET Analysis for a Java ProcessorJava Processor
Martin SchoeberlMartin SchoeberlTU Vienna, AustriaTU Vienna, Austria
Rasmus PedersenRasmus PedersenCBS, DenmarkCBS, Denmark
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
OutlineOutline
MotivationMotivation WCET analysisWCET analysis The Java processor JOPThe Java processor JOP ResultsResults Conclusion, future workConclusion, future work DemoDemo
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
MotivationMotivation
Schedule analysisSchedule analysis For (hard) real-timeFor (hard) real-time Execution time numbers neededExecution time numbers needed
Static WCET analysisStatic WCET analysis No measurements!No measurements!
Can not guarantee the WCCan not guarantee the WC Still usedStill used
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Issues with static WCET Issues with static WCET AnalysisAnalysis
Why is WCET Analysis so Why is WCET Analysis so seldom used?seldom used?
High-level part is easyHigh-level part is easy Low-level is the hard partLow-level is the hard part
Instruction timingInstruction timing CachesCaches Advanced, speculative processorsAdvanced, speculative processors
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Static WCET AnalysisStatic WCET Analysis
Mature researchMature research High-level based in ILPHigh-level based in ILP
Construct CFGConstruct CFG Add execution time to BBAdd execution time to BB Build ILP equations:Build ILP equations:
Sum of BB tSum of BB texeexe will be maximized will be maximized Frequency of in-edges = out-edgesFrequency of in-edges = out-edges Add loop constraintsAdd loop constraints
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Low-level WCET AnalysisLow-level WCET Analysis
Execution time of basic blocksExecution time of basic blocks Sum of instruction timing?Sum of instruction timing?
Not in modern CPUsNot in modern CPUs What about memory access?What about memory access?
Instruction cacheInstruction cache Instruction prefetchInstruction prefetch Data cacheData cache
Very hard for general purpose Very hard for general purpose CPUsCPUs
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
The Proposed SolutionThe Proposed Solution
Build a processor to simplify Build a processor to simplify WCET AnalysisWCET Analysis Avoid non analyzable featuresAvoid non analyzable features Find better solutionsFind better solutions
Java processor JOPJava processor JOP Built from ground up for WCETBuilt from ground up for WCET FPGA implementation (small)FPGA implementation (small) Not slow on averageNot slow on average
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
JOP FeaturesJOP Features
A A RISCRISC stack machine stack machine 4 stage pipeline4 stage pipeline
No dependenciesNo dependencies No shared state (e.g. memory)No shared state (e.g. memory)
Stack cacheStack cache Method cacheMethod cache
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
SizeSize
ResourceResource
(LC)(LC)
MemoryMemory
(KB)(KB)
FmaxFmax
(MHz)(MHz)
JOP min.JOP min. 10771077 3.253.25 9898
JOP typ.JOP typ. 20492049 3.253.25 100100
LightfootLightfoot 34003400 44 4040
LEON3LEON3 79787978 10.910.9 3535
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
PerformancePerformance
0
2000
4000
6000
8000
10000
12000
J OP Cjip Komodo aJ 80 aJ 100
Perf
orm
ance [itera
tions/s
]
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Low-level TimingLow-level Timing
Bytecode execution time knownBytecode execution time known Analysis of microcode (DATE’06)Analysis of microcode (DATE’06) No dependenciesNo dependencies DocumentedDocumented
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Memory AccessMemory Access
Assume SRAMAssume SRAM Constant access time (Constant access time (rrwsws and and wwwsws))
Access time partially hidden:Access time partially hidden:
Method cache load:Method cache load:
Partially hiddenPartially hidden
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Method CacheMethod Cache
Full method loadedFull method loaded Misses only on invoke/returnMisses only on invoke/return Cache contains several Cache contains several
methodsmethods Simpler to analyzeSimpler to analyze
At call tree levelAt call tree level Other instructions are a hitOther instructions are a hit
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Method Cache AnalysisMethod Cache Analysis
Only call tree leavesOnly call tree leaves Return is always a hitReturn is always a hit Invoke in a loopInvoke in a loop
for (int i=0; i<10; ++i) {for (int i=0; i<10; ++i) {
foo();foo();
}}
One miss and 9 hitsOne miss and 9 hits Miss times added to the CFGMiss times added to the CFG
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Miss Times in the CFGMiss Times in the CFG
=>
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
EvaluationEvaluation
MeasuredMeasured
(cycle)(cycle)
EstimatedEstimated
(cycle)(cycle)
PessimismPessimism
(ratio)(ratio)
RobotRobot 736736 775775 1.051.05
LiftLift 72147214 1124911249 1.561.56
KflKfl 1333413334 2876328763 2.162.16
UdpIpUdpIp 1182311823 219569219569 18.5718.57
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
ConclusionConclusion
We need static WCET analysisWe need static WCET analysis COTS processors don’t workCOTS processors don’t work Design HW for WCETDesign HW for WCET
A RT computer architectureA RT computer architecture JOP is a first step to RT JOP is a first step to RT
processorsprocessors Analysis at bytecode levelAnalysis at bytecode level
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Future WorkFuture Work
Method cache cont.Method cache cont. Detection of loop boundsDetection of loop bounds Integration into EclipseIntegration into Eclipse WC memory consumptionWC memory consumption
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Demo TimeDemo Time
Martin Schoeberl – WCET Analysis for a Java Martin Schoeberl – WCET Analysis for a Java ProcessorProcessor
JTRES 2006JTRES 2006
Thank You!Thank You!
QuestionsQuestions
&&
SuggestionsSuggestions