In this paper, we propose a new approach to use a residue number system (RNS) to design an arithmetic unit to parallelize execution of addition and multiplication. The chosen RNS is defined by a moduli set composed of one larger even modulus 2k and all remaining moduli of the type 2n - 1, selected to fit into the word size of a typical general-purpose processor, e.g., 32 or 64 b. The RNS operations are implemented in hardware, except for the reverse conversion, which is implemented in software, allowing not only to save hardware area but also offering the ease of run-time changing of the dynamic range, which in turn can result in reducing both power consumption and execution time. Simulation experiments were performed on synthesized seven-operation arithmetic units with varying dynamic range for three applications: constant-coefficient filtering, matrix multiplication, and large Montgomery multiplication. The results show that thanks to smaller modular multipliers, RNS arithmetic units have smaller both area and delay, and, consequently, they allow to achieve up to over 20% energy saving for a constant-coefficient filter application, up to over 28% for the matrix multiplication, and up to 27% for Montgomery multiplication, compared with executions using a positional arithmetic unit.
Number comparison has long been recognized as one of the most fundamental non-modular arithmetic operations to be executed in a non-positional Residue Number System (RNS). In this paper, a new technique for designing comparators of RNS numbers represented in an arbitrary moduli set is presented. It is based on a newly introduced modified diagonal function, whose strictly monotonic properties make it possible to replace the cumbersome operations of finding the remainder of the division by a large and awkward number with significantly simpler computations involving only a power of 2 modulus. Comparators of numbers represented in sample RNSs composed of varying numbers of moduli and offering different dynamic ranges, designed using various methods, were synthesized for the 65 nm technology. The experimental results suggest that the new circuits enjoy a delay reduction ranging from over 11% to over 75% compared to the fastest circuits designed using existing methods. Moreover, it is achieved using less hardware, the reduction of which reaches over 41%, and is accompanied by significantly reduced power-consumption, which in several cases exceeds 100%. Therefore, it seems that the presented method leads to the design of the most efficient current hardware comparators of numbers represented using a general RNS moduli set.
This paper presents the design methods of residue-to-binary (reverse) converters for the new flexible balanced five-moduli set \(\{ 2^k, 2^n-1, 2^n+1,\) \(2^{n+1}-1, 2^{n-1}-1 \}\) for the pairs of positive integers \({n \ge 4}\) (even) and any \({k>0}\), which can provide the exact required dynamic range of the residue number system. This modulus set is the generalisation of the five-moduli set \(\{ 2^n, 2^n-1, 2^n+1, 2^{n+1}-1, 2^{n-1}-1 \}\) (n even) with only a single parameter, n. The reverse converter for the new modulus set is the first ever proposed. Synthesis results obtained for the 65 nm technology for all dynamic ranges from 19 to 88 bits have shown that the state-of-the-art converters available for the five-modulus sets with a single parameter n\({\{ 2^n, 2^n-1, 2^n+1, 2^{n+1}-1, 2^{n-1}-1 \}}\) (n even) and \({\{ 2^n-1, 2^n, 2^n+1, 2^{n+1}+1, 2^{n-1}+1 \} }\) (n odd) not only introduce from 28 to 40% larger delay but also still consume more area and power than the converters proposed here.