You are on page 1of 6

Digital Arithmetic Using Analog Arrays

Saeid Sadeghi-Emamchaie, G.A. Jullien, V. Dimitrov and W.C. Miller


VLSI Research Group, University of Windsor, Ontario, Canada N9B 3P4

Abstract 2. Cellular Neural Networks


This paper describes techniques for using locally con- Our definition of CNNs is based on the most general
nected analog Cellular Neural Networks (CNNs) to imple- case presented in [5]. Here we recall only the main results
ment digital arithmetic arrays; the arithmetic is
related to our application. The cell located at ( i, j ) in a
implemented using a recently disclosed Double-Base Num-
ber System (DBNS). The CNN arrays are targeted for low M × N array is denoted by C ij and its r -neighborhood N ij
power low-noise DSP applications where lower slew rate is defined by:
during transitions is a potential advantage. Specifically, N ij = C kl max { k – i , l – j } ≤ r; 1 ≤ k ≤ M , 1 ≤ l ≤ N (1)
we demonstrate that a CNN array, using a simple nonlin-
ear feedback template, with hysteresis, can perform arbi- where r is a positive integer. The state of the cell C ij at
trary length arithmetic with good performance in terms of time t is denoted by x ij ( t ) (with initial condition
stability and robustness. The principles presented in this
paper can also be used to implement arithmetic in other x ij ( 0 ) ≤ 1 ) and the output by y ij ( t ) . The state equation of a
number systems such as the binary number system. cell C ij ( 1 ≤ i ≤ M , 1 ≤ j ≤ N ) is shown in eqn. (2), where,
for convenience and without loss of generality, we assume
1. Introduction that R = C = 1 :

ẋ ij ( t ) = –x ij ( t ) +∑ A i, j, k, l ( x k, l ( t ), y k, l ( t ) ) (2)
A Cellular Neural Network (CNN) is a large scale
C kl ∈ N ij
array of locally connected non-linear analog cells [1]-[2].
Since their initial disclosure in 1988, numerous applica- The { A i, j, k, l } are nonlinear functions of the state
tions of CNNs have been proposed. In this paper we use x i + k, j + l and output y i + k, j + l voltages of the cells in N ij ,
CNNs to implement large arithmetic arrays where continu-
including the cell itself.
ous speed/power trade-offs and lower slew rates (lower
The output equation is given by eqn. (3):
noise) are advantageous. Due to their local connectivity
the VLSI implementation of such networks is quite prom- 1
y ij ( t ) = f ( x ij ( t ) ) = --- ( x ij ( t ) + 1 – x ij ( t ) – 1 ) (3)
ising [3]-[4]. 2
CNNs are introduced in section 2. In section 3 we Note that y ij ( t ) ≤ 1 for all t ≥ 0 . The functions { A i, j, k, l }
first briefly introduce DBNS addition and explain the con-
are assumed to be space invariant, so that
ditions required to guarantee carry-free addition by the
A i, j, k, l = A k – i, l – j . For a r -neighborhood, the values of
application of two simple reduction rules. In section 4 we
propose methods for designing CNN arrays to implement A k – i, l – j are usually shown as a ( 2r + 1 ) × ( 2r + 1 ) matrix
DBNS addition. We describe the sets of simple conditions known as feedback template, A. (we are using a modified
that must be met in order to force transition of the state definition for the feedback template).
voltage of the cells by switching sourcing or sinking cur-
rents in the cell. These conditions ensure stability and syn- The input signal is loaded as the initial state voltages of the
chronous transitions of the output voltages of the cells cells x ij ( 0 ) and after transient time the result (output sig-
during the application of reduction rules and also prevent
participation of a cell in more than one reduction at the nal) is available from the output state variables y ij ( ∞ ).
same time. In section 5 we discuss implementation proce-
dures and present basic CMOS circuits of the DBNS cell. 3. Double-Based Number System (DBNS)
In section 6 we provide an illustrative example of DBNS
reduction to guarantee carry-free addition.
The double base number representation has the form
of eqn. (4), where the digits d i, j ∈ ( 0, 1 ) .
j j+1 j j+1
2 2 2 2
∑ d i, j 2 3
i j
x = (4)
i, j

Clearly the binary number system is a special case of the i i


3 3
above representation. The DBNS has an unusually simple
i+1 i+1
2-D geometric interpretation, suitable for implementation 3 3
via CNNs. Representation of numbers using the minimal
number of ones is called canonic or minimal form. Corre-
sponding to a DBNS number, an image or map can be con- Fig. 2 Reduction Rule 1
sidered. Fig. 1 represents two numbers, 79 and 110, in
DBNS image or map form. The cells with d i, j = 1 are Reduction rule 2:
black; these are known as active cells. In cases that the position (i + 1, j) is occupied, we
apply rule 2 (see eqn. (8) and Fig. 3).
i j i j+1 i+1 j i+1 j+1
1 2 4 8 1 2 4 8 32 +32 +3 2 = 3 2 (8)
1 1
j j+1 j j+1
2 2 2 2
3 3
9 9
i i
27 27 3 3
i+1 i+1
79 110 3 3
Fig. 1 Number representation in the DBNS map

3.1 Addition and multiplication Fig. 3 Reduction rule 2.

It is clear that the multiplication process simply cor-


Let Ix (i,j) and Iy(i,j) be the DBNS -maps of the inte- responds to 2D shifts and DBNS additions, in an equiva-
gers x and y, represented in the canonic form. The image lent way to that performed using binary arithmetic. The
Iz(i,j) of the DBNS -map of the number z = x + y can be promise here, however, is that the number of operations is
obtained by the following two steps: considerably reduced based on the sparseness of the repre-
I z ( i, j + 1 ) = I x ( i, j ) ∧ I y ( i, j ) sentation. Obviously as a result of the application of rules
(5) 1 and 2, to a number I z , new adjacent active cells in a row
I z ( i, j ) = I x ( ( i, j ) ⊕ I y ( i, j ) )
might be created (corresponding to ‘carry propagation’ in
where ∧ and ⊕ represent the logic OR and XOR func- binary addition), which requires these two rules to be
tions respectively. Note, in the canonic presentation: applied successively until there are no adjacent active cells
if I x ( i, j ) = 1 then I x ( i, j + 1 ) = 0 (6) in a row. In [7] it is shown that in worst case after
n
---------- ≈ 0.630925n time, the resulting map will have no adja-
and therefore carry-free addition can be accomplished. The lg 2 3
resulting image, Iz, however is not in canonic form and can cent active cells.
not be used in carry-free addition since it might have adja-
cent active cells in a row (violation of the condition
defined in eqn. (6)). To satisfy this condition the following
4. DBNS arithmetic using CNNs
two reduction rules should be applied to Iz [7].
The addition defined in eqn. (5) can be easily imple-
Reduction rule 1: mented using a CNN to perform simple local Boolean
Using the simple identity: operations. The application of the reduction rules is some-
i j i j+1 i+1 j
what more complicated, and so we concentrate on their
32 +32 = 3 2 (7) implementation in the remainder of the paper. We consider
the two adjacent active cells at position (i, j) and a N × M CNN corresponding to the N × M image I z
(i, j + 1) can be replaced by a cell at (i + 1, j) (see Fig. 2). resulting from completion of step a and b. We set the ini-
tial values of the state voltages of the cells of our CNN to one set of two sets of conditions A C and A G (correspond-
the values of the corresponding cells in I z (‘-1’ and ‘1’ ing to the positions C in reduction rule 1 and G in reduc-
corresponding to ‘0’ and ‘1’ in I z ). tion rule 2) must be met. Each of these sets of conditions
For convenience we refer to the cells (positions) consists of two groups of conditions.
involved in reduction rule ‘1’ with A,B and C (Fig. 4 a) Group 1 conditions
and the cells (positions) participating in reduction rule 2 Considering a cell at an

...
with D,E,F and G (Fig. 4 b). j
arbitrary position (i, j)
i with three of its neighbors
...

...
... ... at positions (i, j – 1) ,
A B D E (i + 1, j – 1) and (i + 1, j) in
.. ... ... ... our CNN (Fig. 6)
δ C ϕ λ F G

...
We define the following
functions:
...
...

Fig. 6 Cell at position (i, j)


a) b) and its three neighbors
Fig. 4 Reduction rule 1 a) and reduction rule 2 b)

The state voltage of the cells at positions δ , ϕ and λ H i, j ;w = f ( y i, j – y i, j – 1 ) (9)


as we will see later, will be used to define conditions
H i, j ;sw = f ( y i, j – y i + 1, j – 1 ) (10)
required for the proper applications of rules ‘1’ and ‘2’.
During the application of these two rules the output H i, j ;s = f ( y i, j + y i + 1, j ) (11)
voltage of the cells with initial value of ‘1’ (A,B,D,E and
F) continuously fall from ‘+1’ to ‘-1’ and at the same time
the output voltage of the cells with initial value of ‘-1’ (C The function f ( u )
f (u)
and G) rise from ‘-1’ to ‘+1’. represents has the hys-
teresis characteristic 1
Circuit diagram of a cell:
shown in Fig. 7.
Fig. 5 shows the simplified circuit diagram of a cell
C i, j :
Referring to Fig. 4
x ij I snk y ij a), for the application of u
R reduction rule 1, the fol-
I src lowing conditions are 0.1 0.3
C I sf necessary: Fig. 7 Hysteresis charac-
A A, A B, A D , A E , A F teristic of f ( u )
AC , AG

Fig. 5 Simplified Circuit Diagram of a cell


H B, w = f ( y B – y A ) = 1 (12)
I sf = k x ij is the self-feedback current. To have
H A, s = f ( y A + y C ) = 1 (13)
binary outputs ( ± 1 ), k > 1 [1]. During transitions, we set k
to a larger value than its value at the saturation voltages Referring to Fig. 4 b), for application of reduction
( ± 1 ); this allows fast transitions [9]. The current sources rule 2 the following conditions are necessary:
I snk = – k ( 1 + x ij ) and I src = k ( 1 – x ij ) are used to force H E, w = f ( y E – y D ) = 1 (14)
the state voltage of the cell to change; normally these two H E, sw = f ( y E – y F ) = 1 (15)
current sources are switched off. For I snk to be switched
H E, s = f ( y E + y G ) = 1 (16)
on, at least oneof five sets of conditions
A A, , A B ,, A D ,, A E , and A F , (corresponding to the positions These hysteresis functions provide a simple tools to
locate the patterns of cells which have necessary condi-
A and B in reduction rule 1 and D, E, and F in reduction
tions to participate in reductions, to ensure stability of the
rule 2) must be satisfied. For I src to be switched on, at least
cell during switching of I snk , I src and also to guarantee
synchronous transitions of the state voltages of the cells Case 3c
during the application of reduction rules 1 and 2. An active cell can par- j

...
Group 2 conditions ticipate at position A (Fig.
4 a)) in reduction rule 1 and i
Considering the map of a DBNS number, each square
position E (Fig. 4 b)) in
(cell) has a specific value, and participation of any active ... ...
reduction rule 2 at the same
cell in more than one reduction at the same time leads to
time. (see Fig. 12).
incorrect results. Therefore in cases where two or more
reduction patterns have a cell in common, only one of

...
them is allowed. This requirement is forced using group 2
conditions. Participation of an active cell in more than one Fig. 12 Case 3c
reduction can occur in the following cases:
Case 1 As we see, choosing one reduction set over the other
The active cell at leads to different but equivalent representations of the
j
DBNS number (nonuniqueness property of the DBNS [7]).
...
position ( i, j ) can partici-
pate in two applications of However, in a CNN implementation of these five cases, we
i
reduction rule 1, in the left must select the appropriate design in terms of complexity
and speed of operation. In our design, minimum hardware
set shown by the broken ... ...
line or in the right set complexity and higher speed are achieved by selecting the
shown by the solid line. set shown by the solid line in each case using the group 2
conditions. By checking the output voltage of the cells at
Case 2 positions δ , ϕ and λ (Fig. 4 a) and b)) and comparing
...

Fig. 8 Case 1 them with threshold values we select the sets shown by the
The active cell at j solid lines over the sets shown by the broken lines (see Fig.
...

position ( i, j ) can partici- 8-12). The group 2 conditions comprise the following:
pate in two applications of
y ϕ ≥ 0.9, y δ ≥ 0.9, y λ < 0.7 (17)
reduction rule 2, in the
upper set shown by the i ... ... Now we define conditions required for switching Isnk
broken line or in the lower (Isrc) on. The following five sets ( A A , A B , A D , A E , A F )
set shown by the solid line.
of conditions are required to be satisfied for Isnk to be
...

Case 3a switched on. Each of these sets of conditions corresponds


Fig. 9 Case 2 to the position of one of the cells ( A , B , D , E , or F ) with
An active cell can j falling state voltage during the application of rule 1 or 2
participate at position B
...

(see Fig. 4 a) and b)).


(Fig. 4 a)) in reduction
rule 1 and position F (Fig. Reduction rule 1
4 b)) in reduction rule 2 at i ... ... H i, j + 1 ;w = H i, j ;s = 1
the same time. (see Fig.
A A: & (18)
10)
y i + 1, j + 1 ≥ 0.9
...

Case 3b
Fig. 10 Case 3a H i, j ;w = H i, j – 1 ;s = 1
An active cell can j AB : & (19)
...

participate at position B y i + 1, j – 2 ≥ 0.9


(Fig. 4 a)) in reduction i
rule 1 and position D (Fig. Reduction rule 2
4 b)) in reduction rule 2 at ... ...
H i, j + 1 ;w = H i, j + 1 ;sw = H i, j + 1 ;s = 1
the same time. (see Fig.
11) AD : & (20)
y i + 1, j – 1 < – 0.7
...

Fig. 11 Case 3b
H i, j ;w = H i, j ;sw = H i, j ;s = 1
AE : & (21) VDD
y i + 1, j – 2 < – 0.7
Vb2
M5
M8
A F : H i – 1, j + 1 ;w = H i – 1, j + 1 ;sw = H i – 1, j + 1 ;s = 1 (22) Vb1

and a set of conditions required for Isrc to be switched on: M1 M2


M7
M6
Vr
Reduction Rule 1
M9 M3 M4
H i – 1, j + 1 ;w = H i – 1, j ;s = 1
AC : & (23) Vb3
Vr

y i, j + 1 ≥ 0.9
M1 2 M13
Reduction Rule 2
_ _ __
M10 M11
Vs r c Vsr c
H i – 1, j ;w = H i – 1, j ;sw = H i – 1, j ;s = 1
AG : & (24)
y i, j – 2 < – 0.7 VDD

M15
As we see, the dynamic of a cell is determined by its inter-
action with the other cells in the 5 × 5 neighborhood. M1 4 M1 6
Vb4

5. Implementing the cell


M1 7 M19 _ __ _
Vs nk Vs nk

I snk and I src have values – k × ( 1 + x ij ) and M18 Vb5

k × ( 1 – x ij ) respectively. These can be decomposed into


two parts: – k – k x ij and k – k x ij . The first part is a con- Fig. 14 CMOS circuit of a cell
stant current source and the second part is the negative of As soon as the state voltage passes the output saturat-
the self-feedback current. Since at most one of the two ing voltages ( ± 1 ), M8 or M9 turns on and forces the state
sourcing or sinking currents are active, the circuit diagram
voltage to be close to the output voltage. I src ( I snk ) is pro-
of any given cell in our CNN during the activity of I snk or
vided by the sub-circuit consisting of M14, M15 and M16
I src can be simplified as shown in Fig. 13.
(M17, M18 and M19) which is controlled by V src ( V snk ).
Fig. 14 shows the CMOS circuit used for SPICE sim- The self-feedback current source is applied to the state
ulations of the basic adder cell. A differential pair consist- capacitor through M13 and M14. As soon as the conditions
ing of transistors M1-M4 is used to realize the nonlinear of one of the elements of the feedback template are met
output characteristic (eqn. (3)). The cell resistor is built
V src = 1 ( V snk = 1 ), the self-feedback path is opened by
with an NMOS and PMOS transistor in parallel (M6 and
M7). M8 and M9 (diode connected) are used to realize the turning M13 (M14) off, the output of the differential pair is
nonlinear behavior of I sf . These two transistors are off loaded with a temporary load M10 (M11) in order to main-
tain the proper function of the differential pair in providing
during the transition of the output (state) voltage from ± 1 the nonlinear characteristic, and finally I src ( I snk ) is
to −+ 1 .
applied to the state capacitor.
x ij y ij
6. Simulation results:
R
±k In this example simulation, we have used R=32.5KΩ
C and C=0.4pF to provide a time-constant of 13nS for each
cell. We tested our method on a non-canonic representa-
tion of the number 54 represented in a 4 × 3 map. Fig. 15
Fig. 13 Cell during application of Rule1 or Rule2
shows the initial values (left) and final values of the state sourcing or sinking currents in the cells. These conditions
voltages, which is correct. The simulations were per- ensure stability and synchronous transitions of the output
formed using HSPICE. Fig. 16 shows the state voltages of voltages of the cells during swithching of the current
the cells during processing. sources. These conditions also serve as simple tool to guar-
antee proper application of reduction rules which are nec-
essary for carry-free addition
1 2 4 8 1 2 4 8
The implementation provides us with a continuous
1 1 speed/power trade-off mechanism, and reduced system
3 3 noise compared to switching logic gates. The technique
appears promising for low bandwidth networks where both
9 9 power and low supply voltages are a major concern.
27 27
8. Acknowledgments
54 54
Fig. 15 Initial and final values of the state voltages
The authors wish to acknowledge financial support
from the Natural Sciences and Engineering Research
1 Council of Canada, and the Micronet Network of Centres
s11 s12 s13 of Excellence. Simulation tools, design workstations and
access to the MOSIS technology have been provided by
0 the Canadian Microelectronics Corporation.

-1 9. References
1
[1] L. O. Chua and L. Yang, “Cellular neural networks: Theory
s21 s22 s23
& applications,” IEEE Trans. CAS, 35, pp. 1257-1290, 1988.
0 [2] T. Roska, and L. O. Chua, “Cellular neural networks with
nonlinear and delay-type template elements and nonuniform
grids,” Int. J. Circ. Th. and Appl., vol. 20, pp. 469-482, 1992.
-1 [3] J. E. Varrientos, E. Sanchez-Sinencio, and J. Ramirez-
Angulo, “A current -mode Cellular Neural Network Imple-
1 mentation,” IEEE Trans.CAS-II, vol. 40, No. 3, March 1993.
s31 s32 s33 [4] E. Sanchez-Sinencio, J. Ramirez-Angulo, B. Linares-Bar-
ranco, and A. Rodriguez-Vazquez, “Operational transcon-
0 ductance amplifier-based nonlinear function syntheses,”
IEEE Journal of Solid-State Circuits, 24, 6, Dec. 1989.
[5] L. O. Chua, M. Hassler, G. Moschytz, and J. Neirynck,
-1 “Autonomous Cellular Neural Networks: A unified paradigm
1 for pattern formation and active wave propagation,” IEEE
Transactions on Circuits and Systems-I, 42, 10, Oct.1995.
s41 s42 s43 [6] K. Jordar, “A simple approach to Modeling Cross-Talk in
Integrated Circuits”, IEEE Journal of Solid-State Circuits,
0 vol. 29, NO. 10, October 1994, pp. 1212-1219.
[7] V. Dimitrov, S. Sadeghi-Emamchaie, G.A. Jullien, and W.C.
Miller, ”A near Canonic Double-Based Number System
-1 (DBNS) with applications in Digital Signal Processing,”
20n 40n 20n 40n 20 40n Proc. SPIE, Adv. Sig.l Proc. VI, vol. 2846 pp. 14-25.
[8] V.S. Dimitrov, G.A. Jullien, and W.C. Miller, ”Theory and
Fig. 16 Cell state voltages Application for a Double-Base Number System,” Proceed-
ings of 13th symposium on Computer Arithmetic, Asilomar,
California 1997, pp. 44-51
7. Conclusions [9] S. Sadeghi-Emamchaie, G.A. Jullien, and W.C. Miller,”
Arithmetic Arrays using Cellular Neural Network” Proceed-
In this paper, we have introduced the concepts behind ings of 31th Asilomar conference on Signals, Systems and
a novel CNN-based processor for implementing digital Computer, Asilomar, California Nov. 1997
arithmetic arrays in a Double-Base number system. We
have presented sets of simple conditions that are required
to force the transition of the state voltage by switching

You might also like