sample design of half adder is used to explain the design flow

Upload: syam-sandeep

Post on 10-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    1/12

    Sample Design of Half Adder is used to explain the Design Flow.

    1 Design Description

    2 Truth Table of Half adder: -

    Inputs Output

    A B Sum Carry

    0 0 0 0

    0 1 1 0

    1 0 1 0

    1 1 0 1

    3 VHDL Code for Half adderlibrary IEEE;

    use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;

    use IEEE.STD_LOGIC_UNSIGNED.ALL;

    entity half_adder is

    Port ( a : in std_logic;

    b : in std_logic;c : in std_logic;

    sum : out std_logic;carry : out std_logic);

    end full_adder;

    architecture Behavioral of half_adder is

    beginsum

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    2/12

    4 Steps to implement the Half adder in the FPGA using Xilinx ISE(8.1i)

    Step 1 : Start the Xilinx Project Navigator by using the desktop shortcut or by using the Start

    Programs Xilinx ISE(8.1i).

    SOURCE

    WINDOW

    PROCESSWINDOW

    WORKSPACE

    TRANSCRIP

    T

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    3/12

    Step 2 Create a new project

    In the window go to FILENew project.Specify the project name and location and say NEXT

    Select Device. Use the pull-down arrow to select the Value for each Property Name.Click in the field to access the pull-down list.

    Say FINISH. Project summary is seen.

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    4/12

    Step 3: Creating a new VHD file

    Click on the symbol of FPGA device and then right click Click on new source

    VHDL module and give the File name

    Then say NextDefine ports.In this case

    a and b are the input ports defined as in

    sum and carryare output ports defined as outafter this say Nexttwice and then FinishSkeleton of the design is shown in the VHDL editor.

    VHDLMODUL

    E

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    5/12

    Step 4: Writing the Behavioural VHDL Code in VHDL EditorSample code is given below for this experiment.

    Step 5 Check Syntax

    Run the Check syntax Process window synthesizecheck syntax >, and removeerrors if present.

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    6/12

    Step 6 Creating a test bench fileVerify the operation of your design before you implement it as hardware. Simulationcan be done using ISE simulator. For this click on the symbol of FPGA device and

    then right click Click on new sourceTest Bench Waveform and give the name

    Select entityFinish.

    Select the desired parameters for simulating your design. In this case combinationalcircuit and Simulation time.

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    7/12

    Step 7: Simulate the codeSimulation ToolsISE tool supports the following simulation tools:

    HDL Bencher is an automated test bench creation tool. It is fully integrated withProject Navigator.

    ModelSim from Model Technology, Inc., is integrated in Project Navigator tosimulate the design at all steps (Functional and Timing). ModelSim XE, the XilinxEdition of Model Technology, Inc.s ModelSim application, can be installed from theMTI CD included in your ISE Tool

    In source Window from the Drop-down menu select Behavioural Simulation to view thecreated test Bench file.

    Click on test bench file. Test bench file will open in main window. Assign all the signalsand save File. From the source of process window. Click on Simulate BehavioralModelin Process window.

    FORSIMULATION

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    8/12

    Verify your design in wave window by seeing behaviour of output signal with respect toinput signal. Close the ISE simulator window

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    9/12

    Step 8: Synthesize the design using XST.Translate your design into gates and optimize it for the target architecture. This is thesynthesis phase.Again for synthesizing your design, from the source window select,

    synthesis/Implementation from the drop-down menu.

    SIMULATED

    OUTPUT

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    10/12

    Highlight file in the Sources in Project window. To run synthesis, right-click onSynthesize, and the Run option, ordouble-click on Synthesize in the Processes forCurrent Source window. Synthesis will run, and

    a green check will appear next to Synthesize when it is successfullycompleted.

    a red crossindicates an error was generated and

    a yellow exclamation ! mark indicates that a warning was generated, (warningsare OK).Check the synthesis report.If there are any errors correct it and rerun synthesis..

    SYNTHESIS

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    11/12

    Step 9: Create Constraints File(UCF)

    Click on the symbol of FPGA device and then right click Click on new sourceImplementation Constraints File and give the name Select entityFinish.Click on User Constraint andin that Double Click onAssign Package Pins option inProcess window. Xilinx PACE window opens. Enter all the pin assignments in PACE.,depending upon target device and number of input and outputs used in your design.(sample code is given below for given design.)

    SYNTHESISCOMPLETED

    SUCCESSFULLY

  • 8/8/2019 Sample Design of Half Adder is Used to Explain the Design Flow

    12/12

    PINASSIGNMENT