|
4.2.4 LPM_OR |
Copyright © 1998 University of Manchester |
Ports
Description | Comments | |||
Data input | Vector, LPM_Size times LPM_Width wide | |||
Result of OR operators | Vector, LPM_Width wide |
Properties
Value | Comments | ||
LPM Value > 0 | Width of output vector. Number of OR gates. | ||
LPM Value > 0 | Number of inputs to each OR gate. Number of input buses. |
Function
Where i goes from 0 to (LPM_Width - 1).
Suppose the designers have three 8-bit buses and they want to
OR the corresponding bits of the three buses. This is done using
an LPM_OR with an LPM_Width of 8 and an LPM_Size of three. The
LPM_Width of eight indicates that there are eight OR gates, and
the LPM_Size of three indicates that each OR gate has three inputs.
The function performed by the LPM_OR gate in this case is:
Out[0] = Result0 = Data2X0 | Data1X0 | Data0X0 = A[0] | B[0] | C[0]
Out[1] = Result1 = Data2X1 | Data1X1 | Data0X1 = A[1] | B[1] | C[1]
Out[2] = Result2 = Data2X2 | Data1X2 | Data0X2 = A[2] | B[2] | C[2]
Out[3] = Result3 = Data2X3 | Data1X3 | Data0X3 = A[3] | B[3] | C[3]
Out[4] = Result4 = Data2X4 | Data1X4 | Data0X4 = A[4] | B[4] | C[4]
Out[5] = Result5 = Data2X5 | Data1X5 | Data0X5 = A[5] | B[5] | C[5]
Out[6] = Result6 = Data2X6 | Data1X6 | Data0X6 = A[6] | B[6] | C[6]
Out[7] = Result7 = Data2X7 | Data1X7 | Data0X7 = A[7] | B[7] | C[7]