systems
play

Systems Fast Adder Shankar Balachandran* Associate Professor, CSE - PowerPoint PPT Presentation

Spring 2015 Week 9 Module 51 Digital Circuits and Systems Fast Adder Shankar Balachandran* Associate Professor, CSE Department Indian Institute of Technology Madras *Currently a Visiting Professor at IIT Bombay Recursive Doubling Technique


  1. Spring 2015 Week 9 Module 51 Digital Circuits and Systems Fast Adder Shankar Balachandran* Associate Professor, CSE Department Indian Institute of Technology Madras *Currently a Visiting Professor at IIT Bombay

  2. Recursive Doubling Technique From previous stages if any; To find the prefix sum of 8 numbers : This input is assumed to be stable; 8 7 6 5 4 3 2 1 0 27 0 -15 6 -8 7 3 -2 1 Request Data From Next step will have : 8,7 7,6 6,5 5,4 4,3 3,2 2,1 1,0 0

  3. Step 2 8 7 6 5 4 3 2 1 0 0 12 -9 -2 -1 10 1 -1 1 Next step will have : 8,7,6,5 7,6,5,4 6,5,4,3 5,4,3,2 4,3,2,1 3,2,1,0 2,1,0 1,0 0

  4. Step 3 8 7 6 5 4 3 2 1 0 10 -10 8 0 9 2 -1 1 0 Next step will have : 8->1 7->0 6->0 5->0 4->0 3,2,1,0 2,1,0 1,0 0

  5. Step 4 0 19 -8 7 1 9 2 -1 1 Next step will have : 8->0 7->0 6->0 5->0 4->0 3,2,1,0 2,1,0 1,0 0

  6. Summary  Prefix Sum of n numbers in log n steps  Applicable for any semigroup operator like min , max , add, mul etc. that is associative Reading Assignment : Change the last stage input 0 to 5 and start from Step 1. Check if you get 24 -3 12 6 14 7 4 6

  7. To Learn  High speed Addition as a circuit

  8. n-bit Carry Ripple Addition B(n-1) A(n-1) B(2) A(2) B(1) A(1) B(0) A(0) C(n-2) C(0) FA(2) FA(n-1) FA(1) FA(0) C(n) C(3) C(2) C(1) S(n-1) S(1) S(2) S(0) Requires n steps in the worst case.

  9. There’s Something About Carry a(j) b(j) c(j) c(j+1) 0 0 0 0 0 0 1 0 If a(j) = b(j) then 0 1 0 0 c(j+1) = a(j) = b(j) 0 1 1 1 1 0 0 0 If a(j) != b(j) then 1 0 1 1 c(j+1) = c(j) 1 1 0 1 1 1 1 1

  10. Carry Look Ahead – Generate and Propagate a(j) b(j) c(j+1) Status ( x(j+1) ) 0 0 0 Kill ( k ) 0 1 c(j) Propagate ( p ) 1 0 c(j) Propagate ( p ) 1 1 1 Generate ( g )

  11. CLA – Operation (*) x(j+1) (*) k p g New (j+1)th carry status k k k g as influenced by x(j) x(j) p k p g (*) is associative g k g g y(j) = x(0) (*) x(1) (*) … x(j) x(0) = k If y(j) = k then c(j) = 0 If y(j) = g then c(j) = 1 Note that y(j) != p

  12. Carry Calculation  A prefix computation  y(0) = x(0) = k  y(1) = x(0) (*) x(1)  y(2) = x(0) (*) x(1) (*) x(2)  …….  y(n) = x(0) (*) x(1) (*) …. x(n)

  13. An 8-node Carry Look Ahead Adder

  14. Parallel Prefix circuit • Input x(1), … x(n) – for an n-bit CLA • Let x(0) = k if there is no carry in • If carry is available x(0) = g • Each x(i) is a 2-bit vector • We use the Recursive Doubling Technique described earlier

  15. Example • Add two binary numbers 1 0 1 0 1 1 0 1 0 1 1 1 0 1 Expected 1 0 1 1 0 0 1 1

  16. Example • Generate sums in parallel 1 0 1 0 1 1 0 1 0 1 1 1 0 1 Expected 1 0 1 1 0 0 1 1 Sum 0 0 0 1 0 1 1 Ignore carries for now

  17. Example • Generate carries in parallel 1 0 1 0 1 1 0 1 0 1 1 1 0 1 Expected 1 0 1 1 0 0 1 1 Sum 0 0 0 1 0 1 1 Carry 1 0 1 0 1 0 0 Generate carries in parallel

  18. Example • Add sum and carry now (ignoring any carries that are generated in this process 1 0 1 0 1 1 0 1 0 1 1 1 0 1 Expected 1 0 1 1 0 0 1 1 Sum 0 0 0 1 0 1 1 Carry 1 0 1 0 1 0 0 Wrong in this position Add 1 0 1 0 0 0 1 1

  19. Prefix Idea for Carry • Generate sum in parallel – keep aside • Generate k, p or g also in parallel • Do parallel prefix carry computation

  20. 7-Bit Carry Generation 1 0 1 0 1 1 0 Stable 1 0 1 1 1 0 1 Carry In g k g p g p p k (Decimal example in first few slides is for 8 nodes, this example is for 7 bits )

  21. 7-Bit Carry Generation Stable Carry In g k g p g p p k g k g g g p k g k g g g k k g k g g g k k

  22. Finally assign bits Stable Carry In g k g p g p p k g k g g g p k g k g g g k k g k g g g k k 1 0 1 1 1 0 0

  23. Getting back to addition • Add sum and carry now (ignoring any carries that are generated in this process) 1 0 1 0 1 1 0 1 0 1 1 1 0 1 Expected 1 0 1 1 0 0 1 1 Sum 0 0 0 1 0 1 1 Carry 1 0 1 1 1 0 0 Ignore carries now Add 1 0 1 1 0 0 1 1

  24. End of Week 9: Module 51 Thank You Fast Adders 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend