English
Language : 

NS32FV16 Datasheet, PDF (23/104 Pages) Texas Instruments – Advanced Imaging/Communication Signal Processors
2 0 Architectural Description (Continued)
2 5 2 4 BITBLT Directions
UNTIL
done vertically
A BITBLT operation moves a rectangular block of data in a
RETURN
(from BITBLT)
frame buffer The operation itself can be considered as a
Note In the NS32FX164 only the setup operations must be done by the
subroutine with two nested loops The loops are preceded
programmer The inner and outer loops are automatically executed
by setup operations In the outer loop the source and desti-
by the BITBLT instructions
nation starting addresses are calculated and the test for
Each loop can be executed in one of two directions the
completion is performed In the inner loop the actual data
inner loop from left to right or right to left the outer loop
movement for a single scan line takes place The length of
from top to bottom (down) or bottom to top (up)
the inner loop is the number of (aligned) words spanned by
each scan line The length of the outer loop is equal to the
height (number of scan lines) of the block to be moved A
skeleton of the subroutine representing the BITBLT opera-
tion follows
The ability to move data starting from any corner of the
BITBLT rectangle is necessary to avoid destroying the
BITBLT source data as a result of destination writes when
the source and destination are overlapped (i e when they
share pixels) This situation is routinely encountered while
BITBLT
calculate BITBLT setup parameters
panning or scrolling
(once per BITBLT operation)
A determination of the correct execution directions of the
OUTERLOOP
INNERLOOP
UNTIL
such as
width height
bit misalignment (shift number)
left right masks
horizontal vertical directions
etc

te 
calculate source dest addresses
(once per scanline)
move data (logical operation) and incre-
ment addresses
(once per word)
Obsole donehorizontally
BITBLT must be performed whenever the source and desti-
nation rectangles overlap Any overlap will result in the de-
struction of source data (from a destination write) if the cor-
rect vertical direction is not used Horizontal BITBLT direc-
tion is of concern only in certain cases of overlap as will be
explained below
Figures 2-22(a) and (b) illustrate two cases of overlap Here
the BITBLT rectangles are three pixels wide by five scan
lines high they overlap by a single pixel in (a) and a single
column of pixels in (b) For purposes of illustration the
BITBLT is assumed to be carried out pixel-by-pixel This
convention does not affect the conclusions
In Figure 2-22(a) if the BITBLT is performed in the UP direc-
tion (bottom-to-top) one of the transfers of the bottom scan
line of the source will write to the circled pixel of the destina-
tion Due to the overlap this pixel is also part of the upper-
most scan line of the source rectangle Thus data needed
later is destroyed Therefore this BITBLT must be per-
formed in the DOWN direction Another example of this oc-
TL EE 11267–8
(a)
(b)
FIGURE 2-22 Overlapping BITBLT Blocks
The left mask and the right mask are 0000 1111 1111 1111 and 1111 1111 0000 0000 respectively
Note 1 Zeros in either the left mask or the right mask indicate the destination bits which will not be modified
Note 2 The BB(function) and EXTBLT instructions use different set up parameters and techniques
TL EE 11267 – 9
22