IBM System 360/370/390: Section 3.2 CISC
IBM System 360/370/390: Section 3.2 CISC
System 360/370/390
CS 350
IBM S/360
• 370 is 360, re-implemented , plus a few new
features
CS 350
S/360
• Instruction set a UNION of instruction sets
– fixed-point binary (7090)
– floating binary (7090)
– decimal character-oriented (1401)
– string processing
• 4 hardware data types
– byte, halfword, word, doubleword
CS 350
S/360
• One OS (well, 5)
– OS/360 big batch OS, no virtual memory
– DOS/360 little batch OS, no virtual memory
– DAMPS real time (360/44)
– VM virtual memory for 360/67, 370s
– TSS failure, virtual memory for 360/67
CS 350
S/360
• 8 models with almost identical ISP
– (the 360 ISP)
• performance range of 300:1 (!)
• microprogrammed CPUs in Models 20 - 67
• microstore times of 200 nsec - 1 µsec
• data bus widths of 1 - 8 bytes
• memory cycle times of 7.2 µsec - 0.75 µsec
CS 350
Models
• 20 25 30 40 44 50 65 67 75 85 91
• Anomalies:
– 44 for real time process control
– 67 to compete with GE 645 in timesharing
market (paging, segmentation, swap drums,
unique OS)
– 25 had user-alterable control store
CS 350
Prices:
• Model 40 with 250 Kbytes Mp, 3 µsec
cycle time: $40 000/month (not sold)
CS 350
360 ISP design
• Previous large machines:
– addressed 32K cells of Mp maximum
– cell = word of length 36 bits or so
– registers: AC, MQ, few Index Registers
– fixed length instructions & operands
Op IR address
CS 350
360 ISP goals
• Bigger address space (224 )
• cf. Motorola 68000 of 25 years later
• General Purpose registers and more of them
• 16
• use program store more efficiently
• variable length instructions
CS 350
360 ISP decisions
• Registers: 16 GPRS, useable as
– accumulators
– MQs
– index registers
– base registers
CS 350
Instruction length
• 2 - 6 bytes
CS 350
Address Formation
• How to avoid storing 24 bits of real address
per instruction?
CS 350
Address Formation
• Use a GPR (32 bits) to point to the general
vicinity of the desired cell
• use a small address (12 bits) in the
instruction to hit the precise location
CS 350
Address Formation
• How to avoid storing 24 bits of real address
per instruction?
– Instruction holds a 12-bit field (spans 4096
bytes) called displacement
CS 350
Address formation
X B disp + EA
CS 350
Good & Bad
• What’s good?
– Uses codespace efficiently IF locality of
reference is valid
• What’s bad?
– Need to make a gpr point within 4096 of
address A before we can access it (“establishing
addressability)
CS 350
Good & Bad
• Base registers are NOT invisible to the
programmer , do the OS can NOT use them
for program relocation (blunder)
CS 350
Program relocation
• Newer models had programmer-invisible
relocation registers (DAT box, MMU) in
addition to the above
– 360/67, all 370s, MIPS chip, . . .
• Older 360s could not relocate programs or
data (!)
• BTW, MIPS uses a 64-bit address space
CS 350
360 Critique
(1998)
• Not enough address space!
– 224 bytes insufficient
• no virtual address spaces
– program & data relocation impractical
– batch throughput oscillated
• not enough GPRs (16)
• inadequate interrupt structure
CS 350
However
• 360 redefined computer architecture
– Gerritt Blauuw: “the end of architecture”
CS 350
Instruction Formats
• Goals:
• flexibility
CS 350
Register-Register (RR)
8 4 4
OP R1 R2 2 bytes
* e.g. AR R3, R4
*short
* can’t reference memory
CS 350
Register - Storage, indexed
RX
8 4 4 4 12
op R1 X2 B2 D2
Storage address
* e.g L R5, GEO(R3)
*twice as long as RR format
CS 350
Register - Storage, unindexed
RS
8 4 4 4 12
op R1 R3 B2 D2
RS format
Storage address
E.g LM R1, R6, SUE
CS 350
Storage- Storage
SS
8 8 4 12 4 12
op L B1 D1 B2 D2
ADDRESS ADDRESS
CS 350
360 INSTRUCTION FORMATS
• Note lack of orthogonality of opcode space
to format space --
• not all opcodes work with all formats
CS 350
360 INSTRUCTION DESIGN
• 256 opcodes, many are spares
CS 350
360 Bus Structure
control
CPU
data
Mp
KIO KIO
CS 350
360 Storage structure
Byte 0 1 2 3
cell
0
Word at
1
2 address 0
3 Halfword at 2
Byte 4 5 6 7
Bits 0 7 8 15 16 23 24 31
Little-endian order -- is this natural?
CS 350
360 Storage structure
• Halfword addresses = 0 mod 2
CS 350
360 Implementations
• How to get a performance range of 300:1
using ONE logic family?
CS 350
Model 40
• ALU: 1 byte wide
• microinstruction time: 625 nsec
• Mp cycle: 2.5 µsec
• max Mp: 0.25 Mbyte
• rent: $20 000 / month
CS 350
Model 50 Motorola 68000
• 1963
• 1983
CS 350
pdp-11 ISP
• 8 General Purpose Registers (GPRs)
• instructions taking 0,1 or 2 operands
• symmetric instruction set
• nearly-orthogonal instruction set
– easier for compilers (and humans )
CS 350
pdp-11 cpu cycles
• Fetch intruction cycle
• source operand cycle
• destination operand cycle
• Execute
• honour interrupts
CS 350
Address generation
CF:
X B DISP
4 4 12
CS 350 360
pdp-11 best feature:
addressing modes
00 Rn contains operand (register mode)
CS 350
Double operand:
CS 350
Double operand
MOV R1, ARRAY(R2) 00 0 11 0
ARRAY + C(R2) <- C(R1)
INDEXED STORE
ARRAY(R2), R1 11 0 00 0
INDEXED LOAD
ARRAY(R2), VEC(R1) 11 0 11 0
DOUBLY INDEXED
TOM, GEORGE 11 0 11 0
INDEXED RELATIVE TO PC
@TOM, @GEORGE 11 1 11 1
AS ABOVE, AND INDEXED
CS 350
TERRIFYING TIMING
REQUIRES
14 MICROSECONDS 11/20
5.6 MICROSECONDS 11/40
CS 350
Stacks!
Hi address-
stack top
Lo address-
Rn
stack bottom
CS 350
CONDITIONAL BRANCHES
CS 350
DATA TYPES
WORD OR BYTE
MOV MOVB
INC INCB
CS 350
R7 IS THE PROGRAM
COUNTER
OP #N ASSEMBLES TO OP
CS 350
R7 IS THE PROGRAM
COUNTER
OP @#A OP
ABSOLUTE ADR(A)
CS 350
PHBREAK:
you read:
text Chapter 3
CS 350
Summary of main points:
Two objectives;
( no caches,
cycle times of 1-6 microseconds
[vs. 100 nsec = 0.1 microsec today] )
CS 350
"wired macroinstructions"
CS 350
What happened?
CS 350
• Microstore became as slow as Mp
CS 350
• Programmers spent pages setting upa killer
effect so
CS 350
RISC Empirical result:
the product
CS 350
the simpler control design was amenable to VLSI
(single-chip cpus) so
CS 350
MIPS architecture
c($0) = 0, always.
CS 350
230 memory cells,
CS 350