Design of Reverse Converters for the Multi
Total Page:16
File Type:pdf, Size:1020Kb
Louisiana State University LSU Digital Commons LSU Master's Theses Graduate School 2012 Design of reverse converters for the multi-moduli residue number systems with moduli of forms 2a, 2b - 1, 2c + 1 Naveen Kumar Samala Louisiana State University and Agricultural and Mechanical College Follow this and additional works at: https://digitalcommons.lsu.edu/gradschool_theses Part of the Electrical and Computer Engineering Commons Recommended Citation Samala, Naveen Kumar, "Design of reverse converters for the multi-moduli residue number systems with moduli of forms 2a, 2b - 1, 2c + 1" (2012). LSU Master's Theses. 1242. https://digitalcommons.lsu.edu/gradschool_theses/1242 This Thesis is brought to you for free and open access by the Graduate School at LSU Digital Commons. It has been accepted for inclusion in LSU Master's Theses by an authorized graduate school editor of LSU Digital Commons. For more information, please contact [email protected]. DESIGN OF REVERSE CONVERTERS FOR THE MULTI-MODULI RESIDUE NUMBER SYSTEMS WITH MODULI OF FORMS 2a, 2b – 1, 2c + 1 A Thesis Submitted to the Graduate Faculty of the Louisiana State University and Agricultural and Mechanical College in partial fulfillment of the requirements for the degree of Master of Science in Electrical Engineering in The Department of Electrical Engineering and Computer Engineering by Naveen Kumar Samala Bachelor of Engineering (Electrical and Electronics) Osmania University, 2008 May 2012 ACKNOWLEDGEMENTS First and foremost I would like to offer my sincerest gratitude to my advisor, Dr. Alexander Skavantzos, for his constant support and guidance throughout my research with his patience and knowledge. I attribute the level of my Master’s degree to his encouragement and effort and without him this thesis, too, would not have been completed or written. I am indebted to him more than he knows. I am also grateful to Dr. Suresh Rai and Dr. Ashok Srivastava for accepting my request and being a part of my thesis committee. I would like to thank Mark Hovey for providing financial assistance for the second academic year of my Masters studies at LSU. I enjoyed working with him and gained professional experience, which will be helpful to me to start my professional career at United States. I would also express my gratitude to Dr. Svetlana Oard for providing financial support during my first year of my Masters. I enhanced my skills in research, computer programming and documenting research by working with her. Finally, it gives me immense pleasure to acknowledge my parents- Vijaya Laxmi Samala and Ram Prakash Samala, my brother Girish Kumar Samala, my sister Ambica Ambati, my brother-in-law Ravinder Ambati, relatives and all my friends who have helped me in making this thesis a successful one. Special thanks to my cousins Rama Devi Goshika and Vijay Kumar Goshika. ii TABLE OF CONTENTS Acknowledgements..………….…………...……………………………………………………….ii List of Tables……...…………………………………………………………………………..…...vi List of Figures…….…...…………………………………………………………………….…...viii Abstract…......……………………………………………………………………………………..ix 1. Introduction to Residue Number Systems………………………………........…………...….…1 1.1 Introduction….………….……………………………….……………...……………….1 1.2 Basics of Residue Number System………………………….…………………………...1 1.2.1 Weighted to RNS Conversion..……..………..…………………………………….2 1.2.2 Arithmetic Operations on RNS Numbers..…..………………..……………………2 1.2.3 Dynamic Range of RNS……………….…..…………...…………………………..2 1.2.4 RNS to Weighted Conversion.………...…..…………..……………….…………..3 1.2.4.1 Chinese Remainder Theorem (CRT)……….……………………………....3 1.2.4.2 Mixed Radix Conversion (MRC)…...………………………………….…..4 1.2.4.3 New Chinese Remainder Theorem 1 (New CRT I)...………………….…..5 1.2.4.4 New Chinese Remainder Theorem 2 (New CRT II)..………………….…..6 1.3 Modular Arithmetic……………………………………………………………………..7 1.3.1 Properties of Modulo m Operator……..………………...…………………………7 1.3.2 Properties of Arithmetic Modulo Operator....………..…………………..7 1.3.3 Properties of Arithmetic Modulo Operator………………………….………..8 1.4 Adders and Subtractors…………………………………………………………………9 1.4.1 Basic Adder Unit…………………………………………………………………..9 1.4.1.1 Half Adder (HA)…………………………………………………………..9 1.4.1.2 Full Adder (FA)………………………………………………………….10 1.4.2 Carry Propagate Adder (CPA)…………………………………………………...11 1.4.2.1 CPA as Subtractor………………………………………………………..11 1.4.3 Carry Propagate Adder with End Around Carry (CPA with EAC)……………...12 1.4.4 Carry Save Adder (CSA)……………………………………………….………..13 1.4.5 Carry Save Adder with End Around Carry (CSA with EAC)…………………...13 1.4.6 Multi-operand Modulo ( ) Addition (MOMA)……………………….…...14 2. Design of Reverse Converters for Four Moduli Sets………………………………..………....17 2.1 Four Moduli Sets……………………………………………………………………….17 2.1.1 Reverse Converter Designs for { }…………...17 2.1.1.1 Reverse Converter Design for Using New CRT II……………………18 2.1.1.2 Reverse Converter Design for Using CRT and MRC…………………26 2.1.1.3 Reverse Converter Design for Using New CRT I and MRC……….....35 2.1.2 Reverse Converter Designs for { }………...35 2.1.2.1 Reverse Converter Design for Using New CRT II………...….………35 2.1.2.2 Reverse Converter Design for Using CRT and MRC……...…………42 iii 2.1.3 Reverse Converter Designs for { }…………...51 2.1.3.1 Reverse Converter Design for Using New CRT II………………...…51 2.1.3.2 Reverse Converter Design for Using CRT and MRC………………..56 3. Design of Reverse Converters for Five Moduli Sets…………………………………………...65 3.1 Five Moduli Sets………………………………………………………………………65 3.1.1 Reverse Converter Design for { }………………………...…..66 3.1.1.1 Reverse Converter Design for Using New CRT I and MRC….……....67 3.1.2 Reverse Converter Design for { }.73 3.1.2.1 Reverse Converter Design for Using New CRT I and MRC……….…76 3.1.3 Reverse Converter Design for { }...80 3.1.3.1 Reverse Converter Design for Using New CRT I and MRC (Method 1)…………………………………………………….83 3.1.3.2 Reverse Converter Design for Using New CRT I and MRC (Method 2)…………………………………………………….88 3.1.4 Reverse Converter Design for { }………………………………...96 3.1.4.1 Reverse Converter Design for Using New CRT I and MRC (Method 1)…………………………………………………….99 3.1.4.2 Reverse Converter Design for Using New CRT I and MRC (Method 2)…………………………………………………...103 3.1.5 Reverse Converter Design for { }…110 3.1.5.1 Reverse Converter Design for Using New CRT I…………………...110 3.1.6 Reverse Converter Design for { }...116 3.1.6.1 Reverse Converter Design for Using New CRT I…………………...119 4. Evaluation and Comparison……………………………………………………………….….124 4.1 Area and Delay Comparisons for Four Moduli Set Reverse Converters……………124 4.2 Area and Delay Comparisons for Five Moduli Set Reverse Converters….…………125 4.3 Choice of Reverse Converters………………………………………….……………125 5. Conclusion and Future Work………………………………………………………………....127 References…….…………………………………………………………………………….…...128 Appendix A: Multiplicative Inverse Modulo Calculation………………………..…….…..…....130 A.1 Extended Euclidean Algorithm…….......……...…………….……………………...….130 A.2 Code in C to Calculate Multiplicative Inverse:....………….………………………..…131 Appendix B: Proofs for the Sets to be Pairwise Relatively Prime………….…………….……..134 B.1 The Set { } where Is Pairwise Relatively Prime..…….......…………………………………...………...…134 B.2 The Set { } where Is Pairwise Relatively Prime……………………………………………………………...136 iv B.3 The Set { } where Is Pairwise Relatively Prime……………………………………...………………………………..137 B.4 The Set { } where Is Pairwise Relatively Prime………………………………………………………...……………..138 B.5 The Set { } where Is Pairwise Relatively Prime………………………………………………………………………138 B.6 The Set { } where Is Pairwise Relatively Prime………………………………….………………………………..….140 Vita…………………………………………………………………….………………………...141 v LIST OF TABLES Table Page Table 1.1 The Minimum Number of Levels l on a CSA tree that processes N input operands [17]…………...................………………………………………………………...15 Table 2.1 Hardware and Delay Specification of Reverse Converter for the moduli set using New CRT-II……………………………………………………......………….......28 Table 2.2 Area and Delay Specification of Reverse Converter for the moduli set using CRT and MRC……………………………………………………………………...…..33 Table 2.3 Area and Delay of Reverse Converter for the moduli set using New CRT I and MRC [19]…...……………………………………………………………………….…..35 Table 2.4 Area and Delay Specification of Reverse Converter for the moduli set using New CRT II…….……………………………………………………........………….....44 Table 2.5 Area and Delay Specification of Reverse Converter for the moduli set using CRT and MRC…………………………………………………………….………..…..49 Table 2.6 Area and Delay Specification of Reverse Converter for the moduli set using New CRT I…………………………………………………………..….…………..…..57 Table 2.7 Area and Delay Specification of Reverse Converter for the moduli set using CRT and MRC...………………………………………………………..…………..…..64 Table 3.1 Area and Delay Specification of Reverse Converter for the moduli set using New CRT I and MRC………………………………………………..…………..……..74 Table 3.2 Area and Delay Specification of Reverse Converter for the moduli set using New CRT I and MRC……………………………………………….…….……..……..81 Table 3.3 Area and Delay Specification of Reverse Converter for the moduli set using New CRT I and MRC (Method 1)……………….………………….…….……..……..89 Table 3.4 Area and Delay Specification of Reverse Converter for the moduli set using New CRT I and MRC (Method 2)……………….………………….…….……..……..97 Table 3.5 Area and Delay Specification of Reverse Converter for the moduli set using New CRT I and MRC (Method 1)……………….………………….….…...…..…….104 vi Table 3.6 Area and Delay Specification of Reverse Converter for the moduli set using New CRT I and MRC (Method 2)……………….………………….….…...…..…….111