The Study of the Wiener Processes Base on Haar Wavelet
14 mecv14 dvd
1. Special Assignment
Subjects:
- Digital VLSI Design
Topic:
“A four-bit comparator with a six-bit output Y(5:0). Bit 5 of Y is for "equals:' bit 4 is
for "not equal to," bit 3 is for "greater than," bit 2 is for "less than," bit 1 for "greater
than or equal to: ' and bit 0 for "less than or equal to." With minimum hardware
requirements.”
Department of Electrical Engineering
Electronics & Communication Engineering Program
Master of Technology - VLSI
Institute of Technology, Nirma University
Ahmedabad-382481
Prepared By,
Axay Patel (14MECV14)
Guided By,
Dr. Usha S Mehta
Prof. Vaishali Dhare
2. 1. Specification and Architecture definition
1.1 4-bit Magnitude Comparator:
Our aim is to minimize hardware area as much as possible. So first we derive two outputs,
equal and greater. Then others (lesser, greater or equal, not equal, less or equal) will be
derived using simple gate structure followed by those two outputs. This is explained below
Two 4-bit data
퐴 = 퐴3퐴2 퐴1퐴0, 퐵 = 퐵3퐵2퐵1퐵0
푋3 = 퐴3 푥푛표푟 퐵3
푋2 = 퐴2 푥푛표푟 퐵2
푋1 = 퐴1 푥푛표푟 퐵1
푋0 = 퐴0 푥푛표푟 퐵0
퐸푞푢푎푙 (퐸) = 푋3푋2푋1푋0
퐺푟푒푎푡푒푟 (퐺) = 퐴3 퐵3 ′
+ 푋3퐴2퐵2 ′
+ 푋3푋2퐴1퐵1 ′
+ 푋3푋2푋1퐴0퐵0 ′
퐺푟푒푎푡푒푟 (퐺) = 퐴3 퐵3 ′
+ 푋3(퐴2퐵2 ′
For lesser area we reduce the equation
+ 푋2(퐴1퐵1 ′
+ 푋1퐴0퐵0 ′
))
푁표푡 푒푞푢푎푙 (푁퐸) = 퐸̅
퐺푟푒푎푡푒푟 표푟 푒푞푢푎푙 (퐺퐸) = 퐺 + 퐸
퐿푒푠푠 (퐿) = ̅퐺̅̅퐸̅
퐿푒푠푠 표푟 푒푞푢푎푙 (퐿퐸) = 퐺̅
3. Output is in form of 6-bit,
Y(5:0)={E,NE,G,L,GE,LE}
For example, 1) A=0101 and B=0010 then 2) A=1010 and B=1010 then
Y=011010 Y=100011
5. 3. Gate Level Schematic
Tool Used: DSCH 2.7f
Here we have tried to put all universal gates and NOT gate so we can easily implement all
gate into transistor level schematic.
So, area can be reduced.
We have equations
푋3 = 퐴3 푥푛표푟 퐵3, 푋2 = 퐴2 푥푛표푟 퐵2, 푋1 = 퐴1 푥푛표푟 퐵1, 푋0 = 퐴0 푥푛표푟 퐵0
푋푛 = 퐴푛′
퐵푛′
+ 퐴푛 퐵푛 → 푋푛 = [(퐵푛′
+ 퐴푛 )′ + (퐴푛′
+ 퐵푛)′ ]′ -- NOR and NOT structure
퐺푟푒푎푡푒푟 (퐺) = 퐴3 퐵3 ′
+ 푋3(퐴2퐵2 ′
+ 푋2(퐴1퐵1 ′
+ 푋1퐴0퐵0 ′
))
is manipulated as
′ ∙ [푋3 ∙ [푚2
G = [푚3
′ ∙ [푋2 ∙ [푚1
′ ∙ (푋1 ∙ 푚0)′ ]′ ]′ ]′]′ ]′ -- NAND and NOT structure
푤ℎ푒푟푒 푚3 = 퐴3 퐵3 ′
, 푚2 = 퐴2퐵2 ′
, 푚1 = 퐴1퐵1 ′
, 푚0 = 퐴0퐵0 ′
,
E = 푋3푋2푋1푋0 -> E = ((푋3푋2푋1)′ + 푋0 ′
)′ --NAND ,NOR and NOT structure
(maximum 3 input NAND or NOR gate is used)
퐿 = (퐺 + 퐸)′ -> GE = L’
LE =G’
6. Verilog Code:
module comparator_4_bit(
A0,B0,B3,A3,A2,B2,B1,A1,
E,NE,G,LE,L,GE);
input A0,B0,B3,A3,A2,B2,B1,A1;
output E,NE,G,LE,L,GE;
nor or(w3,w1,A0);
not inv(w4,A0);
not inv(w1,B0);
nor or(w6,B0,w4);
nor or(w7,w3,w6);
nor or(w11,w9,w10);
nor or(w10,B3,w12);
not inv(NE,E);
not inv(w12,A3);
nor or(w9,w16,A3);
nor or(w19,w17,A2);
not inv(w20,A2);
not inv(w17,B2);
nor or(w22,B2,w20);
nor or(w23,w19,w22);
nor or(w27,w25,w26);
nor or(w26,B1,w28);
not inv(w29,B1);
not inv(w28,A1);
nor or(w25,w29,A1);
nand and(w31,w11,w23,w27);
nor or(E,w31,w32);
not inv(w32,w7);
not inv(w16,B3);
nand and(w33,w6,w27);
not inv(w34,w26);
not inv(w35,w22);
nand and(w36,w33,w34);
nand and(w37,w36,w23);
nand and(w38,w37,w35);
not inv(w39,w10);
nand and(w40,w38,w11);
nand and(G,w40,w39);
not inv(LE,G);
nor or(L,E,G);
not inv(GE,L);
endmodule
TOTAL Transistor used: 116 transistors
7. 4. Transistor level schematic for each gate
Total Transistor calculated = 112 transistors (including nmos and pmos)
13. Here we need to design fully combinational circuit and moreover hardware should be
minimized. For combinational circuit we have 8 inputs and 6 non registered outputs. So we
can use PROM or PLA or PAL.
1) PROM: Programmable read only memory
In PROM, decoder is followed by programmable OR plane. So, unnecessary
hardware consumed in decoder as well as in programmable OR plane. So, this is not
suitable choice for design.
2) PLA: Programmable Logic Array
PLA consist two programmable arrays. One is OR plane and second is AND plane.
Here we need three output (G, E, and GE) should be fed back to the input. This
facility is not easily available with PLA structure. If we use PLA structure we need to
implement all equation separately and it consumes more hardware. So PLA would
not be suitable choice for our design.
3) PAL: Programmable Array Logic
PAL is having one programmable AND plane and fixed OR plane.
We know that PAL could be our suitable choice. Now we will find particular device
in PAL.
We need three output fed back to input.
8 input
6 output
So we can use PLA 22CEV10 for our design.
Now our aim is implement this design on FPGA kit. We will use SPARTAN 3E starter board
for our design.
Xilinx XC3S500E Spartan-3E FPGA
• Up to 232 user-I/O pins
• 320-pin FBGA package
• Over 10,000 logic cells
14. • Xilinx 4 Mbit Platform Flash configuration PROM
6. Synthesis
============================================================
* Design Summary *
============================================================
Top Level Output File Name : magnitude_comparator.ngc
Primitive and Black Box Usage:
------------------------------
# BELS : 9
# LUT4 : 3
# LUT5 : 4
# LUT6 : 2
# IO Buffers : 14
# IBUF : 8
# OBUF : 6
Device utilization summary:
---------------------------
Selected Device : 6slx45csg324-3
Slice Logic Utilization:
Number of Slice LUTs: 9 out of 27288 0%
Number used as Logic: 9 out of 27288 0%
Slice Logic Distribution:
15. Number of LUT Flip Flop pairs used: 9
Number with an unused Flip Flop: 9 out of 9 100%
Number with an unused LUT: 0 out of 9 0%
Number of fully used LUT-FF pairs: 0 out of 9 0%
Number of unique control sets: 0
IO Utilization:
Number of IOs: 14
Number of bonded IOBs: 14 out of 218 6%
6.1 Synthesis Report
18. 7.1 Basic difference between two schematics
RTL View
Viewing an RTL schematic opens an NGR file that can be viewed as a gate-level schematic.
This schematic is generated after the HDL synthesis phase of the synthesis process. It
shows a representation of the pre-optimized design in terms of generic symbols, such as
adders, multipliers, counters, AND gates, and OR gates, that are independent of the targeted
Xilinx device.
Technology View
Viewing a Technology schematic opens an NGC file that can be viewed as an architecture-specific
schematic.
This schematic is generated after the optimization and technology targeting phase of the
synthesis process. It shows a representation of the design in terms of logic elements
optimized to the target Xilinx device or "technology"; for example, in terms of of LUTs,
carry logic, I/O buffers, and other technology-specific components. Viewing this schematic
allows you to see a technology-level representation of your HDL optimized for a specific
Xilinx architecture, which might help you discover design issues early in the design
process.
9. Test Bench
19. module comp_stm;
// Inputs
reg [3:0] A;
reg [3:0] B;
// Outputs
wire [5:0] Y;
// Instantiate the Unit Under Test (UUT)
magnitude_comparator uut (
.A(A),
.B(B),
.Y(Y)
);
initial begin
// Initialize Inputs
A = 0;
B = 0;
// Wait 100 ns for global reset to finish
#100
A=4'b0101;
B=4'b0011;
#10
A=4'b1111;
B=4'b1111;
#10
A=4'b0001;
B=4'b0010;
end
endmodule