Processor Design ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.

Slides:



Advertisements
Similar presentations
Microprocessors.
Advertisements

Chapter 5 The LC-3 Instruction Set Architecture l ISA Overview l Operate instructions l Data Movement instructions l Control Instructions l LC-3 data path.
ELEN 468 Advanced Logic Design
Processor Function Topic 3.
Execution of an instruction
Slides to Accompany a Video Tutorial on Harry Porter’s Relay Computer Harry Porter, Ph.D. Portland State University November 7, 2007.
MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker.
Aug. 24, 2007ELEC 5200/6200 Project1 Computer Design Project ELEC 5200/6200-Computer Architecture and Design Fall 2007 Vishwani D. Agrawal James J.Danaher.
Savio Chau Single Cycle Controller Design Last Time: Discussed the Designing of a Single Cycle Datapath Control Datapath Memory Processor (CPU) Input Output.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 25 CPU design (of a single-cycle CPU) Intel is prototyping circuits that.
1 The Design of a Relay Computer Harry Porter, Ph.D. Portland State University April 24, 2006.
Microcontroller Architecture PIC18F Family
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4: IT Students.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4:
Computer Science 210 Computer Organization The Instruction Execution Cycle.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
SAP1 (Simple-As-Possible) Computer
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Basic Architecture Lecture 15. In general, if the number of bits is n, then the number of different combinations of 0s and 1s that can be made is 2 n.
Processor Design ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Housekeeping 1.teams—end of class 2.Example verilog code (alter) 3.Example altera report 4.Lab Monday: you will be asked to show: -- one or more reports.
PIC18F Programming Model and Instruction Set
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
Execution of an instruction
Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.
CDA 3101 Fall 2013 Introduction to Computer Organization
Computer Architecture Lecture 03 Fasih ur Rehman.
Machine Language ELEC 330 Digital Systems Engineering Dr. Ron Hayne.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Our programmer needs to do this !
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
Lecture 2: Instruction Set Architecture part 1 (Introduction) Mehran Rezaei.
Computer Organization Instructions Language of The Computer (MIPS) 2.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Single Cycle Controller Design
EE345 Chapter 2 Lecture 3 April 4. Quiz every Wednesday 1 quiz = 1% extra credit five quizzes before midterm  5% for midterm. five quizzes before final.
8 085Microprocessor Temp Reg (8) Accumulator (A reg) Flag flip flops(8) Instruction Register (8) Arithmetic Logic Unit ALU Instruction Decoder and Machine.
EE345 Chapter 2 Lecture 3 April Instruction and addressing modes 1.Extended Addressing 2.Direct Addressing 3.Inherent Addressing 4.Immediate Addressing.
Access the Instruction from Memory
ELEC 418 Advanced Digital Systems Dr. Ron Hayne
ELEC 418 Advanced Digital Systems Dr. Ron Hayne
Single Cycle CPU.
CS 230: Computer Organization and Assembly Language
Addressing Modes in Microprocessors
IT 251 Computer Organization and Architecture
ELEN 468 Advanced Logic Design
Chapter 4 The Von Neumann Model
Instruction Format MIPS Instruction Set.
Processor (I).
Computer Science 210 Computer Organization
CS/COE0447 Computer Organization & Assembly Language
The LC-3 Instruction Set Architecture Data Movement instructions
ECE 445 CS1251 Computer Organization Carl Hamacher
CS/COE0447 Computer Organization & Assembly Language
Computer Science 210 Computer Organization
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
Computer Structure S.Abinash 11/29/ _02.
Topic 6 LC-3.
COMS 361 Computer Organization
Instruction Format MIPS Instruction Set.
Review Fig 4.15 page 320 / Fig page 322
Datapath and Control Exceptions
CS/COE0447 Computer Organization & Assembly Language
Computer Architecture Assembly Language
What You Will Learn In Next Few Sets of Lectures
Processor: Datapath and Control
Chapter 4 The Von Neumann Model
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Processor Design ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering

418_092 68HC11 Programming Model  Motorola 68HC11 Microcomputer 7 A 07 B 08-bit Accumulators A & B 15 D 016-bit Double Accumulator D 15 X 0Index Register X 15 Y 0Index Register Y 15 SP 0Stack Pointer 15 PC 0Program Counter SXHINZVCCondition Code Register

418_093 68HC11 Instruction Set Table Source Form Operation Boolean Expression Addr. Mode Machine Code Bytes Cycles Op Code Op- erand ABXAdd B to X X + 00:B  X INH3A13  ADDA (opr)Add Memory to A A + M  A A IMM A DIR A EXT A IND,X A IND,Y 8B 9B BB AB 18 AB ii dd hh ll ff ff  CLCClear Carry Bit 0  C INH0C12  LDX (opr)Load Index Register X M:(M + 1)  X X IMM X DIR CE DE jj kk dd

PIC18F452 Programming Model 418_094

5 MIPS ISA  Instruction Set Architecture 32 General-Purpose Registers (32-bits) 3 Instruction Formats R-format (register) I-format (immediate) J-format (jump) 3 Addressing Modes Immediate Register Base and signed offset

MicroMIPS 6 Fig Key elements of the single-cycle MicroMIPS data path. Instruction fetchReg access / decodeALU operationData access Register writeback

Instructional Processor Design  3 Bus Organization 16 bit Data Path  4 Word Register File  4K Word Memory  8 Function ALU 2 Condition Code Flags  6 Data Instructions 4 Addressing Modes  7 Branch Instructions 418_097

Data Path & Memory 8 IR REGS MDR MAR MEM 12 A B R A1A2 PC ALU NZ BUS A BUS BBUS C MUX STATUS MUX STACK Memory 000 I/O Data 07F 080 Program FFF

Data Path Registers & Memory  Program Counter (PC) 12-bit Program Address  Subroutine Stack (STACK) 16 x 12-bit Addresses  Instruction Register (IR) 16-bit Instructions  Register File (REGS) 4 x 16-bit Registers  Arithmetic Logic Unit (ALU) 8 Functions (ALU_OP)  Flag Register (STATUS) Negative Flag (N) Zero Flag (Z)  Memory Data Register (MDR) 16-bits to/from Memory  Memory Address Reg (MAR) 12-bit Memory Address  Memory (MEM) 4K x 16-bit Memory 418_099

Addressing Modes  Method of specifying of an operand Immediate (Literal) addressing The operand is a number that follows the opcode Direct (Absolute) addressing The address of the operand is a part of the instruction Indirect addressing An address is specified in a register (pointer) and the MPU looks up the address in that register 10418_09

Data Instruction Format 418_ IROPSRCDSTVALUE ModeREG #NameSyntaxEffective Address SRC or DST Register DirectRnEA = Rn Register Indirect[Rn]EA = (Rn) 10vvAbsolute[Value]EA = Value 11*vvImmediateValueOperand = Value EA = Effective Address vv = Upper 2 bits of Value * = SRC only

Data Instructions 418_0912 OPFnAssembly LanguageRegister Transfer Notation 000MOVE MOVE SRC,DST DST  SRC 001ADD ADD SRC,DST DST  SRC + DST 010INV INV SRC,DST DST  not SRC 011AND AND SRC,DST DST  SRC and DST 100SHL SHL SRC,DST DST  SRC(14 dt 0) & 0 101ASHR ASHR SRC,DST DST  SRC(15) & SRC(15 dt 1)

Branch Instruction Format 418_ IROPMDOFFSET OPMDFnAssembly LanguageRegister Transfer Notation BRA BRA Offset PC  PC + Offset 001BZ BZ Offset PC  PC + Offset (Z = 1) 010BNZ BNZ Offset PC  PC + Offset (Z = 0) 011BN BN Offset PC  PC + Offset (N = 1) 100BNN BNN Offset PC  PC + Offset (N = 0) BSR BSR Offset STACK  PC; PC  PC + Offset 111RTN PC  STACK

Control Unit Organization 418_0914 SRC_MODE DCD Control Step Counter T0T0 T7T7... STATUS N Instruction DCD I0I0 I7I7... M0M0 M3M3 M0M0 M3M3 DST_MODE DCD Encoder Control Signals Clear CLK Step DCD IR Z...

Control Unit Design  Instruction Fetch 418_0915 StepRTN Control Signals T0 MAR  PC, PC  PC + 1 BUS_B <= PC ALU_OP <= Pass_B Load_MAR <= ‘1’ Inc_PC <= ‘1’ T1 MDR  MEM(MAR) MEM_Read <= ‘1’ Load_MDR <= ‘1’ T2 IR  MDR BUS_B <= MDR ALU_OP <= Pass_B Load_IR <= ‘1’

Control Unit Design  Instruction Execute MOVE Rs,Rd Register Direct (M0), Register Direct (M0) 418_0916 StepRTN Control Signals T3 R(D)  R(S) REGS_Read1 <= ‘1’ ALU_OP <= OP Load_STATUS <= ‘1’ REGS_Write <= ‘1’ Clear <= ‘1’

Assembly Language Program 418_ SUM N 00A 7 X(0) 00B -8 X(1) 00C 10 X(2).data SUM N 3 X 7, -8, 10.code START: MOVE [N],R1 MOVE X,R2 MOVE 0,R0 LOOP: ADD [R2],R0 ADD 1,R2 ADD -1,R1 BNZ LOOP MOVE R0,[SUM] STOP: BRA STOP  program.asm  program.bin

VHDL Simulation 418_0918

Microcontroller  4K (4096) RAM 8 Memory-mapped I/O Ports 0x000SWITCH(Input)8-bit 0x001LED(Output)8-bit 0x002ANODE(Output)4-bit 0x003CATHODE(Output)8-bit 0x004JA(Output)4-bit 0x005JB(Input)4-bit 120 Data Memory Locations 0x x07F 418_0919

FPGA Implementation LED SWITCH Reset Clock Processor ANODE/CATHODE JAJB

418_0921 Summary  Example Microprocessors Instruction Set Architecture  Instructional Processor Design Data Path Memory Instruction Processing  VHDL Model ISim Simulation FPGA Implementation