You are on page 1of 6

Race-Haeard and SkipHaeard in Multivalued Combinational Circuits

Xunwei Wu Xiexiong Chen Jihong Shen Dept. of Electronic Engineering, Hangzhou University, Hangzhou, China

Abstract
This paper discusses racehazards based on AND / OR expression of functions in multivalued combinational circuits, and proposes techniques for eliminating race-haeards by algebraic and K-map's means. Furthermore, this paper analym the skiphazard, another inherent hazards in multivalued circuits, and points out that it is a n o d r e sponse for multivalued circuits. They can be restrained by using the input signals with fast transition or a small load capacitor.
1 Introduction

cuits there exists another new hazard-skiphazard. Now we know it is a complex work to analyze the hazards of ternary and higher-radix combinational circuits, and it can not be avoided in the design of multivalued circuits. In this paper the race-hsard and skiphazard in ternary circuits am mainly diJ3cuw3d.
2 Race-hard of ternary combinational circuits

According to the practical case of ternary combmational circuits, the analysis of their race-hazards may be based on the following assumptions:
(1) The combinational circuits am based upon the twolevel AND/OR or OR/AND realization in Post algebra. (2) Each variable in the expression of functions appears

In m n t years, the m a r c h on multivalued logic has attracted attention of logic designera because it can increase the information density of circuite, and thus leading to the reduction of the number of connections and pins, and the saving of on-chip area of IC.llal However, it also leads to the complexity in designing and analyzing circuits along with the increaae of the number of signal levels. Taking the ternary logic circuits as example, there exist three levels (0,1, 2) for signals in circuits. Therefore, when analyzing ternary circuits, we must consider the response to six transitions of input signals between three voltage levels (0 s 1, 1 s 2, 0 2) as well as the m p o n s e of circuits*tothree values of input signals.
For ternary Combinational circuits, racehiwards may occur when an input signal I transits between two adjacent levels (0, 1) or (1, 2). Thus the task for analyzing e race-hazard doubled. Besides, when input 2 transits b tween two non adjacent levels (0, 2), it must pass through the state of z = 1, and the circuit will respond to the transient input (t = 1) so that the transient spurious output may occur. Therefore, in ternary and higher-& logic cir-

in literal operation form.

(3) Consider only the hazards due to single input changes, and don't consider the hazards due to multiple input changes.

Based on the above assumptions, let us consider the circuits correspondingto two-level AND/OR form first. When diacuasing the hazards under input c changes, we can denote a function i ( ~y,, 2 . . .) as follows:
J ( z )= 110 -'to t (11 *'2' t 02
e%'

td,

(1)

where j ( z ) , m , a l , ~ , d can be regarded as the functions of the remaining input variables y, 3,. ...

In ternary logic the poesible adjacent-level changes for variable z are 0 1 and 1 2. When the variable t take ak e d value 0, 1, 2, the function f will have a definite output: f(O)=ootd, /(l)=al +d, j(2)=o2+d. However, when

222
0-8186-7118-1/95 $04.00 0 1995 IEEE

Authorized licensed use limited to: Air University. Downloaded on June 19, 2009 at 01:03 from IEEE Xplore. Restrictions apply.

z changes between 0, 1 or 1, 2 (x: 0 1 or 1 e 2), the circuitsdesigned by using E q . (1) may produce the spurious output, i. e. the hazards may occur. The condition to

In order to obtain the redundant term A, we discuss the following algebraic relations. According to the related prop erties of ternary functions, we have
WOZO

cause hazards can be listed as follows:


(1) The input signal z has a transition 0

* 1 or 1s 2.

01'2'

+ I3252 = (a0 + w ) ( 0 1 + q

. 2

+q.

(7)

In the above equation if a2 = 0, we obtain

(2) The signal z b transmitted to the output by several opened paths. Wring Eq.(l) as an example, t can be transmitted to the OR gate at the output through three paths ( ~ 9 ~114c1, , ' 02z1). Only if # a, the C o m p n d h g i-th path is opened, and a# exists.

Similarly, if 00 = 0, we have

(3) The propagation delay time of gates for each path is different 80 that the changes of a,%+, o l Y , a Z Vcaused by the transition of t are not simultaneous , i.e. the race exists. For example, when z has a transition o + I, it is possible that a o Y has changed f r o m do to 0, but clY has not changed from 0 to al yet, then the OR operation of these two terms instantaneously produce a 0 output. When z has the changes 1 + o and 1 e 2, the similar cases may also happen.
1 change, if d < 00.0~in Eq.(l), i.e. d is less than the small one of 00 and 01, then a transient (4) When t has the 0

Therefore, we can add a redundant term to f(z)in Eq.(l):


j(z)= ao0zo a1Y

a 2 Y

+ D,

(10)

where
D =d+aoalq+aleq.
(11)

In Eq.(ll), if d , 1 , D = d + h a l +uleW. For analyzing hazards, we should consider the case of minimal D, i.e.
= a, because the hazards most possibly occur. Thus D = d + ~ 0 0 1 , and it obviously satisfies Eq.(5). Hence no hazard occurs when I: changes between 0 and 1 (0 1). For t = I, 2, the minimal D in Eq.(ll) i s d+oloz, and it satisfiea E q . ( 6 ) . So also no hazard occure when t changes between 1 and 2 (1 + 2). In a word, it is proved that the
010257

pulse (hazard) with bottom d may appear. Similarly, when has the change 1 2, the hazard may also occur. According to the above discussion, when z has the buse change 0 1, the hazard-free condition b d 2 a0-01. OR operation has maximum function, the above condition may be written as

racehazards of circuits designed accordingto &.(lo) have been removed.

d + (W* 01)

d.

(2)

Siarly, when condition is

has the change 1 s 2, the hazard-free


d

= d. (3) Thus we can remove race-hazards by adding a redundant term A to Eq.(l).The term A is required to keep the function unchanged, i.e.
* 02)

+ (01

Similar to binary circuits, the detection and elimination of racehazards in ternary circuits can ale0 be done on K-maps. Figure l(a) gives the K-map of Eq.(l), where e r m s in four groupings on the K-map correspond to four t Eq.(l), respectively. When t changes from 0 to 1, the value of the function changes from 00 + d (for x = 0) to u1 + d (for t=1 ) in Fig.l(a). Due to the race, thew may appear d u e

COOZO

+ 01'~' +

02%'

+ d = 0o0to + 01'2' + m2z2+ d + A.

(4)

If d + A is denoted as D , D is needed to satisfy the following equations when d can not sat@ Eqs.(P) and (3).
Figure 1 (a) K-map expmion of Eq.(l) (b)Redundant terms for eliminating race-hazards

223

Authorized licensed use limited to: Air University. Downloaded on June 19, 2009 at 01:03 from IEEE Xplore. Restrictions apply.

0 during the process of the change 00 -+ (11, i.e. at the disjunction of the groupings 00 and al. Therefore the value of the function undergoes a transition: 00 + d (d) -+ o1 + d. If di s less than a0 "1, a transient hazard with smaller value d may appear during the change of the function. The two' redundant terms added are denoted in Fig.l(b). They correspond to a o o l F and a10257 respectively. Their existence removes the disjunction of groupings a0 and a1, also group o r e perceimble to handle ings a1 and e.Obviously, it is m the racehazard on K map.
-+
a

a0

'a1

= 0,

= E

It can be seen that for removing the race-hazards for the 1 2 change of Z, the added redundant term i s A = 1.0gp.W and there is no racehazard for the 0 * 1 change of 2.
Now we consider the racehazards caused by the change of y, f r o m Q.(12), we have

Example 1 . Consider the combination circuit shown in Fig.fl(a). Its output be expressed a
/(tly)

= 1-51 + $1 .'zf

+$lo

122 + 5% -222 + 1 * y.

(12)

G=Y,
Then we obtain

a;=*t*,

o ~ = 1 t Z 2 ,b = 1 . ' z 1 .

Its corresponding K-map is given in Fig.fl(b), where the gates with label 2 denote binary gab. Let's consider the

aI,-a:=O, a~.o~=l-ltl,

mehazards caused by the changes of t in the circuit first. According to Eq.(12), we have
aO=O,

LY = 6 +a{aiW= 1- Y + 1 -4G1 - V 1 = .bl.


The above equations show that the redundant t e r m s are not needed because there exist no race-hazards at all while y undergoes the 0 1 and 1 2 transitions.

a l = f + ' y l , a2=$t'+yr

d=l-V.

Hence we get

Therefore, only the redundant term A = 1 . oy" .%? is needed to eliminate the race-hazards when z,y change among adjacent levels, and hence the hazard-free expression of the output function for the circuit shown in Fig.%(a) is
j(2,g) = 1. '2'
+I21

.$1

+IC2 .%O

+Y.$P+l*y+l-y*TF*
(b)

Ita corresponding circuit realization ie shown in Fig.fl(c), where the circuit in the dotted lines is the additional part.

I
I

Figure 2 (a) Circuit of example 1 (b) K-map exprsssion of function for example 1 (c) Hazard-free circuit for example 1

The above procesa to detect and eliminate hazards has been e x p d in Fig.fl(b) by the dotted linea, where'the grouping Y .%p and the grouping 1 . 4 ' are disjunctive circles, and hence the racehazard w i l l occur when z undergoes 1 2 transition with I = 0. Thus a redundant grouping 1 -'1p-aE6 ia required to eliminate the hazard. Since the disjunctive parts in groupings 2*.2.2$ and 1 - '21 are covered by the grouping I . yl there no hazard occur. Similarlyl the disjunctiveparts in groupings 121 .$1 and 1 .y are covered by the grouping I-Y,and hence there also no hazard occur. ! is needed Therefore, only the redundant grouping 1 . %O F to add.

224

Authorized licensed use limited to: Air University. Downloaded on June 19, 2009 at 01:03 from IEEE Xplore. Restrictions apply.

Example 2. Design a hazard-free T gate.

T gate is a kind of ternary universal-logic-gate. It may beexpressedas


T = do020 + d112'

+ d&?.

(1) If ](I) = j ( o ) or {(I) = j(~), then no skiphazards occur since this transient output /(I) is the same as the previous or later output I(0) or f(2), and thus no hazarda can are ) (OOO), (Ool), be observed. For example, f ( o ) , j ( l ) , j ( ~ (002), ( 0 1 1 ) l (02211 ( 1 1 0 ) l(111)l W ) , ( W , ( 2 % (211), (220), (221) and (222).

(W,

From the above discussion we can derive the function of a hazard-free T gate.

T = do0zot d l ' t '

+ &Y+ d o d l V + d1&P.

(2) If the output j ( 1 ) is set between f(0) and I@), no hazards can be seen also since the middle output must a p pear while the output transits between I(o) and f(2). For example, 1(0),1(1),j(2) are (012) and (210).

The above equation can be written as Is]


T=doO~~+dl('~ + ' d~P+&vt&%~

(3) If /(1) > " 9 , I(2))l i.e. I(1) > f(0) a Peakshaped skiphazard will occur when /(0),I(l),j(2) are (OlO), (020), (021), (120)and (121), as shown in Fig.3(a).
(4) If f(1) -c m w ( o ) ~ m ) ) i.e. , I(1) < /(O)*I(Z), a valleyshaped skiphazard will occur when ~ ( 0 ) , ~ ( 1 ) , jare ( 2 ) (lot), (102), (201), (202) and (212), as shown in Fig.3(b).

+m,

= doozo dl (do q d 2 +w)+ d2Y.

(13)

It is obvious that the circuit realization corresponding to the above equation is hazard-free, but it has not a two-level AND/ORconstruction. It may be pointed that a amall load capacitor also can be used for restraining the race-hazards, however, the input signals with faster transitions are useless for it.
3 Skiphazard in ternary combinational circuits

According to the above analysis, the conditions producing skiphazards in the circuits based on Eq.(l) are a1 + d > uo + (% I + d (peak-shaped skiphazard occm) and UI + d < 0002 + d (valley-shaped skiphazard occura). It is more perceivable to detect the skiphazards on Kmaps. In Fig.l(a), a peak-shaped or a valley-shaped s k i p hazard will occur if the value of /(z) for z=1 is greater or less than the value of f(z) for z=O, 2. Read out the coordinate of these three square, and they are just the conditions producing the correspondingskiphazards. Now let us analyze the skiphazards in the circuit of Example 1. l+om the K-map shown in Fig.%(b)we can derive that a peak-shaped skiphazard (020)will occur when r=l and z has a transition 0 2; a peak-shaped skiphazard (121) will occur when r=1 and 11 has a transition 0 s 2 ; and a valley-shaped skiphazard (202)will occur when 2 and has a transition 0 + 2 .

We have restricted our discusclionso far to race-hazards caused by the changes of input signal z between adjacent levels, i.e. z has a transition 0 = 1 or 1 s 2. Now we consider the changes of z between non adjacent levels (0 2 2 ) . Since i n ternary circuits taking voltage or current a6 signal, the voltage or current correspondingto the iogic value 1 always takes the middle value, it must pass through t = 1 while c has a transition 0 s 2. Thus the change o f t 0 = 2 can be divided into sequential change 0 e 1 and 1 2. However, the time keeping 0 1 i very short (depending on the rise time and fall time of the signal 2). Let us still analyze Eq.(l). When z has a transition o -t 2, I(z) may undergo three transient values a, ol + d , d in the process of its change from 90 + d to 02 +d. If d i s less than a0 -02, d is the racehazard among these three value, and we have mentioned the method in the previous section to remove it. However, al + d is a normal response of the circuits to z e: 1, and it cannot be eliminated. This spurious transient s the output j(1) = o1 + d is temed skiphazard, and it i inherent hazard for multjvalued circuits. If t changes from 0 to 2, we can discuss the skiphazards, which may occur, for various values of l(o),j(i),j(2)as follow:

Figure 3 (a) Peak-shaped s k i p h a z a r d s (b) Valley-shaped skiphazards

225

Authorized licensed use limited to: Air University. Downloaded on June 19, 2009 at 01:03 from IEEE Xplore. Restrictions apply.

Since the transient /(I) produced due to skiphazards is a normal response of the circuit, it cannot be removed
by adding a redundant term to the output for eliminating racehazards as mentioned in the previous section. For restraining skiphazards, we may use the input signals with short rise time and fall time. Moreover, if the output is connected with a small load capacitor, it can also restrain skiphazards. Figure 4(a) shows the &OS circuit for threshold operation '21 based on the theory of clipping voltage switchesP1The output of the circdt is 2 (high level) only if ~ 1 A .SPICE simulation of this circuit has been performed using 3pm technique. The results axe shown in Fig.4(b) and 4(c). In FigA(b), curve @ is the input signal with transition time (between OV and 4V) 4Ons, and curve@is the t d e n t output &anrteristic with a 2 O O W load reaktance, where two spurious p u b are just the s k i p hazards of the circuit. Curve 0shows the transient ontput characteriiticwith a 2Wkn load resistance and a 0.7PF

load capacitor. It can be seen that the magnitudes of two spurious pulses are reduced obviously, and are less than IV. It shows that a s m a l l load capacitor can restrain the , , of the skiphazards, which may be the input capacitor C next MOS gate. Figure 4(c) gives the simulation result of the circuit by using the input signal with faster transitions. Curve@ is the input signal with the transition t i e (between OV and 4V) 4ns,and curve@is the transient output characteristicwith a 200kn load resistance. It may be seen that the magnitudes of two spurious pulses are obviously smaller than that of curve @ in Fig%(b), and hence it is shown that skiphazards can be also &rained by using the input signals with faster transitions.

Conchu4ons

Firstly, this paper discusses the racehazards of ternary combinational circuits based on two-level AND/OR expressions due to certain variable change among adjacent levels. We analyze their occurring process and conditions, a n ! the method to remove race-hazardsby both algebraic and Kmap means. They totally correspond to the counterparts in binary circuits, and have several advantages such as easy to operate, easy to understand, etc. firther, this paper discusses another inherent hazards for multivalued circuits-akiphazarda when an input variable changes between non adjacent levels, and proposes the methods to detect the Bkiphazards by algebraic and K-map means. S i n c e the skiphazards are the normal response of the circuib, they cannot be removed by using the technique for removing race-hazards. For restraining skiphazards, several methods such as using the input signals with faster transitions and connecting a small load capacitor at the output are proposed in this paper. Although our discussion in this paper is restricted to hazards in ternary circuits, it can be extended to multivalued circuits with a higher radix. Of course, the case of racehazards and skiphazards are more complicated. %ICing R=4 a s an example, for each variable three racehazards (OS 1 , 1 * 2,2 3) and threeskiphazards (OP 2 , 1 ~ 3 , 0 S) are required to consider. Therefore, the analysis for the hazards of the multivalued circuits is more cumbersome.

50

100

150

dns)

I,
0

Q
2o
r(ns)
'O

Figure 4 (a) Ternary &OS circuit for realizing 121 (b) Jnput signal with slower transition 0 2 (c) Input signal with faster transition 0 e 2

226

Authorized licensed use limited to: Air University. Downloaded on June 19, 2009 at 01:03 from IEEE Xplore. Restrictions apply.

Acknowledgments The project has been supported by the National Natural Science Foundation of the Peoples Republic of China. References

[l] Hurst, S.L . ,Multiplevalued logic - Ita status and ita future, IEEE %nu. on Computer, C-33,1160-1179,1984.

r o f i l e s of topics and oth[2]Butler, S.W., Butler, J. T., P ers of the International Symposium on multiple valued logic for 1971-1991,Proecding 01ttnd lEEE I n : . S p p . on multiple uolued logic, Sendai, 372-379,1992.
[3] Higuchi, T.,.Kameyama,M., Static-hazard-free T-gate for ternary memory element and it application t o ternary counters, IEEE Item. on Computer, 016,1212-1221,

1977.
[4] Wu,

X., Zhao, X.,

Degign of ternary

&OS circuits

based on the theory of clipping voltage switches,International Journal 01Medronieu, 75, 91-102,1993..

227

Authorized licensed use limited to: Air University. Downloaded on June 19, 2009 at 01:03 from IEEE Xplore. Restrictions apply.

You might also like