LA VARIABLE PERSONALIDAD Y SU SITUACIÓN CON EL RENDIMIENTO ACADÉMICO Y LAS FUNCIONES EJECUTIVAS.
3.1. Los rasgos de personalidad y su relación con el rendimiento académico.
Some handshake components (including MERGE) require that the commu- nication along several (input) channels is mutually exclusive. For the simple static data-flow circuit structures we have considered so far this has been the case, but in general one may encounter situations where a resource is shared between several independent parties/processes.
The basic circuit needed to deal with such situations is a mutual exclusion element (MUTEX), figure 5.20 (we will explain the implementation shortly). The input signals R1 and R2 are two requests that originate from two inde- pendent sources, and the task of the MUTEX is to pass these inputs to the corresponding outputs G1 and G2 in such a way that at most one output is ac- tive at any given time. If only one input request arrives the operation is trivial. If one input request arrives well before the other, the latter request is blocked until the first request is de-asserted. The problem arises when both input sig-
R1 R2 R1 R2 Bistable & & G2 G1 G1 G2 MUTEX Metastability filter x2 x1
nals are asserted at the same time. Then the MUTEX is required to make an arbitrary decision, and this is where metastability enters the picture.
The problem is exactly the same as when a synchronous circuit is exposed to an asynchronous input signal (one that does not satisfy set-up and hold time requirements). For a clocked flip-flop that is used to synchronize an asyn- chronous input signal, the question is whether the data signal made its tran- sition before or after the active edge of the clock. As with the MUTEX the question is again which signal transition occured first, and as with the MU- TEX a random decision is needed if the transition of the data signal coincides with the active edge of the clock signal.
The fundamental problem in a MUTEX and in a synchronizer flip-flop is that we are dealing with a bi-stable circuit that receives requests to enter each of its two stable states at the same time. This will cause the circuit to enter a metastable state in which it may stay for an unbounded length of time before randomly settling in one of its stable states. The problem of synchronization is covered in most textbooks on digital design and VLSI, and the analysis of metastability that is presented in these textbooks applies to our MUTEX com- ponent as well. A selection of references is: [95, sect. 9.4] [53, sect. 5.4 and 6.5] [151, sect. 5.5.7] [115, sect. 6.2.2 and 9.4-5] [150, sect. 8.9].
For the synchronous designer the problem is that metastability may per- sist beyond the time interval that has been allocated to recover from potential metastability. It is simply not possible to obtain a decision within a bounded length of time. The asynchronous designer, on the other hand, will eventually obtain a decision, but there is no upper limit on the time he will have to wait for the answer. In [22] the terms “time safe” and “value safe” are introduced to denote and classify these two situations.
A possible implementation of the MUTEX, as shown in figure 5.20, in- volves a pair of cross coupled NAND gates and a metastability filter. The cross coupled NAND gates enable one input to block the other. If both inputs are asserted at the same time, the circuit becomes metastable with both signals
x1 and x2 halfway between supply and ground. The metastability filter pre-
vents these undefined values from propagating to the outputs; G1 and G2 are both kept low until signals x1 and x2 differ by more than a transistor threshold voltage.
The metastability filter in figure 5.20 is a CMOS transistor-level implemen- tation from [83]. An NMOS predecessor of this circuit appeared in [121]. Gate-level implementations are also possible: the metastability filter can be implemented using two buffers whose logic thresholds have been made partic- ularly high (or low) by “trimming” the strengths of the pull-up and pull-down transistor paths ([151, section 2.3]). For example, a 4-input NAND gate with all its inputs tied together implements a buffer with a particularly high logic
threshold. The use of this idea in the implementation of mutual exclusion ele- ments is described in [6, 139].
5.8.2
Arbitration
The MUTEX can be used to build a handshake arbiter that can be used to control access to a resource that is shared between several autonomous inde- pendent parties. One possible implementation is shown in figure 5.21.
& & C C R0 A0 R1 A1 R2 A2 ARBITER + R0 A0 y1 y2 G1 MUTEX R2 G2 G1 R1 A1 R1 R2 A2 G2 A1 A2 a’ aa’ b’ bb’
Figure 5.21. The handshake arbiter: symbol and possible implementation.
The MUTEX ensures that signals G1 and G2 at the a’–aa’ interface are mutually exclusive. Following the MUTEX are two AND gates whose purpose it is to ensure that handshakes on they1A1andy2A2channels at the b’–
bb’ interface are mutually exclusive: y2 can only go high if A1 is low and
y1 can only go high if signal A2 is low. In this way, if handshaking is in
progress along one channel, it blocks handshaking on the other channel. As handshaking along channelsy1A1 andy2A2 are mutually exclusive the
rest of the arbiter is simply a MERGE, c.f., figure 5.1 on page 59. If data needs to be passed to the shared resource a multiplexer is needed in exactly the same way as in the MERGE. The multiplexer may be controlled by signals y1 and/or
y2.
5.8.3
Probability of metastability
Let us finally take a quantitative look at metastability: if Pmett denotes
the probability of the MUTEX being metastable for a period of time of t or longer (within an observation interval of one second), and if this situation is considered a failure, then we may calculate the mean time between failure as:
MT BF
1
Pmett
(5.8) The probability Pmettmay be calculated as:
PmettPmettmett
0
Pmett
0
where:
Pmettmett
0
is the probability that the MUTEX is still metastable at
time t given that it was metastable at time t0. Pmett
0
is the probability that the MUTEX will enter metastability
within a given observation interval. The probability Pmett
0
can be calculated as follows: the MUTEX will go
metastable if its inputs R1 and R2 are exposed to transitions that occur almost simultaneously, i.e. within some small time window ∆. If we assume that the two input signals are uncorrelated and that they have average switching frequencies fR1and fR2respectively, then:
Pmett 0 1 ∆fR1fR2 (5.10) which can be understood as follows: within an observation interval of one second the input signal R2 makes 1fR2 attempts at hitting one of the 1fR1
time intervals of duration∆where the MUTEX is vulnerable to metastability. The probability Pmettmett
0 is determined as: Pmettmett 0 e tτ (5.11) whereτexpresses the ability of the MUTEX to exit the metastable state spon- taneously. This equation can be explained in two different ways and experi- mental results have confirmed its correctness. One explanation is that the cross coupled NAND gates have no memory of how long they have been metastable, and that the only probability distribution that is “memoryless” is an exponen- tial distribution. Another explanation is that a small-signal model of the cross- coupled NAND gates at the metastable point has a single dominating pole.
Combining equations 5.8–5.11 we obtain:
MT BF
etτ
∆fR1fR2
(5.12) Experiments and simulations have shown that this equation is reasonably accurate provided that t is not very small, and experiments or simulations may be used to determine the two parameters ∆andτ. Representative values for good circuit designs implemented in a 0.25 µm CMOS process are∆30ps
andτ25ps.
5.9.
Summary
This chapter addressed the implementation of the various handshake com- ponents: latch, fork, join, merge, function blocks, mux, demux, mutex and arbiter). A significant part of the material addressed principles and techniques for implementing function blocks.