King Fahd University of Petroleum and
Minerals
College of Computer Science and
Engineering
Computer Engineering Department
COE -390 : Seminar
PicoJava Microprocessor Architecture
PicoJava Microprocessor Architecture
Presented by
Muhammad F. Sagr
Contents
Java Virtual Machine
3 Ways to Execute Java Code
PicoJava Overview
PicoJava Structural Implementation
The Stack Cache
Cost and Performance
PicoJava Microprocessor Architecture Muhammad Sagr
Page 2 of 40
Java Virtual Machine
(A Machine within a Machine)
System Calls
PicoJava Microprocessor Architecture Muhammad Sagr
Page 3 of 40
3 Ways to Execute Java Code
PicoJava Microprocessor Architecture Muhammad Sagr
Page 4 of 40
PicoJava Chip
PicoJava Microprocessor Architecture Muhammad Sagr
Page 5 of 40
PicoJava Structural Implementation
PicoJava Microprocessor Architecture Muhammad Sagr
Page 6 of 40
Stack cache
The stack cache is a 64 entry register file
which caches the top few entries of the
operand stack.
Stack is circular. 65 pushes would result in
one cache replacement.
PicoJava Microprocessor Architecture Muhammad Sagr
Page 7 of 40
PicoJava Features
Developed Using Verilog RTL.
Supports:
Hardware floating-point arithmatics.
6-digit instruction pipeline.
Instruction / Data Caching.
Innovative Stack Management Unit.
Stack-based architecture:
Has no General-purpose Registers
Allows up to 2 POP and 1 PUSH per clock cycle.
PicoJava Microprocessor Architecture Muhammad Sagr
Page 8 of 40
JVM and PicoJava
Data types: byte, short, int, long, float,
double, char, object, returnAddress
All opcodes have 8 bits followed by a
variable number of operands (1,2,3)
Opcodes
200 assigned
24 quick variations
2 reserved
PicoJava Microprocessor Architecture Muhammad Sagr
Page 9 of 40
JVM Code Size
Compact Code
Average JVM instruction is 1.8 bytes
RISC instruction required 4 bytes
Java based bytecodes are smalls
No register specifiers
Implicit VARS register for local variable accesses
Large application (2500+ lines) coded both the
C++ and Java Languages
Java bytecodes are 2 3 x smaller than the RISC
code from the C++ complier
PicoJava Microprocessor Architecture Muhammad Sagr
Page 10 of 40
PicoJava Microprocessor Overview
Pipeline instructions.
Single cycle execution for most
instructions.
Implement in hardware only those
instructions that make a difference.
Trap for costly instruction that do not
occur often.
PicoJava Microprocessor Architecture Muhammad Sagr
Page 11 of 40
PicoJava 4-Stage Pipeline
Figure 2 Simple 4 stage pipeline
FETCH
Fetch fixed
Cache lines
(from I/O via
Instruction
Cache) into the
Instruction
Buffer.
DECODE
Decode and
apply folding
Logic, if
Appropriate.
EXECUTE
Execute for one
Or more cycles.
PicoJava Microprocessor Architecture Muhammad Sagr
WRITE-BACK
Write results back
Into the operands
Stack.
Page 12 of 40
Stack-Based Architecture
Stack architecture implement as a RISC
Operands typically accessed from the stack, put
back on the stack
Example: Integer addition
Add top 2 entries in the stack and put the result back
on top of the stack
Typical emulation on a RISC processor
LOAD TOS
LOAD TOS-1
ADD
STORE TOS-1
PicoJava Microprocessor Architecture Muhammad Sagr
Page 13 of 40
PicoJava: Performance and cost
Embeded market products (mobile phones
etc) very sensitive to systems cost
Eliminates interpreter or JIT
Excellent systems performance compare
to other processor ( Pentium etc.)
Efficient implementation through use of
the same methodology; process circuit
techniques developed for RISC
processors
PicoJava Microprocessor Architecture Muhammad Sagr
Page 14 of 40
PicoJava: Performance and cost
Simple and very efficient
Accelerates runtime
Support for garbage collection
Support for threads
PicoJava Microprocessor Architecture Muhammad Sagr
Page 15 of 40
Comparison of PicoJava and
Pentium chips Fig. 6
PicoJava Microprocessor Architecture Muhammad Sagr
Page 16 of 40
Conclusion
PicoJava is used in internet appliances,
WebTV, mobile phones and other high
speed appliances.
In the very near future, PicoJava will be a
processor of choice for CPUs.
PicoJava achieved speed and efficiency.
Five major companies are already
licensed for PicoJava chips.
PicoJava Microprocessor Architecture Muhammad Sagr
Page 17 of 40
References
1.
2.
PicoJava Microprocessor Core Architecture:
[Link]
Sun Microsystems:
[Link]
PicoJava Microprocessor Architecture Muhammad Sagr
Page 18 of 40
Thank you!
? ?
Questions?
PicoJava Microprocessor Architecture Muhammad Sagr
Page 19 of 40