-16 ~ 15 ? Processor - PC : Program counter, holds address of the current instruction - zero in ALU changed to CMP - IorD - instruction or data Datapath Where all data computations take place Control unit A big FSM that instructs the datapath to perform all appropriate actions.
Example: compute x2 + 2x 1. Identify the various datapath components 2. Identify which signals will be FSM inputs, FSM outputs 3. Come up with a state diagram/state table 4. Implement control components and datapath components in verilog
OutputsV,C,N,Z indicate special conditions in the arithmetic result: - V: overflow condition, used to detect errors in signed arithmetic - C: carry-out bit, used to detect errors in unsigned arithmetic - N: negative indicator (sign bit flag) - Z: zero-condition indicator, set if result of operation is zeroMultiplicationApproaches: - Layered rows of adder units - An adder/shifter circuit - Booth’s AlgorithmBooth’s Algorithm•X * 001111 = X * 010000 - X * 1Memory and RegistersRegisters: Small number of fast memory unit that allow multiple values to be writtensimultaneouslyMain memory: Larger grid of memory cells that are used to store the main information to be processed by the CPUmaddress width: - 2m rows - each row contains nbits (data width) - size of memoryis 2m * n bits => 2m * n / 8 BytesMemory capacity:measured in Bytes (1 Byte is 8 bits) - KB (kilobyte) = 1024 Bytes = 210 Bytes - MB (Megabyte) = 1024 KB = 220 Bytes - GB (Gigabyte) = 1024 MB = 230 BytesRAM Memory Interface•Address port (input): Address-width bit Wide•Write Enable (input):–Memory write: Memory is modified if 1–Memory read: Memory is read if 0•Data In (input): data to write if writeEn is 1•Data out (output): data read from memory if writeEn is 0Processor datapathProgram Counter (PC)Store location of the current instruction
Updating PC•for instructions that are 4B long (32 bits), PC need to be incremented by 4, so that next instruction is fetched and executed•can also be updated via result of ALU operation•every instruction updates PC
- Fall '09
- Central processing unit, Flip-flop