Download Micro-programmed Control Unit: Fetch, Indirect, and Interrupt Cycles and more Lecture notes Microprocessors in PDF only on Docsity!
CSE- 3821
Computer Architecture
Dr. Md. Waliur Rahman Miah Associate Professor, CSE, DUET
Lecture- 3
Micro-programmed control unit
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET
Syllabus ā Second Part
- Arithmetic and logical processing unit
- Micro-programmed control unit
- Information representation and transfer
- Instruction and data access methods
- The control unit: hardware and micro- programmed
- Interrupts, DMA, memory organization, computer peripherals
- Von Neuman SISD organization, RISC and CISC machines
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Micro-Operations
- A computer executes a program
- Fetch/execute cycle
- Each cycle has a number of steps
- Each step does very little
- Atomic operation of CPU
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Constituent Elements of Program Execution
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET (^7) Fetch Sequence
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Fetch Sequence
- Address of next instruction is in PC
- Address (MAR) is placed on address bus
- Control unit issues READ command
- Result (data from memory) appears on data bus
- Data from data bus copied into MBR
- PC incremented by 1 (in parallel with data fetch from memory)
- Data (instruction) moved from MBR to IR
- MBR is now free for further data fetches
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Rules for Micro-operation Grouping
- Two rules:
- Rule#1: Proper sequence must be followed
- MAR <- (PC) must precede MBR <- (memory)
- Rule#2: Conflicts must be avoided
- Must not read & write same register at same time
- MBR <- (memory) & IR <- (MBR) must not be in same cycle
- Note Also: PC <- (PC) +1 involves addition
- Use ALU
- May need additional micro-operations
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Indirect Cycle
- MAR <- (IR address ) - address field of IR
- MBR <- (memory)
- IR address
<- (MBR
address
- After the indirect cycle:
- MBR contains an address
- IR is now in same state as if direct addressing had been used
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Execute Cycle (ADD)
- Different for each instruction
- e.g. ADD R1,X - add the contents of location X to Register 1 , result in R
- t1: MAR <- (IR address
- t2: MBR <- (memory)
- t3: R1 <- R1 + (MBR)
- Note no overlap of micro-operations
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Execute Cycle (ISZ)
- ISZ X - increment and skip if zero
- t1: MAR <- (IR address )
- t2: MBR <- (memory)
- t3: MBR <- (MBR) + 1
- t4: memory <- (MBR)
- if (MBR) == 0 then PC <- (PC) + 1
- Notes:
- if is a single micro-operation
- Micro-operations done during t
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Instruction Cycle
- Each phase decomposed into sequence of elementary micro-operations
- E.g. fetch, indirect, and interrupt cycles
- Execute cycle
- One sequence of micro-operations for each opcode
- Need to tie sequences together
- Assume new 2-bit register
- Instruction cycle code (ICC) designates which part of cycle processor is in - 00: Fetch - 01: Indirect - 10: Execute - 11: Interrupt
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET Flowchart for Instruction Cycle
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET
1. Basic Elements of Processor
- ALU
- Registers
- Internal data pahs
- External data paths
- Control Unit
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET
2. Types of Micro-operation
- Types of Micro-operation:
- Transfer data between registers
- Transfer data from register to external interface (ex. System bus)
- Transfer data from external to register
- Perform arithmetic or logical operations, using registers for input and output These micro-operations cover the execution of each and every instruction in the instruction-set