• No results found

A 2N SCALING SCHEME FOR SIGNED RNS INTEGERS USING FPGA IMPLEMENTATION

N/A
N/A
Protected

Academic year: 2020

Share "A 2N SCALING SCHEME FOR SIGNED RNS INTEGERS USING FPGA IMPLEMENTATION"

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

Available Online at www.ijpret.com 183

INTERNATIONAL JOURNAL OF PURE AND

APPLIED RESEARCH IN ENGINEERING AND

TECHNOLOGY

A PATH FOR HORIZING YOUR INNOVATIVE WORK

A 2

N

SCALING SCHEME FOR SIGNED RNS INTEGERS USING FPGA

IMPLEMENTATION

INDHUMATHI S.

Assistant Professor, Dept of ECE, Apollo Engineering College, Chennai, Tamilnadu, India.

Accepted Date: 22/11/2014; Published Date: 01/12/2014

\

Abstract: We present an efficient scaling algorithm for signed integers in RNS through

introducing a correction constant in negative integers scaling procedure. Because high efficient implementation of scaling in residue number system (RNS) is one of the critical issues for the applications of RNS in digital signal processing (DSP) systems. Based on the proposed scaling algorithm, an efficient RNS 2n scaling implementation method is presented, in which Chinese reminder theorem (CRT). A redundant modulus are used to perform the base extension to obtain the least significant n bits of RNS integers and then the RNS sign detection can be achieved by the parity detection. We provide a method of computing the correction constant of the redundant channel in negative integers scaling. On synthesizing we observe the critical path of the proposed algorithm is shortened by 12 %. Therefore on scaling the area and power consumption performance is improved by about 35 %, compared to the existing cascading 2n scaling method. For future project work it is implemented in FPGA and the result is observed.

Keywords: RNS, FPGA, scaling, CRT, base extension, sign detection.

Corresponding Author: MS. S. INDHUMATHI

Access Online On:

www.ijpret.com

How to Cite This Article:

(2)

Available Online at www.ijpret.com 184 INTRODUCTION

In the future digital integrated circuits (IC) design the traditional sequential processing technique will be replaced by the large-scale parallel processing technique to meet the requirements of high-efficient data processing capability and low power consumption [1]. Residue number system (RNS) is just a parallel number representation system. In RNS an integer with large word-length is divided into several relatively small once by a specific moduli set. The addition and multiplications of RNS integers are performed concurrently and independently, and there are no carries among residue channels. Thus better performance of latency, area and power consumptions in very large scale integration (VLSI) chips will be achieved. Scaling is one of the most commonly used methods to avoid computation overflows. In two’s complementary system (TCS), truncation is often employed to accomplish 2n scaling. However, scaling in RNS is not as simple as that in TCS because of the independency of each residue channel. As consequence the high efficient scaling algorithm is one fundamental issue of RNS-based DSP systems.

II. SCALING SCHEME

We propose a parallel scaling algorithm for signed RNS integers. In the proposed algorithm, a correction constant is introduced to guarantee the correctness of computation and simplify the circuits design when the integers are negative. The scaling block is composed of three modules: scaling computation, base extension and sign detection. Based on the proposed algorithm, a 2 n parallel scaling scheme for signed RNS integers is proposed. In this scheme a redundant modulus is used to get the n least significant bits (LSBs) for base extension and the sign of RNS integers. Meanwhile, the method for updating the redundant residue digit is also presented for signed numbers scaling. Furthermore, comparisons are carried out with the existing scaling algorithms [6-10]. The results indicate the complexity of the proposed scaling algorithm grows linearly with the word-length of RNS dynamic range, and large look-up tables (LUT) are unnecessary. The area and power consumption is improved by about 35%, and the proposed algorithm is 12% faster than the results of [10] under the same clock restriction and the same pipeline stages. We can implement the RNS scaling in FPGA and observe the results for future project work. We see that area and power has been reduced.

III. RNS-DEFENITION

(3)

Available Online at www.ijpret.com 185 The integers in the range of [0, P] can be represented in this RNS uniquely, where P is the dynamic range of RNS and P=p1×p2×…×p N. let the representations of integers A, B and C in RNS be {a1,a2,…,a N}, {b1,b2,…bN}, and {c 1,c2,…cN}, respectively. According to the rules of modulo operations, if ci= (aiΔbi) mod mi, then C=‹AΔB›p, where “Δ” can be the addition, subtraction, or multiplication. The RNS integer {x1, x2…xN} can be converted into corresponding decimal integer X by the celebrated Chinese reminder theorem (CRT):

X =‹ ›P = -r x P,

Where Pi=P/pi, ai =‹ › pi , ai is the modulo multiplicative inverse which can be obtained from ‹a i×Pi› pi=1, and rx is an integer smaller than N. CRT is one of the fundamental theorems in RNS for R/B conversion, scaling, magnitude comparison, overflow detection, etc.

IV EXISTING SCALING ALGORITHMS

RNS scaling can be classified into three groups: scaling by one modulus or the product of several moduli [6, 7, 9, 11-14], the scaling factor being co-prime with the moduli of RNS [8], and the scaling by the power of two [10, 15]. The specific implementation techniques for scaling fall into two categories: Combinational logic [10, 13, 14] and LUT (or the mixture of these two techniques) [6–9, 11, 12, 15]. With respect to the fundamentals of the algorithm in scaling, there are three main types: CRT combined with MRC [6, 11], CRT [7–10, 12, 15] and core function [14].Scaling implies constant division, and the constant is what is called scaling factor. The selection of this constant is one of the most important factors that determine the circuit complexity. When the scaling factor is K, the scaling result will be

Y= = X-‹X›K/K,

Where donates the integer part of x. If X is an unsigned number, the residue of Y can be computed as follows:

yi=‹Y› p i=‹‹X-‹X›K› pi‹ › pi› pi

=‹‹xi-‹X›K› pi‹ › pi› pi

(4)

Available Online at www.ijpret.com 186 With a scaling factor K

= [6]. He used MRC

to obtain yi when 1≤

i ≥ s.The LUT-based

Implementation is optimized in [9], which enabled scaling to be achieved within two LUT access cycles when the dynamic range is small. Along with LUT, CRT and a redundant modulus are used to carry out the similar scaling operation in [7, 11, 12]. In [8], Ulman proposed a scaling algorithm, in which the scaling factor was larger than the number of the moduli set and LUTs were used to perform division operation. In this method, specific LUTs are used to correct the scaling errors. However, the implementation costs of these LUT-based schemes will increase significantly when the dynamic range of RNS is large. In [13], a scaling algorithm based on full-adder structure was proposed, and its scaling factor is the product of several moduli. In [14], Burgess introduced a new core function based scaling algorithm, in which the product of several moduli is used as the scaling factor and its magnitude is approximate. Burgess’s method is suitable for scaling operation with a large scaling factor, but the error correction circuit is complex.

V a) SCALING ALGORITHM

The definition of the signed numbers in RNS is similar to that in TCS; that is, an integer, X, in [0, P]

can be represented as a signed number, .

Thus, is positive if X < P/2 and negative if X P/2. If is negative, then - = P- X. In RNS, let {x1, x2, xN} be

The representation of, and let { , ,… }Be the

Representation of -, where, = pi-xi.

(5)

Available Online at www.ijpret.com 187 Scaling result can be rewritten as follows:

yi= «xi-‹X›K› pi‹ › pi› pi

If is negative, the absolute value of is P-X. First, we should perform the scaling on the absolute value. We get the scaling result of the absolute value:

Y’ = (│ │-‹│ │›K)/K

1 (P-X-‹P-X›K)/K

2 (P-X-‹P›K+‹X›K)/K.

Note that the scaling result is positive and should be mapped into the negative range of RNS,i.e.

Y = −Y’

= P − Y’ = ((K − 1) P + X + ‹P›K −‹X›K) K −1. (6)

Considering •›AB ›A = •›A and GCD ({K, P}) = 1,

we perform modulo operation on pi for Y in (6), and

‹‹ ‹

Obtain the scaling result of the negative integers in the representation of RNS:

yi = ‹Y ›pi = ‹‹xi − ‹X ›K + ‹P›K›pi ‹K −1 ›pi ›pi .

(7) ‹P›K, is

(6)

Available Online at www.ijpret.com 188 b) PARALLEL SCALING OF SIGNED RNS INTEGERS.

2n SCALING

If the scaling factor is K = 2n, the scaling results both for positive and negative integers are given by

yi=‹‹xi-‹X›

2n›pi‹ ›pi› pi,, ≥ 0,

yi =‹‹xi − ‹X

›2n

+ ‹P›2n›pi ‹(2n) −1›pi

›pi . <0.

In order to perform RNS scaling for signed numbers, one base extension module, which is used to obtain the n LSBs of X , and one sign detection module, which is used to determine the sign of X , are required in the proposed scheme. If the scaling factor is too large, the 2n scaling block can be cascaded to perform the scaling procedure. Even in this case, only one sign detection is required.

We now demonstrate the above technique with two examples. Let p1 = 3, p2 = 5, and p3 = 7. Then, the dynamic range is P = p1p2p3 = 3 ×5 ×7 = 105, and the

We can find that a correction constant, correction constant is P ›4 = 1. According to the

definition in RNS, is positive when signed integers ‹ 2 = 4, 0≤ X ≥53, and negative when 53≤ X<105. If K=2 then the multiplicative inverses of ‹ ›pi (i=1, 2, 3) are ‹ ›3=1, ‹ ›5=4, and‹ ›7= 2, respectively. The RNS integer {0, 0, 1} represents the positive integer =X=+15, and ‹X›k=‹15›4=3.The scaling result is { ‹(0-3)×1›3,‹(0-3)×4›5,‹(1-3)×2›7 }= {0,3,3}. Since { ‹3›3,‹3›5,‹3›7 } = {0,3,3} is =X=3.for another integer, X=88, it is represented in RNS as {1,3,4}, which is also the representation for the signed number in RNS, =-17. Since ‹X› K=‹88›4=0,

the scaling result is{‹(1-0+1)×1› 3,‹(3-0+1)×4›5,‹(4-0+1)×2›7}={2,1,3}. According to the definition of RNS signed number of {2, 1, 3} is =-4.

CONVERSION FOR THE n LSBs

(7)

Available Online at www.ijpret.com 189 magnitudes of moduli are small while the scaling factor is large, the processing latency will be pretty long with MRC. An algorithm based on CRT with a redundant modulus, pr, for base extension is proposed in [20], which is adapted in [7, 8, and 10]. This algorithm is also used in [21] to perform sign and parity detection. The redundant modulus, pr, is very small and there is no restriction on the form of moduli sets. Thus, we introduce a small redundant modulus to perform the n LSBs conversion and sign detection in scaling. We also propose an algorithm for updating the redundant residue digit and provide the correction constant for the redundant channel when the RNS integer is negative.

Figure 1 The block diagram for the N LSBs conversion

Let dn=‹X›2n,

Let pr be the redundant modulus and pr≥N, we get ‹X›pr=‹‹ ‹ xi›pi›pr-‹rxP›pr›pr‹rx›pr = ‹‹ ›pr (‹ ‹ xi›pi›pr-‹X›pr) ›pr,

Where Pi=P/pi, ‹ pi..

Let l=‹ ‹ xi›pi›2n, if pr is in the form of 2m and m<n. then the m LSBs of l can be used to compute rx:

dn =‹‹ ‹ xi›pi›2n =‹l -‹rxP›2n›2n =‹l -‹rx›2n‹P›2n›2n

= ‹l -‹‹ ›pr (lm-xr) ›pr‹P›2n›2n

Where xr=‹X›pr and lm represents m LSBs of l.

REDUNDANT CHANNEL UPDATE

In order to perform the following process in the DSP systems, we need to update the redundant channel after scaling. Let yr. be the residue value of redundant channel after unsigned number scaling. For signed numbers, let the scaling result of the redundant residue digit be yr1 when is positive and yr2 when negative, respectively.

If X is positive, we can get yr1 = yr. =‹(X − ‹X› K) K −1›pr

(8)

Available Online at www.ijpret.com 190 =‹‹(X-‹X›K)›pr+‹(-(P-‹P›K) )-P)›pr›pr

=‹yr+‹(-(P-‹P›K) K −1-P)›pr›pr.

The scaling result of redundant channel is the same as that of unsigned numbers when is positive.

Otherwise, the scaling result can be achieved by adding a constant, ‹ (-(P-‹P›K) K−1-P) ›pr, which can be pre-computed, to yr1. Since pr is required to be larger than the number of moduli set and with the form of 2m, the k most significant bits (MSBs) can be processed in the n LSBs conversion module. That is, the result of the conversion module should be n + k bits, and the k MSBs of the conversion result is yr.

SIGN DETECTION

Let parity(x) is the parity of x. That is, if parity(x) = 0, x is even; otherwise, x is odd. Let sign(x) are the sign of x. If sign(x) = 0, x is positive or zero; otherwise, x is negative. We find that if K = 2n and GCD (K, pi) = 1, pi should be odd. Correspondingly, the dynamic range, P, is also odd. When the dynamic range for RNS is odd, the overflow in RNS will violate the parity rules in arithmetic operations. For example, if the product of one odd and one even or two evens is odd, then there is overflow. Thus, we can get the sign of X by determining the parity of Z = 2X directly [5].

Sign(X) = parity (Z).

(15)

The parity of Z, parity (Z), can be obtained from [21]: parity (Z) = LSB (‹z1a1›p1) ⊕ . . . ⊕ LSB (‹znan›pn) ⊕ LSB(rz),

(16)

(9)

Available Online at www.ijpret.com 191 Figure 2 Block diagram for parallel scaling of signed RNS integers

VI SIMULATED OUTPUT OF PARRALLEL SCALING OF SIGNED RNS INTEGERS

a) RNS of an integer: The below simulated output is the residues of an largest integer using a prime moduli set. we’ll get three residues for a given number.

Figure 3 simulated output of RNS of an integer

(10)

Available Online at www.ijpret.com 192 Figure 4 simulated output of ‹‹xi-‹X› 2n›pi

The below simulated output is the output of parallel 2n scaling of signed RNS integers

Figure 5 simulated output of parallel 2n scaling of signed RNS integers

VII IMPLEMENTATION OF PARALLEL 2n SCALING OF SIGNED RNS INTEGERS IN FPGA

(11)

Available Online at www.ijpret.com 193 VIII CONCLUSION

On 2n scaling, the proposed one can achieve 35% savings in area and power consumption, and the critical path is shortened by about 12%. Figures 3, 4 and 5 are the simulated output for the 2n scaling algorithms of [10] and the proposed.

REFERENCES

1. William J. Dally S L. VLSI architecture: past, present, and future. In: Proceedings of the 20th Anniversary Conference on Advanced Research in VLSI, Atlanta, GA, USA, 1999. 232– 241

2. Ananth G, George K, Vipin K, et al. Introduction to Parallel Computing. 2nd ed. Addison Wesley, 2003

3 Liu Y, Lai E M K. Design and implementation of an RNS-based 2-D DWT processor. IEEE Trans Consum Electron, 2004, 50: 376–385

4 Lindahl A, Bengtsson L. A lowpower FIR filters using combined residue and radix2 signed -digit representation. In: Proceedings of the 2005 8th Euro micro Conference on Digital System Design (DSD’05), Porto Portugal, 2005. 42–47

5 Ma S, Hu J H, Zhang L, etal. An efficient RNS parity checker for moduli set abd its applications. Sci China Ser F-Inf Sci, 2008, 51: 1563–1571

6 Jillian G A. Residue number scaling and other operations using ROM arrays. IEEE Trans Comput, 1978, c-27: 325–336

7 Shenoy M A P, Kumaresan R. A fast and accurate RNS scaling technique for high speed signal processing. IEEE Trans Acoust Speech Signal Process, 1989, 37: 929–937

8 Ulman Z, Czyzak M, Zurada J. Effective RNS scaling algorithm with the Chinese remainder theorem decomposition. In: IEEE Pacific Rim Conf Commun Comput Signal Proce, Victoria, Canada, 1993, 2: 528–531

9 Garcia A, Lloris A. A look- up scheme for scaling in the RNS. IEEE Trans Comput, 1999, 48: 748–751

Figure

Figure 1 The block diagram for the N LSBs conversion
Figure 2 Block diagram for parallel scaling of signed RNS integers
Figure 5 simulated output of parallel 2n scaling of signed RNS integers

References

Related documents

By first analysing the image data in terms of the local image structures, such as lines or edges, and then controlling the filtering based on local information from the analysis

Key words: Ahtna Athabascans, Community Subsistence Harvest, subsistence hunting, GMU 13 moose, Alaska Board o f Game, Copper River Basin, natural resource management,

The key points that will be described and analysed further in this chapter include the background theory of RBI for tube bundles, overview of Weibull

All stationary perfect equilibria of the intertemporal game approach (as slight stochastic perturbations as in Nash (1953) tend to zero) the same division of surplus as the static

Under this cover, the No Claim Bonus will not be impacted if repair rather than replacement is opted for damage to glass, fi bre, plastic or rubber parts on account of an accident

The EXs we analyze are those associated with vulcanian and strombolian eruption styles and gas bursts at Sakurajima, Suwanosejima, and Tokachi-dake in Japan, Semeru and Lokon

The purpose of the study was to investigate perceptions of principals and teachers regarding principal leadership behaviors that contribute to implementing and leading effective