Logic Gates
Logic Gates
1: LOGIC GATES
Aim:
To design all logic gates.
To write the Verilog HDL code for the realization of logic gates circuits.
To write the testbench and simulate the design in Xilinx ISE environment
for verifying its functionality.
To synthesize the design, implement it on Artix-7 FPGA kit and verify its
functionality.
Apparatus:
Computer System
Xilinx Vivado 2018.2
Artix 7NEXYS DDR4 FPGA Boards
Logic Diagram:
21
EXNOR GATE: TRUTH TABLE
Experimental Procedure:
1. Write a Verilog program for the design of Logic Gate Functionalities
2. Write the testbench program for the given design.
3. Simulate the design using Xilinx ISim Simulator and verify its
functionality.
4. Synthesize the design using Xilinx XST tool.
5. Obtain the RTL schematic and Technology schematic diagrams.
6. Assign pin packages using PlanAhead as per given in the evaluation
board (Spartan 3 FPGA).
7. Create Timing constraints for the design.
8. Implement the design with the user constraints specified in step 6 and 7.
9. Properly connect the FPGA evaluation board to the PC.
10.Generate the FPGA bitmap file and configure the device using iMPACT
tool.
11.Verify the functionality of the design in the FPGA Board.
22
Verilog Testbench Code:
module logicgates_tb;
reg x;reg y; // Inputs
wire A,B,C,D,E,F, G; // Outputs
logicgatesuut (.x(x), .y(y), .A(A), .B(B), .C(C), .D(D), .E(E), .F(F), .G(G));
initial
begin
// Initialize Inputs
#100 x = 0; y = 0;
#100 x = 0; y = 1;
#100 x = 1; y = 0;
#100 x = 1; y = 1;
end
endmodule
RTL Schematic:
23
abstraction which models a digital circuit in terms of the flow of digital signals
(data) between hardware registers, and the logical operations performed on
those signals. 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 Schematic:
24
a specific Xilinx architecture, which might help you discover design issues early
in the design process. We should always refer to technology schematic for
synthesized result.
Simulated Waveforms:
Synthesis Reports:
Power Report:
25
Power report gives us an insight into the power consumed by the module, a
report like this helps to know where the power is consumed and if any
redesigning is necessary.
XDC REPORT:
Utilisation report gives us an insight into the no. of LUTs, sliced registers and
Bonded IOB consumed by the module.
Result:
The design of a Logic gates circuit is obtained and simulated using Verilog
HDL in Xilinx ISE environment. The design is then synthesized, implemented
in Artix-7 FPGA kit and its functionality is verified.
26