+ All Categories
Home > Documents > Copy of Vlsi Manual Final11

Copy of Vlsi Manual Final11

Date post: 10-Apr-2018
Category:
Upload: balaji-duraiyan
View: 223 times
Download: 0 times
Share this document with a friend

of 47

Transcript
  • 8/8/2019 Copy of Vlsi Manual Final11

    1/46

    VLSI LABORATORY

    Department Of Electronics and

    Communication Engineering

    Paavai College of EngineeringPachal,Namakkal

    VLSI LAB SYLLABUS

  • 8/8/2019 Copy of Vlsi Manual Final11

    2/46

    SL. No. ExperimentsCycle-I Design and simulation of Combinational Logic Circuit using VHDL

    1 Adder2 Multiplexer and Demultiplexer3 Encoder and Decoder4 Multiplier

    Cycle-II Design and simulation of Sequential logic circuit using VHDL1 Flip Flops2 Counter3 Shift registers

    Cycle-III CMOS Circuit design using Multisim (DC and Transient Analysis)1 CMOS Inverter2 CMOS NAND and NOR Gates3 CMOS D Latch

    Cycle-IV FPGA Implementation1 4 bit Adder2 Real Time Clock

    TOOLS USED: Modelsim, Xilinx ISE and Multisim.

    EX.No:1ADDERDATE :

    AIM:

    To Simulate VHDL Program for Adder Using ModelSim SE 6.0a tool and verify theoutput.

  • 8/8/2019 Copy of Vlsi Manual Final11

    3/46

    APPARATUS REQUIRED:

    1. EDA Tool: ModelSim SE 6.0a2. PC : WINDOWS OS

    PROCEDURE:

    1. Double click on ModelSim SE 6.0a icon in the Desktop.

    2. Click fileNew SourceVerilog.

    3. Type the program in the work space window.

    4. Save the program as .v extension in Work.

    5. Go to Compile Type file name Compile Done.

    6. Go to Simulate Start SimulationWorkSelect Filename Ok.

    7. Go to ViewDebug WindowObjects.

    8. Force the input by right clicking the input variables

    9. Select all the variablesRight clickAdd To WaveSelected Signals.

    10. Go to SimulateRunRun 100ps.

    11. Then verify the output.

    PROGRAM:

    Half Adder(VHDL) using dataflow:

    library ieee;

    use ieee.std_logic_1164.all;

    use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;

    entity halfadder isport ( a,b : in std_logic;

    sum, carry : out std_logic);

    end halfadder;

    architecture behavioral of halfadder isbegin

    sum

  • 8/8/2019 Copy of Vlsi Manual Final11

    4/46

    Full Adder(VHDL) using dataflow:

    library ieee;use ieee.std_logic_1164.all;

    use ieee.std_logic_arith.all;

    use ieee.std_logic_unsigned.all;entity fulladder is

    port ( a,b,c : in std_logic;

    sum, carry : out std_logic);end fulladder;

    architecture behavioral of fulladder is

    beginsum

  • 8/8/2019 Copy of Vlsi Manual Final11

    5/46

    architecture behavioral of xor1 is

    begin

    y

  • 8/8/2019 Copy of Vlsi Manual Final11

    6/46

    y

  • 8/8/2019 Copy of Vlsi Manual Final11

    7/46

    component xor1

    port(a,b,c: in std_logic; y: out std_logic);

    end component;component and1

    port(a,b: in std_logic; y: out std_logic);

    end component;component or1

    port(a,b,c: in std_logic; y: out std_logic);

    end component;signal y1,y2,y3:std_logic;

    begin

    x1: xor1 port map(a,b,c,sum);

    a1: and1 port map(a,b,y1);a2: and1 port map(b,c,y2);

    a3: and1 port map(c,a,y3);

    o1: or1 port map(y1,y2,y3,carry);

    end behavioral;

    RESULT:

    Thus the half adder and full adder program using ModelSim SE 6.0a was stimulated and

    output was verified.

    EX.No:2Multiplexer and DemultiplexerDATE :

    AIM:

    To Simulate VHDL Program for Multiplexer and Demultiplexer Using ModelSim SE6.0a tool and verify the output.

    ECE DEPARTMENT

    PERFORMANCE 25

    RECORD 15

    VIVA-VOCE 10

    TOTAL 50

  • 8/8/2019 Copy of Vlsi Manual Final11

    8/46

    APPARATUS REQUIRED:

    1. EDA Tool: ModelSim SE 6.0a tool2. PC:WINDOWS OS

    PROCEDURE:

    1. Double click on ModelSim SE 6.0a icon in the Desktop.

    2. Click fileNew SourceVerilog.

    3. Type the program in the work space window.

    4. Save the program as .v extension in Work.

    5. Go to Compile Type file name Compile Done.

    6. Go to Simulate Start SimulationWorkSelect Filename Ok.

    7. Go to ViewDebug WindowObjects.

    8. Force the input by right clicking the input variables

    9. Select all the variablesRight clickAdd To WaveSelected Signals.

    10. Go to SimulateRunRun 100ps.

    11. Then verify the output.

    PROGRAM:

    2 to 1 MUX (VHDL) using dataflow:

    library ieee;

    use ieee.std_logic_1164.all;

    use ieee.std_logic_arith.all;

    use ieee.std_logic_unsigned.all;

    entity mux 2 to 1 is

    port ( i1,i2,s : in std_logic;

    y : out std_logic);end mux 2 to 1;

    architecture behavioral of mux 2 to 1 is

    begin

    y

  • 8/8/2019 Copy of Vlsi Manual Final11

    9/46

    end behavioral;

    4 to 1 MUX (VHDL) using dataflow:library ieee;

    use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;

    use ieee.std_logic_unsigned.all;

    entity mux 4 to 1 isport ( i1,i2,i3,i4,s1,s2 : in std_logic;

    y : out std_logic);

    end mux 4 to 1;

    architecture behavioral of mux 4 to 1 is

    begin

    y

  • 8/8/2019 Copy of Vlsi Manual Final11

    10/46

    case sel is

    when"000"=>

    y

    yy

    y

    y

    y

    y

    y

    end case;end process;

    end behavioral;

    1 to 2 DEMUX (VHDL) using dataflow:

    library ieee;use ieee.std_logic_1164.all;

    use ieee.std_logic_arith.all;

    use ieee.std_logic_unsigned.all;

    entity demux 1 to 2 is

    port ( i, s : in std_logic;y1,y2 : out std_logic);

    end demux 1 to 2;

    architecture behavioral of demux 1 to 2 is

    begin

    y1

  • 8/8/2019 Copy of Vlsi Manual Final11

    11/46

    use ieee.std_logic_unsigned.all;

    entity demux 1 to 4 isport ( i,s1,s0 : in std_logic;

    y1,y2,y3,y4 : out std_logic);

    end demux 1 to 4;

    architecture behavioral of demux 1 to 4 is

    begin

    y1

  • 8/8/2019 Copy of Vlsi Manual Final11

    12/46

    end behavioral;

    RESULT:

    Thus the Multiplexer and Demultiplexer program using ModelSim SE 6.0a was

    stimulated and output was verified.

    EX.No:3Encoder and DecoderDATE :

    AIM:

    ECE DEPARTMENT

    PERFORMANCE 25

    RECORD 15

    VIVA-VOCE 10

    TOTAL 50

  • 8/8/2019 Copy of Vlsi Manual Final11

    13/46

    To Simulate VHDL Program for Encoder and Decoder Using ModelSim SE 6.0a tool and

    verify the output.

    APPARATUS REQUIRED:

    3. EDA Tool: ModelSim SE 6.0a tool

    4. PC:WINDOWS OS

    PROCEDURE:

    12. Double click on ModelSim SE 6.0a icon in the Desktop.

    13. Click fileNew SourceVerilog.

    14. Type the program in the work space window.

    15. Save the program as .v extension in Work.

    16. Go to Compile Type file name Compile Done.

    17. Go to Simulate Start SimulationWorkSelect Filename Ok.

    18. Go to ViewDebug WindowObjects.

    19. Force the input by right clicking the input variables

    20. Select all the variablesRight clickAdd To WaveSelected Signals.

    21. Go to SimulateRunRun 100ps.

    22. Then verify the output.

    PROGRAM:

    2 to 4 Decoder:

    library ieee;

    use ieee.std_logic_1164.all;

    use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;

    entity decoder 2 to 4 isport ( e,i1,i2 : in std_logic;

    o1,o2,o3,o4 : out std_logic);

    end decoder 2 to 4;architecture behavioral of decoder 2 to 4 is

    begin

    o1

  • 8/8/2019 Copy of Vlsi Manual Final11

    14/46

    o2

  • 8/8/2019 Copy of Vlsi Manual Final11

    15/46

    o2

  • 8/8/2019 Copy of Vlsi Manual Final11

    16/46

    AIM:To Simulate VHDL Program for Multiplier Using ModelSim SE 6.0a tool and verify the

    output.

    APPARATUS REQUIRED:5. EDA Tool: ModelSim SE 6.0a tool6. PC:WINDOWS OS

    PROCEDURE:

    23. Double click on ModelSim SE 6.0a icon in the Desktop.

    24. Click fileNew SourceVerilog.

    25. Type the program in the work space window.

    26. Save the program as .v extension in Work.

    27. Go to Compile Type file name Compile Done.

    28. Go to Simulate Start SimulationWorkSelect Filename Ok.

    29. Go to ViewDebug WindowObjects.

    30. Force the input by right clicking the input variables

    31. Select all the variablesRight clickAdd To WaveSelected Signals.

    32. Go to SimulateRunRun 100ps.

    33. Then verify the output.

    PROGRAM:

    Unsigned 8 x 4 bit Multiplier:

    library ieee;

    use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;

    entity mult is

    port(A : in std_logic_vector(7 downto 0);B : in std_logic_vector(3 downto 0);

    RES : out std_logic_vector(11 downto 0));

    end mult;architecture archi of mult is

    begin

  • 8/8/2019 Copy of Vlsi Manual Final11

    17/46

    RES

  • 8/8/2019 Copy of Vlsi Manual Final11

    18/46

    AIM:

    To Simulate VHDL Program for Flip Flops Using ModelSim SE 6.0a tool and verify the

    output.

    APPARATUS REQUIRED:1. ModelSim SE 6.0a tool

    2. PC:XP/WINDOWS

    PROCEDURE:

    1. Double click on ModelSim SE 6.0a icon in the Desktop.

    2. Click fileNew SourceVerilog.

    3. Type the program in the work space window.

    4. Save the program as .v extension in Work.

    5. Go to Compile Type file name Compile Done.

    6. Go to Simulate Start SimulationWorkSelect Filename Ok.

    7. Go to ViewDebug WindowObjects.

    8. Force the input by right clicking the input variables

    9. Select all the variablesRight clickAdd To WaveSelected Signals.

    10. Go to SimulateRunRun 100ps.

    11. Then verify the output.

    PROGRAM:

    DFF(VHDL) using Behavioral:

    library ieee;

    use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;

    use ieee.std_logic_unsigned.all;

    entity dff is

    port ( d,res,clk : in std_logic;

    q : out std_logic);end dff;

    architecture behavioral of dff is

    begin

    process(clk)begin

    if(res='0') then q

  • 8/8/2019 Copy of Vlsi Manual Final11

    19/46

    elsif clk'event and clk='1'

    then q

  • 8/8/2019 Copy of Vlsi Manual Final11

    20/46

    port (s,r,clk : in std_logic;

    q,qb : buffer std_logic);

    end srff;

    architecture behavioral of srff is

    begin

    q

  • 8/8/2019 Copy of Vlsi Manual Final11

    21/46

    COUNTERDATE :

    AIM:

    To Simulate VHDL Program for Counter Using ModelSim SE 6.0a tool and verify the

    output.

    APPARATUS REQUIRED:

    1. ModelSim SE 6.0a tool2. PC:XP/WINDOWS

    PROCEDURE:

    1. Double click on ModelSim SE 6.0a icon in the Desktop.

    2. Click fileNew SourceVerilog.

    3. Type the program in the work space window.

    4. Save the program as .v extension in Work.

    5. Go to Compile Type file name Compile Done.

    6. Go to Simulate Start SimulationWorkSelect Filename Ok.

    7. Go to ViewDebug WindowObjects.

    8. Force the input by right clicking the input variables

    9. Select all the variablesRight clickAdd To WaveSelected Signals.

    10. Go to SimulateRunRun 100ps.

    11. Then verify the output.

    PROGRAM:

    UP COUNTER(VHDL) using Behavioral:

    library ieee;use ieee.std_logic_1164.all;

    use ieee.std_logic_arith.all;

    use ieee.std_logic_unsigned.all;

    entity upcounter is

    port ( clk,clr : in std_logic;q : inout std_logic_vector (2 downto 0));

  • 8/8/2019 Copy of Vlsi Manual Final11

    22/46

    end upcounter;

    architecture behavioral of upcounter is

    begin

    process(clk)

    variable temp: std_logic_vector (2 downto 0):="000";

    begin

    if (rising_edge (clk)) thenif clr='0' then

    case temp is

    when "000"=>temp:="001";

    when "001"=>temp:="010";when "010"=>temp:="011";

    when "011"=>temp:="100";

    when "100"=>temp:="101";

    when "101"=>temp:="110";when "110"=>temp:="111";

    when "111"=>temp:="000";when others=>temp:="000";

    end case;

    else

    temp:="000";end if;

    end if;

    q

  • 8/8/2019 Copy of Vlsi Manual Final11

    23/46

    process(clk)

    variable temp: std_logic_vector (2 downto 0):="000";

    begin

    if (rising_edge (clk)) then

    if clr='0' thencase temp is

    when "000"=>temp:="111";

    when "111"=>temp:="110";when "110"=>temp:="101";

    when "101"=>temp:="100";

    when "100"=>temp:="011";

    when "011"=>temp:="010";when "010"=>temp:="001";

    when "001"=>temp:="000";

    when others=>temp:="000";

    end case;else

    temp:="000";end if;

    end if;

    q

  • 8/8/2019 Copy of Vlsi Manual Final11

    24/46

    begin

    if (rising_edge (clk)) then

    if clr='0' thencase temp is

    when "0000"=>temp:="0001";

    when "0001"=>temp:="0010";when "0010"=>temp:="0011";

    when "0011"=>temp:="0100";

    when "0100"=>temp:="0101";when "0101"=>temp:="0110";

    when "0110"=>temp:="0111";

    when "0111"=>temp:="1000";

    when "1000"=>temp:="1001";when others=>temp:="0000";

    end case;

    else

    temp:="0000";end if;

    end if;q

  • 8/8/2019 Copy of Vlsi Manual Final11

    25/46

    case temp is

    when "000"=>temp:="001";

    when "001"=>temp:="010";when "010"=>temp:="011";

    when others=>temp:="000";

    end case;else

    temp:="000";

    end if;end if;

    qtemp:="001";when "001"=>temp:="011";

    when "011"=>temp:="101";

    when "101"=>temp:="111";when others=>temp:="000";

  • 8/8/2019 Copy of Vlsi Manual Final11

    26/46

    end case;

    else

    temp:="000";end if;

    end if;

    q

  • 8/8/2019 Copy of Vlsi Manual Final11

    27/46

    EX.No:7SHIFT REGISTERSDATE :

    AIM:

    To Simulate VHDL Program for Shift Registers Using ModelSim SE 6.0a tool and verifythe output.

    APPARATUS REQUIRED:

    1. ModelSim SE 6.0a tool2. PC:XP/WINDOWS

    PROCEDURE:

    12. Double click on ModelSim SE 6.0a icon in the Desktop.13. Click fileNew SourceVerilog.

    14. Type the program in the work space window.

    15. Save the program as .v extension in Work.

    16. Go to Compile Type file name Compile Done.

    17. Go to Simulate Start SimulationWorkSelect Filename Ok.

    18. Go to ViewDebug WindowObjects.

    19. Force the input by right clicking the input variables

    20. Select all the variablesRight clickAdd To WaveSelected Signals.

    21. Go to SimulateRunRun 100ps.

    22. Then verify the output.

    PROGRAM:

    REGISTER:

    library ieee;use ieee.std_logic_1164.all;

    entity reg is

    port(clk : in std_logic;input : in std_logic_vector(15 downto 0);

    output : out std_logic_vector(15 downto 0);

    ld : in std_logic) ;

  • 8/8/2019 Copy of Vlsi Manual Final11

    28/46

    end reg;

    architecture behavioral of reg is

    begingeneric_register: process(clk, input, ld)

    begin

    if (rising_edge(clk)) thenif (ld = '1') then

    output

  • 8/8/2019 Copy of Vlsi Manual Final11

    29/46

    8-bit Shift Register with Positive-Edge Clock, Serial In,and Parallel Out:

    library ieee;

    use ieee.std_logic_1164.all;

    entity sipo is

    port(C, SI : in std_logic;PO : out std_logic_vector(7 downto 0));

    end sipo;

    architecture archi of sipo issignal tmp: std_logic_vector(7 downto 0);

    beginprocess (C)

    beginif (C'event and C='1') then

    tmp

  • 8/8/2019 Copy of Vlsi Manual Final11

    30/46

    EX.No:8CMOS INVERTERDATE :

    AIM:

    To Design CMOS Inverter Using Multisim Software and verify the output.

    APPARATUS REQUIRED:

    1. Multisim Software2. PC:XP/WINDOWS

    Inverter Circuit:

  • 8/8/2019 Copy of Vlsi Manual Final11

    31/46

    DC Operating Point:

    RESULT:

    Thus the CMOS Inverter is Designed using Multisim and output was verified.

    ECE DEPARTMENT

    PERFORMANCE 25

    RECORD 15

    VIVA-VOCE 10

    TOTAL 50

  • 8/8/2019 Copy of Vlsi Manual Final11

    32/46

    EX.No:9CMOS NAND and NOR GatesDATE :

    AIM:

    To Design CMOS NAND and NOR Gates Using Multisim Software and verify theoutput.

    APPARATUS REQUIRED:

    3. Multisim Software4. PC:XP/WINDOWS

    NAND Gate Circuit:

  • 8/8/2019 Copy of Vlsi Manual Final11

    33/46

    DC Operating Point:

    NOR Gate Circuit:

  • 8/8/2019 Copy of Vlsi Manual Final11

    34/46

    DC Operating Point:

    RESULT:

    Thus the CMOS NAND and NOR Gates is Designed using Multisim and output was

    verified.

    ECE DEPARTMENTPERFORMANCE 25

    RECORD 15

    VIVA-VOCE 10

    TOTAL 50

  • 8/8/2019 Copy of Vlsi Manual Final11

    35/46

    EX.No:10CMOS D LatchDATE :

    AIM:

    To Design CMOS D Latch using Multisim Software and verify the output.

    APPARATUS REQUIRED:

    5. Multisim Software

    6. PC:XP/WINDOWS

    D Latch with NAND Gate Circuit:

  • 8/8/2019 Copy of Vlsi Manual Final11

    36/46

    Circuit:

    DC Operating Point:

  • 8/8/2019 Copy of Vlsi Manual Final11

    37/46

    RESULT:

    Thus the CMOS D Latch is Designed using Multisim and output was verified.

    ECE DEPARTMENT

    PERFORMANCE 25

    RECORD 15

    VIVA-VOCE 10

    TOTAL 50

  • 8/8/2019 Copy of Vlsi Manual Final11

    38/46

    EX.No:114 BIT ADDERDATE :

    AIM:

    To Study the synthesis of a VHDL Program Using tools in XILINX ISE 8.2i Software.

    APPARATUS REQUIRED:

    1. XILINX ISE 8.2i tool2. PC:XP/WINDOWS

    PROCEDURE:

    1. Double click on XILINX ISE 8.2i icon in the Desktop.

    2. Click fileNew project Enter the project name & Location, Select top level source

    type as HDL. Click NEXT.

    3. In the device property window select the details:

    4. Click NextNEXTNEXTFINISH.

    5. Click Project New source Select Verilog module, Enter the file Name

    NEXTNEXT FINISH.

    6. Type program in the work space window.

    7. Save the program.

    8. Double click the synthesis XST in the process window.

    9. Click view RTL schematic in the synthesis XST.

    10. Click view Technology schematic in the synthesis XST.

    11. Verify the schematic diagram.

    PROGRAM:

    library ieee;use ieee.std_logic_1164.all;

    use ieee.std_logic_arith.all;

    entity fadd4 is

    port(a,b : in std_logic_vector(3 downto 0);

    cin : in std_logic;s : out std_logic_vector(3 downto 0);

    cout : out std_logic);

    end fadd4;

  • 8/8/2019 Copy of Vlsi Manual Final11

    39/46

    architecture structural of fadd4 iscomponent fulladd

    port(a,b,cin : in std_logic;

    sum,cout : out std_logic);

    end component;signal c1,c2,c3: std_logic;

    begin

    a0: fulladd port map (a(0),b(0),cin,s(0),c1);

    a1: fulladd port map (a(1),b(1),c1,s(1),c2);

    a2: fulladd port map (a(2),b(2),c2,s(2),c3);a3: fulladd port map (a(3),b(3),c3,s(3),cout);

    end structural;

    RESULT:

    Thus the 4 Bit Adder program using XILINX ISE 8.2i Software was stimulated andoutput was verified.

    ECE DEPARTMENTPERFORMANCE 25

    RECORD 15

    VIVA-VOCE 10

    TOTAL 50

  • 8/8/2019 Copy of Vlsi Manual Final11

    40/46

    EX.No:12Real Time ClockDATE :

    AIM:To Study the synthesis of a VHDL Program Using tools in XILINX ISE 8.2i Software.

    APPARATUS REQUIRED:

    3. XILINX ISE 8.2i tool

    4. PC:XP/WINDOWS

    PROCEDURE:

    12. Double click on XILINX ISE 8.2i icon in the Desktop.

    13. Click fileNew project Enter the project name & Location, Select top level

    source type as HDL. Click NEXT.

    14. In the device property window select the details:

    15. Click NextNEXTNEXTFINISH.

    16. Click Project New source Select Verilog module, Enter the file Name

    NEXTNEXT FINISH.

    17. Type program in the work space window.

    18. Save the program.

    19. Double click the synthesis XST in the process window.

    20. Click view RTL schematic in the synthesis XST.

    21. Click view Technology schematic in the synthesis XST.

    22. Verify the schematic diagram.

    PROGRAM:

    library ieee;

    use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;

    use ieee.std_logic_unsigned.all;

    entity rtc_im is

    port(reset,clk_4m,load,control:in std_logic;

    rtc_seg:out std_logic_vector(7 downto 0);rtc_dis:out std_logic_vector(5 downto 0));

  • 8/8/2019 Copy of Vlsi Manual Final11

    41/46

    end rtc_im;

    architecture behavioral of rtc_im issignal tc,tc1,tc2,tc3,tc4,tc5,tc6,enable:std_logic;

    signal sec1,sec2,min1,min2,hr1,hr2: std_logic_vector(3 downto 0);

    signal sec1_rg:std_logic_vector(3 downto 0);signal sec2_rg:std_logic_vector(3 downto 0);

    signal min1_rg:std_logic_vector(3 downto 0);

    signal min2_rg:std_logic_vector(3 downto 0);signal hr1_rg:std_logic_vector(3 downto 0);

    signal hr2_rg:std_logic_vector(3 downto 0);

    signal pulsegen:std_logic_vector(21 downto 0);

    signal sel:std_logic_vector(2 downto 0);signal mout:std_logic_vector(3 downto 0);

    signal sgout:std_logic_vector(7 downto 0);

    signal dis_sig:std_logic_vector(5 downto 0);

    signal cnk2:std_logic_vector(2 downto 0);begin

    --*************************** pulse generator ******************p0:process(reset,clk_4m,pulsegen)

    begin

    if (reset = '1') then

    pulsegen

  • 8/8/2019 Copy of Vlsi Manual Final11

    42/46

    if (sec1_rg = "1001")then

    sec1_rg

  • 8/8/2019 Copy of Vlsi Manual Final11

    43/46

    min1_rg

  • 8/8/2019 Copy of Vlsi Manual Final11

    44/46

    hr1_rg

  • 8/8/2019 Copy of Vlsi Manual Final11

    45/46

    end if;

    end if;

    end if;else

    if (tc6 = '1') then

    hr2_rg

  • 8/8/2019 Copy of Vlsi Manual Final11

    46/46

    "10000000" when mout = "1000" else

    "10011000" when mout = "1001" else

    "11111111" ;dis_sig


Recommended