Modulo-( 2 π + 3 ) Parallel Prefix Addition via Diminished-3 Representation of Residues Authors: Ghassem Jaberipur, Sahar Moradi Cherati Arith 26 Kindly presented by: Paulo SΓ©rgio Alves Martins
Contents 2/22
3/22 I NTRODUCTION ο Popular Ο = 2 π β 1,2 π , 2 π + 1 ο΄ Residue number systems (RNS) ο΄ β = {π 1 , π 2 β¦ π π } , π π (1 β€ π β€ π) ο General form: π ο΄ π = π=1 π π 2 π Β± Ξ΄ 1 β€ Ξ΄ < 2 πβ1 ο΄ Applications ο§ Cryptography ο§ digital signal/image processing Parallel prefix modulo- ( 2 π β Ξ΄ ) adders: Delay ο§ High Speed ο΄ RNS Features 3 + 2 log π Ξ ο Ξ΄ = 1 ο§ Low Power ο Ξ΄ = 3 [ Jaberipur,2015 ] 4 + 2 log π Ξ ο Ξ΄ = 2 π + 1 [ Langroudi,2015 ] 5 + 2 log π Ξ π, π β β π = π¦ 1 , π¦ 2 β¦ , π¦ π , π = (π§ 1 , π§ 2 β¦ , π§ π ) , ο 2 π + Ξ΄ = 2 π+1 β Ξ΄β² where π¦ π = π π π , π§ π = π π π , where 1 < Ξ΄ β² = 2 π β Ξ΄ < 2 π π = π β π , π¨ π = π¦ π β π§ π , where ββ {+, β,Γ} No direct fast solution
D IMINISHED -1 ADDERS 4/22 Diminished-1 encoding Diminished-1 addition π = π΅ + πΆ 2 π +1 = π β² + π¨ π , π΅ = π΅ β² + π¨ π΅ , πΆ = πΆ β² + π¨ πΆ π : A modulo- (2 π + 1) residue β 0,2 π π β² = π β 1 , π΅ β² = π΅ β 1 , πΆ β² = πΆ β 1 for π, π΅, πΆ > 0 π = π β² + π¨ π , where π β² = π β 1 β 0,2 π β 1 for π > 0 π¨ π , π¨ π΅ , π¨ πΆ : zero-indicator bits π¨ π = 0(1) , if and only if π = 0(> 0) π΅ β² + πΆ β² = 2 π π₯ π β² + π β² = π₯ πβ1 π¨ π = (π¨ π΅ β¨ π¨ πΆ ) β§ π¨ π΅ π¨ πΆ β§ π π β² , where β² β² β¦ π₯ 0 π β² = π΅ β² + πΆ β² + π¨ π΅ + π¨ πΆ β π¨ π 2 π +1 π β² = π β 1 = π΅ + πΆ 2 π +1 β 1 π β² + π¨ π΅ π¨ πΆ π₯ π = β² 2 π = π΅ β² + 1 + πΆ β² + 1 β 1 2 π +1 = 2 π π₯ π β² + π β² + 1 2 π +1 β² = π» πβ1:0 π₯ π π β² + 1 β π₯ π π β² + π₯ β²π = 2 π +1 = β² π = π πβ1:0 π» πβ1:0 = 1 , Iff π΅ β² + πΆ β² = 2 π β 1
Related Work: Modulo-( π π + π ) D1 adder 5/22 RPP TPP
D IMINISHED -3 REPRESENTATION AND ADDITION
7/22 D IMINISHED -3 REPRESENTATION {0, 1, 2} π: Moduloβ 2 π + 3 residue β [0, 2 π + 2] [3, 2 π + 2] π β { 0, 1, 2} -indicator π π = π’ 1 π’ 0 π D3 π = πβ² + π Representation π π β² β [0, 2 π β 1] π β² βΆ π bit π = 0 βΊ π = 0, π β² = 0 π π = 1 βΊ π = 1, π β² = 0 π π = 2 βΊ π = 2, π β² = 0 π π = 3 βΊ 3 β€ π β€ 2 π + 2, π β² β [0,2 π β 1] π
Modulo-( π π + π ) D3 ADDITION 8/22 π΅ β [0, 2 π + 2] π΅ = π΅ β² + π β¦ π΅β² = π πβπ π π π π π π π΅ πΆ β² = β¦ π πβπ π π π π π π πΆ β [0, 2 π + 2] πΆ = πΆ β² + π πΆ β² β¦ β² β² β² β² π₯ π π₯ πβπ π₯ 2 π₯ 1 π₯ 0 π΅, πΆ, π β₯ 3 π β² = π β 3 = π΅ + πΆ 2 π +3 β 3 = π΅ β² + 3 + πΆ β² + 3 β 3 2 π +3 = 2 π π₯ π β² + π β² + 3 2 π +3 π β² + 3 1 β π₯ π π β² + 3π₯ β²π = 2 π +3 = β²
Comparison D1 and D3 9/22 π + π πππ π π π + π πππ π π
Detect Special Cases 10/22 π» = π© + πͺ π π +π β {π ,1,2} π¬π IF π΅ β² + πΆ β² = 2 π β 1 THEN ΞΎ 1 = 1 ELSE ΞΎ 1 = 0 π» = π© + πͺ π π +π = π IF π΅ β² + πΆ β² = 2 π β 2 THEN ΞΎ 2 = 1 ELSE ΞΎ 2 = 0 IF π΅ β² + πΆ β² = 2 π β 1 THEN ΞΎ = 1 ELSE ΞΎ = 0 IF π΅ β² + πΆ β² = 2 π β 3 THEN ΞΎ 3 = 1 ELSE ΞΎ 3 = 0 ΞΎ 1 = π πβ1:2 π» πβ1:2 β 1 π£ 0 ΞΎ 2 = π πβ1:2 π» πβ1:2 β 1 π£ 0 ΞΎ 3 = π πβ1:2 π» πβ1:2 π£ 1 π£ 0
D ERIVATION OF π 11/22 π π§ = π πβ1:2 π» πβ1:2 , ΞΎ 1 = π§β 1 π£ 0 , ΞΎ 2 = π§β 1 π£ 0 , ΞΎ 3 = π§π£ 1 π£ 0 ο΄ Ο 1 = Ξ± 1 Ξ² 1 β¨ Ξ± 0 Ξ² 0 π§ β¨ π 1 (Ξ± 1 , Ξ² 1 , Ξ± 0 , Ξ² 0 , π£ 1 , π€ 1 , π£ 0 ) ο΄ Ο 0 = Ξ± 1 Ξ² 0 β¨ Ξ± 0 Ξ² 1 π§ β¨ π 0 Ξ± 1 , Ξ² 1 , Ξ± 0 , Ξ² 0 , π£ 1 , π€ 1 , π£ 0
Impact of ΞΎ -dependent noise terms on πΌ π» 12/22 πΌ π© πΌ πͺ π π π π π π πΌ π» π» Justification π = π΅ + πΆ = π΅ β€ 2 π + 2 β₯ 3 3 0 X X X 3 π π = 3 πΌ π© πΌ πͺ π π π π π π πΌ π» π» Justification π΅ β² + πΆ β² = π΅ β² < 2 π β 1 βΉ π = π΅ + πΆ = π΅ β² + 3 + 1 < 2 π + 3 β₯ 4 3 1 0 X X 3 π΅ β² + πΆ β² = 2 π β 1 βΉ π΅ + πΆ = 2 π + 3, π = π΅ + πΆ 2 π +3 = 0 3 1 1 X X 0 0 π π = 3 π 1 πΌ π© πΌ πͺ π π π π π π πΌ π» π» Justification π΅ β² + πΆ β² = π΅ β² < 2 π β 2 βΉ π = π΅ + πΆ = π΅ β² + 3 + 2 < 2 π + 3 β₯ 5 3 2 0 0 X 3 π΅ β² + πΆ β² = 2 π β 2 βΉ π΅ + πΆ = 2 π + 3, π = π΅ + πΆ 2 π +3 = 0 3 2 0 1 X 0 0 π΅ β² + πΆ β² = 2 π β 1 βΉ π΅ + πΆ = 2 π + 4, π = π΅ + πΆ 2 π +3 = 1 3 2 1 0 X 1 1 π π = π 1 + 3 π 1 π 2 πΌ π© πΌ πͺ π π π π π π πΌ π» π» Justification π΅ β² + πΆ β² < 2 π β 3 βΉ π = π΅ + πΆ = π΅ β² + πΆβ² + 6 < 2 π + 3 β₯ 6 3 3 0 0 0 3 2 π β€ π΅ β² + πΆ β² β€ 2 π + 2 π β 2 βΉ 3 β€ π = π΅ + πΆ 2 π +3 β€ 2 π + 1 3 3 0 0 0 3 β₯ 3 π΅ β² + πΆ β² = 2 π β 3 βΉ π΅ + πΆ = 2 π + 3, π = π΅ + πΆ 2 π +3 = 0 3 3 0 0 1 0 0 π΅ β² + πΆ β² = 2 π β 2 βΉ π΅ + πΆ = 2 π + 4, π = π΅ + πΆ 2 π +3 = 1 3 3 0 1 0 1 1 π΅ β² + πΆ β² = 2 π β 1 βΉ π΅ + πΆ = 2 π + 5, π = π΅ + πΆ 2 π +3 = 2 3 3 1 0 0 2 2 π π = 2 π 1 + π 2 + 3 π 1 π 2 π 3
13/22 D ERIVATION OF πβ² π β² = π΅ β² + π π΅ + πΆ β² + π πΆ β π π 2 π +3 = π΅ β² + πΆ β² + π π΅ + π πΆ β π π 2 π +3 β² + π β² + πβ² 2 π +3 , π β² = π β 3π₯ π π β² + π 2 π +3 = π β² + π β 3π₯ π = 2 π π₯ π β² 2 π +3 = β² πΌ πͺ 0 1 2 3 πΌ π© 0 0 0 0 0 0 0 0 3 π 1 + 1 1 0 0 1 2 π 1 + 3 π 2 + 2 2 0 3 π 1 + 1 2 π 1 + 3 π 2 + 2 π 1 + 2 π 2 + 3 π 3 + 3 3 T HE NOISE TERM π = π π΅ + π πΆ β π π IN TERMS OF π π΅ , π πΆ , AND ΞΎ BITS
14/22 C OMPOUND RPP REALIZATION OF π»β² β² Ξ΄ 0 β² β {0,1,2} Ξ΄ β² = Ξ΄ 1 β² + πβ² πΏ β² + ππ π π»β² = π π β² = ΞΎ 1 Ξ± 1 Ξ² 1 Ξ± 0 β¨Ξ² 0 β¨ ΞΎ 1 β² , Ξ΄ 1 ΞΎ 2 π¨π₯ π β² = ΞΎ 1 π¦ β¨ ΞΎ 2 π¨ β¨ Ξ± 0 Ξ² 0 Ξ± 1 β¨Ξ² 1 β¨ Ξ± 1 Ξ² 1 Ξ± 0 β¨ Ξ² 0 Ξ΄ 0 π¨ = Ξ± 1 Ξ² 1 Ξ± 0 Ξ² 0
15/22 The required RPP circuitry π 7 π 7 π 6 π 6 π 2 π 2 π 1 π 1 π 0 π 0 π 5 π 5 π 4 π 4 π 3 π 3 ( g , p ) ( g , p ) ( g , p ) ( g , p ) ( g , p ) π£ π π€ π l l r r l l r r i i HA HA HA HA HA HA HA HA pgh π£ 7 π€ 7 π£ 6 π€ 6 π£ 5 π€ 5 π£ 4 π€ 4 π£ 3 π€ 3 π£ 2 π€ 2 π£ 1 π€ 1 π£ 0 π€ 8 ο ο h ( g , p ) ( g p g , p p ) ( g p g ) ( g , p ) π 1 , π 1 i i i l l r l r l l r i i pgh pgh pgh pgh pgh pgh pgh πΈ π : π πΈ π : π (4 Ξ ) π 12 π 02 (3 Ξ ) (6 Ξ ) π 03 πΈ π : π πΈ π : π π 13 (4 Ξ ) π + π πππ π π π 01 (4 Ξ ) π£ 0 (4 Ξ ) π§ π 11 (5 Ξ ) Ξ± 1 Ξ² 1 Ξ± 1 Ξ² 0 Ξ± 0 Ξ² 1 Ξ± 0 Ξ² 0 π― π : π π― π : π (3 Ξ ) π¦ (π π : π , π π : π ) π― π : π πΈ π : π π§ (4 Ξ ) π 2 π 6 π 5 π 4 π 3 π 7 π 1 π 0 π 0 (7 Ξ ) π 1 (7 Ξ ) Ο 1 Ο 0 β² β² β² β² β² β² β² β² π‘ 1 π‘ 0 π‘ 7 π‘ 4 π‘ 2 π‘ 6 π‘ 5 π‘ 3
16/22 Carry Bits for RPP Architecture β² β¨ π 1 β² β¨ π 1 β² π» πβ1:2 = π» πβ1:2 β¨ π πβ1:2 π 1 β² π» πβ1:π π π = π» πβ1:2 β¨ π πβ1:2 π 2 = π» πβ1:2 β¨ π πβ1:2 π 1 β² β¨ π 1 β² β π» 7:2 , 1 β² π» 7:2 , π 1 β² , π 1 π 2 = π 1 β² β¨ π 1 β² β π» 7:3 , 1 β² π» 7:3 , π 2 , π 2 β π 1 β² , π 1 π 3 = π 2 β¨ π 2 π 1 β² β¨ π 1 β² π» 7:4 , (π», π) 3:2 β (π 1 β² , π 1 β² ) β π» 7:4 , 1 π 4 = π» 3:2 β¨ π 3:2 π 1 β² β¨ π 1 β² π» 7:5 , π», π 4:2 β (π 1 β² , π 1 β² ) β π» 7:5 , 1 π 5 = π» 4:2 β¨ π 4:2 π 1 β² β¨ π 1 β² π» 7:6 , π», π 5:2 β (π 1 β² , π 1 β² ) β π» 7:6 , 1 π 6 = π» 5:2 β¨ π 5:2 π 1 β² β¨ π 1 β² π 7 , π», π 6:2 β (π 1 β² , π 1 β² ) β π 7 , 1 π 7 = π» 6:2 β¨ π 6:2 π 1
Recommend
More recommend