
Java Chips Aim at
Embedded Control
Taking advantage of the fact that they make it easier to develop software programs with fewer bugs, Java chips are aiming at embedded microcontrollers.Java is attracting attention as a means of changing the World Wide Web (WWW) Internet information browsing service into an interactive information processing service1). Java is an object-oriented programming language developed by Sun Microsystems, Inc of the US, but Java application fields are extending far beyond the Internet (Fig 1). One of the most exciting applications is embedded systems.
Sun Microelectronics, which is the integrated circuit (IC) development arm of Sun Microsystems, is developing Java chips for embedded applications. They will be capable of high-speed execution of programs described in the Java language.
Other IC manufacturers are also beginning to develop Java chips. Mitsubishi Electric Corp of Japan announced in May 1996 that it will port Java to its 32-bit microcontroller M32R/D for embedded applications (Fig 2). The M32R/D has 2 Mbytes of internal DRAM, which can be used to store the interpreter and microkernel needed to execute Java programs. Mitsubishi Electric says it had Java in mind when it determined the DRAM capacity for the M32R/D.
Three Sun Java Chips
Sun Microelectronics is developing three types of Java chips (Table 1): the picoJAVA with only the central processing unit (CPU core); microJAVA, a microprocessor or microcontroller consisting of picoJAVA coupled with a DRAM controller; and the UltraJAVA high-end processor handling multimedia instructions2).
Both microJAVA and UltraJAVA will be marketed by Sun, while picoJAVA is slated to be licensed to semiconductor and consumer electronics manufacturers. "We hope to license picoJAVA to ten firms worldwide," says Chet Silvestri, president of Sun Microelectronics.
NEC Corp and Mitsubishi Electric are two such licensees, and Toshiba Corp and Fujitsu Ltd, all of Japan, are currently in negotiations, according to industry sources. In Korea, LG Semiconductor and Samsung Electronics Co, Ltd will be licensed.
Semiconductor manufacturers licensed for picoJAVA will develop chips offering high performance on a par with UltraJAVA, utilizing superscalar architecture and other means.
Safely Embeddable Software
The reason Java chips are attracting so much attention is that the industry believes they can resolve many of the problems that embedded control software development face today. Engineers involved in this type of development are becoming increasingly sensitive to reducing a program's internal bugs; in other words, maximizing productivity and safety.
Until lately, design has assigned top priority to performance and object code size. As semiconductor technology progresses, performance has risen considerably, and the restraints on object code size have not been so tight as they used to be, thanks to increasing memory capacity.
Today, embedded application developers are more worried about how to make an environment that will get the product out the door quicker, with fewer bugs. "It looks like the Java language can meet many of these needs," one microprocessor design engineer at a major semiconductor manufacturer pointed out.
A software engineer added, "Because productivity is emphasized, it is likely to see widespread adoption of C++ as a development language for embedded systems. C++ is pretty tough for electronics engineers, however, who are experts when it comes to their equipment but not when it comes to programming software. Java is easier to understand than C++, and much easier for electronics engineers to utilize."
Originally for Embedded Units
The Java language was originally developed for embedded use in electronic equipment for the end-user, like personal digital assistants (PDA). It was also a program execution environment3). Java is still quite suitable for these needs. Java makes it easy to develop relatively bug-free programs because even when the programs are used with different microprocessors or operating systems (OS), they do not have to be recompiled. This feature was designed in specifically with an eye toward embedded applications.
OS and microprocessors used in embedded systems depend on cost and performance, and there is no assurance that an embedded system may use a microprocessor supporting the same instruction set as previous systems. Effective utilization of past resources means that developed software should be as independent of the microprocessor and OS as possible.
Software in products like consumer electronics, printers and facsimiles cannot be easily upgraded. It is possible for a serviceperson to go to the site and rewrite the software, but that consumes time and cost. It would be better to develop high-quality software from the start, with fewer bugs. And that is where the characteristics of Java come into play.
Separating Hardware, Software
From the viewpoint of the microprocessor designers, Java is attractive because it clearly separates hardware from software.
Until now, microprocessors have been speeded up by implementing the instruction set in the IC, and optimizing the compiler. The two are closely linked, however, and if a new technique is introduced in the implementation, the optimization method changes. For example, there is an optimization method called register renaming, which the hardware executes invisibly from the software. This means that the optimized code for a microprocessor may actually run slower when the microprocessor is changed. A microprocessor engineer says, "Java chips clearly define what is hardware and what is software so each can be optimized independently."
Stacked Architecture Adopted
Programs described in the Java language are compiled into byte code by the Java compiler. Byte code is binary code which can be executed on the Java virtual machine (Java VM).
This virtual computer has no registers, and all data processing and calculations are handled through the stack. In short, it is a "stack machine."
Close to Compiler Intermediate Code
The reason the Java VM adopted a stack-type architecture is because it is a natural choice for a programming language compiler.
Most compilers convert the source programs into intermediate code, and then convert the intermediate code into code designed for the target processor (Fig 3). This makes it easier to design compilers which will work with multiple processors or languages.
Intermediate code usually takes the form of storing data to the stack, and implementing various processing on it4). Stacks are used instead of registers, making the code independent of processor architecture. Java byte code takes the intermediate code generated by the compiler and uses it, without changes, as the instruction set specification.
Ample Performance Even with Stacks
The Java chip is a microprocessor which integrates essentially all of the functions used by the Java VM. For that reason, the basic architecture is stacked. The hardware uses registers to implement stacks. Stack machines have been proposed in the past, but never entered practical use because of low performance.
People in the know, however, say the Java chip has no performance problems.
"It is quicker to use microJAVA than to execute a Java program on a Java interpreter having a 100MHz Pentium processor," says Raj Parekh, vice president in charge of technology at Sun Microelectronics.
A microprocessor designer says, "With 0.35µm rule IC manufacturing technology, it is pretty simple to get picoJAVA to run at 100 to 200MHz. Even if a little overhead in object-oriented language execution is added, it should be an easy matter to maintain high performance. Although it is a stack machine, not everything is implemented in stacks; registers are used as well. The fewer architecture restrictions provide extra freedom in register naming, and make it possible to use technologies gained through RISC design. It leaves the engineer plenty of room to find elegant solutions."
224 Instructions Supported
There are 203 Java VM instructions, or a total of 224 when hidden instructions are added in. Depending on their usage, they can handle quite complex processing. However, not everything can be implemented with wired logic.
"First the instructions are integrated on a chip through microcode. Traps are generated for complex instructions that are difficult to implement with microcode, and the instructions are executed by software emulation," explains Parekh.
Java chips also offer extended Java byte code instructions. This is because the instruction sets defined in the virtual machine cannot implement all needed processing; concretely, instructions which directly operate hardware. Parekh says, "Driver software for transmission control protocol/Internet protocol (TCP/IP), for example, cannot be described with Java VM instructions alone. These instructions cannot be used in the application software."
Seeking Optimum Application
Java chips are attracting considerable attention in and out of the industry, but at the same time there really aren't any applications they are ideal for. A Japanese microprocessor designer comments, "Existing microprocessors can be evaluated through MIPS ratings and SPEC benchmarks. There are no evaluation criteria for Java chips, so it is impossible to say what they are suited for. The documentation seems to indicate the chip is slightly more complex than an 80386, but there are many questions that cannot be answered until we actually make it. The first step will probably be to form a test element group (TEG) for evaluation."
At present, there seem to be few applications suitable for Java chips: the only one that comes to mind is the Java Client (Fig 4), an Internet terminal being developed by Sun Microsystems.
Another possibility is a Java printer, using Java language instead of the current PostScript page description language. The printer may print out figures and text drawn by Java. Because the Java chip is less expensive than the PostScript microprocessor, it would mean less expensive printers.
Parekh at Sun Microelectronics also suggests game systems as an UltraJAVA application. "UltraJAVA can play back voice and motion video, along with three dimensional graphics, at higher speed," he says. "It can be made cheaper than a reduced instruction set computer (RISC)-based processor incorporating Java extended functions."
All of these applications can also be implemented without the Java chip, of course, and none of them has anything to do with machine control. As one software engineer puts it, "The Java chip is suited to information-processing applications like Java clients and PDA, but not to controlling hardware. Using Java byte code for modem control would be pretty tough."
Demand for Low Cost
Some people in the industry feel that Java chips could only be used in embedded control. If Java achieves widespread usage, then it is likely that general-purpose RISC processors will incorporate the so-called Java Extension to allow them to execute Java at high speed.
"The general-purpose RISC processor is better suited to information processing," explains a microprocessor designer. "These chips will soon incorporate functions for high-speed execution of Java, and probably at low prices. The only way for the Java chip to survive might be as a central processing unit (CPU) core for a system controller IC."
A software engineer at a semiconductor firm added, "If it can't be made cheaply, there's no point in making it. It is likely that applications demanding high performance will use RISC processors, and price-driven applications will use Java chips. The US$500 terminal is the threshold, with Java below that line and RISC above."
by Tatsuro Hokugo
References:
1) Hokugo, T, "Sun's Java Expected to Pose Threat to Microsoft", Nikkei Electronics (in Japanese), no 658, pp 205-221, March 25 1996.
2) Asami, N, "Sun Microsystems Develops Stack MPU with Java Language", ibid, no 656, p13, February 26 1996.
3) Van Hoff, A, Shaio, S and Starbuck, O, Hooked on JAVA, Addison-Wesley Publishing, 1996.
4) Aho, A, Sethi, R, and Ullman, J, Compilers Principles, Techniques, and Tools, Addison-Wesley Publishers Ltd, 1986.