ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder...

41
ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    217
  • download

    1

Transcript of ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder...

Page 1: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

    

ECE – 329 

Fall 2007    

Lab Manual for Xilinx  

Example: Design and simulation of a Half Adder   

Instructor: Dr.Botros        

Page 2: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.
Page 3: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Click on the FILE menu and select New Project.  

Page 4: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Name the New Project as follows. Change the VALUES accordingly.    

Page 5: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following window appears on your screen……   

Page 6: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Right click on XCV…….. and select New Source.   

Page 7: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following window appears……    

Page 8: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Select “Schematic” and change the name of the file as shown…..      

Click on NEXT

Page 9: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following window appears…..click on Finish   

Page 10: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following window opens up:  

Page 11: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Click on Symbols tab and select Logic from the categories…..   

Page 12: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Select and2 from the symbols….  

Page 13: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Place the 2-input AND gate on the schematic window as shown:    

Page 14: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Similarly select the xor2 and place it on the schematic window and then select the options tab as shown below:    

Page 15: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Click the “Add Wire” button as shown:  

Page 16: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Draw wires starting from the gate ends as shown below:   

Page 17: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Click on the “Add I/O Marker” and select the “Add input marker” option in the options tab as shown….    

Page 18: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Place the two pins as shown :   

Page 19: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Now again, click the “Add Wire” button    

Page 20: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Make the connections as shown…..   

Page 21: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Right click on the XLXN_1 pin and select Rename    

Page 22: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following window appears….   

Page 23: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Rename the branch’s net to “a” and click OK   

Page 24: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Follow the above procedure to rename the XLXN_2 pin to “b”  

Page 25: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Now again, click the “Add I/O Marker” and select the “Add output marker” option in the options tab.   

Page 26: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Place the pins as follows…..   

Page 27: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Rename the output pins as follows….   

Page 28: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Rename XLXN_5 to Cout and XLXN_6 to Sum.  

Page 29: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

   

Page 30: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Now click on the “Save All” icon to save all the work u did so far.    

Page 31: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

In the main project navigator window, highlight the halfadder.sch as shown……   

Page 32: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Now click the “+” ahead Design Entry Utilities to get the following…..   

Page 33: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Select the Launch ModelSim Simulator and double click on it.    

Page 34: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following window appears……   

Page 35: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

In the signals window, highlight the signal “a” :    

Page 36: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Now click on the “Edit” menu and select “clock”    

Page 37: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

In the “define clock window” , change the period to 1000 (not 100 )   

 

Period = 1000

Page 38: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Do the same for signal “b” but change the period to 2000(not 200)   

Period = 2000 Click OK. 

Page 39: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following screen appears….  

Page 40: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

Maximize the Wave-Default window and click on RUN as shown…   

Page 41: ECE – 329 Fall 2007 Lab Manual for Xilinx Example: Design and simulation of a Half Adder Instructor: Dr.Botros.

The following waveform appears. Place the cursor accordingly to check for the correct output values for all combinations of “a” and “b”. there is a delay of 100ps which you can ignore while checking for the output values.