PRIORITY RESOLUTION SYSTEM
AND VIDEO DISPLAY APPARATUS
The present invention relates to a priority resolution system for a plurality of devices to which priority numbers are assigned for determination of priorities in accordance with the rule higher number = higher priority (maximum priority resolution) or the rule lower number = higher priority (minimum priority resolution). The devices may be processors or peripheral devices. The invention also relates to video display apparatus, more specifically apparatus for generating a video signal for a raster-scan display.
Priority resolution systems of the above kind are known and examples are described in "Introduction to a Simple but Unconventional Multiprocessor System and Outline of an Application", Rolf Linder, Technische Hochschule Darmstadt, Presented at the NATO Advanced Study Institute on Computer Architectures for Spatially Distributed Data, Cetraro, Italy, June 83. and in published application GB 2 143 349. GB 2 143 349 explains how the priority numbers may be assigned dynamically so as to achieve desired allocation of a shared resource or determination as to which of a plurality of processors provides image data in a situation where images can overlay each other.
The systems described in the references above use multibit priority buses. Each device has priority logic with wired - AND (open collector) connections to the bus lines to pull down bus lines. The logic is such that the device providing the most significant "1" bit in its priority number wins and is granted access to a data bus (maximum priority resolution). The system described in GB 2 143 349 is moreover pipelined so that bit-wise comparisons ripple through the logic. The performance of these systems is dependant on the number of devices which are connected. The maximum clock speed decreases as the physical size of priority and data buses increases because a longer settling time is required. The total number of contending processors (or devices) is limited by the electrical loading on the wired -OR lines of the priority bus. Thus large numbers of contending devices will degrade system performance and ultimately cease to make this a workable solution.
The loading problem is recognised in GB 2 143 349 and buffering of lines is accordingly proposed. The maximum clock rate is still reduced (one buffer propagation delay is added for each device) and the circuit complexity is increased.
An object of the present invention is to provide a system which does not suffer from these problems and which can be used at very high clock rates, e.g. a pixel clock rate of 160 MHz or greater. It is a further object to provide a system which places no limit on the number of devices which may be incorporated and in which the maximum usable clock rate is not affected by the number of devices (although latency is increased as devices are added). The priority resolution system according to the invention is defined in claim 1 below and advantageous developments are defined in the claims dependent on claim 1.
As already noted, one application of priority resolution is in relation to computer generated image systems, in which case priority values correspond to z-values, i.e. values of the depth coordinate. In synthesizing a picture, higher priority images are required to overlay lower priority images. Various approaches are known but all are relatively complex. It is necessary to be able to make the resolution on a pixel by pixel basis. Many systems use a frame buffer and sort the image data into the frame buffer. Sorting is notoriously difficult to implement quickly. The z-buffer algorithm is simpler but requires a large z-buffer to store a z-value for every pixel. Systems as described in GB 2 143 349 and also in GB 1 532 275 which rely on real-time selection of the highest priority device suffer from the kind of problems discussed above in relation to the priority resolution process.
It is a further object of this invention to provide an improved apparatus for generating a video signal for a raster-scan display, which does not suffer from the aforementioned disadvantages.
The invention will be described In more detail, by way of example, with reference to the accompanying drawings, in which:
Fig. 1 is a block diagram of a system embodying the invention;
Fig. 2 is a block diagram of the priority logic associated with one device;
Figs. 3 and 4 are tables illustrating the operation of Fig. 2;
and
Fig. 5 is a diagram illustrating pipelined operation.
The system illustrated in Fig. 1 comprises an ordered plurality of devices such as microprocessors P1, p2 etc. up to Pn. n must be at least 2 and may well be substantially larger than 2. The processors operate synchronously with respect to video sync signals for a raster scan display; these signals are passed from processor to processor on a line S. Each processor outputs video signals on a corresponding port V1 to Vn shown as comprising three lines to cater for R, G and B signals, although the number of lines is not important to the present invention; only one is needed for a monochrome display. The video lines do not necessarily carry signals which determine colour directly. It is well known to translate the video signals on a plurality of lines by use of a colour look-up table.
The nature of the devices P1 to Pn is not important. They may generate their video signals from bit-plane buffers or by real-time scan conversion, for example.
The video signals are fed to respective pixel insertion circuits M1 to Mn, which are essentially two-input, three channel multiplexers through which a video bus X1 to Xn is chained. Each multiplexer outputs whatever it receives on the bus X1 to Xn when a corresponding selection signal D1 to Dn has a first logic state and outputs what it receives on the corresponding port V1 to Vn when its selection signal has the other logic state. The complete image is thus built up from the signals provided from the processors p1 to Pn and the signals from higher order processors may overlay the signals from lower order processors.
The invention is concerned in part with the way in which the selection signals D1 to Dn are provided by priority logic units L1 to Ln associated with the processors P1 to Pn. These units are chained by an m-bit priority bus A1, A2 ... An where m is large enough to select between the number of processors involved, i.e. the minimum value of m is given by the relation n≤2m<2n.
In practice it may be more convenient to choose a larger value for m.
Each of the priority logic units also receives a corresponding m-bit input B1 to Bn which is the corresponding device's priority number. These numbers may emanate from the devices P1 to Pn themselves or may be assigned by a common priority allocation unit, as in GB 2 143 349.
The indexes 1 to n pertain to the processors P1 to Pn and associated entities. If the index i is used for the general case, the properties of each priority logic unit L1 to Ln may be described as follows. A unit Li compares Ai and Bi in bit-wise fashion, working from the most significant to the least significant bit. The first mis-match indicates whether the bus number Ai or the device number Bi indicates the higher priority. Di is set accordingly and Ai+1 becomes whichever of Ai and Bi indicates the higher priority.
Before describing an embodiment of a priority logic unit, certain special cases will be considered. The first priority logic unit L1 is shown receiving A1 and B1. A1 may be set to a minimum priority value to provide a threshold below which a processor cannot be selected. More likely, A1 will be set to all zeroes (maximum priority resolution) or to all ones (minimum priority resolution) so that A2 always equals B1 and D1 always effects selection. The same result can be achieved by omitting the unit L1, connecting B1 directly to A2 and wiring D1 to effect selection. Going further it is also possible to omit the pixel insertion multiplexer M1 and connect V1 to X2 . On the other hand M1 may be provided to cater for a case in which there is already video information on X1 , provided by a separate system.
Turning now to the structure of a representative priority logic unit Li, the bits of the numbers Ai, Bi and Ai+1 will be denoted as follows:
Ai = a1 ... aj ... am
Bi = b1 ... bj ... bm
Ai+1= z1 ... zj ... zm
where the subscripts 1 and m denote the most and least significant bits respectively and j denotes a general bit.
Each priority logic unit (Fig. 2) comprises m bit logic units T1 to Tm. Considering the general unit Tj, it receives the bits aj
and bj and outputs z j . The unit Tj also receives inputs cj- 1 and dj-1 from the next more significant unit Tj-1 and outputs cj and dj to the next less significant unit. The signal cj indicates whether or not priority has been resolved at the unit Tj or at a unit of higher significance and dj indicates, when priority has been resolved, in whose favour. The final bit dm constitutes the selection signal Di . zj becomes a j for the next priority logic unit.
One set of equations defining the structure for Tj in the case of minimum priority resolution is as follows:
cj = cj-1 + (aj
bj) (1) dj = cj-1.dj-1 + aj.
(2) zj = aj.bj + cj-1.(bj.dj-1 + aj.
(3)
Fig. 3 tabulates all possible combinations of the input quantities aj, bj, Cj-1 and dj- 1 and the resultant output quantities cj, dj and z j . The heavy boxes indicate the cases in which priority resolution takes place (cj-1 = 0 but cj = 1). The bracketed values for dj are the values arising from equation (2) although they are actually "don't care" values. An
alternative to equation (2) is dj = cj-1. dj-1 +
cj-1 (2a)
The convention assumed is that cj-1 = 0 means "not resolved" while cj-1 = 1 means "resolved". If cj-1 = 0 the value of dj-1 is without significance. If cj-1 = 1, then dj -1 = 1 means the device has won the priority contest whereas dj -1 = 0 means the bus has won the priority contest.
The provision of the initial values co and do will now be considered. co may be input from the corresponding processor, as indicated in Fig. 1 while d0 may be tied to logical 0. This allows the processor to allow itself to enter the priority contest (by setting co = 0) or to shut itself out of the contest by setting co =
1, which forces all co to cm to 1 and forces all d1 to dm to 0. If this facility is not required, co can be tied to logical 0. On the other hand the processor could be given control over both co and do to allow it to effect forced selection, overriding the priority contest.
In one particular embodiment do is tied to 0 and co is provided as an ACTIVE signal which is logical 1 only during that part of each scanline traversing an object processed by the processor in question.
Thus each processor is prevented from attempting to contribute to the signals on the video bus except in areas which contain image data so far as that processor is concerned.
A set of equations for the case of maximum priority resolution is now given. Fig. 4 is the corresponding table of input and output quantities.
Cj = cj-1 + (aj bj) (4 )
dj = cj-1. dj-1 + bj. (5)
OR dj = Cj-1 . dj-1 + aj .
cj-1 (5a)
Zj = aj. - + bj.
+ dj-1) (6)
The bracketed "don't care" values in Fig 4 for dj are those which arise if equation (5) is used. The gate arrays required to implement equations (1) to (3) or equations (4) to (6) are not illustrated as they involve only trivial, everyday design.
So far it has been assumed that each priority logic unit produces its output virtually instantaneously (subject only to the gate delays in rippling through the bit logic units). This may be a practical implementation for some applications but an important development of the invention allows pipelined operation. Every bit logic unit is provided with latches (not shown) for all its output quantities zj, cj and dj. These latches are clocked by a bit-rate clock CK (Fig. 2) so that, if resolution of the most significant bits ao, bo is effected in one clock cycle, a1 and b1 will be resolved in the next clock cycle and so on. During the said next clock cycle the bits ao and bo of the next contest are treated and each priority logic unit Li actually effects bit resolutions simultaneously in each clock cycle from m different contests for which m bus priority numbers Ai1 to Aim are pipelined through the unit, as illustrated in Fig. 5 for a greatly simplified case of m = 3. ki1 means a first bus priority number handled by a unit Li, Ai2 means the next bus priority number handled by Li and Ai3 means a third bus priority number handled by Li.
In order to avoid hiccups in operation, when a device priority number Bi is changed it should either be changed during an inactive phase of the system (e.g. during the field blanking interval in a computer graphics application) or be changed bit by bit over m clock cycles, starting with the most significant bit.
In the examples above it has been assumed that positive logic is used throughout. It will be appreciated that the logical conventions employed are immaterial to the principle of the invention and may be chosen as may best suit circuit design. It is not essential to preserve the same convention throughout the whole system, although this is desirable if configurations are to be altered. In a fixed configuration system, the most efficient implementation may involve using inverted logic in alternate priority logic units. Inverted logic may also be used in alternate bit logic units within each priority logic unit.
In contrast to the prior art, the maximum clock speed of the system does not depend upon the number of devices P1 to Pn. Each priority logic unit Li merely has to drive lines long enough to carry the bus priority number to the next unit. Moreover there is no limitation on the number of devices imposed by bus loading since the loading on each priority logic unit arises solely from the next unit.
The invention may be used in many applications, including priority resolution in computer generated image systems, including object-based systems. Other applications are to priority resolution between contending processes in computer systems and to data transfer between processors in multiprocessor systems. The circuitry may also be used to resolve number comparisons for numbers other than priority numbers, i.e. as a pipelined hardware comparator.
The pipelined nature of the system means that it does not select just one device with highest priority. Selection is a progressive process along the pipeline and a device is selected if it has higher priority than the bus priority at that point along the pipeline. This form of priority resolution is particularly suited to image overlay processes. It is not applicable when solely the highest priority device is to be selected.
The assigned priority numbers may be such that equal priority situations are never encountered. If they can arise, the logic must be designed to give the required resolution. Reverting to
Fig. 2, the final signal cm will be false if there is no resolution in any priority logic unit Li (i.e. Ai = Bi). Simple additional logic can be used to force Di to whichever state is desired when cm is false.