Digital Fundamentals & Computer Architecture
Digital Fundamentals & Computer Architecture
• 1. Instruction fetch
• 2. Instruction decode and register file read:
• 3. Execute or address calculation:
• 4. Memory access:
• 5. Write-back:
Instruction fetch
• The top portion of instruction being read from memory
using the address in the PC and then being placed in
the IF/ID pipeline register.
• The PC address is incremented by 4 and then written
back into the PC to be ready for the next clock cycle.
This incremented address is also saved in the IF/ID
pipeline register in case it is needed later for an
instruction, such as beq.
• The computer cannot know which type of instruction is
being fetched, so it must prepare for any instruction,
passing potentially needed information down the
pipeline.
Instruction decode and register file read:
• Hardware Interrupts
• Software Interrupts:
Hardware Interrupts
• Many computers have facility to connect two or more input and output
devices.
• A single interrupt request line may be used to serve n devices.
• All devices are connected to the line via switches to ground.
• To request an interrupt a device closes its associated switch.
• Thus if all interrupt request signals INTR1 to INTRn are inactive, that is,
if all switches are open, the voltage on the interrupt request line will be
equal to Vdd. This is the inactive state of the line.
• When a device request an interrupt by closing its switch, the voltage on
the line drops to 0, causing the interrupt request signal, INTR, received
by the processor to go to 1.
• Since the closing of one or more switches will cause the line voltage to
drop to 0, the value of INTR is the logical OR of the requests from
individual devices, that is,
• INTR = INTR1 + …….+ INTRn
there is a common interrupt line for
all N input/output devices
• The resistor R is called as a pull up resistor because it
pulls the line voltage to high voltage state when all
switches are open( no interrupt state).
ENABLING AND DISABLING INTERRUPTS
two or more I/O devices to the processor, the processor must have some
•The processor simply accepts the request having the highest priority. If several
Polling the status registers of the I/O devices is the simplest such mechanism.
In this case, priority is determined by the order in which the devices are
polled. When vectored interrupts are used, we must ensure that only one
device is selected to send its interrupt vector code. A widely used scheme is