【正文】
} : RESP。 – 11 – Processor Decode amp。– 1 – Processor SEQ CPU Implementation – 2 – Processor What we will discuss today? The implementation of a sequential CPU SEQ ? Every Instruction finished in one cycle. ? Instruction executes in sequential ? No two instruction execute in parallel or overlap An revised version of SEQ SEQ+ ? Modify the PC Update stage of SEQ ? to show the difference between ISA and implementation – 3 – Processor Some Macros Name Value Meaning INOP 0 Code for nop instruction IHALT 1 Code for halt instruction IRRMOVL 2 Code for rrmovl instruction IIRMOVL 3 Code for irmovl instruction IRMMOVL 4 Code for rmmovl instruction IMRMOVL 5 Code for mrmovl instruction IOPL 6 Code for integer op instructions IJXX 7 Code for jump instructions ………… …… …………………………… IPOPL B Code for popl instruction RESP RENONE 6 8 Register ID for %esp Indicates no register file access ALUADD 0 Function for addition operation – 4 – Processor Instruction memory Instruction PC increment increment CC CC ALU ALU Data memory Data memory Fetch Decode Execute Memory Write back icode , ifun rA , rB valCRegister file fi A B M E Register file A B E PC valP srcA , srcB dstA , dstB valA , valB aluA , aluB Bch valE Addr , Data valM PC valE , newPC valM – 5 – Processor SEQ Hardware Structure Stages ? Fetch ? Read instruction from memory ? Decode ? Read program registers ? Execute ? Compute value or address ? Memory ? Read or write data ? Write Back ? Write program registers ? PC ? Update program counter Instruction Flow ? Read instruction at address specified by PC ? Process through stages ? Update program counter Instruction memory I tr t r PC increment r t CC ALU Data memory t r Fetch Decode Execute Memory Write back icode , ifun rA , rB valC Register file ist r file A B M E PC valP srcA , srcB dstA , dstB valA , valB aluA , aluB Bch valE Addr , Data valM PC valE , valM newPC – 6 – Processor Difference between semantics and implementation ISA ? Every stage may update some states, these updates occur sequentially SEQ ? All the state update oper