Problem 7.
The Xilinx 4000 series field-programmable gate array (FPGA) can be
programmed to emulate a circuit made up of many thousands of gates;
for example, the XC4025E can emulate circuits with up to 25,000 gates.
The heart of the FPGA architecture is a configurable logic block (CLB)
which has a combinational logic subsection with the following circuit
diagram:
There are two 4-input function generators and one 3-input function
generator, each capable of implementing an arbitrary Boolean function
of its inputs.
The function generators are actually small 16-by-1 and 8-by-1
memories that are used as lookup tables; when the Xilinx device is
"programmed" these memories are filled with the appropriate values so
that each generator produces the desired outputs. The multiplexer
select signals (labeled "Mx" in the diagram) are also set by the
programming process to configure the CLB. After programming, these Mx
signals remain constant during CLB operation.
The following is a list of the possible configurations. For each
configuration indicate how each the control signals should be
programmed, which of the input lines (C1-C4, F1-F4, and G1-G4) are
used, and what output lines (X, Y, or Z) the result(s) appear on.
-
An arbitrary function F of up to four input variables, plus another
arbitrary function G of up to four unrelated input variables, plus a
third arbitrary function H of up to three unrelated input variables.
Let X = F(F1, F2, F3, F4), Z = G(G1, G2, G3, G4), Y = H(C1, C2, C3).
The necessary control signals are:
MA = 1
MB = 1
MC = 0 (select C1)
MD = 1 (select C2)
ME = 2 (select C3)
-
An arbitrary single function of five variables.
Let Y = F(A1, A2, A3, A4, A5). This can be implemented using both
4-input logic functions, and selecting between the two outputs with
the 3-input logic function.
Z=f(A1, A2, A3, A4, 0),
X=f(A1, A2, A3, A4, 1),
Y= Z if A5=0, else Y=X
So Z is calculating F for the case when A5 = 0, X is calculating F for
the case when A5 = 1, and Y is selecting between X and Z with a
multiplexer function. A1-A4 represents F1-F4 and G1-G4 (they're
connected to the same 4 inputs) and A5 represents C1. The necessary
control signals are:
MA = 0
MB = 0
MC = X (value doesn't matter)
MD = X (value doesn't matter)
ME = 0 (select C1)
-
An arbitrary function of four variables together with some functions
of six variables. Characterize the functions of six variables that
can be implemented.
Let Z = G(G1, G2, G3, G4) - any function of 4 variables.
X = F(F1, F2, F3, F4)
Y = H(C1, C2, X) = H(C1, C2, F(F1, F2, F3, F4))
The functions of six variables which can be implemented (along with
the 4-variable function) are all those functions that can be
re-written as a function of 3 variables. The inputs to this function
of three variables must be 2 of the original variables and some
function of the remaining four variables. The necessary control
signals are:
MA = 0
MB = 1
MC = X (value doesn't matter)
MD = 0 (select C1)
ME = 1 (select C2)
-
Some functions of up to nine variables. Characterize the functions of
up to nine variables that can be implemented.
Let
X = F(F1, F2, F3, F4)
Z = G(G1, G2, G3, G4)
Y = H(C1, X, Z) = H(C1, F(F1, F2, F3, F4), G(G1, G2, G3, G4))
The functions of nine variables that can be implemented are all
those functions that can be re-written as a function of 3 variables.
The inputs to this three-variable function will be one of the original
variables, plus two separate functions of 4 variables (these two
4-variable functions will have the remaining 8 original variables as
inputs).
MA = 0
MB = 0
MC = X (value doesn't matter)
MD = X (value doesn't matter)
ME = 0 (select C1)
-
[Optional challenge] Can every function of six inputs be implemented?
If so, explain how. If not, give a 6-input function and explain why
it can't be implemented in the CLB.
The functions of 6 variables which we can implement must be of the form
Y = y(C1, C2, f(F1,F2,F3,F4))
or of the form
Y = y(C1, f(F1, F2, F3, F4), g(G1, G2, G3, G4))
(this second function will have some overlap between C1, F1-4, and
G1-4; some variables will be connected to multiple inputs)
Essentially, the functions we are able to implement are only those for
which we can factor a set of 4 variables out of the equation. For
example, the following function cannot be implemented by the CLB:
Y = A1A2A3A4A5 + A1A2A3A4A6 + A1A2A3A5A6 + A1A2A4A5A6
+ A1A3A4A5A6 +A2A3A4A5A6
This function cannot be broken down into either of the forms mentioned above.