JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.
-
Upload
kory-davidson -
Category
Documents
-
view
223 -
download
3
Transcript of JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.
![Page 1: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/1.jpg)
JOP: A Java Optimized Processor for Embedded Real-Time Systems
Martin Schöberl
![Page 2: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/2.jpg)
VSIS JOP Overview 2
JOP Research Targets
Java processor Time-predictable architecture Small design Working solution (FPGA)
![Page 3: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/3.jpg)
VSIS JOP Overview 3
Overview Motivation Research objectives Java and the JVM Related work JOP architecture Results Conclusions, future work
![Page 4: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/4.jpg)
VSIS JOP Overview 4
Current Praxis
C and assembler Embedded systems are RT
systems Different RTOS JIT is not possible JVM interpreter are slow => Java processor
![Page 5: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/5.jpg)
VSIS JOP Overview 5
Why Java?
Safe OO language No pointers Type-safety Garbage collection
Built in model for concurrency Platform independent Very rich standard library
![Page 6: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/6.jpg)
VSIS JOP Overview 6
Research Objectives Primary objectives:
Time-predictable Java platform Small design A working processor
Secondary objectives: Acceptable performance A flexible architecture Real-time profile for Java
![Page 7: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/7.jpg)
VSIS JOP Overview 7
Java and the JVM
Java language definition Class library The Java virtual machine (JVM)
An instruction set – the bytecodes A binary format – the class file An algorithm to verify the class file
![Page 8: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/8.jpg)
VSIS JOP Overview 8
The JVM instruction set
32 (64) bit stack machine Variable length instruction set Simple to very complex
instructions Symbolic references Only relative branches
![Page 9: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/9.jpg)
VSIS JOP Overview 9
Memory Areas for the JVM
Stack Most often accessed On-chip memory as cache
Code Novel instruction cache
Class description and constant pool Heap
![Page 10: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/10.jpg)
VSIS JOP Overview 10
Implementations of the JVM
Interpreter Just-in-time compilation Batch compilation Hardware implementation
![Page 11: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/11.jpg)
VSIS JOP Overview 11
Related Work picoJava
SUN, never released aJile JEMCore
Available, RTSJ, two versions Komodo
Multithreaded Java processor FemtoJava
Application specific processor
![Page 12: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/12.jpg)
VSIS JOP Overview 12
Research Objectives
picoJava aJileKomod
oFemtoJav
aJOP
Predictability
- - . - . + +
Size - - - + - + +
Performance
+ + + - - - +
JVM conf. + + + - - - .
Flexibility - - - - + + + + +
![Page 13: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/13.jpg)
VSIS JOP Overview 13
JOP Architecture
Overview Microcode Processor pipeline An efficient stack machine Instruction cache
![Page 14: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/14.jpg)
VSIS JOP Overview 14
JOP Block Diagram
![Page 15: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/15.jpg)
VSIS JOP Overview 15
JVM Bytecode Issue
Simple and complex instruction mix No bytecodes for native functions Common solution (e.g. in picoJava):
Implement a subset of the bytecodes SW trap on complex instructions Overhead for the trap – 16 to 926
cycles Additional instructions (115!)
![Page 16: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/16.jpg)
VSIS JOP Overview 16
JOP Solution Translation to microcode in hardware Additional pipeline stage No overhead for complex bytecodes
1 to 1 mapping results in single cycle execution
Microcode sequence for more complex bytecodes
Bytecodes can be implemented in Java
![Page 17: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/17.jpg)
VSIS JOP Overview 17
Microcode Stack-oriented Compact Constant
length Single cycle Low-level HW
access
An example
dup: dup nxt // 1 to 1 mapping
// a and b are scratch variables// for the JVM code.
dup_x1: stm a // save TOS stm b // and TOS−1 ldm a // duplicate TOS ldm b // restore TOS−1 ldm a nxt // restore TOS // and fetch next bytecode
![Page 18: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/18.jpg)
VSIS JOP Overview 18
Processor Pipeline
![Page 19: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/19.jpg)
VSIS JOP Overview 19
Interrupts Interrupt logic at bytecode translation
Special bytecode Transparent to the core pipeline
Interrupts under scheduler control Priority for device drivers No additional blocking time Integration in schedulability analysis Jitter free timer events Bound to a thread
![Page 20: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/20.jpg)
VSIS JOP Overview 20
An Efficient Stack Machine
JVM stack is a logical stack Frame for return information Local variable area Operand stack
Argument-passing regulates the layout
Operand stack and local variables need caching
![Page 21: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/21.jpg)
VSIS JOP Overview 21
Stack access Stack operation
Read TOS and TOS-1 Execute Write back TOS
Variable load Read from deeper stack location Write into TOS
Variable store Read TOS Write into deeper stack location
![Page 22: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/22.jpg)
VSIS JOP Overview 22
Two-Level Stack Cache
Dual read only from TOS and TOS-1
Two register (A/B) Dual-port memory Simpler Pipeline No forwarding logic
Instruction fetch Instruction decode Execute, load or store
![Page 23: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/23.jpg)
VSIS JOP Overview 23
JVM Properties
Short methods Maximum method size is restricted No branches out of or into a
method Only relative branches
![Page 24: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/24.jpg)
VSIS JOP Overview 24
Proposed Cache Solution
Full method cached Cache fill on call and return
Cache misses only at these bytecodes Relative addressing
No address translation necessary No fast tag memory
![Page 25: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/25.jpg)
VSIS JOP Overview 25
Architecture Summary
Microcode 1+3 stage pipeline Two-level stack cache Method cache
The JVM is a CISC stack architecture,whereas JOP is a RISC stack architecture.
![Page 26: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/26.jpg)
VSIS JOP Overview 26
Results Size
Compared to soft-core processors General performance
Application benchmark (KFL & UDP/IP) Various Java systems
Real-time performance 100MHz JOP – 266MHz Pentium MMX Simple RT profile – RTSJ/RT-Linux
![Page 27: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/27.jpg)
VSIS JOP Overview 27
Size of FPGA processors
Processor Resources Memory fmax
[LC] [KB] [MHz]
JOP min. 1077 3.25 98
JOP typ. 1831 3.25 101
Lightfoot 3400 1 40
Komodo 2600 ? 33/4
FemtoJava 2000 ? 4
NIOS 2923 5.5 119
SPEAR 1700 8 80
![Page 28: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/28.jpg)
VSIS JOP Overview 28
Application Benchmark
1
10
100
1000
10000
100000
1000000
Pre
form
an
ce
[it
era
tio
n/s
]
![Page 29: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/29.jpg)
VSIS JOP Overview 29
Periodic Thread Jitter
Period JOP RTSJ/Linux
Min. Max. Min. Max.
50 us 35 us 63 us - -
70 us 70 us 70 us - -
100 us 100 us 100 us - -
5 ms 5 ms 5 ms 0.017 ms
19.9 ms
10 ms 10 ms 10 ms 0.019 ms
19.9 ms
30 ms 30 ms 30 ms 29.7 ms 30.3 ms
35 ms 35 ms 35 ms 29.8 ms 40.3 ms
![Page 30: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/30.jpg)
VSIS JOP Overview 30
Context Switch
JOP RTSJ/Linux
Min. Max. Min. Max.
Thread 2676 2709 11529 21090
SW Event 2773 2935 63060 101292
Low priority thread records current time High priority periodic/event thread measures
elapsed time after unblocking Time in cycles
![Page 31: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/31.jpg)
VSIS JOP Overview 31
Applications Kippfahrleitung
Distributed motor control ÖBB
Vereinfachtes Zugleitsystem GPS, GPRS, supervision
TeleAlarm Remote tele-control Data logging Automation
![Page 32: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/32.jpg)
VSIS JOP Overview 32
Contributions Real-time Java processor
Exactly known execution time of the BCs
No mutual dependency between BCs Time-predictable method cache
Resource-constrained processor RISC stack architecture Efficient stack cache Flexible architecture
![Page 33: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/33.jpg)
VSIS JOP Overview 33
Future Work
Real-time garbage collector Instruction cache WC analysis Hardware accelerator Multiprocessor JVM Java computer
![Page 34: JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649e415503460f94b3300c/html5/thumbnails/34.jpg)
VSIS JOP Overview 34
More Information
JOP Thesis and source http://www.jopdesign.com/thesis/inde
x.jsp http://www.jopdesign.com/
download.jsp Various papers
http://www.jopdesign.com/docu.jsp