Lab 1 & 2
Lab 1 & 2
Lab 1 & 2
LAB 1:
1. Write Verilog HDL code for Half Adder using Gate Level, Data Flow and Behavioural
Modeling.
Synthesize and implement using Xilinx tools and also attach RTL schematic of each modeling
repectively.
SOLUTION:
CODE:
module adder( a,b,sum,cout);
input a;
input b;
output sum;
output cout;
xor(sum,a,b);
and(cout,a,b);
endmodule
DATA FLOW:
input a;
input b;
output sum;
output cout;
endmodule;
BEHAVIOURAL:
input a;
input b;
output sum;
output cout;
reg sum;
reg cout;
always@(a or b)
begin
sum = a^b;
cout = a&b;
end
endmodule
IMPLEMENTATION:
LAB 2:
Write a Verilog code for blinking LEDs on FPGA board. Upload the program on board by
following the above procedure. Attach snapshots of each step.
SOLUTION/IMPLEMENTATION: