Downloaded from orbit.dtu.dk on: Oct 04, 2021 JOP: A Java Optimized Processor for Embedded Real-Time Systems Schoeberl, Martin Publication date: 2005 Document Version Publisher's PDF, also known as Version of record Link back to DTU Orbit Citation (APA): Schoeberl, M. (2005). JOP: A Java Optimized Processor for Embedded Real-Time Systems. Vienna University of Technology. http://www.jopdesign.com/ General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. Users may download and print one copy of any publication from the public portal for the purpose of private study or research. You may not further distribute the material or use it for any profit-making activity or commercial gain You may freely distribute the URL identifying the publication in the public portal If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately and investigate your claim. DISSERTATION JOP: A Java Optimized Processor for Embedded Real-Time Systems ausgef¨uhrt zum Zwecke der Erlangung des akademischen Grades eines Doktors der technischen Wissenschaften unter der Leitung von AO.UNIV.PROF. DIPL.-ING. DR.TECHN. ANDREAS STEININGER und AO.UNIV.PROF. DIPL.-ING. DR.TECHN. PETER PUSCHNER Inst.-Nr. E182 Institut f¨ur Technische Informatik eingereicht an der Technischen Universit¨at Wien Fakult¨at f¨ur Informatik von DIPL.-ING. MARTIN SCHOBERL¨ Matr.-Nr. 8625440 Straußengasse 2-10/2/55 1050 Wien Wien, im J¨anner 2005 Abstract Compared to software development for desktop systems, current software design practice for embedded systems is still archaic. C/C++ and even assembler are used on top of a small real-time operating system. Many of the benefits of Java, such as safe object references, the notion of concurrency as a first-class language construct, and its portability, have the potential to make embedded systems much safer and simpler to program. However, Java technology is seldom used in embedded systems, due to the lack of acceptable real-time performance. This thesis presents a Java processor designed for time-predictable execution of real-time tasks. JOP (Java Optimized Processor) is the implementation of the Java virtual machine in hardware. JOP is intended for applications in embedded real-time systems and the primary implementation technology is in a field programmable gate array. This research demonstrates that a hardware implementation of the Java virtual machine results in a small design for resource-constrained devices. Architectural advancements in modern processor designs increase average perfor- mance with features such as pipelines, caches and branch prediction. However, these features complicate worst-case execution time (WCET) analysis and lead to very conservative WCET estimates. This thesis tackles this problem from the architec- tural perspective – by introducing a processor architecture in which simpler and more accurate WCET analysis is more important than average case performance. This thesis evaluates the issues surrounding the use of standard Java for real-time applications. In order to overcome some of the issues with standard Java, a profile for real-time Java is defined. Tight integration of the real-time scheduler with the supporting processor result in an efficient platform for Java in embedded real-time systems. The proposed processor and the Java real-time profile have been used with success to implement several commercial real-time applications. Kurzfassung Eingebettete Systeme werden zur Zeit vorwiegend in C/C++ oder auch noch in Assembler programmiert. Viele Vorteile der Programmiersprache Java, wie z.B. sichere Objektreferenzen, die Notation von Nebenl¨aufigkeit in der Sprache und auch die Portabilit¨at der Sprache, k¨onnten die Entwicklung dieser Systeme vereinfachen und auch die Sicherheit dieser Systeme erh¨ohen. Jedoch erschwert die mangelnde Echtzeitf¨ahigkeit von Standard Java den Einsatz in eingebetteten Systemen. Diese Arbeit beschreibt den Entwurf eines echtzeitf¨ahigen Java Prozessors. JOP (Java Optimized Processor) ist die Realisierung der Java virtual machine in Hard- ware. JOP ist f¨ur den Einsatz in eingebetteten, echtzeitf¨ahigen Systemen entworfen und ist in einem ‘Field Programmable Gate Array’ implementiert. Diese Arbeit zeigt, dass eine Hardwarerealisierung der Java virtual machine zu einem kleinen System f¨uhrt, das auch f¨ur Applikationen mit rigiden Ressourcebeschr¨ankungen geeignet ist. Moderne Prozessoren weisen Architekturmerkmale auf (wie z.B. Parallelverar- beitung, Cachespeicher und Sprungvorhersage), die vor allem die durchschnittliche Rechenleistung erh¨ohen. Diese Architekturmerkmale erschweren jedoch die ‘Worst- Case Execution Time’ (WCET) Analyse und f¨uhren zu pessimistischen WCET Ab- sch¨atzungen. Diese Arbeit geht einen anderen Weg – Es wird eine Prozessorarchitek- tur vorgestellt, f¨ur die eine einfache und genauere WCET Analyse wichtiger ist als die durchschnittliche Rechenleistung. Diese Arbeit untersucht die Probleme, die sich bei der Verwendung von Java in Echtzeitsystemen ergeben. Standard Java wird um eine Spezifikation f¨ur Echtzeit- systeme erweitert. Die Integration des echtzeitf¨ahigen Schedulers mit dem Prozessor f¨uhrt zu einer effizienten Plattform f¨ur Java in eingebetteten Echtzeitsystemen. Der vorgestellte Prozessor und die Spezifikation f¨ur echtzeitf¨ahiges Java wurden erfolgreich in mehreren kommerziellen Echtzeitsystemen eingesetzt. Contents 1 Introduction 1 1.1 Justification for Development . 1 1.2 Embedded Real-Time Systems . 2 1.3 Research Objectives and Contributions . 3 1.4 OutlineoftheThesis ......................... 6 2 Java and the Java Virtual Machine 7 2.1 Java .................................. 7 2.1.1 History ............................ 9 2.1.2 The Java Programming Language . 9 2.2 The Java Virtual Machine . 11 2.2.1 MemoryAreas ........................ 11 2.2.2 JVM Instruction Set . 12 2.2.3 Methods ........................... 13 2.2.4 Implementation of the JVM . 14 2.3 Summary ............................... 16 3 Related Work 17 3.1 Hardware Translation and Coprocessors . 17 3.1.1 Hard-Int............................ 19 3.1.2 DELFT-JAVAEngine. 19 3.1.3 JIFFY............................. 19 3.1.4 Jazelle............................. 20 3.1.5 JSTAR,JA108 ........................ 21 3.1.6 A Co-Designed Virtual Machine . 21 3.2 JavaProcessors ............................ 22 3.2.1 picoJava............................ 22 3.2.2 aJileJEMCore ........................ 25 3.2.3 Cjip.............................. 26 3.2.4 Ignite,PSC1000 ....................... 26 II CONTENTS 3.2.5 Moon............................. 27 3.2.6 Lightfoot ........................... 27 3.2.7 LavaCORE .......................... 28 3.2.8 Komodo............................ 28 3.2.9 FemtoJava .......................... 28 3.3 AdditionalComments. 29 3.4 Research Objectives . 30 4 Restrictions of Java for Embedded Real-Time Systems 33 4.1 Java Support for Embedded Systems . 33 4.2 Issues with Java in Embedded Systems . 34 4.3 JavaMicroEdition .......................... 37 4.3.1 Connected Limited Device Configuration (CLDC) . 37 4.3.2 Connected Device Configuration (CDC) . 39 4.3.3 Additional Specifications . 40 4.3.4 Discussion .......................... 40 4.4 Real-Time Extensions . 41 4.4.1 Real-Time Core Extension . 41 4.4.2 Discussion of the RT Core . 42 4.4.3 Real-Time Specification for Java . 43 4.4.4 Discussion of the RTSJ . 45 4.4.5 SubsetsoftheRTSJ ... ..... ...... ..... .. 51 4.4.6 Extensions to the RTSJ . 53 4.5 Summary ............................... 53 5 JOP Architecture 55 5.1 BenchmarkingtheJVM. 55 5.1.1 Bytecode Frequency . 55 5.1.2 Methods Types and Length . 60 5.1.3 Summary ........................... 64 5.2 OverviewofJOP ........................... 64 5.3 Microcode............................... 66 5.3.1 Translation of Bytecodes to Microcode . 66 5.3.2 Compact Microcode . 68 5.3.3 Instruction Set . 69 5.3.4 BytecodeExample .... ..... ...... ..... .. 70 5.3.5 Flexible Implementation of Bytecodes . 70 5.3.6 Summary ........................... 71 5.4 The Processor Pipeline . 71 CONTENTS III 5.4.1 Java Bytecode Fetch . 72 5.4.2 JOP Instruction Fetch . 73 5.4.3 Decode and Address Generation . 74 5.4.4 Execute............................ 75 5.4.5 Interrupt Logic . 77 5.4.6 Summary ........................... 77 5.5 AnEfficientStackMachine. 78 5.5.1 Java Computing Model . 78 5.5.2 Access Patterns on the Java Stack . 81 5.5.3 Common Realizations of a Stack Cache . 82 5.5.4 A Two-Level Stack Cache . 85 5.5.5 Resource Usage Compared . 91 5.5.6 Summary ........................... 93 5.6 HW/SWCodesign .......................... 93 5.7 Real-Time Predictability . 98 5.7.1 Interrupts ........................... 98 5.7.2 TaskSwitch.......................... 99 5.7.3 Architectural Design Decisions . 101 5.7.4 Summary ........................... 103 5.8 A Time-Predictable Instruction Cache . 103 5.8.1 Cache Performance . 104 5.8.2 Proposed Cache Solution . 107 5.8.3 WCETAnalysis ....................... 112 5.8.4 CachesCompared . 113 5.8.5 Summary ........................... 119 6 JOP Runtime System 121 6.1 A Real-Time Profile for Embedded Java . 121 6.1.1 Application Structure . 122 6.1.2 Threads............................ 122 6.1.3 Scheduling .......................... 123 6.1.4 Memory...........................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages254 Page
-
File Size-