Professional Documents
Culture Documents
in the Sixties:
Architectures
Arvind
6.823 L3- 2
Arvind
The Sixties
• Hardware costs started dropping
- memories beyond 32K words seemed likely
- separate I/O processors
- large register files
- I/O facilities
– virtual memory
A Stack Machine
Processor A Stack machine has a stack as
a part of the processor state
c
push b b push c b pop b
a Î a Î
a Î a
Evaluation of Expressions
(a + b * c) / (a + d * c - e)
/
+ -
a * + e
b c a *
d
c
c
*
bb
*c
Reverse Polish a
abc*+adc*+e-/
Evaluation Stack
push a Push c
multiply
Push b
September 14, 2005
6.823 L3- 8
Arvind
Evaluation of Expressions
(a + b * c) / (a + d * c - e)
/
+ -
a * + e
b c a *
d
c
b*c
+
Reverse Polish a+a
b*c
abc*+adc*+e-/
Evaluation Stack
add
abc*+adc*+e-/
program stack (size = 2) memory refs
push a R0 a
push b R0 R1 b
push c R0 R1 R2 c, ss(a)
* R0 R1 sf(a)
+ R0
push a R0 R1 a
push d R0 R1 R2 d, ss(a+b*c)
push c R0 R1 R2 R3 c, ss(a)
* R0 R1 R2 sf(a)
+ R0 R1 sf(a+b*c)
push e R0 R1 R2 e,ss(a+b*c)
- R0 R1 sf(a+b*c)
/ R0
4 stores, 4 fetches (implicit)
September 14, 2005
6.823 L3- 11
Procedure Calls
Proc P R
Proc Q
Proc R 3 Q
Q 2
R ll = 1 P
Q
display stack static
registers links
automatic loading of display registers?
September 14, 2005
6.823 L3- 15
Arvind
Stacks post-1980
• Inmos Transputers (1985-2000)
– Designed to support many parallel processes in Occam
language
– Fixed-height stack design simplified implementation
– Stack trashed on context swap (fast context switches)
– Inmos T800 was world’s fastest microprocessor in late 80’s
• Forth machines
– Direct support for Forth execution in small embedded real-
time environments
– Several manufacturers (Rockwell, Patriot Scientific)
• Java Virtual Machine
– Designed for software emulation not direct hardware
execution
– Sun PicoJava implementation + others
• Intel x87 floating-point unit
– Severely broken stack model for FP arithmetic
– Deprecated in Pentium-4 replaced with SSE2 FP registers
6.823 L3- 20
Arvind
8 4 4
RR opcode R1 R2 R1←(R1) op (R2)
8 4 4 4 12
RD opcode R X B D
8 8 4 12 4 12
opcode length B1 D1 B2 D2
– overflow
– carry...
• I/O instructions also set condition codes
– channel busy
• Conditional branch instructions are based on
testing condition code registers (CC’s)
– RX and RR formats
• BC_ branch conditionally
• BAL_ branch and link, i.e., R15 ← (PC)+1
for subroutine calls
⇒ CC’s must be part of the PSW
operand
10 Functional
result Units
Central IR
Memory Address Regs Index Regs
8 x 18-bit 8 x 18-bit
Inst. Stack
oprnd 8 x 60-bit
addr
result
addr
CDC 6600:
Arvind
A Load/Store Architecture
B0 ← - n
loop: JZE B0, exit
A0 ← B0 + a0 load X0
A1 ← B0 + b0 load X1
X6 ← X0 + X1
A6 ← B0 + c0 store X6
B0 ← B0 + 1
jump loop
Ai = address register
Bi = index register
Xi = data register
Example of difficulties:
Current machines have register files with more storage
than entire main memory of early machines!
On-chip test circuitry in current machines has hundreds
of times more transistors than entire early computers!
– DSP’s