Presentation is loading. Please wait.

Presentation is loading. Please wait.

designKilla: The 32-bit pipelined processor Brought to you by: Victoria Farthing Dat Huynh Jerry Felker Tony Chen Supervisor: Young Cho.

Similar presentations


Presentation on theme: "designKilla: The 32-bit pipelined processor Brought to you by: Victoria Farthing Dat Huynh Jerry Felker Tony Chen Supervisor: Young Cho."— Presentation transcript:

1

2 designKilla: The 32-bit pipelined processor Brought to you by: Victoria Farthing Dat Huynh Jerry Felker Tony Chen Supervisor: Young Cho

3 32-Bit RISC Pipelined Processor Reduced Instruction Set allows for faster execution of simple, frequently used instructions which can be combined to achieve the same result as a single, slower CISC instruction Pipelining allows a faster clock cycle and less wasted resources

4 Datapath Pipeline Stages 5 Stages – Instruction Fetch – Instruction Decode – Execution – Memory Write – Write Back

5

6

7

8

9

10

11

12 Unique Data Path Features Next instruction address calculation –For basic incrementation, the address is calculated by a counter

13 Address Jump Calculations –For address jumps, there is a 19-bit load port on the counter The loaded address comes from an adder with multiplexed inputs Load bit is controlled by a comparator (beq) or-ed with the absolute jump control bit

14 Double Clocked Memory Interface Problem:Problem: One Memory for both Instruction and Data Solution:Solution: Double Clock! twiceAccess the memory twice during one clock cycle

15 Fast Clock Clock Fetch Instruction Fetch DataFetch Instruction Write Enable Write Data Fetches Instruction in First Cycle Fetches or Writes Data In Second Cycle Data is output by end of Clock Cycle

16 Unique Data Path Features Structural Multiplier –16 X 16 bit –Multi-level creation: Four 8 X 8 bit multipliers –Each containing four 4 X 4 bit multipliers Each comprised of a cascaded network of full and half adders, built on logic gates

17 16-Bit Multiplier Unit Based On Hand Multiplication Made Up of Network of AND Gates and Adders

18 Why 32  16 bit? 32bit x 32bit = 64 bits! Multiple complex changes to existing architecture would be required Only one register can be written per clock cycle –Could hold value for next cycle or stall the pipeline Would require pseudoinstruction as well as new hardware and multiple control signals

19 Use pseudo-code instruction mult32 mult 20, 2, 4 mult 21, 4, 1 mult 22, 2, 3 mult 23, 1, 3 and 24, 20, 30 srli 24, 24, 16 and 25, 21, 31 add 25, 24, 25 and 24, 22, 31 add 25, 25, 24 and 5, 25, 31 srli 5, 5, 16 and 20, 20, 31 or 5, 5, 20 srli 25, 25, 16 and 24, 22, 30 srli 24, 24, 16 add 24, 24, 25 and 25, 23, 31 add 24, 24, 25 and 22, 24, 30 srli 22, 22, 16 and 21, 23, 30 srli 21, 21, 16 add 6, 21, 22 slli 6, 6, 16 and 24, 24, 31 or 6, 6, 24

20 Improve the Multiplier Can decrease the latency of a combinational multiplier with carry-look ahead adding methods. –Small amount of extra hardware needed, worth it if multiplier has largest latency.

21 Other Multiplier Topologies Shifting multiplication –Shift multiplicand several times based on multiplier bits –Add intermediate shifted values

22 Other Multiplier Topologies Pipelined multiplication –Store intermediate sums –Allows for faster clock cycle if traditional combinational multiplication presents the critical path

23 Other Multiplier Topologies Pipelined multiplication –Sequential multiplication Useful to minimize hardware waste if multiplication is an infrequent operation Continues to allow for faster clock cycle if traditional combinational multiplication presents the critical path

24 Instruction Set Architecture R-Type

25 I-Type J-Type

26 Converts assembly code to binary representation The Assembler Add $3,$1,$2 => 0000000001000100001100000000000 000000000100010 => High 0001100000000000 => Low 16-bit wide memory modules Split into high and low bits for output

27 Allows for labels to be used in loops Automatically calculates offsets based on label position LABEL: add $1,$2,$3 jmp LABEL Resolves hazards created by pipelining 1.Automatically determines the appropriate number of NO-OPS to insert based on relative position of consecutive instructions Assembler Features

28 Design allows for pseudo-instructions to be used Pseudo Instruction HLT Actual Instructions H1:JMP H1 NOP

29 Topic 2 Design – Compiler Bison - Parser A compiler compiler A grammar generator ------------------------- Flex – Lexer A Fast lexical analyzer Tool used in pattern matching on text

30 CompilingThe C Language Interface Lexer and Parser Lex will feed tokens to Bison (YACC) A grammar tree is generated

31 Source code to run-time

32 A simple program A simple C program void main ( void ) { int b ; int d; int x; int y = 3; int g; x = b + d; g = y + x; } Assembly Code Equivalent lwi 4, 0, 3 add 6, 1, 2 sw 3, 6, 0 add 6, 4, 3 sw 5, 6, 0 Memory High 00000110000000100 10000000000100010 20000000000000000 30000000000000000 40000000000000000 50000000000000000 60000000000000000 70000100011000011 80000000000000000 90000000000000000 100000000000000000 110000000010000011 120000000000000000 130000000000000000 140000000000000000 150000000000000000 160000000000000000 170000100011000101 Memory Low 00000000000000011 10011000000000000 20000000000000000 30000000000000000 40000000000000000 50000000000000000 60000000000000000 70000000000000000 80000000000000000 90000000000000000 100000000000000000 110011000000000000 120000000000000000 130000000000000000 140000000000000000 150000000000000000 160000000000000000 170000000000000000 Machine Code Instructions

33 Could Use a Little Work Currently the Processor could use a little work to improve performance. –Decreased memory latency would be largest and most direct improvement to processor. –Must optimize ALU as well as multiplier unit. –All in all, will work but not ready for commercial usage.

34 References Computer Organization and Design: The Hardware Software Interface (2 nd Ed) Patterson, David A. and Hennessy, John L. Morgan Kaufman Publishers, 1997 Introduction to Compilers http://cs.wwc.edu/~aabyan/221_2/PLBOOK/Translation.html Aaby, Anthony A., 1998 The Compiler Design Handbook Srikant, Y. N. and Shankar, Priti CRC Press, 2002

35 THE END Questions?


Download ppt "designKilla: The 32-bit pipelined processor Brought to you by: Victoria Farthing Dat Huynh Jerry Felker Tony Chen Supervisor: Young Cho."

Similar presentations


Ads by Google