中村宏 工学部計数工学科 情報理工学系研究科システム情報学専攻 計算システム論第 2 1

Similar documents
Topics: A multiple cycle implementation. Distributed Notes

Designing MIPS Processor

Instruction register. Data. Registers. Register # Memory data register

Review. Combined Datapath

Reactive Fluid Dynamics 1 G-COE 科目 複雑システムのデザイン体系 第 1 回 植田利久 慶應義塾大学大学院理工学研究科開放環境科学専攻 2009 年 4 月 14 日. Keio University

2011/12/25

Designing Single-Cycle MIPS Processor

CSE Computer Architecture I

CMB の温度 偏光揺らぎにおける弱い重力レンズ効果 並河俊弥 ( 東京大学 )

英語問題 (60 分 ) 受験についての注意 3. 時計に組み込まれたアラーム機能 計算機能 辞書機能などを使用してはならない 4. 試験開始前に 監督から指示があったら 解答用紙の受験番号欄の番号が自身の受験番号かどうかを確認し 氏名を記入すること

日本政府 ( 文部科学省 ) 奨学金留学生申請書

シミュレーション物理 6 運動方程式の方法 : 惑星の軌道 出席のメール ( 件名に学生番号と氏名 ) に, 中点法をサブルーチンを使って書いたプログラムを添付

Agilent 4263B LCR Meter Operation Manual. Manual Change. Change 1 Add TAR in Test Signal Frequency Accuracy Test (Page 9-38) as follows.

Report on the experiment of vibration measurement of Wire Brushes. mounted on hand held power tools ワイヤ ブラシ取付け時の手持動力工具振動測定調査の実施について

車載用高効率燃焼圧センサー基板に最適なランガサイト型結晶の開発 結晶材料化学研究部門 シチズンホールディングス ( 株 )* 宇田聡 八百川律子 * Zhao Hengyu 前田健作 野澤純 藤原航三

京都 ATLAS meeting 田代. Friday, June 28, 13

GRASS 入門 Introduction to GRASS GIS

Mathematics 数理科学専修. welcome to 統合数理科学を 目 指 す 基礎理工学専攻

CPU DESIGN The Single-Cycle Implementation

2015 年度研究活動報告理工学術院 先進理工 応用物理学科小澤徹 Department of Applied Physics, Waseda University

WHO 飲料水水質ガイドライン第 4 版 ( 一部暫定仮訳 ) 第 9 章放射線学的観点 9.4 飲料水中で一般的に検出される放射性核種のガイダンスレベル 過去の原子力緊急事態に起因する長期被ばく状況に関連する可能性のある人工の放射性核種のみならず 飲料水供給で最も一般的に検出される自然由来及び人工

BCR30AM-12LB. RJJ03G Rev I T(RMS) 30 A V DRM 600 V I FGT I, I RGT I, I RGT III 50 ma : PRSS0004ZE-A ( : TO-3P) 4 2, 4

Taking an advantage of innovations in science and technology to develop MHEWS

C-H Activation in Total Synthesis Masayuki Tashiro (M1)

Thermal Safety Software (TSS) series

( 主査 ) 教授髙橋秀幸教授山口信次郎准教授佐藤修正

Photoacclimation Strategy in Photosystem II of Prymnesiophyceae Isochrysis galbana

Day 5. A Gem of Combinatorics 組合わせ論の宝石. Proof of Dilworth s theorem Some Young diagram combinatorics ヤング図形の組合せ論

The unification of gravity and electromagnetism.

むらの定量化について IEC-TC110 HHG2 への提案をベースに ソニー株式会社冨岡聡 フラットパネルディスプレイの人間工学シンポジウム

Advance Publication by J-STAGE. 日本機械学会論文集 Transactions of the JSME (in Japanese)

谷本俊郎博士の研究業績概要 谷本俊郎博士は これまで地球内部の大規模なマントルの対流運動を解明するための研究 および 大気 - 海洋 - 固体地球の相互作用に関する研究を様々な角度から進めてきた これらのうち主要な研究成果は 以下の様にまとめることができる

Deep moist atmospheric convection in a subkilometer

Spontaneous magnetization of quark matter in the inhomogeneous chiral phase

Yutaka Shikano. Visualizing a Quantum State

一体型地上気象観測機器 ( ) の風計測性能評価 EVALUATION OF WIND MEASUREMENT PERFORMANCE OF COMPACT WEATHER SENSORS

Evaluation of IGS Reprocessed Precise Ephemeris Applying the Analysis of the Japanese Domestic GPS Network Data

11/13 Diagonalization. Theorem: The set R of all real numbers is not enumerable. 12/13. 0.a k1 a k2 a k3... where a ij {0, 1,...

ATLAS 実験における荷電ヒッグス粒子の探索

統合シミュレーションコードによる高速点火実験解析大阪大学レーザーエネルギー学研究センター中村龍史

October 7, Shinichiro Mori, Associate Professor

重力波天体の多様な観測による 宇宙物理学の新展開 勉強会 熱海 銀河における元素量の観測. 青木和光 Wako Aoki. 国立天文台 National Astronomical Observatory of Japan

Neutron-Insensitive Gamma-Ray Detector with Aerogel for Rare Neutral-Kaon Decay Experiment

Introduction to Multi-hazard Risk-based Early Warning System in Japan

非弾性散乱を利用した不安定核 核構造研究 佐藤義輝東京工業大学

Illustrating SUSY breaking effects on various inflation models

超新星残骸からの陽子起源ガンマ線 放射スペクトルの変調機構

Estimation of Gravel Size Distribution using Contact Time

マテリアルズインフォマティクスの最前線 吉田 亮. サイエンティフィック システム研究会 科学技術計算分科会 2017年度会合

Development of Advanced Simulation Methods for Solid Earth Simulations

PROTEUS, AND THE NAME OF THE TYPE SPECIES OP THE GENUS HUENIA

Effects of pairing correlation on the low-lying quasiparticle resonance in neutron drip-line nuclei

21 点 15 点 3 解答用紙に氏名と受検番号を記入し, 受検番号と一致したマーク部分を塗りつぶすこと 受検番号が 0( ゼロ ) から始まる場合は,0( ゼロ ) を塗りつぶすこと

On Attitude Control of Microsatellite Using Shape Variable Elements 形状可変機能を用いた超小型衛星の姿勢制御について

Network of Evolutionary Trends and Maturity assessment through contradiction analysis 進化トレンドのネットワークと矛盾解析による成熟度評価

Computer Engineering Department. CC 311- Computer Architecture. Chapter 4. The Processor: Datapath and Control. Single Cycle

Algorithm Theoretical Basis Document for Cloud Top Height Product

Trends of the National Spatial Data Infrastructure

近距離重力実験実験室における逆二乗則の法則の検証. Jiro Murata

新学習指導要領で求められる暗黙知の指導に関する事例研究 保健体育科教育法 Ⅰと器械運動 Ⅱにおける指導内容から

2006 Inter-laboratory Comparison Study for Reference Material for Nutrients in Seawater

Analysis of shale gas production performance by SGPE

高分解能原子核乾板を用いた暗黒物質探索 中竜大 名古屋大学基本粒子研究室 (F 研 ) ICEPP 白馬

69 地盤の水分変化モニタリング技術 比抵抗モニタリングシステムの概要 * 小林剛 Monitoring Technology for a Moisture Change of Subsurface Outline of the Resistivity Monitoring System Tsuyo

2018 年 ( 平成 30 年 ) 7 月 13 日 ( 金曜日 ) Fri July 13, 2018

EU 向けに輸出される食品等に関する証明書の発行に係る事務処理要領 ( 国際 ) 通知に基づき 欧州連合 ( 以下 EU という ) へ輸出される食品及び飼料の証明書の発行条件及び手続きを定めるものとする

Safer Building and Urban Development ( 安全な建物づくり まちづくりづ ) Contents ( 内容 ) 1)Lessons from building damage by earthquake motions and/or tsunami ( 振動被害または

Crustal Deformation Associated with the 2005 West Off Fukuoka Prefecture Earthquake Derived from ENVISAT/InSAR and Fault- slip Modeling

生命システム解析 構成のための 次世代シミュレーション

Lecture 12: Pipelined Implementations: Control Hazards and Resolutions

28 th Conference on Severe Local Storms 11 Nov Eigo Tochimoto and Hiroshi Niino (AORI, The Univ. of Tokyo)

結合および相互作用エネルギーの定量的 評価法の開発と新規典型元素化合物の構築

Development of a High-Resolution Climate Model for Model-Observation Integrating Studies from the Earth s Surface to the Lower Thermosphere

Hetty Triastuty, Masato IGUCHI, Takeshi TAMEGURI, Tomoya Yamazaki. Sakurajima Volcano Research Center, DPRI, Kyoto University

Fusion neutron production with deuterium neutral beam injection and enhancement of energetic-particle physics study in the Large Helical Device

モータ用モデル予測電流制御における 予測用モータモデルの磁気特性表現の改善

XENON SHORT ARC LAMPS キセノンショートアークランプ

Product Specification

地理学における災害 防災研究の動向 IGC 2004 を通して 赤石直美 *

東ソー株式会社 - 明日のしあわせを化学する - TOSOH CORPORATION The Chemistry of Innovation. TOSOH CORPORATION The Chemistry of Innovation

平成 23 年度 博士学位論文 内容の要旨および 審査結果の要旨 ( 平成 24 年 3 月授与 ) 北九州市立大学大学院国際環境工学研究科

NIE を取り入れた教育実践研究 大学 2 年生を対象とした時事教養 Ⅰ の授業実践を通して. Educational Research based on Newspaper In Education (NIE)

Youhei Uchida 1, Kasumi Yasukawa 1, Norio Tenma 1, Yusaku Taguchi 1, Jittrakorn Suwanlert 2 and Somkid Buapeng 2

Chemical Management Manual. Ver. 1

井出哲博士の研究業績概要 井出哲博士はこれまで データ解析や数値シミュレーションの手法を用いることによって 地震の震源で起きている現象を様々な角度から研究してきた その主な研究成果は 以下の 3 つに大別される

HWS150A RELIABILITY DATA 信頼性データ

一般化川渡り問題について. 伊藤大雄 ( 京都大学 ) Joint work with Stefan Langerman (Univ. Libre de Bruxelles) 吉田悠一 ( 京都大学 ) 組合せゲーム パズルミニ研究集会

低温物質科学研究センター誌 : LTMセンター誌 (2013), 23: 22-26

L07-L09 recap: Fundamental lesson(s)!

A method for estimating the sea-air CO 2 flux in the Pacific Ocean

SML-811x/812x/813x Series

高度バッテリ温度監視 デュアル入力リニアチャージャ Smart Power Selector

質量起源 暗黒物質 暗黒エネルギー 宇宙線 陽子崩壊 ニュートリノ質量 米国 P5 ニュートリノ CPV 宇宙背景ニュートリノクォーク レプトンマヨラナ粒子 ニュートリノ測定器 陽子崩壊探索. Diagram courtesy of P5. Origin of Mass.

二国間交流事業共同研究報告書 共同研究代表者所属 部局独立行政法人理化学研究所 創発物性科学研究センター

Kyoko Kagohara 1, Tomio Inazaki 2, Atsushi Urabe 3 and Yoshinori Miyachi 4 楮原京子

TDK Lambda INSTRUCTION MANUAL. TDK Lambda A B 1/40

Y. Okayasu for the Jlab E collaboration Department of Physics. Tohoku University

Oxford, Vol. 9, pp (2004).. (3) 微小空間を活用する多相系有機合成反応 小林重太 森雄一朗 小林修 化学と工業 59, pp (2006).

Experimental and FE Analysis of Seismic Soil-Pile-Superstructure Interaction in Sand. Mahmoud N. HUSSIEN*, Tetsuo TOBITA and Susumu IAI

Transcription:

計算システム論第 2 (3 章 ) 中村宏 工学部計数工学科 情報理工学系研究科システム情報学専攻 計算システム論第 2

IPS Assembly Langage ( 抜粋 ) IPS operands Name Eample Comments $s-$s7, $t-$t9, $zero, Fast locations for data. In IPS, data mst be in registers to perform 32 registers $a-$a3, $v-$v, $gp, arithmetic. IPS register $zero alw ays eqals. Register $at is $fp, $sp, $ra, $at reserved for the assembler to handle large constants. emory[], Accessed only by data transfer instrctions. IPS ses byte addresses, so 2 3 memory emory[4],..., seqential w ords differ by 4. emory holds data strctres, sch as arrays, words emory[4294967292] and spilled registers, sch as those saved on procedre calls. IPS assembly langage Category Eample eaning Comments add add $s, $s2, $s3 $s = $s2 + $s3 Three operands; data in registers Arithmetic sbtract sb $s, $s2, $s3 $s = $s2 - $s3 Three operands; data in registers add immediate addi $s, $s2, $s = $s2 + Used to add constants load word lw $s, ($s2) $s = emory[$s2 + ] Word from memory to register store word sw $s, ($s2) emory[$s2 + ] = $s Word from register to memory Data transfer load byte lb $s, ($s2) $s = emory[$s2 + ] Byte from memory to register store byte sb $s, ($s2) emory[$s2 + ] = $s Byte from register to memory load pper immediate li $s, $s = * 2 6 Loads constant in pper 6 bits branch on eqal beq $s, $s2, 25 if ($s == $s2) go to PC + 4 + branch on not eqal bne $s, $s2, 25 if ($s!= $s2) go to Conditional PC + 4 + branch set on less than slt $s, $s2, $s3 if ($s2 < $s3) $s = ; else $s = Eqal test; PC-relative branch Not eqal test; PC-relative Compare less than; for beq, bne set less than immediate slti $s, $s2, if ( $s2 < ) $s = ; else $s = Compare less than constant jmp j 25 go to Jmp to target address Uncondi- jmp register jr $ra go to $ra For switch, procedre retrn tional jmp jmp and link jal 25 $ra = PC + 4; go to For procedre call 計算システム論第 2 2

命令の sbset ADD and SUB addu rd, rs, rt (nsigned) sbu rd, rs, rt 3 OR Immediate: ori rt, rs, imm6 LOAD and STORE Word lw rt, rs, imm6 sw rt, rs, imm6 BRANCH: beq rs, rt, imm6 3 3 3 26 2 6 op rs rt rd shamt fnct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 26 2 6 op rs rt immediate 6 bits 5 bits 5 bits 6 bits 26 2 6 op rs rt immediate 6 bits 5 bits 5 bits 6 bits 26 命令フォーマット 2 6 op rs rt immediate 6 bits 5 bits 5 bits 6 bits 6 計算システム論第 2 3

実現すべき動作 PC (Program Conter) で指定された番地のメモリから命令を取る. PC は +4する ( 分岐命令以外 ) op rs rt rd shamt fnct = E[ PC ] addu, sbu op rs rt Imm6 = E[ PC ] ori, lw, sw, beq 2 つの命令フォーマット 命令 実現すべき動作 addu R[rd] < R[rs] + R[rt]; PC < PC + 4 sbu R[rd] < R[rs] R[rt]; PC < PC + 4 ori R[rt] < OR(R[rs], zero_et(imm6) ); PC < PC + 4 lw R[rt] < E[ R[rs] + sign_et(imm6)]; PC < PC + 4 sw E[ R[rs] + sign_et(imm6) ] < R[rt]; PC < PC + 4 beq if ( R[rs] == R[rt] ) then PC < PC + sign_et(imm6)] else PC < PC + 4 計算システム論第 2 4

命令の種類と各ステージにおける処理 Step name fetch decode/register fetch 制御信号の作り方 Action for R-type instrctions Action for memory-reference instrctions IR = emory[pc] PC = PC + 4 A = Reg [IR[25-2]] B = Reg [IR[2-6]] ALUOt = PC + (sign-etend (IR[5-]) << 2) Action for branches Eection, address ALUOt = A op B ALUOt = A + sign-etend if (A ==B) then comptation, branch/ (IR[5-]) PC = ALUOt jmp completion emory access or R-typ Reg [IR[5-]] = Load: DR = emory[aluot] completion ALUOt or Store: emory [ALUOt] = B emory read completion Load: Reg[IR[2-6]] = DR 制御信号は, 命令の種類, および現在のステップ ( 状態 ) に依存 状態遷移機械 (FS : Finite State achine) として記述可能 計算システム論第 2 5

データパスと制御論理 PC Address Write data emory emdata [25 2] [2 6] [5 ] register [5 ] emory data register Cond IorD Otpts em emwrite emtoreg IRWrite Control Op [5 ] [5 ] PCSorce ALUOp ALUSrcB 6 ALUSrcA RegWrite RegDst [25 ] 26 28 Shift left 2 [3-26] PC [3-28] register register 2 Registers Write register Write data Sign etend data data 2 32 Shift left 2 A B 4 2 3 ALU control Zero ALU ALU reslt Jmp address [3-] ALUOt 2 [5 ] 計算システム論第 2 6

例 : 状態 Step name fetch decode/register fetch Action for R-type instrctions Action for memory-reference instrctions IR = emory[pc] PC = PC + 4 A = Reg [IR[25-2]] B = Reg [IR[2-6]] ALUOt = PC + (sign-etend (IR[5-]) << 2) Action for branches Eection, address ALUOt = A op B ALUOt = A + sign-etend if (A ==B) then comptation, branch/ (IR[5-]) PC = ALUOt jmp completion emory access or R-typ Reg [IR[5-]] = Load: DR = emory[aluot] completion ALUOt or Store: emory [ALUOt] = B emory read completion Load: Reg[IR[2-6]] = DR 計算システム論第 2 7

状態 におけるデータの流れ IR = emory[pc], PC=PC+4 PC Address Write data emory emdata [3-26] [25 2] [2 6] [5 ] register [5 ] emory data register Cond IorD Otpts em emwrite emtoreg IRWrite [25 ] Control Op [5 ] [5 ] PCSorce ALUOp ALUSrcB 6 ALUSrcA RegWrite RegDst register register 2 Registers Write register Write data Sign etend data data 2 32 Shift left 2 A B 4 2 3 26 28 Shift left 2 ALU control PC [3-28] Zero ALU ALU reslt Jmp address [3-] ALUOt 2 [5 ] 必要な制御信号 IorD= (: PC em) ALUsrcA= (: PC ALU) em= ALUsrcB= (: 4 ALU) IRwrite= ALUop= (ALU : 足し算 ) PCwrite= PCSorce= (ALU 出力をPCへ ) 計算システム論第 2 8

制御信号の定義 計算システム論第 2 9

FS で記述した 制御論理状態 2 emory address comptation ALUSrcA = ALUSrcB = ALUOp = Start fetch em ALUSrcA = IorD = IRWrite ALUSrcB = ALUOp = PCSorce = 6 (Op = 'LW') or (Op = 'SW') Eection ALUSrcA = ALUSrcB = ALUOp= 8 (Op = R-type) Branch completion ALUSrcA = ALUSrcB = ALUOp = Cond PCSorce = decode/ register fetch (Op = 'BEQ') 9 ALUSrcA = ALUSrcB = ALUOp = (Op = 'J') Jmp completion PCSorce = 3 (Op = 'LW') emory access (Op = 'SW') 5 emory access 7 R-type completion em IorD = emwrite IorD = RegDst = RegWrite emtoreg = 4 Write-back step RegDst = RegWrite emtoreg = 計算システム論第 2

例 : 状態 Step name fetch decode/register fetch Action for R-type instrctions Action for memory-reference instrctions IR = emory[pc] PC = PC + 4 A = Reg [IR[25-2]] B = Reg [IR[2-6]] ALUOt = PC + (sign-etend (IR[5-]) << 2) Action for branches Eection, address ALUOt = A op B ALUOt = A + sign-etend if (A ==B) then comptation, branch/ (IR[5-]) PC = ALUOt jmp completion emory access or R-typ Reg [IR[5-]] = Load: DR = emory[aluot] completion ALUOt or Store: emory [ALUOt] = B emory read completion Load: Reg[IR[2-6]] = DR 計算システム論第 2

状態 におけるデータの流れ A = Reg [IR[25-2]] B = Reg [IR[2-6]] ALUOt = PC + (sign-etend (IR[5-]) << 2) PC Address Write data emory emdata [3-26] [25 2] [2 6] [5 ] register [5 ] emory data register Cond IorD Otpts em emwrite emtoreg IRWrite [25 ] Control Op [5 ] [5 ] PCSorce ALUOp ALUSrcB 6 ALUSrcA RegWrite RegDst register register 2 Registers Write register Write data Sign etend data data 2 32 Shift left 2 A B 4 2 3 26 28 Shift left 2 ALU control PC [3-28] Zero ALU ALU reslt Jmp address [3-] ALUOt 2 [5 ] 計算システム論第 2 2

FSで記述した fetch 制御論理 em ALUSrcA = IorD = IRWrite ALUSrcB = ALUOp = PCSorce = 状態 2 emory address comptation ALUSrcA = ALUSrcB = ALUOp = Start 6 (Op = 'LW') or (Op = 'SW') Eection ALUSrcA = ALUSrcB = ALUOp= 8 (Op = R-type) Branch completion ALUSrcA = ALUSrcB = ALUOp = Cond PCSorce = decode/ register fetch (Op = 'BEQ') 9 ALUSrcA = ALUSrcB = ALUOp = (Op = 'J') Jmp completion PCSorce = 3 (Op = 'LW') emory access (Op = 'SW') 5 emory access 7 R-type completion em IorD = emwrite IorD = RegDst = RegWrite emtoreg = 4 Write-back step RegDst = RegWrite emtoreg = 計算システム論第 2 3

状態遷移図の作り方 Step name fetch decode/register fetch Action for R-type instrctions Action for memory-reference instrctions IR = emory[pc] PC = PC + 4 A = Reg [IR[25-2]] B = Reg [IR[2-6]] ALUOt = PC + (sign-etend (IR[5-]) << 2) Action for branches Eection, address ALUOt = A op B ALUOt = A + sign-etend if (A ==B) then comptation, branch/ 6 2 (IR[5-]) PC = ALUOt jmp completion emory access or R-typ Reg [IR[5-]] = Load: DR = emory[aluot] completion 7 ALUOt or 5 Store: emory [ALUOt] = B emory read completion 3 4 Load: Reg[IR[2-6]] = DR ステップ間の因果関係を状態遷移図で表す 8 計算システム論第 2 4

wired logic ( 布線論理 ) を用いた制御回路の実現 Op5 Op4 組み合わせ論理を PLA で記述 Op3 Op2 Op O p 5 O p 4 組み合わせ回路 C o n t r o l l o g i c O p 3 O p 2 O p I n s t r c t i o n r e g i s t e r o p c o d e f i e l d I n p t s O p 命令内の op フィールド S 3 S 2 O t p t s S S S t a t e r e g i s t e r P C W r i t e P C W r i t e C o n d I o r D e m R e a d e m W r i t e I R W r i t e e m t o R e g P C S o r c e A L U O p A L U S r c B A L U S r c A R e g W r i t e R e g D s t N S 3 N S 2 N S N S 4 ビットで 9 状態 Op S3 S2 S S AND 平面 Cond IorD em emwrite IRWrite emtoreg PCSorce PCSorce ALUOp ALUOp ALUSrcB ALUSrcB ALUSrcA RegWrite RegDst NS3 NS2 NS NS RegWrite=^S3 S2 ^S ^S + ^S3 S2 S S OR 平面 計算システム論第 2 5

RegWrite は? 状態 4() と状態 7() 2 ^S3 S2 ^S ^S + ^S3 S2 S S 3 emory address comptation ALUSrcA = ALUSrcB = ALUOp = (Op = 'LW') emory access (Op = 'SW') 5 Start emory access fetch em ALUSrcA = IorD = IRWrite ALUSrcB = ALUOp = PCSorce = 6 (Op = 'LW') or (Op = 'SW') 7 Eection ALUSrcA = ALUSrcB = ALUOp= 8 R-type completion (Op = R-type) Branch completion ALUSrcA = ALUSrcB = ALUOp = Cond PCSorce = (Op = 'BEQ') decode/ register fetch 9 ALUSrcA = ALUSrcB = ALUOp = (Op = 'J') Jmp completion PCSorce = em IorD = emwrite IorD = RegDst = RegWrite emtoreg = 4 Write-back step RegDst = RegWrite emtoreg = 計算システム論第 2 6

microprogram による制御論理の実現 C o n t r o l n i t i c r o c o d e m e m o r y マイクロ命令を格納 I n p t O t p t s P C W r i t e P C W r i t e C o n d I o r D e m R e a d e m W r i t e I R W r i t e B W r i t e e m t o R e g P C S o r c e A L U O p A L U S r c B A L U S r c A R e g W r i t e R e g D s t A d d r C t l D a t a p a t h A d d e r 次に実行すべきマイクロ命令を指定 i c r o p r o g r a m c o n t e r A d d r e s s s e l e c t l o g i c O p [ 5 ] A d d e r microcode memory microprogram conter 3 2 A d r C t l I n s t r c t i o n r e g i s t e r o p c o d e f i e l d D i s p a t c h R O 2 D i s p a t c h R O A d d r e s s s e l e c t l o g i c O p I n s t r c t i o n r e g i s t e r o p c o d e f i e l d 計算システム論第 2 7

microprogram による制御論理の実現 Dispatch RO Op Opcode name Vale R-format jmp beq lw sw Dispatch RO 2 Op Opcode name Vale lw sw Label ALU control SRC SRC2 Register control emory control Seqencing Fetch Add PC 4 PC ALU Seq Add PC Etshft Dispatch em Add A Etend Dispatch 2 LW2 ALU Seq Write DR Fetch SW2 Write ALU Fetch Rformat Fnc code A B Seq Write ALU Fetch BEQ Sbt A B ALUOt-cond Fetch JUP Jmp address Fetch データパスに与える制御信号 microcode memory に保持される microcode 次のマイクロ命令を指定 計算システム論第 2 8

microcode のフォーマット Field name Vale Signals active Comment Add ALUOp = Case the ALU to add. ALU control Sbt ALUOp = Case the ALU to sbtract; this implements the compare for branches. Fnc code ALUOp = Use the instrction's fnction code to determine ALU control. SRC PC ALUSrcA = Use the PC as the first ALU inpt. A ALUSrcA = Register A is the first ALU inpt. B ALUSrcB = Register B is the second ALU inpt. SRC2 4 ALUSrcB = Use 4 as the second ALU inpt. Etend ALUSrcB = Use otpt of the sign etension nit as the second ALU inpt. Etshft ALUSrcB = Use the otpt of the shift-by-two nit as the second ALU inpt. two registers sing the rs and rt fields of the IR as the register nmbers and ptting the data into registers A and B. Write ALU RegWrite, Write a register sing the rd field of the IR as the register nmber and Register RegDst =, the contents of the ALUOt as the data. control emtoreg = Write DR RegWrite, Write a register sing the rt field of the IR as the register nmber and RegDst =, the contents of the DR as the data. emtoreg = PC em, memory sing the PC as address; write reslt into IR (and lord = the DR). emory ALU em, memory sing the ALUOt as address; write reslt into DR. lord = Write ALU emwrite, Write memory sing the ALUOt as address, contents of B as the lord = data. ALU PCSorce = Write the otpt of the ALU into the PC. PC write control ALUOt-cond PCSorce =, If the Zero otpt of the ALU is active, write the PC with the contents Cond of the register ALUOt. jmp address PCSorce =, Write the PC with the jmp address from the instrction. Seq AddrCtl = Choose the net microinstrction seqentially. Seqencing Fetch AddrCtl = Go to the first microinstrction to begin a new instrction. Dispatch AddrCtl = Dispatch sing the RO. Dispatch 2 AddrCtl = Dispatch sing the RO 2. 計算システム論第 2 9

水平 vs. 垂直マイクロプログラム 2bit bit 2bit 3bit 3bit 4bit 2bit Label ALU control SRC SRC2 Register control emory control Seqencing Fetch Add PC 4 PC ALU Seq Add PC Etshft Dispatch em Add A Etend Dispatch 2 LW2 ALU Seq Write DR Fetch SW2 Write ALU Fetch Rformat Fnc code A B Seq Write ALU Fetch BEQ Sbt A B ALUOt-cond Fetch JUP Jmp address Fetch bit 折りたたんでフィールドを共有する 2bit bit 2bit 3bit 2bit ALU Register Label U/L control SRC SRC2 control Seqencing 命令ステップは U/L emory PC Write Control Fetch U Add PC 4 Seq 僅かプラス2 L PC ALU Seq U Add PC Etshft Dispatch ' em U Add A Etend Dispatch 2' マイクロ命令用 LW2 L ALU Seq U Write DR Fetch メモリ量減少 SW2 L Write ALU Fetch Rformat U Fnc code A B Seq 7bit = 7bit L Write ALU Fetch BEQ U Sbt A B Seq bit 2 = 32bit L ALU Ot-Cond Fetch JUP L Jmp address計算システム論第 Fetch 2 2