Moteur de recherche de fiches techniques de composants électroniques
  French  ▼
ALLDATASHEET.FR

X  

39504 Fiches technique(PDF) 6 Page - Microchip Technology

No de pièce 39504
Description  Section 4. Architecture
PDF  16 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricant  MICROCHIP [Microchip Technology]
Site Internet  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

39504 Fiches technique(HTML) 6 Page - Microchip Technology

Back Button 39504 Datasheet HTML 2Page - Microchip Technology 39504 Datasheet HTML 3Page - Microchip Technology 39504 Datasheet HTML 4Page - Microchip Technology 39504 Datasheet HTML 5Page - Microchip Technology 39504 Datasheet HTML 6Page - Microchip Technology 39504 Datasheet HTML 7Page - Microchip Technology 39504 Datasheet HTML 8Page - Microchip Technology 39504 Datasheet HTML 9Page - Microchip Technology 39504 Datasheet HTML 10Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 6 / 16 page
background image
PIC18C Reference Manual
DS39504A-page 4-6
 2000 Microchip Technology Inc.
4.3
Instruction Flow/Pipelining
An “Instruction Cycle” consists of four Q cycles (Q1, Q2, Q3 and Q4). Fetch takes one instruction
cycle, while decode and execute takes another instruction cycle. However, due to pipelining, each
instruction effectively executes in one cycle. If an instruction causes the program counter to
change (e.g. GOTO instruction), then an extra cycle is required to complete the instruction (See
Example 4-1).
The instruction fetch begins with the program counter incrementing in Q1.
In the execution cycle, the fetched instruction is latched into the “Instruction Register (IR)” in
cycle Q1. This instruction is then decoded and executed during the Q2, Q3 and Q4 cycles. Data
memory is read during Q2 (operand read) and written during Q4 (destination write).
Example 4-1 shows the operation of the two stage pipeline for the instruction sequence shown.
At time TCY0, the first instruction is fetched from program memory. During TCY1, the first instruc-
tion executes, while the second instruction is fetched. During TCY2, the second instruction exe-
cutes, while the third instruction is fetched. During TCY3, the fourth instruction is fetched, while
the third instruction (CALL SUB_1) is executed. When the third instruction completes execution,
the CPU forces the address of instruction four onto the Stack and then changes the Program
Counter (PC) to the address of SUB_1. This means that the instruction that was fetched during
TCY3 needs to be “flushed” from the pipeline. During TCY4, instruction four is flushed (executed
as a NOP) and the instruction at address SUB_1 is fetched. Finally during TCY5, instruction five is
executed and the instruction at address SUB_1 + 2 is fetched.
Example 4-1: Instruction Pipeline Flow
Most instructions are single cycle. Program branches take two cycles, since the fetch instruction is “flushed” from
the pipeline while the new instruction is being fetched and then executed.
TCY0TCY1TCY2TCY3TCY4TCY5
1. MOVLW 55h
Fetch 1
Execute 1
2. MOVWF PORTB
Fetch 2
Execute 2
3. CALL SUB_1
Fetch 3
Execute 3
4. BSF
PORTA, BIT3 (Forced NOP)
Fetch 4
Flush
5. Instruction @ address SUB_1
Fetch SUB_1 Execute SUB_1
Fetch SUB_1 +2



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


Fiches technique Télécharger

Go To PDF Page


Lien URL



ALLDATASHEET vous a-t-il été utile ?  [ DONATE ] 

À propos de Alldatasheet   |   Publicité   |   Contactez-nous   |   Politique de confidentialité   |   Lien vers la fiche technique    |   Echange de liens   |   Fabricants
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com