JOP - Java Optimized Processor
Third Approach: A stack machine
In JOP2 a basic JVM instruction like iadd needs 3 cycles: load, add and store. This can be reduced if the ALU is moved to the stack. The instruction set is changed to reflect this: ALU operation are done only with the operands from the stack. But this means that the stack is used for the Java stack and for internal operations of the JVM.
The stackThe stack is implemented in local memory with independent read and write ports. The top two elements are registers. The ALU operation is done with these registers. To fill the second register one memory read is necessery.
Local variables are also stored in the stack memory. A load needs one memory read for the variable and one store to write the second register back to the memory.
Fetch and DecodeBy merging the former jump table and the micro code ROM the pipeline can be reduced to four stages:
Adding some hardware (an adder for the new JVM pc) a JVM conditional and unconditional goto can be executed in four cycles.
One instruction needs 16 bits (like JOP1). But the jump table is saved. Five bits are used for the instruction. Eight bits for a jump address, an immediate value or additional instruction coding.
Three bits have a special meaning:
The instruction set of the current JOP3 implementation:
Java and JOP fetch
A final word (for now)It's about two times faster then JOP2. The third approach has been verified in different applications.
Some further enhancements have to be documented.
Copyright © 2000-2007, Martin Schoeberl