Sequential CPU Implementation
Sequential CPU Implementation
Suggested Reading Chap 4.3 Processor
– 2 – Processor Suggested Reading - Chap 4.3
Y86 Instruction Set P259 Byte 00 addl halt subl rrmovl rA, rB P2|0旧 and16 irmov1V rB rmmovl rA, d(rB)40 rB D mrmovl D(rB), TA [50 TA rB D e OPl rA, rB 6 n[ rBh 1[2 jXX Dest Dest e all dest Dest ne ret pushl rA Ara 8 g WI Tod c- 0|rA8 Processor
– 3 – Processor Y86 Instruction Set P259 Byte 0 1 2 3 4 5 pushl rA A 0 rA 8 jXX Dest 7 fn Dest popl rA B 0 rA 8 call Dest 8 0 Dest rrmovl rA, rB 2 0 rA rB irmovl V, rB 3 0 8 rB V rmmovl rA, D(rB) 4 0 rA rB D mrmovl D(rB), rA 5 0 rA rB D OPl rA, rB 6 fn rA rB ret 9 0 nop 0 0 halt 1 0 addl 6 0 subl 6 1 andl 6 2 xorl 6 3 jmp 7 0 jle 7 1 jl 7 2 je 7 3 jne 7 4 jge 7 5 jg 7 6
Building Blocks p278, P279,P280 fun Combinational Logic A A Compute Boolean functions of Inputs a Continuously respond to input changes MUX a Operate on data and im plement control Storage Elements ■ Store bits SrcA/A Registe dst a Addressable memories Non-addressable registers srcB Clock a Loaded only as clock rises Clock Processor
– 4 – Processor Building Blocks P278, P279, P280 Combinational Logic ◼ Compute Boolean functions of inputs ◼ Continuously respond to input changes ◼ Operate on data and implement control Storage Elements ◼ Store bits ◼ Addressable memories ◼ Non-addressable registers ◼ Loaded only as clock rises Register file A B W dstW srcA valA srcB valB valW Clock A L U fun A B MUX 0 1 = Clock
Hardware Control Language a Very simple hardware description language a Can only express limited aspects of hardware operation e Parts we want to explore and modify Data Types ■boo1: Boolean a, b, C,.. int: words ●A,B,C, e Does not specify word size---bytes, 32-bit words, Statements bool a= bool-expr i nt a int-expr i 5 Processor
– 5 – Processor Hardware Control Language ◼ Very simple hardware description language ◼ Can only express limited aspects of hardware operation ⚫ Parts we want to explore and modify Data Types ◼ bool: Boolean ⚫ a, b, c, … ◼ int: words ⚫ A, B, C, … ⚫ Does not specify word size---bytes, 32-bit words, … Statements ◼ bool a = bool-expr ; ◼ int A = int-expr ;