Coder units
Encoder Networks
A network of 2kinput encoders and some other modules can implement a 2ninput encoder. We assume in the following discussion that n = 2k.
Consider first the case of encoder networks when at most one input x_{i} can have a value 1. The priority encoder networks will be discussed later.
We introduce these networks with an example. Consider a 64input encoder network using eightinput encoders as shown in Figure 1.28. The network consists of two levels of modules. In the first level there are eight encoders, each of them encoding a part of the input vector x. Since there is only one input with value 1, the outputs of all encoder modules are 0 except the one corresponding to this x_{i}= 1. Also, only the corresponding A has value 1. Consequently, the outputs of the encoders are
and
In the second level there are three OR gates with eight inputs each which produce (y_{2}, y_{1}, y_{0}), and an eightinput encoder to encode the A outputs of the firstlevel encoders and produce (y_{5}, y_{4}, y_{3}).
The connection of the OR gates produces
since all w's except one are 0.
Similarly the output of the secondlevel encoder is
and, therefore, and the network performs the encoding function. The OR gates can be eliminated if a wiredOR technology is used as indicated in Figure 1.28.b. In this figure we indicate also the outputs when x_{17}=1.
This scheme can be generalized as follows. For an 2^{n}input encoder, using 2^{n/2}input encoder modules, the first level is formed of 2^{n/2} encoder modules, which receive the corresponding input subvectors. The second level is formed of n/2 OR gates, which collect the corresponding outputs of the firstlevel encoders and produce the n/2 least significant bits of the output. For the n/2 most significant bits, another encoder module is used to encode the A outputs of the firstlevel encoder modules. The generalization for n=rk is left as an exercise.
We now consider the implementation of priorityencoder networks where the priority of the input x_{i}, is higher than the priority of x_{j} for i>j. A 2^{n}input priority encoder can be implemented by a network of 2^{n}^{/2}input priority encoders, OR gates, and a 2^{n}^{/2}input priority encoder as illustrated in Figure 1.29. The analysis of this network is left as a problem (Exercise 4.36). Note that the delay of the network is high since the enable signal has to propagate through all encoder modules of the first level.
Fig1.28  Encoder networks (a) OR gates and (b) with wiredOrs.
Fig. 1.29  Priority encoder network.
Date: 20150112; view: 793
