How many LUT2s and MUX2, MUX4 are needed for realization of a truth table?
Number of inputs
Size of truth table
LUT2
INV
MUX2
MUX4
Total Transistors
Number of transistors
36
2
4
12
Total Transistors
2
2^2=4
1
0
0
0
12
3
2^3=8
2
1
1
0
24
4
2^4=16
4
2
0
1
34
5
2^5=32
8
3
3
2
70
6
2^6=64
16
4
0
5
104
7
2^7=128
16
5
1
10
170
8
2^8=256
16
6
0
21
300
2026 Objective
How many transistors are needed for a typical truth table?
4-Bit Floating point number: Size of truth table is 16
4-Bit Division max/x: Size of truth table is 16
Addder: Size of truth table is 256
Multiply: Size of truth table is 256
Implement 3 truth tables size 16 with LUTs and Verilog.
Make layout and simulate with LTSPICE.
(Expand to larger truth tables)
Truth table:
Equations:
Structural lookup MUX VHDL:
Verilog: Simulation:
VHDL LUT Implementation
Example:
output2: 37E54251
MUX4_0: MUX4 port map(net_L1, net_L5, net_L2, net_L4, I2, I3, Y2MA0);
MUX4_1: MUX4 port map(net_L5, net_LE, net_L7, net_L3, I2, I3, Y2MA1);
MUX2_0: MUX2 port map(Y2MA0, Y2MA0, 4, IY2); // Y2MB0
Signal names:
I0,..,In: inputs
L0,..,LF: lookup outputs
Y0MA0,..,YnMAi: first multiplexer stage output
Y0MB0,..,YnMBi: next multiplexer stage output
..
Y0,..Yn:output
-------------------- Cell LUT4_37E5{sch} --------------------
entity LUT4_37E5 is port(I0, I1, I2, I3: in BIT; Y: out BIT);
end LUT4_37E5;
architecture LUT4_37E5_BODY of LUT4_37E5 is
component LUT2E port(I0, I1: in BIT; O: out BIT);
end component;
component LUT23 port(I0, I1: in BIT; O: out BIT);
end component;
component LUT25 port(I0, I1: in BIT; O: out BIT);
end component;
component LUT27 port(I0, I1: in BIT; O: out BIT);
end component;
component MUX4 port(I0, I1, I2, I3, I4, I5: in BIT; O: out BIT);
end component;
signal net_L5, net_L3, net_L7, net_LE: BIT;
begin
LUT2E_0: LUT2E port map(I0, I1, net_LE);
LUT23_0: LUT23 port map(I0, I1, net_L3);
LUT25_0: LUT25 port map(I0, I1, net_L5);
LUT27_0: LUT27 port map(I0, I1, net_L7);
MUX4_0: MUX4 port map(net_L5, net_LE, net_L7, net_L3, I2, I3, Y);
end LUT4_37E5_BODY;
Verilog Counter Implementation
Verilog Truth Table Implementation
module tt4(clk,a,b);
input clk;
input [3:0] a;
output [3:0] b;
reg [3:0] newstate;
always @(posedge clk) // clk sync truth table
begin
case (a)
4'b0000 : newstate = 4'b0001;
..
4'b1111 : newstate = 4'b0000;
default : newstate = 4'b0000; //
endcase
end
assign b = newstate;
endmodule
tt4 tt40(.clk(clk),.a(c),.b(c)); // makes counter