Administrivia
- Joe’s lab hours
– Monday 6-8, Tuesday 6-9, Thursday 6-9
- Any problems with lab 1?
Administrivia Joes lab hours Monday 6-8, Tuesday 6-9, Thursday 6-9 - - PowerPoint PPT Presentation
Administrivia Joes lab hours Monday 6-8, Tuesday 6-9, Thursday 6-9 Any problems with lab 1? Fetch Unit CSE141L Lab 1b The Instruction Execution Cycle Obtain instruction from program storage Instruction Fetch Determine required
3
Obtain instruction from program storage Determine required actions and instruction size Locate and obtain operand data Compute result value or status Deposit results in storage for later use Determine successor instruction Instruction Fetch Instruction Decode Operand Fetch Execute Result Store Next Instruction
Fetch Unit FIFO fetch instruction addr deque FIFO FIFO FIFO FIFO FIFO FIFO FIFO FIFO FIFO FIFO Exec Unit (“BackEnd”)
– Instead of waiting the result of condition evaluation, predict where to go – For a misprediction, a recovery mechanism required
P Opcode Offset
Sign Extend
ADD
PC [9:0] Offset [4:0] Offset [9:0]
Fetch Unit
Instruction(data, addr, valid) deque restart restart_addr memory req (load, store, addr, store_data) load_data, load_valid
Exec Unit
module fetch #(parameter I_WIDTH = 17, A_WIDTH = 10, O_WIDTH= 5) ( input clk, reset, // normal operation, signals from the backend end input deque, input restart, input [A_WIDTH-1:0] restart_addr, // normal operation, signals from the front end to backend
input [A_WIDTH-1:0] load_store_addr, input [I_WIDTH-1:0] store_data,
input load_store_1_0; input do_load_store; )
SRAM FIFO
+1 +Offset
0x0
pc [9:0] pc_prev_r[9:0] restart_addr_r [9:0] loadstore_addr_r [9:0] store_data_r [16:0] din[26:17] din[16:0] load_data[16:0] instruction_addr[9:0] instruction_data[16:0] pc[9:0] deque ram_addr[9:0]
ram_we sel_addr sel_pc fifo_enque
restart_addr [9:0] loadstore_addr [9:0] store_data [16:0]
ram_data [4:0]
– RAM – FIFO
– Adder – Sign extender