






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The exception processing mechanism using behavioral rtl, instruction interpretation, and additional instructions such as svi, ri, edi, and rfi. It covers saving and restoring interrupt information (ii) and interrupt program counter (ipc), enabling and disabling exceptions, and returning from interrupts.
Typology: Slides
1 / 10
This page cannot be seen from the preview
Don't miss anything!







1
Interrupt Request ireq:
Interrupt Acknowldge iack:
Disable Interrupt Flag IE :
Save PC in IPC<31...0>
Load PC with Exception Vector Ivect<31…0>
Get interrupt Info. Isrc-info <15…0>
2
Behavioral RTL
for Exception Processing
Instruction_interpretation:=
(!Run&Strt: Run ← 1:
Run & !(ireq&IE):(IR ←M[PC],
PC ← PC + 4;
Instruction_execution),
Run&(ireq&IE): (IPC ← PC<31..0>,
II<15..0> ← Isrc_info<15..0>,
IE ← 0: PC ← Ivect<31..0>,
Iack ← 1; Iack ← 0) ,
Instruction_interpretation);
Meaning Start Normal Fetch
Interrupt, PC copied II is loaded with the info. PC loaded with new address
4
TO (^) (!(ireq&IE): (MA ← PC, C ← PC + 4);
(ireq&IE): (IPC ← PC,II← Isrc_info, IE ← 0,PC ← 22 α 0©Isrc_vect<7..0> © 00,iack ← 1;iack ← 0,End);
T3 Instruction_execution;
5
7
Fetch Inst.
Fetch Operand
ALU Operation
Memory Access
Register shr r1, r2, 4 Write
sub r6, r7, r
add r4, r2, r
st r2, b
ld r1, a
8
Cycle 1 Cycle 2 Cycle 3 Cycle 4 Cycle 5
lw^ Ifetch^ Reg/Dec^ Exec^ Mem^ Wr
Pipeline Stages: alternate notation
10
Branch Delay brzr r2, r add r6, r7, r8 ;This instruction is always executed st r6, addr1 ;Only done if r2 ≠ 0
Load Delay ld r2,addr add r5, r1, r2 ;This instruction gets “old”value of r shr r1,r1, sub r6, r8, r2 ;This instruction gets r2 value loaded from addr
Branch and Load Delay example
Docsity.com