计 算 机 组 织 与 系 统 结 构
æå°ç - å京大å¦å¾®å¤çå¨ç 究å¼åä¸å¿
æå°ç - å京大å¦å¾®å¤çå¨ç 究å¼åä¸å¿
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>计</strong> <strong>算</strong> <strong>机</strong> <strong>组</strong> <strong>织</strong> <strong>与</strong> <strong>系</strong> <strong>统</strong> <strong>结</strong> <strong>构</strong><br />
<strong>计</strong> <strong>算</strong> 技 术 发 展 简 史<br />
( 第 二 讲 )<br />
程 旭<br />
公 元 前 500 年 , 中 国 , <strong>算</strong> 盘<br />
古 代 <strong>计</strong> <strong>算</strong> 技 术<br />
将 位 置 标 记 的 概 念 (concept of positional notation), 引 入 <strong>计</strong> <strong>算</strong><br />
2010 年 9 月 29 日<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
古 代 <strong>计</strong> <strong>算</strong> 技 术<br />
12 世 纪<br />
塔 什 干 (Tashkent) 的 牧 师<br />
1612, John Napier, 对 数<br />
十 七 世 纪 <strong>计</strong> <strong>算</strong> 技 术<br />
1622, William Oughtred, <strong>计</strong> <strong>算</strong> 尺 (slide rule)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Mukhammad ibn Musa<br />
Al'Khowarizmi<br />
提 出 编 写 出 达 到 一 些 目 标 的<br />
操 作 过 程 的 概 念<br />
并 出 版 了 一 部 以 “ <strong>算</strong> 法<br />
(algorithm)” 为 主 题 的 书 籍<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1880 的 柱 状 <strong>计</strong> <strong>算</strong> 尺 (cylindrical Slide Rule),<br />
大 约 200 英 寸 长 , 四 位 十 进 制 精 度<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
十 七 世 纪 <strong>计</strong> <strong>算</strong> 技 术<br />
1642 年 , Pascal Machine<br />
•Mechanical M h i l Counter for addition and subtraction<br />
ti<br />
Pascal’s Calculator -- Pascalene(1642)<br />
•Counter Wheels for storing decimal numbers<br />
•Used as registers<br />
•One Register acted as Accumulator<br />
•Technical Innovations:<br />
•Automatic A t ti transfer of fCarry<br />
•Use of Complement Representation for negative<br />
numbers<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1671 年 , Gottfried Leibniz<br />
十 七 世 纪 <strong>计</strong> <strong>算</strong> 技 术<br />
A Calculator that could perform multiplication and<br />
division as well as addition and subtraction<br />
Started with Pascal Calculator<br />
Added two additional sets of wheels that could<br />
perform multiplications and division by repetitive<br />
addition or subtraction<br />
Used Chains and Pulleys<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
十 八 世 纪 和 十 九 世 纪 <strong>计</strong> <strong>算</strong> 技 术<br />
• 1750 Mechanical Weaving Technology<br />
• Jacquard Loom(1801)<br />
• Punched card for manual instruction first<br />
• Used mechanically in Jacquard Loom<br />
• Holes in the punched cards used for the<br />
control of the movement of parts of the loom<br />
• the first programmable process control<br />
machine<br />
• Operation under program control<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Jacquard<br />
Loom(1801)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
十 九 世 纪 二 十 年 代<br />
Charles Babbage Difference Engine<br />
Designed to calculate the entries of a table automatically and<br />
transfer them via steel punches to an engraver’s plate<br />
• Could perform only addition and subtraction<br />
• Using Finite Difference methods a large number of functions<br />
could be calculated<br />
•Polynomials<br />
•Trigonometric Functions<br />
• Used a number of mechanical registers<br />
• Driven by steam engine to CRANK OUT the results<br />
• 3rd degree polynomials and 15 digit numbers<br />
• Automatic mulistep operations<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Charles Babbage 1791-1871<br />
Lucasian Professor of Mathematics,<br />
Cambridge University, 1827-1839<br />
Charles Babbage<br />
Difference Engine 1823<br />
Analytic Engine 1833<br />
The forerunner of modern digital computer!<br />
Application<br />
– Mathematical Tables – Astronomy<br />
– Nautical Tables – Navy<br />
Background<br />
– Any continuous function can be approximated by a<br />
polynomial --- Weierstrass<br />
Technology<br />
– mechanical - gears, Jacquard’s loom, simple<br />
calculators<br />
l 北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Difference Engine<br />
A machine to compute mathematical tables<br />
Weierstrass:<br />
Any continuous function can be approximated by a polynomial<br />
l<br />
Any polynomial can be computed from difference tables<br />
An example<br />
f(n) = n 2 + n + 41<br />
d1(n) = f(n) - f(n-1) = 2n<br />
d2(n) =d1(n) - d1(n-1) 1) = 2<br />
f(n) = f(n-1) + d1(n) = f(n-1) + (d1(n-1) + 2)<br />
all you need is an adder!<br />
n<br />
d2(n)<br />
0 1 2<br />
2<br />
3<br />
2<br />
4<br />
2<br />
d1(n) 2 4 6 8<br />
f(n) 41 43 47 53 61<br />
Difference Engine<br />
1823<br />
Babbage’s g paper p is published<br />
1834<br />
The paper is read by Scheutz & his son in Sweden<br />
1842<br />
Babbage gives up the idea of building it; he is onto<br />
Analytic Engine!<br />
1855<br />
Scheutz displays his machine at the Paris World Fare<br />
Can compute any 6th degree polynomial<br />
Speed: 33 to 44 32-digit numbers per minute!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Babbage’s<br />
Difference<br />
Engine 1<br />
1832<br />
Analytic Engine<br />
1833: Babbage’s paper was published<br />
conceived during a hiatus in the development of<br />
the difference engine<br />
Inspiration: Jacquard Looms<br />
looms were controlled by punched cards<br />
The set of cards with fixed punched holes<br />
dictated the pattern of weave ⇒ program<br />
The same set of cards could be used with<br />
different e colored o threads ⇒ numbers<br />
1871: Babbage dies<br />
The machine remains unrealized.<br />
It is not clear if the analytic engine could be built<br />
even today using only mechanical technology<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Babbage’s<br />
Difference Engine 2<br />
and<br />
Analytical Engine<br />
1834 Babbage Analytical Engine<br />
The Mill<br />
The Store<br />
Printer<br />
Punch<br />
Operation<br />
Cards<br />
Variable<br />
Cards<br />
Program<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Babbage Analytical Engine<br />
• The Store: Memory unit consisting of counter<br />
wheels<br />
• The Mill: The arithmetic unit capable of 4 operations<br />
used a pair of register and produced results stored<br />
in another register in the store<br />
• Operation Cards: Specified one of Four operations<br />
• Variable Cards: Specified the memory location to be<br />
used<br />
• Output: Printer or punch<br />
Analytic Engine<br />
The first conception of a general-purpose computer<br />
1. The store in which all variables to be operated upon, as<br />
well as all those quantities which have arisen from the<br />
results of the operations are placed.<br />
2. The mill into which the quantities about to be operated<br />
upon are always brought.<br />
The program ogam<br />
Operation variable1 variable2 variable3<br />
An operation in the mill required feeding two punched cards<br />
and producing a new punched card for the store.<br />
An operation to alter the sequence was also provided!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
The first programmer<br />
Ada Byron aka “Lady Lovelace” 1815-52<br />
52<br />
Babbage’s Influence<br />
Babbage’s ideas had great influence later<br />
primarily because of<br />
Luigi Menabrea, who published notes of<br />
Babbage’s lectures in Italy<br />
Lady Lovelace, who translated Menabrea’s<br />
notes in English and thoroughly expanded<br />
them.<br />
“... Analytic Engine weaves algebraic<br />
patterns....”<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Ada’s tutor was Babbage himself!<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
In the early twentieth century - the focus shifted<br />
to analog computers but<br />
Harvard Mark I built in 1944 is very close in<br />
spirit to the Analytic Engine.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Kelvin’s<br />
Tide<br />
Predictor<br />
(1876)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
古 代 及 近 代 <strong>计</strong> <strong>算</strong> 技 术<br />
公 元 前 500 年 , 中 国 , <strong>算</strong> 盘<br />
12 世 纪 ,Al’Khowarizmi Khowarizmi, <strong>算</strong> 法<br />
1612, John Napier, 对 数<br />
1622, William Oughtred, <strong>计</strong> <strong>算</strong> 尺 (slide rule)<br />
1642, Blaise Pascal, 自 动 进 位 的 加 法 <strong>机</strong> 器<br />
齿 轮 驱 动 的 拨 盘 , 在 窗 口 中 显 示 累 加 和<br />
1822,Charles Babbage, 差 分 <strong>机</strong> (differential engine)<br />
单 一 功 能 的 专 用 <strong>机</strong> 器<br />
1833, 解 析 <strong>机</strong> (Analytical Engine)<br />
具 有 现 代 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 基 本 部 件 ⇒ <strong>计</strong> <strong>算</strong> <strong>机</strong> 之 父<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
二 十 世 纪 前 叶 <strong>计</strong> <strong>算</strong> 技 术<br />
• 1932- Vannevar Bush’s mechanical<br />
computer(calculus)<br />
• Late 30’s - Zuse, Stibitz, Aiken -<br />
electomechanical computer<br />
• 1937~42 - Atanasoff-Berry Computer: first<br />
electronic digital computer<br />
Electomechanical Computers<br />
Limitations:<br />
• Inertia of Moving Parts-limits computation speed<br />
• Use of gears and levers etc. to move data is<br />
cumbersome and unreliable<br />
• Equipment bulk<br />
• 1943 - Turing and Newman -Colossus<br />
(Decryption)<br />
Computers with no moving parts!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
MIT Differential Analyzer (1930)<br />
Vannevar Bush’s MIT Differential Analyzer (1930)<br />
Vannevar Bush, MIT, built a large-scale differential analyzer with the additional<br />
capabilities of integration and differentiation; perhaps the largest computational<br />
device in the world in 1930.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Konrad Zuse’s Z-1 (1935)<br />
a relay computer, using binary arithmetic<br />
Aiken’s Model-K(1937)<br />
Howard Aiken at Harvard<br />
University, whose work would<br />
come to fruition in 1944, and<br />
George Stibitz at Bell Telephone<br />
Laboratories who was looking<br />
at the use of telephone relays in<br />
doing arithmetic. He first<br />
constructed a relay driven<br />
arithmetic unit in 1937 (which<br />
he later called the Model-K<br />
since it was built on the<br />
Kitchen table) and from that<br />
small start built a number of<br />
relay machines that were in use<br />
during World War II<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Linear Equation Solver<br />
John Atanasoff, Iowa State University<br />
1930’s:<br />
Atanasoff built the Linear Equation Solver.<br />
It had 300 tubes!<br />
Application:<br />
Linear and Integral differential equations<br />
Background:<br />
Vannevar Bush’s Differential Analyzer<br />
--- an analog computer<br />
Technology:<br />
Tubes and Electromechanical relays<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Atanasoff decided that the correct mode of<br />
computation ti was by electronic digital it means.<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1936-39 Atanasoff/Berry Computer (ABC)<br />
• Special purpose<br />
- solving simultaneous equations<br />
Electronic digital computation<br />
Electronic switching<br />
Separate memory<br />
Memory regeneration<br />
Binary number system<br />
Vector processing<br />
Clocked control<br />
Capacitor-drum memories<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Scientific American August 1988<br />
pp. 90-96: Dr. Atanasoff’s Computer<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Colossus-Mark I (1943)<br />
IBM /Harvard Mark I (1944)<br />
The first large scale, automatic, general purpose, electromechanical calculator<br />
Built in 1944 in IBM Endicott<br />
laboratories<br />
Howard Aiken – Professor<br />
of Physics at Harvard<br />
Essentially mechanical but<br />
had some electromagnetically<br />
controlled<br />
relays and gears<br />
Weighed 5 tons and had<br />
750,000 components<br />
A synchronizing clock that<br />
beat every 0.015015 seconds<br />
(66Hz)<br />
Performance:<br />
0.3 seconds for addition<br />
6 seconds for multiplication<br />
1 minute for a sine calculation<br />
Broke down once a week!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1937, Alan Turing<br />
While not using the practical<br />
technology of the era, Alan<br />
Turing developed the idea of a<br />
"Universal Machine" capable<br />
of executing any<br />
describable algorithm, and<br />
forming the basis for the<br />
concept of "computability".<br />
Perhaps more importantly<br />
Turing's ideas differed from<br />
those of others who were<br />
solving arithmetic problems<br />
by introducing the concept of<br />
"symbol processing".<br />
1937 年 , 当 A.M.Turing 提 出 图 灵 <strong>机</strong> 概 念 时 ,<br />
也 许 人 们 并 不 知 道 存 储 程 序 <strong>计</strong> <strong>算</strong> <strong>机</strong> 对 人 类 社 会 的<br />
真 正 意 义 ; 然 而 , 在 此 之 后 的 半 个 多 世 纪 , 人 们<br />
却 在 科 学 、 技 术 , 甚 至 哲 学 、 法 律 等 社 会 的 各 个<br />
领 域 都 品 味 到 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 强 大 震 撼 力 。 有 些 我 们 现<br />
在 看 来 理 所 当 然 的 处 理 器 的 特 点 , 在 <strong>计</strong> <strong>算</strong> <strong>机</strong> 不 长<br />
的 历 史 上 也 的 确 经 历 了 一 个 不 短 的 认 识 过 程 。 了<br />
解 这 个 过 程 , 包 括 其 技 术 背 景 和 器 件 工 艺 背 景 ,<br />
对 我 们 研 究 将 来 的 <strong>计</strong> <strong>算</strong> <strong>机</strong> 以 及 用 好 现 在 的 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
都 是 有 益 的 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Generations<br />
“I think there is a world<br />
market for maybe five<br />
computers.”<br />
Thomas Watson Senior,<br />
Chairman of IBM, 1943<br />
1: 1950 ~ 59 Vacuum Tubes<br />
2: 1960 ~ 68 Discrete transistor<br />
3: 1969 ~ 77 ICs<br />
4: 1978 ~ ? LSI and VLSI<br />
5?: Japanese project<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
The First Generation<br />
Use Vacuum Tubes for switching and storage.<br />
A Triode invented in 1906 became a building block.<br />
Structure?<br />
Turing:<br />
• In 1937 gave the mathematical foundations<br />
in terms of TURING MACHINE which can<br />
emulate any other computer.<br />
• He tried to build a computer ACE<br />
Automatic Computing Engine (ACE) was completed in 1947<br />
通 用 电 子 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 起 源<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
第 一 台 通 用 电 子 <strong>计</strong> <strong>算</strong> <strong>机</strong> --ENIAC<br />
Electronic Numerical Integrator and Calculator<br />
1946 年 2 月 14 日<br />
J. Presper Eckert&<br />
John Mauchly<br />
Moore School<br />
University of Pennsylvania<br />
Size: 80 feet long<br />
8.5 feet high<br />
h<br />
18,000 vacuum tubes<br />
5000 additions/sec.<br />
The world’s first general-purpose electronic computer<br />
conditional Jump and be programmable, distinguished it from earlier ones<br />
Used for computing artillery firing tables<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
ENIAC<br />
Inspired by Atanasoff and Berry, Eckert and Mauchly designed and built<br />
ENIAC (1943-45) at the University of Pennsylvania<br />
The first, completely l electronic, operational, general-purpose analytical<br />
l<br />
calculator!<br />
30 tons, 72 square meters, 200KW<br />
Performance<br />
Read R d in 120 cards per minute<br />
Addition took 200 μs, Division 6 ms<br />
1000 times faster than Mark I<br />
Not very reliable!<br />
Application: Ballistic calculations<br />
WW-2 Effort<br />
angle = f (location, tail wind, cross wind,<br />
air density, temperature, weight of shell,<br />
propellant charge, ... )<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Accumulator<br />
28 vacuum tubes<br />
ENIAC was NOT a “stored program” device<br />
For each problem, someone analyzed the<br />
arithmetic processing needed and prepared p wiring<br />
diagrams for the computors to use when wiring the<br />
machine<br />
Process was time consuming and error prone<br />
Cleaning personnel often knocked cables out of<br />
their place and just put them back somewhere<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Wiring the machine<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Function Tables<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong> 北 京 大 学 微 处 理 器 研 究 开 发 中 心 北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong> 北 京 大 学 微 处 理 器 研 究 开 发 中 心
Pulse Diagram<br />
ENICA: Electronic Numerical and Integrate Calculator<br />
Mauchly and Eckert<br />
• First General Purpose Computer: Was designed for<br />
ballistic calculations but was used for H-Bomb<br />
design<br />
• 30 Tons, 15,000 Square Ft., 18,000 Vacuum Tubes,<br />
140 KW<br />
• 5,000 additions per second<br />
• Used decimal arithmetic<br />
• Memory had 20 accumulators for 10 digit numbers<br />
• Programming required setting switches and<br />
plugging cables manually<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
ENIAC<br />
Electronic Discrete Variable Automatic Computer (EDVAC)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
ENIAC’s programming system was external<br />
Sequences of instructions were executed<br />
independently of the results of the calculation<br />
Human H intervention i required to take instructions<br />
i<br />
“out of order”<br />
Eckert, Mauchly, John von Neumann and others<br />
designed EDVAC (1944) to solve this problem<br />
Solution was the stored program computer<br />
⇒ “program can be manipulated as data”<br />
First Draft of a report on EDVAC was published in<br />
1945, but just had von Neumann’s signature!<br />
In 1973 the court of Minneapolis attributed the<br />
honor of inventing the computer to John Atanasoff<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Stored Program Computer<br />
Technology Issues<br />
Program = A sequence of instructions<br />
How to control instruction sequencing?<br />
manual control<br />
calculators<br />
automatic control<br />
external (paper tape) Harvard Mark I , 1944<br />
Zuse’s Z1, WW2<br />
internal<br />
plug board ENIAC 1946<br />
read-only memory ENIAC 1948<br />
read-write memory EDVAC 1947 (concept )<br />
– The same storage can be used to store program and data<br />
EDSAC 1950 Maurice Wilkes<br />
ENIAC ⇒ EDVAC<br />
18,000 tubes 4,000 tubes<br />
20 10-digit numbers 2000 word storage<br />
mercury delay lines<br />
ENIAC had many asynchronous parallel units<br />
but only one was active at a time<br />
BINAC : Two processors that checked each other<br />
for reliability.<br />
Didn’t work well because processors never<br />
agreed<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Dominant Problem: Reliability<br />
Mean time between failures (MTBF)<br />
MIT’s Whirlwind with an MTBF of 20 min. was perhaps the<br />
most reliable machine !<br />
Reasons for unreliability:<br />
1. Vacuum Tubes<br />
2. Storage medium<br />
acoustic delay lines<br />
mercury delay lines<br />
Williams tubes<br />
Selections<br />
Reliability solved by invention of Core memory by<br />
J. Forrester 1954 at MIT for Whirlwind i project<br />
第 一 台 可 操 作 的 存 储 程 序 <strong>机</strong> 器 ---Mark-I<br />
The world’s first operational stored-program machine<br />
1948 年 , 曼 彻 斯 特 大 学 , 小 型 <strong>计</strong> <strong>算</strong> <strong>机</strong> 样 <strong>机</strong><br />
存 储 器 大 小 :32 字 ( 可 扩 充 到 8K 字 )<br />
<strong>机</strong> 器 字 长 :32 位<br />
6 条 指 令 :<br />
jump<br />
load accumulator negative<br />
substract<br />
store accumulator<br />
test for zero<br />
stop<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
第 一 台 全 面 的 、 可 操 作 的 、 存 储 程 序 <strong>计</strong> <strong>算</strong> <strong>机</strong> --EDSAC<br />
The world’s first full-scale,operational,stored-program l l t computer<br />
Maurice Wilkes,Cambridge University<br />
EDSAC: Electronic Delay Storage Automatic Calculator<br />
The von Neumann Machine<br />
Stored Program Computer<br />
IAS(Institute for Advanced Study)<br />
Computer<br />
1946<br />
1949 年 ,EDSAC 开 始 运 行<br />
其 基 于 累 加 器 的 <strong>结</strong> <strong>构</strong> 和 其<br />
指 令 <strong>系</strong> <strong>统</strong> 设 <strong>计</strong><br />
对 以 后 一 段 时 期 的 <strong>机</strong> 器 设<br />
<strong>计</strong> 有 着 重 要 影 响<br />
Main<br />
Memory<br />
Arithmetic<br />
Logic<br />
Unit<br />
Program<br />
Control<br />
Unit<br />
I/O<br />
Equipment<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
存 储 程 序 的 思 想 即 <strong>构</strong> 成 <strong>计</strong> <strong>算</strong> <strong>机</strong> 程 序<br />
的 指 令 可 同 数 据 一 样 事 先 存 放 到 存 储 器 中 ,<br />
然 后 由 <strong>计</strong> <strong>算</strong> <strong>机</strong> 自 己 一 条 条 取 出 执 行 。<br />
这 种 思 想 很 自 然 地 引 出 了 转 移 指 令 和<br />
可 对 指 令 的 地 址 部 分 进 行 修 改 的 概 念 , 从<br />
而 使 一 段 程 序 的 指 令 可 以 自 动 地 被 有 意 义<br />
地 多 次 执 行 。<br />
IAS Computer<br />
• Main memory which stores both data and instructions<br />
• An arithmetic-Logic Unit capable of operating on binary<br />
data<br />
• A control unit which interprets the instructions in<br />
memory and causes them to be executed<br />
• Input and Output equipment operated by the control unit<br />
• 1000 words of 40 bits each<br />
• Signed Magnitude representation of numbers<br />
Instruction<br />
Format<br />
0 8 20 28<br />
Opcode Address Opcode Address<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Central Processing Unit<br />
Arithmetic-logic unit<br />
IAS Computer Details<br />
MQ AC<br />
Input-<br />
Arithmetic-logic circuits<br />
output<br />
equipment<br />
IAS: Institute for Advanced Study(1952)<br />
MBR<br />
IBR<br />
PC<br />
Instructions<br />
and ddata<br />
IR<br />
MAR<br />
Control Control<br />
circuits it<br />
Signal Address<br />
Program control unit<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Main<br />
Memory<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
IAS Instruction Set<br />
•21 Instructions<br />
•Data Transfer<br />
•Unconditional Branch<br />
•Conditional Branch<br />
•ArithmeticA ti<br />
•Address Modify<br />
IAS <strong>机</strong> 器 的 设 <strong>计</strong> 采 用 基 于 累 加 器 的 <strong>结</strong> <strong>构</strong> ,<br />
指 令 <strong>系</strong> <strong>统</strong> 含 有 五 种 指 令 : 数 据 传 送 、 无 条 件 转 移 、<br />
条 件 转 移 、 <strong>算</strong> 术 运 <strong>算</strong> 和 地 址 修 改 。 另 外 ,IAS 可<br />
以 从 主 存 中 一 次 取 出 两 条 指 令 , 并 且 把 不 立<br />
即 执 行 的 指 令 存 放 在 指 令 缓 冲 寄 存 器 中 。<br />
IAS <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 设 <strong>计</strong> , 是 对 前 人 工 作 的 一 个 总<br />
<strong>结</strong> , 它 使 存 储 程 序 的 思 想 和 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 设 <strong>计</strong> 紧 密 联<br />
<strong>系</strong> 在 一 起 , 从 而 开 辟 了 <strong>计</strong> <strong>算</strong> <strong>机</strong> 技 术 发 展 的 广 阔 前<br />
景 。 他 们 的 设 <strong>计</strong> 在 <strong>计</strong> <strong>算</strong> <strong>机</strong> 发 展 史 上 起 到 了 承 前 启<br />
后 的 作 用 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Harvard Architecture<br />
ASCC-Reader(1944)<br />
• Separate memories for instructions<br />
and data<br />
• Named for Aiken’s Mark I ~ IV<br />
machines<br />
• Today used for separate caches<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
The first large scale, automatic,<br />
general purpose, electromechanical<br />
calculator was the<br />
Harvard Mark I (AKA IBM<br />
Automatic Sequence Control<br />
Calculator [ASCC]) conceived by<br />
Howard Aiken in the late 1930's<br />
and implemented by Messrs.<br />
Hamilton, Lake, Durfee of IBM. The<br />
machine was intended to<br />
computer the elements of mathematical<br />
and navigation tables --<br />
the same purpose as intended by<br />
Babbage for the Difference Engine.<br />
Aiken dedicated his early reports<br />
to<br />
Babbage, having been made<br />
aware of the piece of the<br />
Difference Engine at Harvard in<br />
1937. The ASCC was not a stored<br />
program machine but instead was<br />
driven by a paper tape containing<br />
the instructions.<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
这 个 时 期 的 <strong>机</strong> 器 主 要 利 用 电 子<br />
管 来 实 现 。 一 般 主 存 用 静 电 管 和 延<br />
迟 线 , 辅 存 用 纸 带 、 穿 孔 卡 和 延 迟<br />
线 。 由 于 硬 件 的 昂 贵 , 这 一 时 期 的<br />
<strong>机</strong> 器 大 都 采 用 基 于 累 加 器 的 <strong>结</strong> <strong>构</strong> ,<br />
而 且 仅 能 实 现 极 少 一 些 必 须 的 <strong>机</strong> 器<br />
指 令 , 大 多 数 <strong>机</strong> 器 的 设 <strong>计</strong> 目 的 主 要<br />
是 用 于 进 一 步 研 究 。<br />
<strong>计</strong> <strong>算</strong> <strong>机</strong> 产 业 的 形 成<br />
做 为 节 约 人 类 劳 动 工 具 的 <strong>计</strong> <strong>算</strong> <strong>机</strong> , 只 有 在 形 成<br />
产 业 之 后 才 可 能 在 社 会 上 得 以 广 泛 应 用 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Later of 1946, Eckert and Mauchly, in a patent dispute<br />
with the University of Pennsylvania, left the University to<br />
establish the first computer company -- Electronic Control<br />
Corp. with a plan to build the Universal Automatic<br />
Computer (UNIVAC). After many crises they built the<br />
BINAC for Northrup Aviation, and were taken over by<br />
Remington-Rand before the UNIVAC was completed. At<br />
the same time the Electronic Research Associates (ERA)<br />
was incorporated in Minneapolis and took their<br />
knowledge of computing devices to create a line of<br />
computers; later ERA was also assimilated into<br />
Remington-Rand.<br />
1951 年 6 月 ,Eckert-Mauchly <strong>计</strong><br />
<strong>算</strong> <strong>机</strong> 公 司 开 始 交 付 UNIVAC I <strong>机</strong> 器 ,<br />
这 种 <strong>机</strong> 器 售 价 为 250,000 美 元 ,<br />
共 生 产 了 48 套 <strong>系</strong> <strong>统</strong> , 从 而 使 之 成<br />
为 第 一 台 成 功 的 商 业 化 <strong>计</strong> <strong>算</strong> <strong>机</strong> 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
UNIVAC-1(1951)<br />
UNIVAC Console<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
1952 年 ,IBM 公 司 推 出 了 它 的<br />
第 一 台 <strong>机</strong> 器 -----IBM701, 在 这 台<br />
<strong>机</strong> 器 中 使 用 了 威 廉 管 (William’s’<br />
tube) 存 储 器 。<br />
这 种 <strong>机</strong> 器 一 共 生 产 了 19 套 ; 租<br />
金 为 $15,000/ 月 。<br />
IBM 701 (1952)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Whirlwind(1951)<br />
Jay Forrester, Bob Everett<br />
and others at MIT began<br />
work on a simulator for the<br />
Air Force in late 1946, but<br />
changed their minds about<br />
the use of analog<br />
techniques, deciding<br />
instead to use digital<br />
processing to produce the<br />
first real-time<br />
processing<br />
computer -- the<br />
Whirlwind. This work is<br />
also well known for the<br />
development of core<br />
memory.<br />
Cores on a Matrix of Wires<br />
The basic concept for core<br />
memory had been patented<br />
by An Wang, Harvard<br />
University, it in 1949, but his<br />
technique involved using<br />
the cores on single wires<br />
to form delay lines. The<br />
Whirlwind Project<br />
conceived the technique of<br />
stringing the cores onto a<br />
matrix of wires and thus<br />
producing a random<br />
access memory.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
1953, In the midst of the first "police action" on the part of<br />
the United Nations in Korea, IBM took the opportunity to<br />
contribute to the war effort by providing a "Defense<br />
Calculator" that was in fact their first true entry into the<br />
computer business. The IBM "Type 701 EDPM" was built<br />
as a result of the conviction of T.J.Watson, Jr. that IBM<br />
had to take a step into this field and his convincing his<br />
father that computers would not immediately destroy the<br />
card processing business. The 700 series of<br />
machines, including the 704, 709, and eventually<br />
the 7090 and 7094, dominated the large mainframe<br />
market for the next decade, d and brought IBM from<br />
computer obscurity to first place in that same time period.<br />
IBM 650 (1953)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Since the 1930s IBM had built a series of calculators in the<br />
600 series that t contributed t to the versatility of the<br />
card processing equipment that was their major product.<br />
The early IBM computers (701 and 702) were incompatible<br />
with the punched card processing equipment, but the IBM<br />
Type 650 EDPM (1954), a natural extension of the<br />
600 series, used the same card processing<br />
peripherals thus making it upwardly compatible for<br />
many existing IBM customers. A decimal, drum memory<br />
machine, the 650 was the first to be mass produced though<br />
IBM never expected to lease 1000 in the first after its<br />
announcement. For many universities it was to be their first<br />
computer, its attractiveness was considerably enhanced by<br />
the availability of a 60% educational discount conditional on<br />
the institution teaching certain computer-related t courses.<br />
1955 年 ,IBM704 投 入 市 场 ; 在 这 台<br />
<strong>机</strong> 器 中 首 次 使 用 了 变 址 寄 存 器 , 从<br />
而 以 一 种 更 合 理 的 方 式 实 现 了 动 态<br />
修 改 指 令 的 地 址 部 分 所 要 完 成 的 功<br />
能 。<br />
并 且 在 这 台 <strong>机</strong> 器 上 首 次 出 现 了 操 作<br />
<strong>系</strong> <strong>统</strong> 的 原 始 模 型 --- 控 制 程 序 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
1956 年 ;Ferranti 有 限 公 司 建 造<br />
成 功 第 一 台 含 通 用 寄 存 器 的 <strong>机</strong> 器<br />
-----Pegasus;<br />
它 有 八 个 通 用 寄 存 器 , 其 中 R0 恒<br />
为 “0”, 在 今 天 的 很 多 处 理 器 中 ,<br />
我 们 仍 能 看 到 这 一 特 点 。<br />
FORTRAN (1954)<br />
Following the example set<br />
by Grace Hopper, and a<br />
successful implementation<br />
of a digital code interpreter<br />
for the IBM 701 named<br />
Speedcoding, John<br />
Backus proposed the<br />
development of a<br />
programming language<br />
that would allow uses to<br />
express their problems in<br />
commonly understood<br />
d<br />
mathematical formulae --<br />
later to be named<br />
FORTRAN.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Bell Labs<br />
1940: Ohl develops the PN Junction<br />
1945: Shockley's laboratory established<br />
1947: Bardeen and Brattain create point contact<br />
transistor (U.S. Patent 2,524,035)<br />
Diagram from patent application<br />
Transistor(1947)<br />
William Shockley, John<br />
Bardeen, and Walter<br />
Brattain invent the<br />
"transfer resistance"<br />
device, later to be known<br />
as the transistor that will<br />
revolutionize the<br />
computer and give it the<br />
reliability that could not<br />
achieved with vacuum<br />
tubes.<br />
Point-contact-transistor<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Bell Labs<br />
Shockley’s sandwitch transistor<br />
1951: Shockley develops a junction transistor<br />
manufacturable in quantity (U.S. Patent 2,623,105)<br />
Diagram from patent application<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
The Integrated Circuit<br />
Integrated Circuits<br />
1959: Jack Kilby, working at TI, dreams up the<br />
idea of a monolithic “integrated circuit”<br />
Components connected by hand-soldered<br />
wires and isolated by “shaping”, PN-diodes<br />
used as resistors (U.S. Patent 3,138,743)<br />
Diagram from patent application<br />
1961: TI and Fairchild introduce the first logic ICs ($50<br />
in quantity)<br />
1962: RCA develops the first MOS transistor<br />
Fairchild bipolar RTL Flip-Flop<br />
RCA 16-transistor MOSFET IC<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Field Effect Transistor (Lucent)<br />
1953 年 ,MIT 的 林 肯 实 验 室 研 制 成<br />
第 一 台 晶 体 管 <strong>计</strong> <strong>算</strong> <strong>机</strong> 。 从 此 , 晶 体<br />
管 器 件 开 始 逐 步 代 替 电 子 管 器 件 ,<br />
成 为 <strong>计</strong> <strong>算</strong> <strong>机</strong> 实 现 的 主 要 器 件 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
• 1958~1964<br />
• Use of Transistor<br />
Second Generation<br />
• NCR and RCA were first -- Most notable IBM<br />
7000 Series<br />
• More complex ALU and Control Units<br />
• Use of higher h level l languages<br />
• System Software<br />
• I/O Channels<br />
为 了 进 一 步 提 高 IBM704 的 性 能 ,<br />
1960 年 IBM 推 出 了<br />
世 界 上 第 一 台 通 用 流 水 线 <strong>机</strong> 器<br />
-----IBM7030<br />
它 采 用 四 级 流 水 线 <strong>结</strong> <strong>构</strong> , 以 使 取<br />
指 、 译 码 和 执 行 阶 段 重 叠 , 从 而<br />
提 高 速 度 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
在 1960 年 前 后 ,IBM 公 司 推 出 了 它 的 晶 体 管 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
IBM 7094, 在 这 台 <strong>机</strong> 器 中 第 一 次 采 用 逻 辑 指 令 来 进 行 非<br />
数 值 <strong>计</strong> <strong>算</strong> 。<br />
该 <strong>机</strong> 器 采 用 的 许 多 成 功 的 改 进 对 后 来 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 发 展<br />
有 着 很 大 的 影 响 。<br />
指 令 <strong>系</strong> <strong>统</strong> 总 共 有 185 条 指 令 。<br />
这 些 指 令 分 为 七 类 :<br />
数 据 传 送 指 令 、 定 点 <strong>算</strong> 术 指 令 、 浮 点 <strong>算</strong> 术 指 令 、 逻<br />
辑 指 令 、 变 址 指 令 、 转 移 类 指 令 和 I/O 指 令 。<br />
特 点 :<br />
• 它 有 一 <strong>组</strong> 变 址 寄 存 器 以 及 能 够 处 理 定 、 浮 点 <strong>算</strong> 术 运 <strong>算</strong> 的<br />
硬 件 ;<br />
• 所 有 的 I/O 操 作 均 由 一 台 可 对 主 存 储 器 直 接 进 行 存 取 的<br />
I/O 处 理 <strong>机</strong> 来 控 制 ;<br />
• 存 储 部 分 分 成 两 个 模 块 , 一 个 模 块 只 有 偶 地 址 单 元 , 而<br />
另 一 模 块 则 只 有 奇 地 址 单 元 。 这 样 在 一 个 存 储 周 期 内 ,<br />
可 对 独 立 的 模 块 进 行 交 叉 存 取 , 从 而 为 CPU 提 供 两 个 连 续<br />
的 字 ;<br />
• 它 的 指 令 中 有 三 个 特 征 位 , 用 以 指 示 是 否 需 要 变 址 , 以<br />
及 使 用 哪 个 变 址 寄 存 器 ;<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
• 它 采 用 了 间 接 寻 址 技 术 。 在 这 种 技 术 中 , 间 接 寻 址 指 令 所 形 成 的<br />
地 址 , 不 是 存 放 操 作 数 的 地 址 , 而 是 用 来 形 成 操 作 数 地 址 的 地 址 。<br />
这 种 寻 址 技 术 在 分 类 、 排 序 中 是 非 常 有 用 的 ;<br />
• 采 用 了 专 用 的 程 序 控 制 指 令 , 这 种 指 令 对 应 于 不 同 程 序 间 的 控<br />
制 转 移 , 如 它 的 LINK/TRA 指 令 对 ,LINK/TRA 指 令 对 , 即 后 来 人 们<br />
常 称 的 调 用 子 程 序 / 子 程 序 返 回 指 令 对 , 对 调 用 子 过 程 等 是 十 分 有<br />
效 的 ;<br />
• I/O 处 理 <strong>机</strong> <strong>与</strong> CPU 间 的 通 讯 采 用 了 中 断 控 制 , 并 且 在 I/O 处 理<br />
<strong>机</strong> 中 采 用 字 的 拆 、 装 技 术 以 使 得 CPU 和 I/O 设 备 间 的 字 长 能 够 匹 配 ;<br />
• 采 用 了 DMA 技 术 。 即 当 I/O 处 理 <strong>机</strong> 请 求 访 问 主 存 储 器 时 , 可 能 使<br />
CPU 的 主 存 访 问 请 求 延 迟 一 个 存 储 周 期 , 但 是 并 不 中 断 CPU 的 操 作 ,<br />
只 是 使 CPU 操 作 推 迟 一 个 存 储 周 期 ;<br />
IBM 7094<br />
• 700 series in 1952 last member of 7000 in 1964<br />
• Memory 2K to 32K of 36 bit words<br />
• Memory Cycle time fell from 30 micro sec to 1.4<br />
micro sec<br />
• Number of Opcodes grew from 24 to 185<br />
• Use of data channels<br />
• Multiplexor to which all channels are connected<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
IBM 7090 Console<br />
1961<br />
The work on integrated circuits by Jack Kilby and<br />
Robert Noyce came to fruition in 1961 when the<br />
first commercially available integrated<br />
circuits became available from the Fairchild<br />
Corporation. The patent t for the silicon based IC<br />
had been granted to Robert Noyce, starting a long<br />
contention ti on patent t rights for IC's between the<br />
germanium version of Kilby and that of Noyce.<br />
From this date forward computers would<br />
incorporate ICs instead of individual transistors or<br />
other components.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1961<br />
While operating systems (originally called monitors or<br />
supervisors) had been developed as a means of<br />
improving the throughput of computers in the late 1950s,<br />
the users were frustrated by their lack of intimacy with<br />
the computer. To solve this problem and<br />
return the control of the computer back in the hands of<br />
the user, Fernando Corbat MIT, produced CTSS<br />
(Compatible Time Sharing System) for the IBM<br />
7090/94, the first effective time-sharing system<br />
and coincidentally the first means of remote access to a<br />
computer since Stibitz' demonstration in 1940.<br />
从 整 体 来 说 , 这 一 时 期 的 <strong>机</strong> 器 一 般 还<br />
大 多 采 用 简 单 的 指 令 <strong>系</strong> <strong>统</strong> , 通 过 变 址 寄 存<br />
器 来 辅 助 完 成 对 数 <strong>组</strong> 的 访 问 。 <strong>机</strong> 器 中 只 有<br />
极 少 量 的 寄 存 器 , 存 储 器 空 间 也 不 大 , 而<br />
且 处 理 器 的 性 能 和 存 储 器 的 性 能 相 近 。 程<br />
序 设 <strong>计</strong> 一 般 采 用 汇 编 语 言 , 在 后 期 也 使 用<br />
一 些 早 期 出 现 的 高 级 语 言 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
The Earliest Instruction Sets<br />
Single Accumulator - A carry-over from the calculators.<br />
LOAD x AC ← M[x]<br />
STORE x M[x] ← (AC)<br />
ADD x AC ← (AC) + M[x]<br />
SUB<br />
x<br />
MUL x Involved a quotient register<br />
DIV<br />
x<br />
SHIFT LEFT<br />
SHIFT RIGHT<br />
AC ← 2 × (AC)<br />
JUMP x PC ← x<br />
JGE x if (AC) ≥ 0 then PC ← x<br />
LOAD ADR x AC ← Extract address field(M[x])<br />
STORE ADR x<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Typically less than 2 dozen instructions!<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Programming:<br />
Single Accumulator Machine<br />
C i ← A i + B i , 1 ≤ i ≤ n<br />
A<br />
LOOP LOAD N<br />
JGE<br />
DONE<br />
ADD<br />
ONE<br />
STORE<br />
N<br />
F1 LOAD A<br />
F2 ADD B<br />
F3 STORE C<br />
JUMP<br />
LOOP<br />
DONE HLT<br />
How to modify the addresses A, B and C ?<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
B<br />
C<br />
N -n<br />
ONE 1<br />
code<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Self-Modifying Code<br />
C ← A + B , 1 ≤ i ≤ n<br />
LOOP LOAD N<br />
i i i<br />
JGE<br />
ADD<br />
STORE<br />
F1 LOAD A<br />
F2 ADD B<br />
F3 STORE C<br />
LOAD JUMP ADR<br />
DONE ADD HLT<br />
STORE ADR<br />
modify the<br />
LOAD ADR<br />
program<br />
ADD<br />
for the next<br />
STORE ADR<br />
iteration<br />
LOAD ADR<br />
ADD<br />
STORE ADR<br />
JUMP<br />
DONE HLT<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
DONE<br />
ONE<br />
N<br />
F1 LOOP<br />
ONE<br />
F1<br />
F2<br />
ONE<br />
F2<br />
F3<br />
ONE<br />
F3<br />
LOOP<br />
Each iteration involves<br />
total bookkeeping<br />
instruction<br />
ti<br />
fetches 17 14<br />
operand<br />
fetches<br />
stores<br />
10<br />
8<br />
5 4<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Index Registers<br />
Tom Kilburn, Manchester University, it mid 50’s<br />
One or more specialized registers to simplify<br />
address calculation<br />
Modify existing instructions<br />
LOAD x, IX AC ← M[x + (IX)]<br />
ADD x, IX AC ← (AC) + M[x + (IX)]<br />
...<br />
Add new instructions to manipulate index registers<br />
JZi x, IX if (IX)=0 then PC ← x<br />
else IX ← (IX) + 1<br />
LOADi x, IX IX ← M[x] (truncated to fit IX)<br />
...<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Index registers have accumulator-like<br />
characteristics<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Using Index Registers<br />
C i ← A i + B i , 1 ≤ i ≤ n<br />
LOADi -n, IX<br />
LOOP JZi DONE, IX<br />
A<br />
LOAD<br />
LASTA, IX<br />
ADD LASTB, IX<br />
STORE LASTC, IX<br />
JUMP<br />
LOOP<br />
LASTA<br />
DONE HALT<br />
• Program does not modify itself<br />
• Efficiency i has improved dramatically (ops / iter)<br />
with index regs without index regs<br />
instruction fetch 5(2)<br />
17 (14)<br />
operand fetch 2<br />
10 (8)<br />
store 1<br />
5 (4)<br />
• Costs:<br />
Instructions are 1 to 2 bits longer<br />
Index registers with ALU-like circuitry<br />
Complex control<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Operations on Index Registers<br />
To increment index register by k<br />
AC ← (IX)<br />
AC ← (AC) + k<br />
IX ← (AC)<br />
new instruction<br />
new instruction<br />
also the AC must be saved and restored.<br />
It may be better to increment IX directly<br />
INCi k, IX IX ← (IX) + k<br />
More instructions to manipulate index register<br />
STOREi x, IX M[x] ← (IX) (extended to fit a word)<br />
...<br />
IX begins to look like an accumulator<br />
⇒ several index registers<br />
several accumulators<br />
⇒ General Purpose Registers<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Evolution of Addressing Modes<br />
1. Single accumulator, absolute address<br />
LOAD<br />
x<br />
2. Single accumulator, index registers<br />
LOAD x, IX<br />
3. Indirection<br />
LOAD (x)<br />
4. Multiple accumulators, index registers, indirection<br />
LOAD<br />
R, IX, x<br />
or LOAD R, IX, (x) the meaning?<br />
R ← M[M[x] + (IX)]<br />
or R ← M[M[x + (IX)]]<br />
5. Indirect through registers<br />
LOAD R I , (R J )<br />
6. The works<br />
LOAD R I , R J , (R K ) R J = index, R K = base addr<br />
Variety of Instruction Formats<br />
Two address formats: the destination is same as one of the operand<br />
sources<br />
(Reg × Reg) to Reg R I ← (R I ) + (R J )<br />
(Reg × Mem) to Reg R I ← (R I ) + M[x]<br />
x can be specified directly or via a register<br />
effective address calculation for x could include indexing,<br />
indirection, ...<br />
Three address formats: One destination and up to two operand<br />
sources per instruction<br />
(Reg x Reg) to Reg R I ← (R J ) + (R K )<br />
(Reg x Mem) to Reg<br />
R I ← (R J ) + M[x]<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
More Instruction Formats<br />
Zero address formats: operands on a stack<br />
add<br />
load<br />
M[sp-1] ← M[sp] + M[sp-1]<br />
M[sp] ← M[M[sp]]<br />
Register<br />
SP<br />
Stack can be in registers or in memory (usually top of stack<br />
cached in registers)<br />
One address formats: Accumulator machines<br />
Accumulator is always other implicit operand<br />
A<br />
B<br />
C<br />
Many different formats are possible!<br />
Data Formats and Memory Addresses<br />
Data formats:<br />
Bytes, Half words, words and double words<br />
Some issues<br />
• Byte addressing<br />
g<br />
Most Significant<br />
Byte<br />
Big Endian 0 1 2 3<br />
vs. Little Endian 3 2 1 0<br />
• Word alignment<br />
Suppose the memory is organized in 32-bit words.<br />
Can a word address begin only at 0, 4, 8, .... ?<br />
Least Significant<br />
Byte<br />
Byte Addresses<br />
0 1 2 3 4 5 6 7<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Software Developments<br />
Compatibility Problem at IBM<br />
up to 1955 Libraries of numerical routines<br />
- Floating point operations<br />
- Transcendental functions<br />
- Matrix manipulation, equation solvers, . . .<br />
1955-60 High level Languages - Fortran 1956<br />
Operating Systems -<br />
- Assemblers, Loaders, Linkers, Compilers<br />
- Accounting programs to keep track of<br />
usage and charges<br />
Machines required experienced operators<br />
⇒<br />
⇒<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Most users could not be expected to understand<br />
d<br />
these programs, much less write them<br />
Machines had to be sold with a lot of resident<br />
software<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
<br />
By early 60’s, IBM had 4 incompatible lines of<br />
computers!<br />
701 → 7094<br />
650 → 7074<br />
702 → 7080<br />
1401 → 7010<br />
Each system had its own<br />
• Instruction set<br />
• I/O system and Secondary Storage:<br />
magnetic tapes, drums and disks<br />
• assemblers, compilers, libraries,...<br />
• market niche<br />
business, scientific, real time, ...<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
⇒ IBM 360<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Third Generation<br />
• Use of Integrated Circuits<br />
• Examples IBM System/360 and DEC PDP-8<br />
• IC technology has continued to play a major role in this<br />
field<br />
• Family concept<br />
•Similar or identical instruction set<br />
•Similar il or identical operating system<br />
•Increasing speed<br />
•Increasing number of I/O ports<br />
•Increasing memory size<br />
•Increasing cost<br />
<strong>计</strong> <strong>算</strong> <strong>机</strong> <strong>系</strong> <strong>统</strong><br />
软 、 硬 件 的 融 合 <strong>与</strong> 权 衡<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1959 年 ,Barton 提 出 了 堆 栈 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的<br />
设 想 , 在 此 基 础 上 ,1963 年 Burroughs 公 司<br />
推 出 了 第 一 台 堆 栈 <strong>计</strong> <strong>算</strong> <strong>机</strong> B5000, 它 可 以<br />
认 为 是 第 一 台 在 认 真 考 虑 软 硬 件 权 衡 问 题<br />
的 基 础 上 设 <strong>计</strong> 的 <strong>机</strong> 器 。 这 台 <strong>机</strong> 器 的 设 <strong>计</strong> 主<br />
要 是 考 虑 如 何 高 效 地 支 持 象 ALGOL 这 样 的 高<br />
级 语 言 , 同 时 这 台 <strong>机</strong> 器 使 用 了 高 级 语 言 编<br />
写 的 操 作 <strong>系</strong> <strong>统</strong> MCP。<br />
B5000 的 主 要 特 点 是 : <strong>算</strong> 术 寄 存 器 由 后 进 先 出<br />
的 下 推 堆 栈 的 方 式 <strong>构</strong> 成 , 栈 顶 的 两 个 字 是 CPU<br />
中 的 快 速 寄 存 器 , 而 栈 的 其 它 部 分 在 主 存 储<br />
器 中 , 在 大 多 数 情 况 下 指 令 均 采 用 栈 顶 的 内<br />
容 作 为 操 作 数 , 而 <strong>计</strong> <strong>算</strong> <strong>结</strong> 果 也 送 回 堆 栈 , 因<br />
此 指 令 中 不 需 指 明 操 作 数 的 地 址 , 所 以 , 这<br />
种 <strong>机</strong> 器 又 称 为 “ 零 地 址 指 令 ” <strong>机</strong> 器 ; 使 用 一<br />
特 征 位 来 区 分 操 作 数 及 标 识 符 , 这 样 就 可 以<br />
用 来 标 识 信 息 的 类 型 。<br />
在 绝 大 多 数 高 级 语 言 中 , 类 型 说 明 是 必 不 可 少 的 , 加 特 征 位 意 味 着 在 <strong>机</strong> 器 的 指 令<br />
<strong>系</strong> <strong>统</strong> 中 不 必 再 为 不 同 的 数 据 类 型 提 供 不 同 的 指 令 ,CPU 仅 需 检 查 特 征 位 就 可 以 确<br />
定 数 据 类 型 , 这 样 就 为 <strong>机</strong> 器 发 现 软 件 中 的 类 型 错 误 提 供 了 可 能 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
A Stack Machine<br />
Evaluation of Expressions<br />
Processor<br />
stack<br />
:<br />
a<br />
push b<br />
<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Main<br />
Store<br />
b<br />
a<br />
A Stack machine has a stack as a<br />
part of the processor state<br />
typical operations:<br />
push, pop, +, *, ...<br />
Instructions like + implicitly<br />
specify the top 2 elements of the<br />
stack as operands.<br />
push c<br />
<br />
c<br />
b<br />
a<br />
pop<br />
<br />
b<br />
a<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
(a + b * c) / (a + d * c - e)<br />
a<br />
+ -<br />
b<br />
/<br />
* +<br />
c<br />
a<br />
Reverse Polish<br />
a b c * + a d c * + e - /<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
d<br />
*<br />
push push multiply a b c<br />
e<br />
c<br />
*<br />
c<br />
b b* c<br />
a<br />
Evaluation Stack<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Evaluation of Expressions<br />
Hardware organization of the stack<br />
(a + b * c) / (a + d * c - e)<br />
/<br />
Stack k is part of the processor state<br />
t<br />
⇒ stack must be bounded and small<br />
≈ number of Registers,<br />
not the size of main memory<br />
a<br />
+ -<br />
b<br />
* +<br />
c<br />
a<br />
*<br />
e<br />
Conceptually stack is unbounded<br />
⇒ a part of the stack is included in the<br />
processor state; the rest is kept in the<br />
main memory<br />
Reverse Polish<br />
a b c * + a d c * + e - /<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
d<br />
add<br />
c<br />
+<br />
b * c<br />
a + ab * c<br />
Evaluation Stack<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Stack Operations and<br />
Implicit Memory References<br />
Suppose the top 2 elements of the stack are kept in registers and the<br />
rest is kept in the memory.<br />
Each push operation⇒ 1 memory reference<br />
pop operation ⇒ 1 memory reference<br />
No Good!<br />
Better performance can be got if the top N elements are kept in<br />
registers and memory references are made only when register stack<br />
overflows or underflows.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Issue - when to Load/Unload registers ?<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Stack Size and Memory References<br />
a b c * + a d c * + e - /<br />
program stack (size = 2) memory refs<br />
push a R0 a<br />
push b R0 R1 b<br />
push c R0 R1 R2 c, ss(a)<br />
* R0 R1 sf(a)<br />
+ R0<br />
push a R0 R1 a<br />
push d R0 R1 R2 d, ss(a+b*c)<br />
push c R0 R1 R2 R3 c, ss(a)<br />
* R0 R1 R2 sf(a)<br />
+ R0 R1 sf(a+b*c)<br />
push e R0 R1 R2 e,ss(a+b*c)<br />
- R0 R1 sf(a+b*c)<br />
/ R0<br />
4 stores, 4 fetches (implicit)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Stack Size and Expression Evaluation<br />
Register Usage in a GPR Machine<br />
a and c are<br />
“loaded” twice<br />
⇒<br />
not the best<br />
use of registers!<br />
a b c * + a d c * + e - /<br />
program stack (size = 4)<br />
push a R0<br />
push b R0 R1<br />
push c R0 R1 R2<br />
* R0 R1<br />
+ R0<br />
push a R0 R1<br />
push d<br />
R0 R1 R2<br />
push c R0 R1 R2 R3<br />
* R0 R1 R2<br />
+ R0 R1<br />
push e R0 R1 R2<br />
- R0 R1<br />
/ R0<br />
(a + b * c) / (a + d * c - e)<br />
Load R0 a<br />
More control over register usage<br />
since registers can be named<br />
Load R1 c<br />
explicitly<br />
Load R2 b<br />
Reuse<br />
R2 Mul R2 R1<br />
Load Ri m<br />
Add R2 R0<br />
Load Ri (Rj)<br />
Reuse Load R3 d<br />
Load Ri (Rj) (Rk)<br />
R3 Mul R3 R1<br />
Add R3 R0<br />
⇒<br />
Reuse Load R0 e<br />
- eliminates unnecessary<br />
R0 Sub<br />
Div<br />
R3<br />
R2<br />
R0<br />
R3<br />
Loads and Stores<br />
- fewer Registers<br />
but instructions may be longer!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Stack Machines: Essential features<br />
In addition to push, pop, + etc., the<br />
instruction set must provide the<br />
capability to<br />
hi t<br />
refer to any element in the<br />
data area<br />
jump to any instruction in<br />
the code area<br />
move any element in the<br />
stack frame to the top<br />
machinery to<br />
carry out<br />
+, -, etc. ⇔<br />
SP<br />
stack<br />
DP<br />
a<br />
push a<br />
b<br />
PC push b<br />
c<br />
push c .<br />
*<br />
+<br />
push e<br />
data<br />
/<br />
code<br />
堆 栈 式 <strong>结</strong> <strong>构</strong> 在 六 十 年 代 非 常 流 行 , 它 是<br />
从 <strong>机</strong> 器 设 <strong>计</strong> 角 度 考 虑 对 高 级 语 言 支 持 的 一 种<br />
非 常 有 益 的 尝 试 , 它 对 提 高 代 码 的 密 度 是 非<br />
常 有 益 的 , 但 是 这 种 <strong>结</strong> <strong>构</strong> 也 有 许 多 重 要 缺 陷 。<br />
实 践 表 明 <strong>机</strong> 器 的 高 性 能 在 很 大 程 度 上 是 通 过<br />
适 量 快 速 寄 存 器 , 而 不 是 堆 栈 <strong>结</strong> <strong>构</strong> , 来 获 得<br />
的 。 堆 栈 式 <strong>结</strong> <strong>构</strong> 受 限 较 多 , 而 且 需 要 大 量 的<br />
交 换 和 复 制 操 作 ; 只 用 快 速 寄 存 器 实 现 栈 顶 ,<br />
当 信 息 存 放 在 慢 速 存 储 器 中 时 , 会 使 性 能 产<br />
生 损 失 等 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
<strong>计</strong> <strong>算</strong> <strong>机</strong> 的 应 用 领 域 不 断 扩 大 , 同 时 ,<br />
伴 随 着 软 件 资 源 的 不 断 积 累 , 软 件 兼 容 问<br />
题 显 得 越 来 越 重 要 , 为 了 有 效 地 解 决 这 一<br />
问 题 ,1964 年 ,IBM 公 司 宣 布 了 IBM 360 <strong>系</strong><br />
列 。 这 个 <strong>系</strong> 列 包 含 六 种 型 号 , 它 们 之 间 的<br />
性 能 可 相 差 25 倍 。Amdahl 和 Blaauw 等 人 在<br />
介 绍 IBM360 时 , 提 出 了 “ <strong>系</strong> <strong>统</strong> <strong>结</strong> <strong>构</strong> ” 这 一<br />
重 要 概 念 , 并 将 此 术 语 解 释 为 程 序 员 所 看<br />
到 的 那 部 分 指 令 <strong>系</strong> <strong>统</strong> 。 他 们 认 为 具 有 相 同<br />
<strong>结</strong> <strong>构</strong> 的 <strong>机</strong> 器 将 能 够 运 行 相 同 的 软 件 。<br />
IBM 360 : Design Premises<br />
Amdahl, Blaauw and Brooks, 1964<br />
The design must lend itself to growth and successor machines<br />
General method for connecting I/O devices<br />
Total performance - answers per month rather than bits per<br />
microsecond ⇒ programming aids<br />
Machine must be capable of supervising itself without manual<br />
intervention<br />
Built-in hardware fault checking and locating aids to reduce<br />
down time<br />
Simple to assemble systems with redundant d I/O devices,<br />
memories etc. for fault tolerance<br />
Some problems required floating point words larger than 36 bits<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
IBM 360<br />
IBM 360: A General-Purpose Register (GPR) Machine<br />
Processor State<br />
16 General-Purpose 32-bit Registers<br />
may be used as index and base register<br />
Register 0 has some special properties<br />
4 Floating Point t64bit 64-bit Registers<br />
A Program Status Word (PSW)<br />
PC, C Condition codes, Control flags<br />
A 32-bit machine with 24-bit addresses<br />
But no instruction contains a 24-bit address!<br />
Data Formats<br />
8-bit bytes, 16-bit half-words, 32-bit words, 64-bit double-<br />
words The IBM 360 is why bytes are 8-bits long today!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
IBM 360: Initial Implementations<br />
Model 30 . . . Model 70<br />
Storage 8K - 64 KB 256K - 512 KB<br />
Datapath 8-bit 64-bit<br />
Circuit it Delay 30 nsec/level l 5 nsec/level<br />
l<br />
Local Store Main Store Transistor Registers<br />
Control Store Read only 1μsec<br />
Conventional circuits<br />
IBM 360 instruction set architecture (ISA) completely hid<br />
the underlying technological differences between various<br />
models.<br />
Milestone: The first true ISA designed as portable<br />
hardware-software interface!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
With minor modifications it still survives today!<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
IBM 360 <strong>系</strong> 列 <strong>机</strong> 器 成 功 地 在 IBM 内 部 解 决 了 软 件<br />
要 求 环 境 稳 定 <strong>与</strong> 器 件 、 硬 件 技 术 迅 速 发 展 之 间 的 矛<br />
盾 。 在 IBM 360 的 CPU 中 使 用 了 16 个 通 用 寄 存 器 以 存<br />
放 操 作 数 和 运 <strong>算</strong> <strong>结</strong> 果 , 并 且 可 以 做 变 址 寄 存 器 。<br />
IBM 360 能 够 支 持 大 量 不 同 的 数 据 类 型 , 如 它 的<br />
加 法 就 有 长 定 点 、 短 定 点 、 <strong>组</strong> 合 式 十 进 制 、 长 浮 点<br />
标 准 化 、 长 浮 点 非 标 准 化 、 短 浮 点 标 准 化 和 短 浮 点<br />
非 标 准 化 等 9 种 指 令 , 因 而 共 有 近 200 条 指 令 , 这 些<br />
指 令 由 2 个 、4 个 或 6 个 字 节 <strong>组</strong> 成 , 并 分 成 五 种 不 同 格<br />
式 : 寄 存 器 - 寄 存 器 型 (RR)、 寄 存 器 - 变 址 型 (RX)、<br />
寄 存 器 - 存 储 器 型 (RS)、 存 储 器 - 立 即 数 型 (RI) 和 存<br />
储 器 - 存 储 器 型 (SS)。 其 中 SS 型 指 令 都 是 十 进 制 或 串<br />
指 令 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Stack versus GPR Organization<br />
Amdahl, Blaauw and Brooks, 1964<br />
1. The performance advantage of push down stack<br />
organization is derived from the presence of fast<br />
registers and not the way they are used.<br />
2. Advantage of instruction density because of implicit<br />
addresses is equaled if short addresses to specify<br />
registers are allowed.<br />
3. Management of finite depth stack causes<br />
complexity.<br />
4. Recursive subroutine advantage can be realized<br />
only with the help of an independent stack for<br />
addressing.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Stack Machines (Mostly) Died by 1980<br />
1. Stack programs are not smaller if short (Register)<br />
addresses are permitted.<br />
2. Modern compilers can manage fast register space<br />
better than the stack discipline.<br />
GPR’s and caches are better than stack and displays<br />
Early language-directed architectures often did not<br />
take into account the role of compilers!<br />
B5000, B6700, HP 3000, ICL 2900, Symbolics 3600<br />
Some would claim that an echo of this mistake is<br />
visible in the SPARC architecture register<br />
windows - more later…<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Stacks post-1980<br />
• Inmos Transputers (1985-2000)<br />
Designed to support many parallel processes in Occam language<br />
Fixed-height stack design simplified implementation<br />
Stack trashed on context swap (fast context switches)<br />
Inmos T800 was world’s fastest microprocessor in late 80’s<br />
• Forth machines<br />
Direct support for Forth execution in small embedded real-time<br />
environments<br />
Several manufacturers (Rockwell, Patriot Scientific)<br />
• Java Virtual Machine<br />
Designed for software emulation, not direct hardware execution<br />
Sun PicoJava implementation + others<br />
• Intel x87 floating-point unit<br />
Severely broken stack model for FP arithmetic<br />
Deprecated in Pentium-4, replaced with SSE2 FP registers<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1953 年 ,Wilkes 提 出 了 微 程 序 控 制 的 基 本 思<br />
想 和 特 点 。 微 程 序 有 许 多 优 点 , 如 易 于 改 变 设 <strong>计</strong> ;<br />
通 过 仿 真 (emulation) 其 它 指 令 <strong>系</strong> <strong>统</strong> , 可 以 保 证<br />
软 件 兼 容 ; 微 程 序 设 <strong>计</strong> 可 以 减 少 实 现 复 杂 指 令 的<br />
成 本 等 等 。 但 是 , 由 于 在 很 长 的 一 段 时 间 内 , 用<br />
于 实 现 控 制 存 储 器 的 技 术 和 主 存 的 是 相 同 的 , 而<br />
且 <strong>机</strong> 器 的 指 令 <strong>系</strong> <strong>统</strong> 也 比 较 简 单 , 因 而 微 程 序 设 <strong>计</strong><br />
的 优 势 并 不 明 显 。 但 是 , 当 控 制 存 储 器 采 用 半 导<br />
体 存 储 器 工 艺 , 主 存 储 器 采 用 磁 芯 技 术 时 , 这 两<br />
种 工 艺 的 速 度 相 差 十 倍 , 从 而 为 微 程 序 的 广 泛 使<br />
用 提 供 了 基 础 。IBM360 <strong>系</strong> 列 的 许 多 <strong>机</strong> 器 都 采 用 了<br />
微 程 序 技 术 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
为 了 向 用 户 提 供 低 价 格 的 <strong>机</strong> 器 ,<br />
1965 年 DEC 公 司 推 出 了 第 一 台 大 规 模<br />
销 售 的 商 用 小 型 <strong>机</strong> -----PDP-8。 在 此<br />
之 后 , 他 们 又 推 出 了 PDP-11 等 <strong>机</strong> 种 。<br />
小 型 <strong>机</strong> 的 出 现 对 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 普 及 有 着 重<br />
要 的 意 义 。<br />
DEC PDP-8 (1965)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
DEC PDP-8 (1965)<br />
DEC PDP-11<br />
A Typical PDP-11 Installation Digital’s video terminals were relatively inexpensive, and many Digital customers took<br />
advantage by connecting as many users as possible to their Digital computers. The availability of video-based<br />
applications like word processing and spreadsheet programs brought millions of new users into the world of computing.<br />
With just a little training, people who knew nothing at all about computers could sit down at a terminal and do productive<br />
work.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Word length: 12 bits<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
为 了 向 用 户 提 供 高 速 的 科 学 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
器 ,1964 年 CDC 公 司 推 出 了 第 一 台 超 级<br />
<strong>计</strong> <strong>算</strong> <strong>机</strong> :CDC 6600。 这 台 <strong>机</strong> 器 为 达 到<br />
其 设 <strong>计</strong> 要 求 , 采 用 了 深 度 流 水 线 技 术 。<br />
当 时 , 它 的 设 <strong>计</strong> 师 Thornton 和 Cray 等<br />
人 已 经 认 识 到 : 简 单 <strong>结</strong> <strong>构</strong> 可 为 设 <strong>计</strong> 高<br />
效 流 水 线 提 供 更 好 地 支 持 , 另 外 , 多<br />
个 功 能 部 件 可 用 于 进 一 步 开 发 指 令 间<br />
的 空 间 并 行 性 。<br />
CDC 6600<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
C<br />
D<br />
C<br />
CDC 6600<br />
logic gates<br />
6<br />
6<br />
0<br />
0<br />
操<br />
作<br />
员<br />
控<br />
制<br />
台<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
CDC 6600 Cordwood module<br />
CDC 6600 1Kbit core plane<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
C<br />
D<br />
C<br />
6<br />
6<br />
0<br />
0<br />
<strong>结</strong><br />
<strong>构</strong><br />
简<br />
图<br />
CDC 6600<br />
Fastest computer 10/64-69 till 7600 intro<br />
Packaging for 400,000 000 transistors<br />
Memory 128 K 60-bit words; 2 M words ECS<br />
100 ns. (4 phase clock); 1,000 ns. cycle<br />
Functional l Parallelism: li I/O adapters,<br />
I/O channels, Peripheral Processing Units, Load/store units,<br />
memory, function units, ECS- Extended Core Storage<br />
10 PPUs and introduced multi-threading<br />
10 Functional units control by scoreboard<br />
8 word instruction stack<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
No paging/segmentation… base & bounds<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
CDC 6600 <strong>机</strong> 器 和 同 时 期 的 其 它 <strong>机</strong><br />
器 相 比 , 指 令 <strong>系</strong> <strong>统</strong> 要 简 单 得 多 ; 另 外 ,<br />
指 令 <strong>系</strong> <strong>统</strong> 中 只 有 寄 存 器 - 装 入 和 寄 存<br />
器 - 存 放 指 令 以 访 问 存 储 器 , 即 采 用<br />
了 所 谓 的 load/store <strong>结</strong> <strong>构</strong> 。 整 个 处 理<br />
器 都 用 硬 连 线 实 现 , 而 且 为 了 减 少 访<br />
问 低 速 存 储 器 而 产 生 的 损 失 , 使 用 了<br />
较 大 的 指 令 缓 冲 器 , 从 而 保 证 了 流 水<br />
线 的 高 效 运 行 。<br />
1965 年 ,Wilkes 在 他 的 一 篇 论 文<br />
中 提 出 了 直 接 映 象 Cache 的 思 想 。<br />
1970 年 ,IBM 公 司 推 出 了 IBM<br />
360/85 <strong>机</strong> 型 , 这 种 <strong>机</strong> 器 是 第 一 台 使 用<br />
Cache 的 商 品 <strong>计</strong> <strong>算</strong> <strong>机</strong> 。 从 此 ,Cache 作<br />
为 一 种 可 以 有 效 解 决 <strong>计</strong> <strong>算</strong> <strong>机</strong> 处 理 和 存<br />
储 之 间 速 度 差 异 的 技 术 , 在 后 来 的 <strong>机</strong><br />
器 中 扮 演 着 十 分 重 要 的 角 色 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
五 、 六 十 年 代 , 是 <strong>计</strong> <strong>算</strong> <strong>机</strong> 世 界 蓬 勃 发 展 、 百<br />
花 齐 放 的 时 期 , 今 天 <strong>计</strong> <strong>算</strong> <strong>机</strong> <strong>系</strong> <strong>统</strong> 中 的 绝 大 多 数 关<br />
键 技 术 和 <strong>结</strong> <strong>构</strong> 都 是 在 这 个 时 期 就 出 现 了 的 。 六 十<br />
年 代 末 , 高 级 语 言 已 有 了 很 大 发 展 , 如 Fortran、<br />
IPL、Lisp、Cobol、PL/I 和 Algol 等 语 言 都 已 出 现 ,<br />
并 引 起 人 们 重 视 。 另 外 , <strong>算</strong> 法 、 <strong>计</strong> <strong>算</strong> 理 论 、 <strong>系</strong> <strong>统</strong><br />
优 化 、 信 息 处 理 、CAD(Computer Aided Design)<br />
等 许 多 领 域 都 开 始 受 到 了 人 们 重 视 。 生 产 工 艺 的<br />
迅 速 发 展 , 特 别 是 半 导 体 技 术 和 集 成 电 路 的 出 现 ,<br />
使 人 们 有 条 件 实 现 更 复 杂 的 <strong>计</strong> <strong>算</strong> <strong>机</strong> <strong>系</strong> <strong>统</strong> , 这 是 产<br />
生 这 种 局 面 的 一 个 重 要 原 因 ; 另 外 , <strong>计</strong> <strong>算</strong> <strong>机</strong> 应 用<br />
领 域 的 不 断 扩 大 , 对 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 功 能 要 求 不 断 提 高 ,<br />
也 是 <strong>计</strong> <strong>算</strong> <strong>机</strong> 发 展 的 一 个 不 可 忽 视 的 动 力 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
•Semiconductor memories<br />
•64 MB per chip<br />
•Microprocessors<br />
•Instruction set > 150<br />
•Address bus width 32<br />
•Data D t Bus width 32<br />
Fourth Generation<br />
•Memory addressability 4GB<br />
•Bus bandwidth 32MB/sec<br />
•Cache architectures<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
<strong>计</strong> <strong>算</strong> <strong>机</strong> 普 及<br />
高 级 语 言 <strong>机</strong> 器 的 尝 试<br />
七 十 年 代 , 当 集 成 电 路 工 业 发 展<br />
到 LSI(Large scaled Integrated<br />
circuit) 阶 段 时 , 它 的 门 密 度 可 达 到<br />
1000 门 / 片 , 这 时 已 有 可 能 利 用 单 片 IC<br />
制 成 简 单 的 CPU, 即 微 处 理 器 。1971 年 ,<br />
Intel 公 司 开 始 出 售 它 的 第 一 种 微 处 理<br />
器 芯 片 Intel 4004;1973 年 , 又 推 出<br />
Intel 8008 芯 片 。 这 些 CPU 都 采 用 了 基<br />
于 累 加 器 的 <strong>结</strong> <strong>构</strong> 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1976 年 , Cray-1<br />
第 一 台 每 秒 亿 次 浮 点 <strong>计</strong> <strong>算</strong> 能 力 的 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
第 一 台 商 业 化 的 向 量 超 级 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
在 当 时 , 既 是 速 度 最 快 的 <strong>计</strong> <strong>算</strong> <strong>机</strong> , 也 是 对<br />
科 学 <strong>计</strong> <strong>算</strong> 程 序 , 性 能 价 格 比 最 好 的 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
1996 年 , Cray Research<br />
被 Silicon Graphics 兼 并<br />
CRAY-1<br />
1976<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Cray X-MP(1985)<br />
CRAY X-MP with 4 processors achieved a processing speed of 713MFLOPS (against a peak of 840) on<br />
1000x1000 LINPACK. In thirty years the supercomputer had achieved an improvement of five orders<br />
of magnitude (from 5KFLOPS for the 1955 IBM STRETCH).<br />
Cray<br />
XMP<br />
4<br />
vector Proc.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Cray 2<br />
1985<br />
Is vector processor dead?<br />
Ratio of Vector processor to<br />
Microprocessor speed vs time<br />
1993 Cray Y-MP IBM RS6000/550 94 9.4<br />
1997 NEC SX-4 SGI R10k 902 9.02<br />
2000* Fujitsu VPP Intel Merced 900 9.00<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
如 何 减 小 高 级 语 言 和 <strong>机</strong> 器 硬 件 之 间 的 语<br />
义 差 距 (semantic gap)?<br />
由 于 微 电 子 工 业 的 发 展 , 硬 件 生 产 的 成<br />
本 迅 速 降 低 , 同 时 , 也 为 我 们 实 现 更 复 杂 的<br />
<strong>机</strong> 器 <strong>结</strong> <strong>构</strong> 提 供 了 基 础 , 因 而 , 当 时 一 种 普 遍<br />
的 观 点 是 用 硬 件 来 不 断 实 现 高 级 语 言 、 编 译<br />
程 序 和 操 作 <strong>系</strong> <strong>统</strong> 的 功 能 , 从 而 消 除 这 种 语 义<br />
差 异 , 降 低 软 件 的 成 本 。 受 这 种 认 识 的 影 响 ,<br />
这 个 时 期 的 许 多 <strong>机</strong> 器 大 都 力 图 在 <strong>机</strong> 器 的 硬 件<br />
上 , 直 接 对 高 级 语 言 及 编 译 等 提 供 支 持 。<br />
1978 年 DEC 公 司 推 出 了 VAX-11/780 小 型 <strong>机</strong> (Virtual<br />
Address eXtension of PDP-11)。<br />
设 <strong>计</strong> 的 一 个 重 要 动 <strong>机</strong> 就 是 减 化 高 级 语 言 的 编 译 器<br />
设 <strong>计</strong> 。VAX 的 <strong>系</strong> <strong>统</strong> <strong>结</strong> <strong>构</strong> 就 设 <strong>计</strong> 了 具 有 高 度 的 规 整 性<br />
的 指 令 <strong>系</strong> <strong>统</strong> , 使 高 级 语 言 的 语 句 和 单 一 的 VAX 指 令<br />
之 间 有 良 好 的 映 射 关 <strong>系</strong> 。 另 外 , 由 于 编 译 后 的 程<br />
序 常 常 得 不 到 需 要 的 存 储 空 间 , 所 以 ,VAX 的 设 <strong>计</strong><br />
师 很 注 意 优 化 代 码 的 大 小 。VAX-11/780 是 第 一 台<br />
真 正 采 用 存 储 器 - 存 储 器 <strong>结</strong> <strong>构</strong> 的 <strong>机</strong> 器 。VAX11/780<br />
<strong>机</strong> 器 在 商 业 上 取 得 了 巨 大 的 成 功 , 这 里 的 主 要 原<br />
因 是 该 <strong>机</strong> 器 将 当 时 大 型 <strong>机</strong> 的 许 多 成 功 概 念 和 较 低<br />
成 本 的 工 艺 很 好 地 <strong>结</strong> 合 在 一 起 , 另 外 ,VAX11 <strong>机</strong> 器<br />
在 很 大 程 度 上 , 保 证 了 和 PDP11 <strong>机</strong> 器 的 兼 容 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
VAX 11/780 的 产 生 代 表 着 超 级 小 型<br />
<strong>机</strong> 的 出 现 。 它 的 成 功 进 一 步 推 进 了 小 型<br />
<strong>机</strong> 的 发 展 。<br />
Software: FORTRAN-77,<br />
COBOL, BLISS-32, VAX<br />
VMS Version 1<br />
Price: $120,000 000 to $160,000<br />
000<br />
高 级 语 言 <strong>计</strong> <strong>算</strong> <strong>机</strong> <strong>结</strong> <strong>构</strong><br />
(High Level Language Computer Architecture)<br />
这 种 <strong>结</strong> <strong>构</strong> 希 望 通 过 采 用 高 级 语 言 作 为 <strong>机</strong> 器 语<br />
言 , 从 而 完 全 消 除 语 义 差 异 。 这 种 研 究 中 ,<br />
最 有 名 的 、 规 模 最 大 的 是 SYMBOL <strong>计</strong> 划 。1971<br />
年 ,Smith、Rice 等 人 介 绍 了 他 们 在 Fairchid<br />
公 司 开 展 的 SYMBOL <strong>计</strong> 划 。 他 们 的 研 究 目 的 是<br />
希 望 建 造 一 台 能 够 大 量 减 少 编 程 时 间 的 高 级<br />
语 言 分 时 <strong>机</strong> 器 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
在 SYMBOL 实 验 样 <strong>机</strong> 中 , 用 硬 件 实<br />
现 了 编 程 语 言 、 操 作 <strong>系</strong> <strong>统</strong> , 甚 至 正 文<br />
编 辑 器 等 许 多 通 常 用 软 件 完 成 的 功 能 ,<br />
所 以 整 个 <strong>系</strong> <strong>统</strong> 非 常 复 杂 , 这 给 设 <strong>计</strong> 和<br />
调 试 都 带 来 了 很 大 的 困 难 。 另 外 , 程<br />
序 员 只 能 使 用 <strong>机</strong> 器 支 持 的 那 种 高 级 语<br />
言 , 这 样 就 不 可 能 吸 取 高 级 语 言 和 操<br />
作 <strong>系</strong> <strong>统</strong> 的 最 新 成 就 , 使 得 <strong>系</strong> <strong>统</strong> 的 灵 活<br />
性 很 差 。<br />
由 于 , 在 这 种 <strong>机</strong> 器 中 极 少 发 生 的<br />
复 杂 事 件 也 需 要 完 全 由 硬 件 来 处 理 ,<br />
所 以 , 虽 然 对 一 些 异 乎 寻 常 的 事 件 ,<br />
<strong>机</strong> 器 处 理 速 度 很 快 , 但 SYMBOL 样 <strong>机</strong> 在<br />
处 理 简 单 的 、 经 常 出 现 的 事 件 时 , 往<br />
往 速 度 较 慢 ; 这 样 , <strong>机</strong> 器 的 整 体 性 能<br />
和 预 想 的 <strong>结</strong> 果 相 差 很 远 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
在 七 十 年 代 末 , <strong>计</strong> <strong>算</strong> <strong>机</strong> 实 现 技 术 的 发<br />
展 <strong>结</strong> 果 是 : 半 导 体 存 储 器 开 始 替 代 磁 芯 存<br />
储 器 ; 集 成 电 路 变 得 越 来 越 便 宜 ; 而 且 ,<br />
和 磁 芯 存 储 器 相 比 , 集 成 电 路 的 速 度 能 够<br />
比 它 快 10 倍 左 右 。 从 <strong>结</strong> <strong>构</strong> 和 <strong>组</strong> 成 上 来 看 ,<br />
Cache 的 出 现 和 发 展 有 效 地 改 进 了 非 微 码 程<br />
序 的 执 行 速 度 。 同 时 , 编 译 技 术 的 发 展 也<br />
非 常 快 , 人 们 开 始 认 识 到 优 化 编 译 产 生 的<br />
目 标 代 码 往 往 只 使 用 指 令 <strong>系</strong> <strong>统</strong> 中 的 少 数 一<br />
些 指 令 。<br />
<strong>计</strong> <strong>算</strong> <strong>机</strong> 设 <strong>计</strong> 的 工 程 化<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
在 许 多 人 试 图 用 堆 栈 <strong>结</strong> <strong>构</strong> <strong>机</strong> 器 , 或 者 用<br />
硬 件 逐 步 取 代 软 件 以 减 小 语 义 差 异 的 同 时 ,<br />
有 些 研 究 人 员 对 指 令 <strong>系</strong> <strong>统</strong> 的 使 用 情 况 、 高 级<br />
语 言 的 使 用 特 点 , 以 及 如 何 真 正 从 性 能 的 角<br />
度 来 对 硬 件 、 软 件 进 行 权 衡 等 问 题 进 行 了 大<br />
量 细 致 的 研 究 , 从 而 , 开 创 了 <strong>计</strong> <strong>算</strong> <strong>机</strong> 设 <strong>计</strong> 工<br />
程 化 的 新 局 面 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
早 在 五 十 年 代 末 ,Gibson 就 对 IBM7090 <strong>机</strong> 器<br />
的 指 令 的 使 用 分 布 情 况 进 行 了 研 究 。 但 由 于 当<br />
时 采 集 数 据 的 技 术 还 不 成 熟 , 设 备 非 常 昂 贵 ,<br />
所 以 只 能 对 一 些 小 程 序 进 行 研 究 。 这 样 所 得 <strong>结</strong><br />
论 就 不 很 有 说 服 力 。 在 七 十 年 代 末 , 由 于 实 验<br />
条 件 的 不 断 完 善 , 以 及 <strong>计</strong> <strong>算</strong> <strong>机</strong> 发 展 的 需 要 , 对<br />
不 同 <strong>机</strong> 器 的 指 令 <strong>系</strong> <strong>统</strong> 的 测 试 、 分 析 变 得 非 常 活<br />
跃 , 这 为 我 们 更 合 理 地 设 <strong>计</strong> <strong>机</strong> 器 提 供 了 重 要 依<br />
据 。 另 外 , 在 七 十 年 代 , 人 们 对 高 级 语 言 的 使<br />
用 特 点 也 进 行 了 大 量 研 究 。 虽 然 , 这 一 时 期 的<br />
大 部 分 工 作 仅 针 对 程 序 的 静 态 特 性 , 如 代 码 大<br />
小 、 程 序 中 各 指 令 的 使 用 频 度 等 , 但 当 时 对 高<br />
级 语 言 程 序 的 动 态 执 行 特 征 的 研 究 也 已 开 始 引<br />
起 人 们 的 重 视 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
在 八 十 年 代 初 ,Ditzel 和 Patterson 分 析<br />
了 高 级 语 言 <strong>机</strong> 器 <strong>结</strong> <strong>构</strong> 所 遇 到 的 一 些 困 难 的 原<br />
因 , 在 此 基 础 上 提 出 了 简 单 的 <strong>机</strong> 器 <strong>结</strong> <strong>构</strong> 更 有<br />
可 能 获 得 高 性 能 的 观 点 。1980 年 ,Patterson<br />
等 人 提 出 了 、 并 讨 论 了 RISC(Reduced<br />
Instruction ti Set Computer) 的 思 想 。 同 时 期<br />
的 其 它 一 些 研 究 人 员 也 开 始 提 倡 体 <strong>系</strong> <strong>结</strong> <strong>构</strong> 应<br />
该 和 编 译 技 术 在 提 高 <strong>系</strong> <strong>统</strong> 整 体 性 能 的 基 础 上<br />
紧 密 <strong>结</strong> 合 , 而 不 是 仅 仅 在 形 式 上 注 意 <strong>结</strong> <strong>构</strong> 对<br />
编 译 程 序 的 支 持 。<br />
从 1975 年 开 始 ,John Cocke 在 IBM 公 司 开<br />
始 了 一 个 称 为 801 的 <strong>计</strong> 划 , 他 们 的 最 初 研 究 目<br />
标 是 : 如 何 设 <strong>计</strong> 比 现 有 <strong>机</strong> 器 性 能 价 格 比 更 好<br />
的 、 支 持 高 级 语 言 的 <strong>机</strong> 器 。 在 他 们 的 工 作 中<br />
充 分 借 鉴 了 象 CDC 6600 中 采 用 的 硬 连 线 控 制<br />
这 样 的 设 <strong>计</strong> 简 单 化 原 则 。 虽 然 801 只 是 一 个 实<br />
验 性 的 <strong>计</strong> 划 , 但 是 他 们 为 RISC 技 术 的 发 展 做<br />
出 了 许 多 基 础 性 的 贡 献 。 为 此 Cocke 荣 获 了 <strong>计</strong><br />
<strong>算</strong> <strong>机</strong> 领 域 的 最 高 奖 -----Eckert-Maunchly 奖<br />
和 Turing 奖 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
1980 年 , 加 州 大 学 Berkeley 分 校 的 David<br />
Patterson 开 始 设 <strong>计</strong> 具 有 RISC 思 想 的 <strong>机</strong> 器 。<br />
他 们 先 后 实 现 了 试 验 样 <strong>机</strong> RISCI 和 RISCII,<br />
成 为 后 来 得 到 广 泛 应 用 的<br />
SPARC(Scalable l Processor ARChitecture)<br />
t <strong>结</strong> <strong>构</strong> 的 稚 型<br />
1981 年 ,Stanford 大 学 的 John<br />
Hennessy 和 他 的 同 事 们 设 <strong>计</strong> 、 实 现 了<br />
MIPS(Microprocessor without<br />
Interlocked Pipeline Stages) <strong>机</strong> 器 。<br />
MIPS 原 始 设 <strong>计</strong> 的 两 个 最 重 要 的 特 色 是<br />
高 效 的 指 令 流 水 线 和 编 译 辅 助 的 流 水<br />
线 调 度 策 略 , 为 后 来 商 品 化 的 R2000,<br />
R3000 等 奠 定 了 基 础 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
以 上 三 个 小 <strong>组</strong> 设 <strong>计</strong> 的 <strong>机</strong> 器 801、<br />
MIPS 和 RISC II 在 许 多 方 面 是 不 谋<br />
而 合 的 , 例 如 采 用 简 单 的<br />
LOAD/STORE <strong>结</strong> <strong>构</strong> 、 固 定 的 32 位 指<br />
令 格 式 , 以 及 强 调 流 水 线 的 高 效<br />
性 等 等 。<br />
八 十 年 代 中 期 ,RISC 思 想 和 技 术<br />
开 始 普 遍 被 工 业 界 接 受 。RISC 技<br />
术 本 身 也 得 到 了 迅 速 完 善 和 发 展 。<br />
1986 年 , 出 现 了 一 些 商 品 化 的<br />
RISC 芯 片 , 如 整 数 处 理 器 MIPS<br />
2000;1987 年 ,Sun 公 司 开 始 提<br />
供 采 用 SPARC <strong>结</strong> <strong>构</strong> 的 <strong>机</strong> 器 。<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
八 十 年 代 末 , 人 们 开 始 在 注 重 流 水 线<br />
技 术 , 以 产 生 时 间 并 行 效 益 的 同 时 , 也 力<br />
图 进 一 步 开 发 出 指 令 间 空 间 并 行 的 效 益 。<br />
1989 年 ,Intel 公 司 推 出 了 采 用 LIW <strong>结</strong> <strong>构</strong><br />
(Long Instruction Word) 的 RISC 处 理 器<br />
芯 片 -----i860。1990 年 ,IBM 公 司 推 出 了<br />
第 一 种 采 用 超 级 标 量 <strong>结</strong> <strong>构</strong> (Superscalar)<br />
的 新 一 代 RISC <strong>计</strong> <strong>算</strong> <strong>机</strong> <strong>系</strong> <strong>统</strong> -----RISC/6000。<br />
1991 年 2 月 ,MIPS 公 司 宣 布 了 采 用 超 级 流<br />
水 线 <strong>结</strong> <strong>构</strong> 的 RISC 处 理 器 -----R4000。<br />
MIPS R4400 Microprocessor<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
80X86 <strong>系</strong> 列<br />
单 处 理 器 <strong>系</strong> <strong>统</strong> 小 <strong>结</strong><br />
° 以 史 为 鉴 , 可 知 兴 替 , 可 明 得 失 !<br />
8080<br />
8086 80286 80386<br />
29k trans<br />
134k trans<br />
275k trans<br />
° 起 源<br />
• 大 型 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
• Von Neumann 曾 认 为 整 个 美 国 最 多 需 要 10 台 <strong>计</strong> <strong>算</strong> <strong>机</strong><br />
• 为 当 今 的 <strong>计</strong> <strong>算</strong> <strong>机</strong> 体 <strong>系</strong> <strong>结</strong> <strong>构</strong> 作 了 大 量 的 储 备<br />
1200k trans<br />
80486<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
3100k trans<br />
Pentium<br />
PentiumPro<br />
P<br />
5500k trans<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
° 微 程 序 ( 微 码 ) 至 关 重 要<br />
• IBM 360 – VAX<br />
• CPU 采 用 多 个 逻 辑 电 路 板 实 现<br />
• 通 过 “ 微 程 序 执 行 <strong>机</strong> 制 (microengine)” 以 解 释 方 式 实 现 指 令<br />
<strong>系</strong> <strong>统</strong><br />
• 易 于 增 添 ( 许 多 ) 新 功 能<br />
• 性 能 评 测 没 有 <strong>统</strong> 一 标 准 ( 专 用 平 台 )<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
单 处 理 器 <strong>系</strong> <strong>统</strong> 小 <strong>结</strong> ( 续 )<br />
°RISC Revolution<br />
• ~1983, IBM 801, UCB RISC project, Stanford MIPS project<br />
• Make the microengine be the CPU!<br />
- Avoid inefficiency of interpretation layer<br />
- Let compilers do the optimizing<br />
- Implement on single chip<br />
• Generic Unix Box<br />
°Superscalar p Processing<br />
• ~1990 (IBM Power-1) to present (almost all processors today)<br />
• Basic idea: issue multiple instructions simultaneously<br />
- exploit fine-grained parallelism within the instruction stream<br />
• In-order (Alpha 21164) vs. out-of-order (MIPS R10K, Pentium Pro)<br />
• Aggressive, pipelined cache and memory subsystems<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
最 新 进 展<br />
°How to push Superscalar further?<br />
• Hardware complexity (rather than chip real estate) is the limitation<br />
• One direction: VLIW (Intel “EPIC” instruction set in IA-64)<br />
°Parallel processing<br />
• supercomputers -> computer servers -> desktop<br />
°Personal computers remain a key driving force<br />
• Huge economies of scale<br />
°Customers t want more than raw computing power<br />
• Fast WWW access, multimedia (3D graphics, video, etc.)<br />
- Difficult real-time performance constraints<br />
- ISA extensions (e.g., Intel MMX) + balanced system-level design<br />
°Mobile Computing<br />
• Low power consumption is important<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
IA-32<br />
Control<br />
Itanium Processor Silicon<br />
FPU<br />
IA-64 Control<br />
TLB<br />
Integer Units Cache<br />
Instr.<br />
Fetch &<br />
Decode Cache Bus<br />
Core Processor Die<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
4 x 1MB L3 cache<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Frequency<br />
Transistor Count<br />
Process<br />
Package<br />
Itanium Machine Characteristics<br />
800 MHz<br />
25.4M CPU; 295M L3<br />
0.18u CMOS, 6 metal layer<br />
Organic Land Grid Array<br />
Machine Width<br />
6 insts/clock (4 ALU/MM, 2 Ld/St, 2 FP, 3 Br)<br />
Registers<br />
Speculation<br />
Branch Prediction<br />
FP Compute Bandwidth<br />
Memory -> >FPB Bandwidth<br />
Virtual Memory Support<br />
L2/L1 Cache<br />
L2/L1 Latency<br />
L3 Cache<br />
System Bus<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
14 ported 128 GR & 128 FR; 64 Predicates<br />
32 entry ALAT, Exception Deferral<br />
Multilevel 4-stage Prediction Hierarchy<br />
3.2 GFlops (DP/EP); 6.4 GFlops (SP)<br />
4 DP (8 SP) operands/clock<br />
64 entry ITLB, 32/96 2-level DTLB, VHPT<br />
Dual ported 96K Unified & 16KD; 16KI<br />
6 / 2 clocks<br />
4MB, 4-way s.a., BW of 12.8 GB/sec;<br />
2.1 GB/sec; 4-way Glueless MP<br />
Scalable to large (512+ proc) systems<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
同 <strong>构</strong> CMP—IBM POWER4<br />
IBM POWER4 :Server Multi-chip Module<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
POWER4 Chip I/O Footprint<br />
A Closer Look at AMD’s New Generation<br />
Server and Desktop Architecture<br />
True quad core die<br />
Optimized for 65nm SOI<br />
and beyond<br />
Expandable shared<br />
L3 cache<br />
IBM CMOS 0.18um<br />
copper and SOI with 7M<br />
IPC enhanced<br />
CPU cores<br />
• 32B instruction fetch<br />
• Enhanced branch prediction<br />
• Out-of-order load execution<br />
• Up to 4 DP FLOPS/cycle<br />
• Dual 128-bit SSE dataflow<br />
• Dual 128-bit loads per cycle<br />
• Bit Manipulation extensions (LZCNT/POPCNT)<br />
• SSE extensions (EXTRQ/INSERTQ, MOVNTSD/MOVNTSS)<br />
Enhanced Direct<br />
Connect Architecture<br />
and Northbridge<br />
• HT-3 3links (Up to 52GT/ 5.2GT/sec)<br />
• Enhanced crossbar<br />
• DDR2 with migration path to<br />
DDR3<br />
• FBDIMM when appropriate<br />
• Enhanced power management<br />
• Enhanced RAS<br />
2000.1<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
13.75mm * 22 mm<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Intel 80 核 芯 片<br />
•80 个 处 理 核 心<br />
• 1T<br />
Teraflop<br />
• 100 亿 次 运 <strong>算</strong> / 瓦 特<br />
• 主 频 3.1GHz<br />
• 面 积 300mm²,<br />
• 各 CPU 内 核 <strong>与</strong> 内 存 1 对 1 地<br />
连 接 , 分 别 拥 有 256MBps<br />
的 内 存 带 宽<br />
• 32MB 的 片 上 静 态 RAM 。<br />
• 单 芯 片 整 体 的 内 存 带 宽 达<br />
到 了 1TB/s<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Thinking Machine CM-2(1987): 65,536 1-bit<br />
processors, SIMD<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
CM-5(1991), 16384 SPARC<br />
KSR(COMA)<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
IBM SP-1<br />
IBM SP-2(1993): RS/6000 Model 590 processor<br />
board, AIX OS, MPP Switch, Max. 128 nodes<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
Intel Paragon(1992): 4-2048 i860<br />
SGI<br />
PowerChallenge<br />
Family<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Cray T3D<br />
Origin 2000<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
指 令 <strong>系</strong> <strong>统</strong> 的 演 变<br />
Single Accumulator (EDSAC 1950)<br />
Accumulator + Index Registers<br />
(Manchester Mark I, IBM 700 series 1953)<br />
Separation of Programming Model<br />
from Implementation<br />
High-level Language Based<br />
Concept of a Family<br />
(B5000 1963) (IBM 360 1964)<br />
General Purpose Register Machines<br />
Complex Instruction Sets<br />
Load/Store Architecture<br />
(Vax, Intel 432 1977-80) (CDC 6600, Cray 1 1963-76)<br />
Growth of Microprocessor Performance<br />
Perfo<br />
orman nce in<br />
Mflo op/s<br />
10000<br />
1000<br />
100<br />
10<br />
1<br />
0.1<br />
0.01<br />
8087<br />
Cray 1S<br />
Cray 2<br />
Cray Y-MP<br />
Cray C90 Cray T90<br />
Cray X-MP<br />
R2000<br />
i860<br />
Alpha RS6000/590Alpha<br />
RS6000/540<br />
Supers<br />
Micros<br />
2X transistors/Chip Every 1.5<br />
years<br />
“Moore’s Law”<br />
80387 Microprocessors have<br />
6881<br />
80287 become smaller, denser, and<br />
more powerful.<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
RISC<br />
(Mips,Sparc,HP-PA,IBM PA RS6000, . . .1987)<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
Year<br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心
Sony Playstation 2000<br />
人 人 都 是 亿 万 富 翁<br />
• Emotion Engine: 6.2 GFLOPS, 75 million polygons per second<br />
(Microprocessor Report, 13:5)<br />
– Superscalar MIPS core + vector coprocessor + graphics/DRAM<br />
– Claim: Toy Story realism brought to games!<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心<br />
1951-1996 年 <strong>计</strong> <strong>算</strong> <strong>机</strong> 的 性 能 价 格 比<br />
大 小<br />
相 对 于<br />
调 整 后 的<br />
相 对 于<br />
( 立 方<br />
功 率<br />
性 能<br />
内 存<br />
UNIVAC<br />
价 格<br />
UNIVAC<br />
年 代<br />
名 称<br />
英 尺 )<br />
( 瓦 特 )<br />
( 加 法 / 秒 )<br />
(KB) 价 格 ($) 价 格 / 性 能<br />
(1996$)<br />
价 格 / 性 能<br />
1951 UNIVAC I 1000 124,500 1,900 48 1,000,000 1 4,996,749 1<br />
1964 IBM<br />
S/360-50<br />
60 10,000 500,000 64 1,000,000 263 4,140,257 318<br />
1965 PDP-8 8 500 330,000 4 16,000 10,855 66,071 13,135<br />
1976 Cray-1 58 60,000 166,000,000 32,768 4,000,000 21,842 8,459,712 51,604<br />
1981 IBM PC 1 150 240,000 256 3,000 42,105 4,081 154,673<br />
1991 HP<br />
9000/750<br />
2 500 50,000,000 16,384 7,400 3,556,188 8,156 16,122,356<br />
1996 Intel<br />
2 5000 400,000,000000 000 16,384 4400 4,400 47,846,890 890 4400 4,400 239,078,908<br />
908<br />
PPro/200<br />
北 京 大 学 <strong>计</strong> <strong>算</strong> <strong>机</strong> 科 学 技 术 <strong>系</strong><br />
北 京 大 学 微 处 理 器 研 究 开 发 中 心