10:33 AM
Write a program in verilog to implement 4 bit parallel adder using Gate level modeling


1. Open a new project from the drop down menu by clicking in FILE given on the
top left of the screen.
2. Create a new project and name it.
3. Click on next to enter the device properties.
4. Select the appropriate properties according to the hardware to be used.
5. Click on the next button to enter the new source.
6. Here select the Verilog MODULE and give the file name.
7. Click on next button and enter the entity name.
8. Select the define module.
9. Select the ports as input and output and name them.
10. Click on next and then to on finish.
11. Write the code for the project under the library entity.
12. Save the program.
13. Select the behavioral simulation option from the three modeling options.
14. Now select the syntax check.
15. If the syntax check comes out to be correct, then precede further, otherwise check
16. Now select simulation option and select the test bench option.
17. Initialize the clock and other properties from the window that appears on the
18. Give the clock pulse to one of the inputs and save the program.
19. Click on simulate to get the output.

module parad4(sum,carry,a,b);
output [3:0]sum;
output carry;
input [3:0]a,b;
wire c1,c2,c3;
ha u1(sum[0],c1,a[0],b[0]);
fa u2(sum[1],c2,a[1],b[1],c1);
fa u3(sum[2],c3,a[2],b[2],c2);
fa u4(sum[3],carry,a[3],b[3],c3);

Views: 95 | Added by: vijoriya | Tags: program, implement, Gate level modeling, verilog, 4 bit, parallel adder | Rating: 0.0/0
Total comments: 0