![]() |
|
![]() |
|
Answers Database
V1.5.2 COREGEN, XC4000: 4K 1-D ROM-based Correlator bit masking function irregularities: problems excluding MSBs, use of 0's to mask out bits, apparent incorrect behavioral and backannotated simulation model
Record #5402
Product Family: Software V1.5.2 COREGEN, XC4000: 4K 1-D ROM-based Correlator bit masking function irregularities: problems excluding MSBs, use of 0's to mask out bits, apparent incorrect behavioral and backannotated simulation model Problem Description: Urgency: hot General Description: The MASK parameter allows the user to selectively identify which bits in the input data which should and should not be treated as part of the correlation pattern and thus contribute, or not contribute, to the correlation output. There are some irregularities and problems with the bit masking capability in the COREGEN 1-D Serial and Parallel Correlator modules. The MASK feature of the Correlator for 4K devices should be avoided in the 1.5.2 release because of several problems. Solution 1: One problem is that masking out the MSBs in a data input pattern does not work the way one might expect. Ordinarily, setting the appropriate bit position in the Mask value to 0 will mask out that bit in the data so that it will not be included in the correlation output. However, setting the MSB to 0 in the mask does not mask out the MSB. The easiest way around this is to make the correlator data pattern smaller by however many MSBs you wish to exclude. The alternative, if you wish to maintain the original width for the mask is to follow the following procedure: 1) Add an extra 4 bits (nybble) to the correlator width. 2) Tie the LSB of the corresponding 4 input bits low. 3) Place 0001 in the corresponding bits 0-3 of the Bit_Match field. This will not match any inputs which have been pulled down so no extra bits are counted. 4) Place 0001 in bits 0-3 of the Mask. The three floating inputs will be masked. The input which was pulled down will not be counted, because it will not match the "1" from step (3). Solution 2: Another group of problems, including what appear to be incorrect behavior in functional and timing simulation, is a side effect of the fact that the COREGEN Serial and Parallel Correlators interpret '1's in a bit mask to mean that the corresponding bit in the input data should contribute to the correlation output. This differs from the usual convention in which a '1' in a mask bit-pattern indicates that the corresponding bit should be *ignored*. To specify that all the bits in the input data contribute to a result, instead of giving a mask value of 0, you must give it a value of '11111111111.....111111111111111111', where the number of 1's in the mask is equal to the number of bits in the correlator pattern. Defining the mask bit '1' to mean that the input data should contribute to the result permits the user to specify a mask value with fewer digits than are necessary for a given correlator input bitwidth. (For example, you only need to specify a value 'F' - only 4 bits - as the mask parameter to a 16-bit correlator if you only wish to ignore the 4 LSB's.) The Verilog model, the VHDL model, and the implementation all assume that any unspecified digits in higher order nybbles *DO* contribute to the correlator's output, so that the corresponding digits in the mask are filled in as 1's. For example, a mask of 'F' for a 16-bit correlator would be interpreted as 'FFFF'.) The side effect of this is that '3F' is interpreted as 'FF3F', since the two most significant bits of the '3' nybble are zero. An additional irregularity is that mask patterns are determined on 4-bit boundaries. That is, starting from the most-significant and going to least-significant, each nybble is examined. If there is a '1' in that nybble, the bit pattern is used "as-is". *HOWEVER*, if there is no '1' in that nybble, the Coregen module checks to see if any of the subsequent nybbles have a '1' in them. If not, the module assumes a mask pattern of '1111'; otherwise it assumes a mask pattern of '0000'. Example: For a 16-bit correlator: mask=1 is treated as mask=fff1 mask=1f is treated as mask=ff1f mask=1ff is treated as mask=f1ff mask=1fff is treated as mask=1fff mask=f0f is treated as mask=ff0f The problem is that... mask=000f is treated as mask=ffff mask=0000 is treated as mask=ffff which is unexpected. RECOMMENDATION: ---------------------------------- Xilinx recommends that users do not use the MASK function in the 1.5.2 version of the Correlator modules. End of Record #5402 - Last Modified: 04/26/99 17:02 |
| For the latest news, design tips, and patch information on the Xilinx design environment, check out the Technical Tips! |