jop a java optimized processor for embedded real time
play

JOP: A Java Optimized Processor for Embedded Real-Time Systems - PowerPoint PPT Presentation

JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schberl University of Technology Vienna, Austria Overview Motivation Related work JOP architecture WCET Analysis Results Conclusions, future work


  1. JOP: A Java Optimized Processor for Embedded Real-Time Systems Martin Schöberl University of Technology Vienna, Austria

  2. Overview � Motivation � Related work � JOP architecture � WCET Analysis � Results � Conclusions, future work � Demo Embedded Java Systems Java Optimized Processor 2

  3. Embedded Systems � An embedded system is a computer systems that is part of a larger system � Examples � Washing machine � Car engine control � Mobile phone Embedded Java Systems Java Optimized Processor 3

  4. Real-Time Systems � A definition by John A. Stankovic: In real-time computing the correctness of the system depends not only on the logical result of the computation but also on the time at which the result is produced. Embedded Java Systems Java Optimized Processor 4

  5. Real-Time Systems � Imagine a car accident � What happens when the airbag is fired too late? � Even one ms too late is too late! � Timing is an important property � Conservative programming styles Embedded Java Systems Java Optimized Processor 5

  6. RT System Properties � Often safety critical � Execution time has to be known � Analyzable system � Application software � Scheduling � Hardware properties � Worst case execution time (WCET) Embedded Java Systems Java Optimized Processor 6

  7. Issues with COTS � COTS are for average case performance � Make the common case fast � Very complex to analyze WCET � Pipeline � Cache � Multiple execution units Embedded Java Systems Java Optimized Processor 7

  8. The Idea � Build a processor for RT System � Optimize for the worst case � Design philosophy � Only WCET analyzable features � No unbound pipeline effects � New cache structure � Shall not be slow Embedded Java Systems Java Optimized Processor 8

  9. Related Work � picoJava � SUN, never released � aJile JEMCore � Available, RTSJ, two versions � Komodo � Multithreaded Java processor � FemtoJava � Application specific processor Embedded Java Systems Java Optimized Processor 9

  10. JOP Architecture � Overview � Microcode � Processor pipeline � An efficient stack machine � Instruction cache Embedded Java Systems Java Optimized Processor 10

  11. JOP Block Diagram Embedded Java Systems Java Optimized Processor 11

  12. 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!) Embedded Java Systems Java Optimized Processor 12

  13. 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 Embedded Java Systems Java Optimized Processor 13

  14. Microcode � Stack-oriented � An example � Compact dup: dup nxt // 1 to 1 mapping � Constant length // a and b are scratch variables � Single cycle // for the JVM code. � Low-level HW dup_x1: stm a // save TOS access stm b // and TOS − 1 ldm a // duplicate TOS ldm b // restore TOS − 1 ldm a nxt // restore TOS // and fetch next bytecode Embedded Java Systems Java Optimized Processor 14

  15. Processor Pipeline Embedded Java Systems Java Optimized Processor 15

  16. 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 Embedded Java Systems Java Optimized Processor 16

  17. 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 Embedded Java Systems Java Optimized Processor 17

  18. Two-Level Stack Cache Dual read only from TOS and Instruction fetch � � TOS-1 Instruction decode � Two register (A/B) � Execute, load or store � Dual-port memory � Simpler Pipeline � No forwarding logic � Embedded Java Systems Java Optimized Processor 18

  19. JVM Properties � Short methods � Maximum method size is restricted � No branches out of or into a method � Only relative branches Embedded Java Systems Java Optimized Processor 19

  20. 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 � Simpler WCET analysis Embedded Java Systems Java Optimized Processor 20

  21. 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. Embedded Java Systems Java Optimized Processor 21

  22. WCET Analysis � WCET has to be known � Needed for schedulability analysis � Measurement usually not possible � Would require test of all possible cases � Static analysis � Theory is mature � Low-level analysis is the issue Embedded Java Systems Java Optimized Processor 22

  23. WCET Analysis � Path analysis � Low-level analysis (bytecodes) � Global low-level analysis � WCET Calculation Embedded Java Systems Java Optimized Processor 23

  24. WCET Analysis for JOP � Simple low-level analysis � Bytecodes are independent � No shared state � No timing anomalies � Bytecode timing is known and documented � Simpler caches Embedded Java Systems Java Optimized Processor 24

  25. WCET Tool � Execution time of basic blocks � Annotated loop bounds � ILP problem solved � Simple cache analysis included � Only two block cache in loops � Will be extended Embedded Java Systems Java Optimized Processor 25

  26. Results � Size � Compared to soft-core processors � General performance � Application benchmark (KFL & UDP/IP) � Various Java systems Embedded Java Systems Java Optimized Processor 26

  27. Size of FPGA processors Processor Resources Memory f max (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 Embedded Java Systems Java Optimized Processor 27

  28. Application Benchmark 1000000 100000 Preformance [iteration/s] 10000 1000 100 10 1 P S I C m j t p e N o c n O m O J J d v g i I X T a o E j J J a m S n e t S u l o S J K Embedded Java Systems Java Optimized Processor 28

  29. Applications � Kippfahrleitung � Distributed motor control � ÖBB � Vereinfachtes Zugleitsystem � GPS, GPRS, supervision � TeleAlarm � Remote tele-control � Data logging � Automation Embedded Java Systems Java Optimized Processor 29

  30. JOP in Research � University of Lund, SE � Application specific hardware (Java-> VHDL) � Hardware garbage collector � Technical University Graz, AT � HW accelerator for encryption � University of York, GB � Javamen – HW for real-time systems � Institute of Informatics at CBS, DK � Real-time GC � Embedded RT Machine Learning Embedded Java Systems Java Optimized Processor 30

  31. JOP for Teaching � Easy access – open-source � Computer architecture � Embedded systems � UT Vienna � JVM in hardware course � Digital signal processing lab � CBS � Distributed data mining (WS 2005) � Very small information systems (SS 2006) � Wikiversity Embedded Java Systems Java Optimized Processor 31

  32. Conclusions � Real-time Java processor � Exactly known execution time of the BCs � Time-predictable method cache � Simple real-time profile � Resource-constrained processor � RISC stack architecture � Efficient stack cache � Flexible architecture Embedded Java Systems Java Optimized Processor 32

  33. Future Work � Real-time garbage collector � Instruction cache WC analysis � Hardware accelerator � Multiprocessor JVM � Java computer Embedded Java Systems Java Optimized Processor 33

  34. More Information � Two pages short paper � JOP Thesis and source � http://www.jopdesign.com/thesis/index.jsp � http://www.jopdesign.com/download.jsp � Various papers � http://www.jopdesign.com/docu.jsp Embedded Java Systems Java Optimized Processor 34

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend