Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng &...
-
Upload
samuel-francis -
Category
Documents
-
view
213 -
download
0
Transcript of Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng &...
![Page 1: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/1.jpg)
Specification and Design of Quasi-Delay-Insensitive Java Card
Microprocessor
Fu-Chiung Cheng & Chuin-Ren Wang
Dept. of Computer Science and EngineeringTatung University
Taipei 104, Taiwan R.O.C.
![Page 2: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/2.jpg)
Outline
1. Motivation
2. Smart Card Architecture
3. Introduction of Java Card
4. Java Card Processor Organization
5. Specification : Data Dependency Graph
6. Implementation and Optimizations
7. Conclusion
![Page 3: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/3.jpg)
1. Motivation
• ID card, driver license, credit cards, bank Cards, library card, pay-phone card, ...
=> Smart Card• Other applications :[Henry97]
– fraud control for credit and debit cards– access control for buildings or computer syste
ms – ticketless travel on airlines, subways, buses or
trains.• Java Card is a smart card using Java technology.
![Page 4: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/4.jpg)
1. Motivation
• Why Asynchronous circuit for Java Card Microprocessor? [Hauck95,Cheng97]
– low power consumption– average-case performance– robust– Modularity, Composability, Reusability
![Page 5: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/5.jpg)
2. Smart Card Architecture
• Smart card architecture consists of – CPU
– memory
– communication interface
• The front and back of Smart card:
![Page 6: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/6.jpg)
2. Smart Card Architecture
• Smart Card CPU:– 8-bit, single-tasking devices with 1KB
of RAM or less.• On-Card Memory
– ROM (Read-Only Memory) – RAM (Random Access Memory)– EEPROM (Electrically Erasable
Programmable Read Only Memory)
![Page 7: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/7.jpg)
2. Smart Card Architecture
• Communication Interface– A smart card does not contain its own power supply, display, or keyboard.
• Card Acceptance Device (CAD)– A smart card interacts with a Card Acceptance Device (CAD) through the communication interface
![Page 8: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/8.jpg)
3. Java Card
• Java Card is a smart card using Java technology.• Java programs run on Java Virtual Machine (JV
M).• JVM is an interpreter to execute bytecodes (Java
instructions). • JVM is a stack-based machine. • Java Card instruction set is a subset of Full Java’
s.
![Page 9: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/9.jpg)
3.1 Data type in Java Card • Two kinds of types: primitive types and reference t
ypes.• Primitive types
– byte : 8-bit signed two’s-complement integer.– short :16-bit signed two’s-complement integers.– int : 32-bit signed two’s-complement integers.– Boolean : 8-bit, TRUE or FALSE.
• Reference types– class types, interface types, and array types.
![Page 10: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/10.jpg)
3.2 Java Card Instruction Set
• Java Card 2.0 has 104 instructions.
1. Load/ Store Instructions: iload, istore, ....
2. Arithmetic Instructions: iadd, isub, ior, ....
3. Type Conversion Instructions: i2b, i2s.
4. Control Transfer Instructions: ifnull, if<cond>
5. Operand Stack Management: pop, dup, ....
6. Object Creation and Manipulation: new, getfield
7. Method Invocation and Return Instructions: invokespecial, invokestatic, return, .....
8. Throwing and Handling Exceptions: athrow.
![Page 11: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/11.jpg)
4. JAVA Card Processor Organization
PC: program counter SP: stack pointer IR: instruction register
MAR: memory address register MI: memory interface
A, B: two general-purposed registers FB: Frame-based register
: Control line
: Bus line
M em ory
M I
P C S P FBIR A B A LU
M em oryaddress
data
C ontro lle r
M A R
A LU B us
A B us
B B us
![Page 12: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/12.jpg)
5. Specification: Data Dependency Graph
• Given an instruction set + a processor organization, micro-operations of instructions may be specified by data dependency graphs [Nanya94].
• The micro-operations can be directly mapped into quasi-delay-insensitive components.
• Five basic components: fork, join,select, merge and oval (micro-operation).
![Page 13: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/13.jpg)
5.1 DDG: Five Basic Elements
c:=f(a,b)
Merge
Select
Join
Fork
Microoperation
![Page 14: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/14.jpg)
5.2 DDG: Java Card Processor
MAR := PC
MI := Readmem(MAR)
decode
IR := MI
Load/S tore A rithm etic
Typeconvers io
n
O bjectcreation
m anipu la tion
O perandTransfer
C ontro lT ransfer
M ethodinvocatio
n andR eturn
Throw ingand
H andling
A := ALU(add, PC, 1)
PC := A
Fetch Instruction
Decode
Execution
![Page 15: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/15.jpg)
5.3 DDG: iadd instruction
MAR := SP - 4
MI := Readmem(MAR)
B := MI
decoder
MAR := SP - 4
W ritemem(MAR)
iadd
Arithmetic
isub ........A
B
C
D
E
F
G
H
I
A := MI
SP := MAR + 4
MI := A + B
MI := Readmem(MAR)
pop value2
pop value1
calculate
push result
SP := MAR
SP := MAR
J
K
MAR := SP
L
value1
value2SP
...
before
SP
result
...
after
![Page 16: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/16.jpg)
6. Implementation:
• Goal: four-phase handshaking QDI circuits [Nanya94,Cheng97].
• Mapping DDGs to QDI Components
• TITAC: point-to-point data transfer
• Our Java Card Processor: shared bus architecture.
![Page 17: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/17.jpg)
6.1 Shared Bus Architecture
![Page 18: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/18.jpg)
6.2 QDI Library
![Page 19: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/19.jpg)
6.3 Deriving Control Path from DDGs
c:=f(a,b) Q Datapath
C
Datapath
Merge
Select
Join
Fork
microoperation
Decoder
![Page 20: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/20.jpg)
6.3 C-element and Q-element
A B0 0 00
01
11 1 1
Input O utputO
Nochange
CAB O
C-elem ent
C
U i
U o
Lo
Li
U i
Lo
LiUo tim e
![Page 21: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/21.jpg)
Control Path: iadd
Q
Q
Q
AsAf
BsBf
CsCf
Q DsDf
Q EsEf
QFsFf
Q GsGf
QHsHf
Q IsIf
Q JsJf
Q KsKf
Q LsLf
![Page 22: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/22.jpg)
6.3 Deriving Datapath from DDGs:
• For each micro-operation, M, and its Q-element with the start (Ms) and finish (Mf) of this micro-operation:– If M read a register R then connect Ms to the rea
d signal of R.– If M write to a register R then connect Ms to the
write signal of R and add a demultiplexer to send out the write acknowledge to Mf.
– If there are multiple signals connecting to a read/write signal, add an OR gate.
![Page 23: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/23.jpg)
DatapathIs
Gf
A
read
write
Din
Dout
WackGs
Kf
Memory
read
write
Din
Dout
Wack
Bs
Fs
Ks
Addr.
BsDsFs
AfMAR
read
write
Din
Dout
WackAsEs
As
Ks
Es
Ef
HsLs
JsDEM UX
s0s1s2
o2o1o0 Jf
Jf
As
Ds
Es
Df
Js
HsLs
D E M U X
s0s1s2
o2o1o0
HfLf
Df
HfLf
SP
read
write
Din
Dout
Wack
BsFs
Gs
BfFfIf
MI
read
write
Din
Dout
WackIs
Cs
DEM UX
s0s1s2
o2o1o0
BsFsIs
IsKs
Cf
B
read
writeDin
Dout
Wack
Is
Cs
Q
Q
Q
AsAf
BsBf
CsCf
Q DsDf
Q EsEf
QFsFf
Q GsGf
QHsHf
Q IsIf
Q JsJf
Q KsKf
Q LsLf
Control Path
![Page 24: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/24.jpg)
6.4 Optimization:
• Goal: better performance, less power consumption and/or less logic.
• Three optimization schemes:– Redundancy Elimination– Parallel Execution– Common Modularity
![Page 25: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/25.jpg)
6.4 Optimization: Example 1
MAR := SP - 4
MI := Readmem(MAR)
B := MI
W ritemem(MAR)
A
B
C
D
E
F
G
H
I
A := MI
SP := MAR
MI := A + B
MAR := SP - 4
MI := Readmem(MAR)
pop value2
pop value1
calculate
push result
B := MIC DSP := MAR
MAR := SP - 4
MI := Readmem(MAR)
A
B
W ritemem(MAR)
E
F
G
H
I
A := MI
MI := A + B
MAR := SP - 4
MI := Readmem(MAR)
(a) (b)
![Page 26: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/26.jpg)
6.4 Optimization: Example 2
• Sharing Common modules:
![Page 27: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/27.jpg)
6.4 Optimization: Results
• Redundancy Elimination– Micro-operations: 12 9– Cost and power consumption: save one additio
n and three data transmission operations.
• Parallel Execution: – Micro-operations: 9 8
• Common Modularity:– Cost: save (n-1)*getTwoOperands.
(n is number of instructions in Arithmetic).
![Page 28: Specification and Design of Quasi- Delay-Insensitive Java Card Microprocessor Fu-Chiung Cheng & Chuin-Ren Wang Dept. of Computer Science and Engineering.](https://reader030.fdocuments.us/reader030/viewer/2022032604/56649e695503460f94b66405/html5/thumbnails/28.jpg)
• A new asynchronous Java Card microprocessor architecture is presented.
• Data dependent graph is used to specify the micro-operations of Java card microprocessor.
• Three optimization schemes are applied for better performance, less power consumption and/or logic.
• New Java Card 2.1 (Mar. 1999) spec contains 186 instructions.
• We are developing CAD tool.
7. Conclusions