Explanation for design The theory of computer architecture Dec 15, 2008 (Mon.)

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

Microprocessors.
Adding the Jump Instruction
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
CSE 340 Computer Architecture Spring 2014 MIPS ISA Review
1 COMS 361 Computer Organization Title: Instructions Date: 9/28/2004 Lecture Number: 10.
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Assembly Language for Intel-Based Computers Chapter 2: IA-32 Processor Architecture Kip Irvine.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
Design and Synthesis of a RISC Stored-Program Machine
Computer Science 210 Computer Organization The Instruction Execution Cycle.
TEAM FRONT END ECEN 4243 Digital Computer Design.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
Dale & Lewis Chapter 5 Computing components
Computer Organization Rabie A. Ramadan Lecture 3.
Computer operation is of how the different parts of a computer system work together to perform a task.
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
MIPS Processor.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
STUDY OF PIC MICROCONTROLLERS.. Design Flow C CODE Hex File Assembly Code Compiler Assembler Chip Programming.
CPU Organisation & Operation
Chapter 4 The Von Neumann Model
ELEN 468 Advanced Logic Design
Chapter 4 The Von Neumann Model
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Instruction Format MIPS Instruction Set.
Computer Architecture
MIPS Processor.
Computer Science 210 Computer Organization
Design of the Control Unit for Single-Cycle Instruction Execution
The fetch-execute cycle
CSCI206 - Computer Organization & Programming
Figure 8.1 Architecture of a Simple Computer System.
Computer Architecture
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
Computer Science 210 Computer Organization
Design of the Control Unit for One-cycle Instruction Execution
MIPS Processor.
Figure 8.1 Architecture of a Simple Computer System.
The Processor Lecture 3.2: Building a Datapath with Control
Unit 12 CPU Design & Programming
COMS 361 Computer Organization
Instruction Format MIPS Instruction Set.
ECE 352 Digital System Fundamentals
The Stored Program Computer
Datapath and Control Exceptions
Program Execution.
October 29 Review for 2nd Exam Ask Questions! 4/26/2019
The Processor: Datapath & Control.
Computer Architecture Assembly Language
Computer Operation 6/22/2019.
COMS 361 Computer Organization
MIPS Processor.
Sec (2.3) Program Execution.
Chapter 4 The Von Neumann Model
Presentation transcript:

Explanation for design The theory of computer architecture Dec 15, 2008 (Mon.)

Task of Computer design theory Design Micro Processor Reference URL:

That's all.

About Micro Processor Fetch Decode Execute Write Back A A A A 1 B B B B C C C C D A B C D cycle 命令 E behavior  Fetch ・・・ Importing the next instruction from memory or cash.  Decode ・・・ With discriminating the imported instruction, defining what to do.  Execute ・・・ Execute the instruction.  Write Back ・・・ reflecting the result.

Instruction Set ~ About Instructions that a microprocessor supports ~

Instruction Set (1) For simplicity, the usable order is set of 9 of the following ( The basic task can be realized with these 9 ) You make the SRP that a bubble sorting program is executable

Instruction Set (2) add:value of register 2 + value of register 3 → store in register 1 subtract:value of register 2 - value of register 3 → store in register 1 and:Multiply value of register 2 and value of register 3 every bit →store in register 1 or:Add value of register 2 and value of register 3 every bit →store in register 1 Operation is performed only with the value of the register

Instruction Set (3) load word:value of register 2 + integer(100) = address of the memory load the value of the address → register 1 store word:value of register 2 + integer(100) = address of the memory store the value of register 1 → the address Communication is performed between register and memory

Instruction Set (4) branch on equal:value of register 1 ≠ value of register 2 → next instruction value of register 1 = value of register 2 → (1+25) instruction set on less than:value of register 2 < value of register 3 → store 1 in register 1 ≧ → 0 jump:change the address of program counter without condition Change the address of Program Counter =Change the Instruction

Addressing ~ Data style ~

Addressing (1) Using Byte Addressing in SRP 1 byte go up, then 1 byte address go up.

Addressing (2) Instruction size → 4 byte 4 byte address go up, then 1 word address go up. Instruction memory and date memory have 32bit address. Using Word Addressing. It is necessary to change to the Word Address for the access to the memory.

Instruction Format

Instruction Format (1) An instruction = 32 bits To show the kind of instruction or an address of register, you divide 32 bits and use it. The divided part is called “field” and the instruction in such a bit is called “assembler expression” or “machine language expression”. decimal number is used in the table

Instruction Format (2) R-style : Show three Register Addresses I-style : Show two Register Addresses and a number J-style : There is no need to show a register address decimal number is used in the table

Instruction Format (2) R-style : Show three Register Addresses I-style : Show two Register Addresses and a number J-style : There is no need to show a register address ~ are usable

Instruction Format (2) R-style : Show three Register Addresses I-style : Show two Register Addresses and a number J-style : There is no need to show a register address value in table is Absolute address unsigned /zero or positive value The negative value is not necessary

Instruction Format (3) A name is added to each field op:operation rs :source register rt :source register (usually) rd :destination register, the place that stores a result func:function (show the variation of the op field)

Size of Instruction Memory and Data Memory 0 ~ 255 番地 256 ~ 511 番地 命令メモリ データメモリ

基本動作 ① Read an instruction corresponding to the value of the program counter ② Decode an instruction and perform necessary control ③ Read values from register file and operate in ALU ④ Write in an operation result and a value of the data memory at a register file ① Fetch ② Decode ③ Execute ④ Write back

When actually designing

Development environment ISE 10.1 M odelSim Necessary file alu_pkg.vhd Definition such as opecode dram.vhd Data RAM irom.vhd Instruction ROM SRP.vhd SRP(Here is made this time. ) test_SRP.vhd For test bench This project file is distributed on the Web.

SRP (Small RISC Processor ) RISC: Reduced Instruction Set Computer Place where code of SRP is written

The value of program count is maintained Program counter’s value is selected when diverging The address of the written register is selected by the instruction ( ※ Instruction Set) Control of instruction The value of the register is rewritten, and output. Select register operation or operation Instruction Instruction is load Data RAM or not Execution part of operation according to instruction ① ② ③ ④ ⑤ ⑥ ⑦⑧

Instruction ROM & Data RAM Instruction ROM The instruction corresponding to input Add is output to Dout in each 10ns. Data RAM Read ・・・ Data corresponding to input Add is output to Dout in each 10ns. Write ・・・ When WE is ‘1’ and Synchronize with Clock, the value of input Din is written at the address of input Add.

About a detailed each part It schedules it opening to the public on Web in the future. Example about ① ・ 32 bit register ・ Synchronize with Clock ・ Reset by signal Reset 32 ビット レジスタ 32 nextpc Clock Reset pc

Bubble Sort

What is Bubble Sort !? The 1st and the 2nd are compared. The 2nd and the 3rd are compared. The last number is fixed. It repeats while the part that has not been fixed. Initial data: The part that fixed the result is red ( When 1st outside loop ends ) ( When 2nd outside loop ends ) ( When 3rd outside loop ends ) ( When 4th outside loop ends ) ( When 5th outside loop ends ) ( When 6th outside loop ends ) ( When 7th outside loop ends )

4byte×8 Data-RAM

Instruction-ROM

Sorting Flow R7<= R8 <= R7 + 4 (Next address) R10 <= data of R7 R11 <= data of R8 R10 < R11 R9 <= data Byte address Yes No R9 <= 0 data of R7 <= R11 data of R8 <= R10 Leading address Leading address <= Leading address + 4 Leading address =end address Yes No end address <= end address - 4 end address = 256 Yes No END START Data RAM

Simulation result The result of sorting data in the memory. The data is 0 to 7.

Application : Pipeline processing behavior  Fetch ・・・ Importing the next instruction from memory or cash.  Decode ・・・ With discriminating the imported instruction, defining what to do.  Execute ・・・ Execute the instruction.  Write Back ・・・ reflecting the result. Fetch Decode Execute Write Back A A A A 1 B B B B C C C C D A B C D cycle Instruction E B B B B C C C C D