• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/21

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

21 Cards in this Set

  • Front
  • Back

Instruction register

-Dedicated tempoaray store register that stores current instruction to be executed - this is the instruction pre load


-written from program memory, decoded by instruction decoder and read by control unit


- it enables some degree of pipelining

Advantage of an instruction register

- by storing instruction to be executed in a register we can use output to control other parts of the cpu so instruction can be executed

What is branching and what instructions in the PIC 16F84 cause a branching effect

- a branch is an instruction in a program which causes a change in execution sequence of instructions in the program. normally instructions are executed one after another


- ANY BIT SKIP INSTRUCTIONS


(DECFZ, INCFZ, BTFSS, BTFSC)

How is the instruction register affected by branching

-As instructions are executed as they appear in the program, branching instructions cause change in execution sequence therefore corrupts the pipeline and breaks it. Therefore the instruction register must be re populated, incurring a latency of 1 clock cycle

Working register

Used to store one of the operands to be inputted into the ALU, stores result of ALU calculations

Control unit

Interprets coded instructions and sends appropriate read and write instructions to the registers connected to the system bus.




controls operation of cpu

Program counter

- holds address in program memeory of next instruction to be executed, is normally incremented after each clock cycle


-if a branch is needed can be acessed via system bus and adress of next instruction can be loaded into program counter. the program counter is modified by jump instruction


-allows implementation of loops subroutines and if then operations.



Function of TRISA

-port direction selection register, corresponds to port A pins, data direction reg allows each pin to be set individually as i/o before data is read or written to port data register portA

PORTA

Port data selection register, i/o register that stores current value of I.O lines so that data can be copied and moved to other registers.

General purpose registers

can be used as general variable storage by the user

Status register

used to store carry flag from arithmetic operations


-stores zero flags for selection instructions


-some instructions are condiitons on state of a flag in the register, so allows some instructions to be controlled (btfss,sc)


-manages bank switching


- constrols program sequence by conditional branching based on flag state.

Program counter - how is an instruction executed

-program counter starts at 0X00


- instruction on line 1 is fetched and stored in IC, instruction is decoded and performed by control unit. any file registers are modified and the resulting output if any are seen at the ports such as switching an LED ON

States of a tri state port

- High impedence


-lowimpedence LOW - output false


-low impedence HIGH - output true




low impedence indicatases output to a bus, indicates port is in ourput mode




higg impedene state is an open circuit and can be ignored, only 1 low impedence at a time. high impedence indicates input.




Function of a watchdog timer

-watchdog timer can reset an mp if stuck in an infinite loop


- can be used to wake mp from sleep mode


- can count down from a value before program is reset


-recovery from errors or infinite loops

What is stack overflow

- stack level on pic is 8 levels deep


- call stack pointer exceeds the bound of the stack


-stack stores return address of subroutines, stack overflow happens where therer are too many nested calls and as a result the number of memory slots are not enough.

What is pipelining

-where operations are stored during previous instruction cycle, so multiple instructions are overalpped in execution


- instruction reg stores op code of current instruction and fetches next one from memory whilst current is being executed.



in pipelining what happens if the next instruction is jump

- contents of instruction register are invalid and are ignored


- will take another instruction cycle to fetch valid op code from program memory


- and take another cycle to complete

Two types of computer architectures (for exam)

-von neuman


single memory, program instructions and data are stored together


-single bus is used to fetch instructions and data


- advantage of this is reduced complexity


- suffers from von neuman bottleneck




harvard


- parallel instructio and data fetch


multiple memories for instruction and data


multiple buses for signals


advntage opf this is that access to each memories bus can occour during the same clock cycle



Two types of instruction sets (for exam)

cisc - complex instruction set computer)


over 80 instruction sets


powerful and specialised


advntage of this is that many instructions are macro like and one instruction can be used in the place of many - making code simpler




risc - reduced set


fewer than 30 instructions


advnatge of this is that processor design is simpler and can be smaller, also consumes less power.

equ meaning

assembler directive used to assign a label to a literal value address or register

addressing modes

direct - address is specified after the instruction such as clrf portb




immediate - address is built into the instruction word - movlw




relative - modifying the program counter contents- using goto/call




indirect - using pointers to reference an address in program memory