VHDL Logic Gates & Adders Design
VHDL Logic Gates & Adders Design
1. LOGIC GATES
Date :
1. AIM: Design Logic gates using VHDL, simulate using ISim Simulator, Synthesize using
Xilinx Synthesis Tool (XST) and Implement using SPARTAN-2/ 3 FPGA.
3. THEORY:
VHDL supports logical operations like AND, OR, NOR ,NAND, XOR, XNOR,NOT.
In this program Logic gates Entity has two inputs A & B and six outputs Y0,Y1……Y6.
Logic
Gates
4. VHDL Program:
Dataflow Style:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_Arith.all;
use IEEE.STD_LOGIC_UNSIGNED.all;
entity allgates is
end allgates;
begin
c<=a and b;
d<=a or b;
e<= not a;
f<=a nand b;
g<=a nor b;
h<=a xor b;
i<=a xnor b;
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_Arith.ALL;
use IEEE.STD_LOGIC_Unsigned.ALL;
entity and_gateis
c : out STD_LOGIC);
end and_gate;
begin
c<= a AND b;
end Behavioral;
library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
useieee.std_logic_unsigned.all;
entity or_gate is
d : out STD_LOGIC);
end or_gate;
begin
d<= a or b;
end Behavioral;
library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity not_gate is
Port ( a : in STD_LOGIC;
e : out STD_LOGIC);
end not_gate;
begin
e<= not a;
end Behavioral;
library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity nand_gate is
f : out STD_LOGIC);
end nand_gate;
begin
f<= a nand b;
end Behavioral;
library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity nor_gate is
g : out STD_LOGIC);
end nor_gate;
begin
g<= a nor b;
end Behavioral;
library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity xor_gate is
h : out STD_LOGIC);
end xor_gate;
begin
h<= a xor b;
end Behavioral;
library IEEE;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity xnor_gate is
i : out STD_LOGIC);
end xnor_gate;
begin
i<= a xnor b;
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. Function Table:
0 0
0 1
1 0
1 1
7. RESULT:
3. Theory:
Ripple Carry Adder adds 2 n-bit number plus carry input and gives n-bit sum and a carry
output. The Main operation of Ripple Carry Adder is it ripple the each carry output to carry
input of next single bit addition. Each single bit addition is performed with full Adder operation
(A, B, Cin) input and (Sum, Cout) output. The 4-bit Ripple Carry Adder VHDL Code can be
Easily Constructed by Port Mapping 4 Full Adder. The following figure represent the 4-bit
ripple carry adder.
In the above figure, A, B 4-bit input, C0 is Carry in and S 4-bit output , C4 is Carry out. The
remaining C1, C2, C3 are intermediate Carry. They are called signals in VHDL Code.
4. VHDL Program:
Dataflow model
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity rc_adder is
Dept. of ECE, SIET Page 7
VLSI Lab III/II
end rc_adder;
--architecture of entity
begin
c1 <= (num1(1) and num2(1)) or (num1(1) and c0) or (num2(1) and c0);
c2 <= (num1(2) and num2(2)) or (num1(2) and c1) or (num2(2) and c1);
c3 <= (num1(3) and num2(3)) or (num1(3) and c2) or (num2(3) and c2);
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
3. Theory
Carry Look Ahead Adder is fastest adder compared to Ripple carry Adder. For the Purpose of
carry Propagation, Carry look Ahead Adder construct Partial Full Adder, Propagation and
generation Carry block. It avoid Carry propagation through each adder.
In order to implement Carry Look Ahead Adder, first implement Partial Full Adder and then
Carry logic using Propagation and generation Block.
Partial Full Adder consist of inputs (A, B, Cin) and Outputs (S, P, G) where P is Propagate
Output and G is Generate output.
VHDL code for carry look ahead adder can be implemented by first constructing Partial full
adder block and port map them to four times and also implementing carry generation block as
shown below.
4. VHDL Program:
Dataflow Model
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
Entity CARRYLOOK is
CIN : in STD_LOGIC;
end CARRYLOOK;
Begin
G1: FOR I IN 0 TO 3
GENERATE
end GENERATE;
C(0)<=CIN;
G2: FOR I IN 0 TO 3
GENERATE
end GENERATE;
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
RESULT:
3. Theory:
A digital multiplexer is a combinational circuit that selects binary information from one of many
input lines and directs it to a single output line. Multiplexing means transmitting a large number
of information units over a smaller number of channels or lines. The selection of a particular
input line is controlled by a set of selection lines. Normally, there are 2 n input lines and n
selection lines whose bit combinations determine which input is selected. A multiplexer is also
called a data selector, since it selects one of many inputs and steers the binary information to the
output lines. Multiplexer ICs may have an enable input to control the operation of the unit.
When the enable input is in a given binary state (the disable state), the outputs are disabled, and
when it is in the other state (the enable state), the circuit functions as normal multiplexer. The
enable input (sometimes called strobe) can be used to expand two or more multiplexer ICs to
digital multiplexers with a larger number of inputs.The size of the multiplexer is specified by the
number 2n of its input lines and the single output line. In general, a 2 n – to – 1 line multiplexer
is constructed from an n – to 2n decoder by adding to it 2 n input lines, one to each AND gate.
The outputs of the AND gates are applied to a single OR gate to provide the 1 – line output.
4. VHDL Program:
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity hema_16x1mux is
Z:out std_logic);
End hema_16x1mux;
signal z1,z2,z3,z4:std_logic;
component hema_4x1mux is
port(a,b,c,d,s0,s1:in std_logic;
Q:out std_logic);
End component;
Begin
end hema_16x1mux1;
Subprogram:
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity hema_4x1mux is
port(a,b,c,d : in std_logic;
S0,s1 : in std_logic;
q : out std_logic);
end hema_4x1mux;
Begin
Process(a,b,c,d,s0,s1)
Begin
else q <=d;
end if;
End process;
End hema_4x1mux1;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
3. Theory:
Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output lines. One
of these outputs will be active High based on the combination of inputs present, when the
decoder is enabled. That means decoder detects a particular code
4. VHDL Program:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity dec3to8 is
EN : in STD_LOGIC;
end dec3to8;
component dec2to4 is
end component;
begin
end Behavioral;
Subprogram:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity dec2to4 is
end dec2to4;
begin
"1000";
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
4. 8:3 ENCODER
1. AIM: Design 8:3 Encoder using VHDL, simulate using ISim Simulator, Synthesize using
Xilinx Synthesis Tool (XST) and Implement using SPARTAN-2/ 3 FPGA.
3. THEORY:
An Encoder is a combinational circuit that performs the reverse operation of Decoder.It has
maximum of 2^n input lines and ‘n’ output lines, hence it encodes the information from 2^n
inputs into an n-bit code. It will produce a binary code equivalent to the input, which is active
High. Therefore, the encoder encodes 2^n input lines with ‘n’ bits
The 8 to 3 Encoder or octal to Binary encoder consists of 8 inputs : Y7 to Y0 and 3 outputs : A2,
A1 & A0. Each input line corresponds to each octal digit and three outputs generate
corresponding binary code.The figure below shows the logic symbol of octal to binary encoder:
Logic Diagram
Truth Table
D0 D1 D2 D3 D4 D5 D6 D7 X Y Z
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
4. VHDL Program:
module encoderbehav(d, a,b,c);
input [7:0] d;
output a,b,c;
reg a,b,c;
end
endmodule
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6.RESULT:
8:3 Encoder has been designed using VHDL, simulated using ISim Simulator, Synthesized
using XST (Xilinx Synthesis Tool) and Implemented using SPARTAM 3 XC3S400 TQ
144.Verified with expected results.
Truth table
4. VHDL Program:
library ieee;
use ieee.std_logic_1164.all;
entity parity is
end parity;
begin
end parity_gen;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
Truth table
4. VHDL Program:
library ieee;
use ieee.std_logic_1164.all;
entity parity_chk is
p: in bit;
e: out bit);
end parity_chk;
begin
e <= p xortemp(6);
end parity_arch;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
6 .Flipflops
6.1. D FLIP FLOP 74X74
1. AIM: Design D flip flop using VHDL, simulate using ISim Simulator, Synthesize using
Xilinx Synthesis Tool (XST) and Implement using SPARTAN 3 /2 FPGA
3. THEORY:
IC 74X74 is a positive edge triggered DFF with active low preset and clear. In this
program DFF architecture is described using behavior model.
4. VHDL Program:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity dff is
end dff;
begin
process(d,clk,reset)
begin
Dept. of ECE, SIET Page 26
VLSI Lab III/II
end if;
end if;
end process;
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
11. Down load design to the target device on FPGA/CPLD demo board
6. FUNCTION TABLE:
CLK D RESET Q NQ
1 0 0 0 1
0 1 1 0 1
1 1 1 0 1
1 1 0 1 0
0 0 0 1 0
7. RESULT
6.2 T flip-flop
1. AIM: Design T flip-flop using VHDL, simulate using ISim Simulator, Synthesize using
Xilinx Synthesis Tool (XST) and Implement using SPARTAN-2/ 3 FPGA.
3. THEORY:
The T in T flip-flop stands for ‘toggle’. This is because a T flip-flop toggles (changes) its value
whenever the input is high. When the input is low, the output remains the same as the previous
output. A T flip-flop can be made using an SR latch, as shown above. Or it can be made using a
JK flip-flop as shown below.
The entity will declare the input and output ports for the T flip-flop. We have the clock, the
reset, and the T input as actual inputs. The outputs are just the usual Q and Qb. As has been the
case with all the remaining flip-flops, we will use behavioral architecture. That’s the entity-
architecture pair sorted right there.
4. VHDL Program:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity T_FLIPFLOP_SOURCE is
end T_FLIPFLOP_SOURCE;
begin
PROCESS(T,CLK,RES)
VARIABLE TEMP:STD_LOGIC:='0';
BEGIN
IF(RES='1')THEN
TEMP:='0';
ELSIF(RISING_EDGE(CLK))THEN
IF(T='1')THEN
END IF;
END IF;
QB<= TEMP;
END PROCESS;
Dept. of ECE, SIET Page 30
VLSI Lab III/II
END BEHAVIORAL;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6 RESULT:
T flip flop has been designed using VHDL, simulated using ISim Simulator, Synthesized using
XST (Xilinx Synthesis Tool) and Implemented using SPARTAM 3 XC3S400 TQ 144.Verified
with expected results.
6.3 SR FLIPFLOP
1. AIM: Design SR FlipFlop using VHDL, simulate using ISim Simulator, Synthesize using
Xilinx Synthesis Tool (XST) and Implement using SPARTAN-2/ 3 FPGA.
3. THEORY:
4. VHDL Program:
module srflipflop(s, r, clk, rst, q, qbar);
input s;
input r;
input clk;
input rst;
output q;
output qbar;
reg q,qbar;
if(rst==1'b1) begin
q= 1'b0;qbar= 1'b1;
end
begin
q=q; qbar=qbar;
end
begin
end
begin
end
else
begin
q=1'bx;qbar=1'bx;
end
end
endmodule
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6.RESULT:
SR Flip Flop has been designed using VHDL, simulated using ISim Simulator, Synthesized
using XST (Xilinx Synthesis Tool) and Implemented using SPARTAM 3 XC3S400 TQ
144.Verified with expected results.
6.4 JK FLIPFLOP
1. AIM: Design JK Flip Flop using VHDL, simulate using ISim Simulator, Synthesize using
Xilinx Synthesis Tool (XST) and Implement using SPARTAN-2/ 3 FPGA.
3. THEORY:
4. VHDL Program:
Behavioral Modeling:
q=1'b0;
qbar=1'b1;
end
else if (j==1'b0 && k==1'b0)
begin
q=q;
qbar=qbar;
end
else if (j==1'b0 && k==1'b1)
begin
q=1'b0;
qbar=1'b1;
end
else if (j==1'b1 && k==1'b0)
begin
q=1'b1;
qbar=1'b0;
end
else
begin
q=~q;
qbar=~qbar;
end
end
endmodule
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
JK Flip Flop has been designed using VHDL, simulated using ISim Simulator, Synthesized
using XST (Xilinx Synthesis Tool) and Implemented using SPARTAM 3 XC3S400 TQ
144.Verified with expected results.
3. THEORY:
When counter is clocked such that each flipflop in the counter is triggered at the same time, the
counter is called as synchronous counter.
4. VHDL Program:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity updown_count is
end updown_count;
begin
process(clk,rst)
begin
if(rst='1')then temp<="0000";
elsif(rising_edge(clk))then
if(updown='0')then temp<=temp+1;
else temp<=temp-1;
end if;
end if;
end process;
count<=temp;
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
3. THEORY:
4. VHDL Program:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity seq_det is
det_vld : out std_logic --A '1' indicates the pattern "1011" is detected in the sequence.
);
end seq_det;
type state_type is (A,B,C,D); --Defines the type for states in the state machine
signal state :state_type := A; --Declare the signal with the corresponding state type.
begin
process(clk)
begin
if( reset = '1' ) then --resets state and output signal when reset is asserted.
det_vld<= '0';
state <= A;
elsif( rising_edge(clk) ) then --calculates the next state based on current state and input bit.
case state is
det_vld<= '0';
state <= A;
else
state <= B;
end if;
state <= C;
else
state <= B;
end if;
state <= A;
else
state <= D;
end if;
state <= C;
else
state <= A;
det_vld<= '1'; --Output is asserted when the pattern "1011" is found in the sequence.
end if;
NULL;
end case;
end if;
end process;
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
4 Bit Sequence Detector Through Mealy and Moore State Machines has been designed using
VHDL, simulated using ISim Simulator, Synthesized using XST (Xilinx Synthesis Tool) and
Implemented using SPARTAM 3 XC3S400 TQ 144.Verified with expected results.
1. AIM: Design Moore FSM Sequence Detector using VHDL, simulate using ISim Simulator,
Synthesize using Xilinx Synthesis Tool (XST) and Implement using SPARTAN-2/ 3 FPGA.
3. THEORY:
The Moore FSM state diagram for the sequence detector is shown in the
following figure
4. VHDL Program:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity VHDL_MOORE_FSM_Sequence_Detector is
end VHDL_MOORE_FSM_Sequence_Detector;
begin
process(clock,reset)
begin
if(reset='1') then
current_state<= Zero;
elsif(rising_edge(clock)) then
current_state<= next_state;
end if;
end process;
-- Combinational logic
process(current_state,sequence_in)
begin
case(current_state) is
if(sequence_in='1') then
-- "1"
next_state<= One;
else
next_state<= Zero;
end if;
if(sequence_in='0') then
-- "10"
next_state<= OneZero;
else
next_state<= One;
end if;
if(sequence_in='0') then
-- "100"
next_state<= OneZeroZero;
else
next_state<= One;
end if;
if(sequence_in='1') then
-- "1001"
next_state<= OneZeroZeroOne;
else
next_state<= Zero;
end if;
if(sequence_in='1') then
next_state<= One;
else
next_state<= OneZero;
end if;
end case;
end process;
process(current_state)
begin
case current_state is
detector_out<= '0';
detector_out<= '0';
detector_out<= '0';
detector_out<= '0';
detector_out<= '1';
end case;
end process;
end Behavioral;
5. PROCEDURE:
7. Verify the functionality of design with expected results and draw input and output waveforms
9. Write User Constrain File to fix in/out ports on Target device Generate programming file
10. Down load design to the target device on FPGA/CPLD FPGA/CPLD demo board
6. RESULT:
Moore FSM Sequence Detector has been designed using VHDL, simulated using ISim
Simulator, Synthesized using XST (Xilinx Synthesis Tool) and Implemented using SPARTAM
3 XC3S400 TQ 144.Verified with expected results.
1. INVERTER
Date:
Aim: To generate schematic and layout for an inverter using mentor graphics tool.
Tools Required:
Theory: Its name itself indicating that in performs inversion operation. It generates logic
‘1’ as output for its logic‘0’ input and vise versa. Symbol of inverter is just as a
buffer with a bubble mounted on its sharp end. It is used to perform logical
operations.
Truth table:
Input A Output
0 1
1 0
Procedure for Schematic:
10. Again click on OK then manage external/logic libraries window will pop up, now click
on the Add standard Libraries then the libraries will be added up and click on OK.
11. The project will be appeared on the left side of the screen,
12. Now right click on the project name and select new library then a pop up window asking
for library name is opened, provide the library name as vlsilaband click on Ok.
13. To create a schematic, right click on the library below the project name and go to new &
select schematic.
14. A window will pop up asking for the schematic name & cell name; provide the same
name for both schematic name and cell name and click on OK.
15. A pyxis schematic editor window is opened.
16. From the left icon bar press on add instance icon then double click on the generic13 and
then select the symbols.
17. In the symbols select the pmos and nmos and click on OK to place the pmos on the
workspace and press ESC to cancel additional one.
18. Now go to “library” → ”generic library” now select “PORT IN, PORT OUT, VDD,
GND”.
19. Now connect all the components with wire by clicking on ’add wire’ on the left of the
window or pressing W on keyboard.
20. After completion of connections press ‘escape F2’.
21. Select and press Q to change the names and properties of components and click on OK.
22. Select pmos and press Q then change the W=width-0.52u and L=length-0.13u and click
on OK.
23. Now select nmos and press Q then change W=width-0.26u and L=length-0.13u and click
on OK.
24. Press on input port →press ’Q’→ change name as ‘a’→ press ‘ok’
Output port → press ‘Q’ → change name as ‘b’→ press ‘ok’
25. Click on ‘check’ and ‘save’→ we will get error report
→To close the error report window press scroll on mouse & drag
from right to left
26. Now click on Add in the tool bar and select Generate Symbol then a pop up is opened.
27. Tick the options ‘replace existing’ & ‘activate symbol’ and click on ‘choose symbol’
→now select a symbol as buffer…. According to our need and then click ‘ok’. Again
click on Ok, now pyxis symbol window is opened then drag the o/p line with mouse and
add the bubble by clicking on circle on left side of window. Now move the wire towards
bubble. Right click on wire & select option”stretch” to move.
28. Now ‘check & save’ and verify the errors and close all tabs.
29. To create a schematic for simulation, right click on the library below the project name
and go to new & select schematic.
30. A window will pop up asking for the schematic name & cell name; provide the same
name for both schematic name and cell name and click on OK.
31. A pyxis schematic editor window is opened.Right click on design sheet and go to
“instance” →” choose symbol” → select schematic name and click ‘ok’.
32. Now the desired symbol of experiment will appear.
Dept. of ECE, SIET Page 51
VLSI Lab III/II
33. Now go to library → generic library, select ‘PORT IN’, ‘PORT OUT’, ‘VDD’, ‘GND’,
and press ’back’.
34. Go to sources library → select “DC (V)” and “PATTERN (V)” and place them on output
side and input side respectively. Now add wires by pressing ‘w’.
35. Select the input and output ports and edit their names by pressing Q and click ‘ok’.
36. Select the DC source and press Q then change voltage to 5V and click on OK, press “
escape F2” and go for ‘check and save’ and close it.
37. Click on “simulation” → “new configuration” → edit configuration name as
“TRAN_SIM” and click ‘ok’.
38. Again click on Ok, now click on “lib/temp/inc” → include files →Analysis.
39. In Analysis remove the tick mark for OP and put a tick mark on the Tran box.
40. Mention the start time as 0n and stop time as 500n and click on Apply. Now in the left
side of window select the outputs.
41. .In outputs change the analysis to TRAN from the dropdown and select the PLOT under
Task.
42. Now minimize it and select all the I/Ps and O/Ps by holding the Ctrl on keyboard.
43. Release the Ctrl and maximize the set up simulation and click on Add and click on
Apply, then close it.
44. On the Right side palette area click on Run ELDO, now check whether the simulation is
completed or not.
45. .Click on “view waves”, now the output waveforms will appear on a new window.
46. Now from the top bar select tools and then select measurement tool and select delay
time, rise time, fall time, to mention on graph by selecting i/p or o/p on graph and then
press then add the waves and then click apply.
1. To create a layout select inv cell, right click on the cell and select new layout
2. A new window named New layout will pop up, here name the layout and click Ok
3. Pyxis layout window will be invoked with a new layout sub window in it and keep the
settings and click on OK.
4. Click restore button & click on MGC--> setup and select left right tiling and click ok
5. Creating SDL:
• Make the Schematic window active by selecting it with the LMB. Select the
PMOS and press on the Pick & Place icon from SDL tool bar on the Icon bar.
The tool will place the device on the Workspace of IC layout window. Similarly
select the NMOS and place it on the workspace
• To make SDL toolbar active, go to setup->SDL
6. After adding the layouts of transistor, select any one of the net in schematic window and
click on inst and then on port, now move your cursor towards layout window and place
the ports one by one.
7. Select the layer POLYG from the layer Palette window and select Easyedit -> shape
from IC palette and connect the gates of NMOS and PMOS transistors.
8. Select the option Tools from the top row menu and select IRoute and interconnect PMOS
and NMOS transistor (press 'w' to change the width of the metal track and specify
width as 0.26).
9. Connect the output port to the metal track using IRoute
10. Create VDD Plane and GND plane using Metal-1 layer. Select metal-1 in layer palette
and choose Easyedit -> shape from ic palette and draw planes and place the VDD
and GND ports in the respective planes
11. Connect the Source of PMOS transistor to VDD plane and Drain of NMOS transistor to
GND plane using IRoute (keep the width as 0.26).
12. To connect the Input port to poly layer ( poly to metal contact) we have to follow below
steps
• Extend the poly region (approx 0.5x0.5) and draw a contact to poly by selecting
CO layer on Layer palette and select easy edit and shape draw exactly 0.16x0.16
of CO layer in the extended poly region.
• Now draw metal-1 layer over the CO layer to the input port.
13. To add N-well contacts select the VDD plane in layout area, click on DLA Layout in IC
palette and click on via (right arrow) and select fill selected and select "m1nwell" in IC
device shape via window and click ok
14. To add P-well contacts select the GND plane in layout area, click on DLA Layout in IC
palette and click on via (right arrow) and select fill selected and select "m1psub" in IC
device shape via window and click ok
15. This finishes the layout for Inverter, Now select Add (from top row) and select add text
on ports and click ok. This should add the names on the I/O ports.
16. Select back in that select IC rules and check and in top of window we shown a ok tag
and click on it.
Schematic Diagram for Inverter:
Result: Hence simulated and verified the schematic and layout of inverter using mentor
graphics tool.
Aim: To generate schematic and layout for an NAND Gate using mentor graphics tool.
Tools Required:
Theory: Nand gate is the logic component in this if any one of the input is ‘0’ or low the
output is high ‘1’ otherwise if two inputs are equal to one then out put is low ‘0’.
It is used to perform logical operations
Truth table:
2. Enter the IP address under host as 10.0.26.133 (IP Address of the Server system).
Password: vlsi123.
Under execution command select Xterm (Linux: type2) and then click on run.
5. A command prompt will open.
User1@mentor server
$ cshand click enter
$ Source /home/software/cshrc/ams_2009.cshrc and click enter
$ dmgr_ic&and click on enter to enter the 130nm tech.
7. To create a new project click on File and go to new project which invoke the new project
window.
8. Beside the project path browse on the folder and click on the look in icon until you reach
the home and click on your user number & give the project name. Now libraries have to be
added to the project.
9. Beside the library browse on the folder and click on the look in icon until you reach home
then click on software/FOUNDRY/GDK/pyris_SPT_HEP/ic_reflibs/tech_libs and select
the generic13 file and click on OK.
10. Again click on OK then manage external/logic libraries window will pop up, now click
on the Add standard Libraries then the libraries will be added up and click on OK.
11. The project will be appeared on the left side of the screen,
12. Now right click on the project name and select new library then a pop up window asking
for library name is opened, provide the library name as vlsilaband click on Ok.
13. To create a schematic, right click on the library below the project name and go to new &
select schematic.
14. A window will pop up asking for the schematic name & cell name; provide the same
name for both schematic name and cell name and click on OK.
16. From the left icon bar press on add instance icon then double click on the generic13 and
then select the symbols.
17. In the symbols select the two pmos and two nmos and click on OK to place the pmos on
the workspace and press ESC to cancel additional one.
18. Now go to “library” → ”generic library” now select “two PORT INs, PORT OUT,
VDD, GND”.
19. Now connect all the components with wire by clicking on ’add wire’ on the left of the
window or pressing W on keyboard.
21. Select and press Q to change the names and properties of components and click on OK.
23. Select pmos and press Q then change the W=width-0.52u and L=length-0.13u and click
on OK.
24. Now select nmos and press Q then change W=width-0.26u and L=length-0.13u and click
on OK.
25. Press on input port →press ’Q’→ change name as ‘a’→ press ‘ok’
→To close the error report window press scroll on mouse & drag
from right to left
27. Now click on Add in the tool bar and select Generate Symbol then a pop up is opened.
28.Check marks the options ‘replace existing’ & ‘activate symbol’ and click on ‘choose
symbol’ →now select a symbol as AND according to our need and then click ‘ok’. Again
click on Ok, now pyxis symbol window is opened then drag the o/p line with mouse and add
the bubble by clicking on circle on left side of window. Now move the wire towards bubble.
Right click on wire & select option ”stretch” to move.
29. Now ‘check & save’ and verify the errors and close all tabs.
30. To create a schematic for simulation, right click on the library below the project name
and go to new & select schematic.
31. A window will pop up asking for the schematic name & cell name; provide the same
name for both schematic name and cell name and click on OK.
32. A pyxis schematic editor window is opened.Right click on design sheet and go to
“instance” →” choose symbol” → select schematic name and click ‘ok’.
34. Now go to library → generic library, select two ‘PORT IN’, ‘PORT OUT’, ‘VDD’,
three ‘GNDs’, and press ’back’.
35. Go to sources library → select “DC (V)” and two “PATTERNs (V)” and place them on
output side and input side respectively. Now add wires by pressing ‘w’.
36. Select the input and output ports and edit their names by pressing Q and click ‘ok’.
37. Select the DC source and press Q then change voltage to 5V and click on OK, press “
escape F2” and go for ‘check and save’ and close it.
39. Again click on Ok, now click on “lib/temp/inc” → include files →Analysis.
40. In Analysis remove the tick mark for OP and put a tick mark on the Tran box.
41. Mention the start time as 0n and stop time as 500n and click on Apply. Now in the left
side of window select the outputs.
42. In outputs change the analysis to TRAN from the dropdown and select the PLOT under
Task.
Dept. of ECE, SIET Page 58
VLSI Lab III/II
43. Now minimize it and select all the I/Ps and O/Ps by holding the Ctrl on keyboard.
44. Release the Ctrl and maximize the set up simulation and click on Add and click on
Apply, then close it.
45. On the Right side palette area click on Run ELDO, now check whether the simulation is
completed or not.
46. Click on “view waves”, now the output waveforms will appear on a new window.
47. Now from the top bar select tools and then select measurement tool and select delay
time, rise time, fall time, to mention on graph by selecting i/p or o/p on graph and then press
then add the waves and then click apply.
1. To create a layout select nandcell, right click on the cell and select new layout
2. A new window named New layout will pop up, here name the layout and click Ok
3. Pyxis layout window will be invoked with a new layout sub window in it and keep the
settings and click on OK.
4. Click restore button and click on MGC --> setup and select left right tiling and click ok
5. Creating SDL:
• Make the Schematic window active by selecting it with the LMB. Select the
PMOS and press on the Pick & Place icon from SDL tool bar on the Icon bar.
The tool will place the device on the Workspace of IC layout window. Similarly
select the NMOS and place it on the workspace
• To make SDL toolbar active, go to setup->SDL
6. After adding the layouts of transistor, select any one of the net in schematic window and
click on inst and then on port, now move your cursor towards layout window and place the
ports one by one.
7. Select the layer POLYG from the layer Palette window and select Easyedit -> shape from
IC palette and connect the gates of NMOS and PMOS transistors.
8. Select the option Tools from the top row menu and select IRoute and interconnect PMOS
and NMOS transistor (press 'w' to change the width of the metal track and specify
width as 0.26).
9. Connect the output port to the metal track using Iroute
10. Create VDD Plane and GND plane using Metal-1 layer . Select metal-1 in layer palette
and choose easyedit -> shape from ic palette and draw planes and place the VDD and
GND ports in the respective planes
11. Connect the Source of PMOS transistor to VDD plane and Drain of NMOS transistor to
GND plane using Iroute (keep the width as 0.26).
12. To connect the Input port to poly layer ( poly to metal contact) we have to follow below
steps
• Extend the poly region (approx 0.5x0.5) and draw a contact to poly by selecting
CO layer on Layer palette and select easy edit and shape draw exactly 0.16x0.16
of CO layer in the extended poly region.
• Now draw metal-1 layer over the CO layer to the input port.
13. To add N-well contacts select the VDD plane in layout area, click on DLA Layout in IC
palette and click on via (right arrow) and select fill selected and select "m1nwell" in IC
device shape via window and click ok
14. To add P-well contacts select the GND plane in layout area, click on DLA Layout in IC
palette and click on via (right arrow) and select fill selected and select "m1psub" in IC
device shape via window and click ok
15. This finishes the layout for Inverter, Now select Add (from top row) and select add text
on ports and click ok. This should add the names on the I/O ports.
16. Select back in that select IC rules and check and in top of window we shown a ok tag
and click on it.
Schematic Diagram for NAND Gate:
Result: Hence simulated and verified the schematic and layout of NAND Gate using mentor
graphics tool.
Aim: To generate schematic and layout for NOR Gate using mentor graphics tool.
Tools Required:
Theory: NOR gate is the logic component in this if any one of the input is one the output
is low ‘0’ otherwise if two input are equal to ‘0’ then the output is high ‘1’. It is
used to perform logical operations
Truth Table:
2. Enter the IP address under host as 10.0.26.133 (IP Address of the Server system).
Password: vlsi123.
Under execution command select Xterm (Linux: type2) and then click on run.
5. A command prompt will open.
User1@mentor server
$ cshand click enter
$ Source /home/software/cshrc/ams_2009.cshrc and click enter
$ dmgr_ic&and click on enter to enter the 130nm tech.
7. To create a new project click on File and go to new project which invoke the new project
window.
8. Beside the project path browse on the folder and click on the look in icon until you reach
the home and click on your user number & give the project name. Now libraries have to be
added to the project.
9. Beside the library browse on the folder and click on the look in icon until you reach home
then click on software/FOUNDRY/GDK/pyris_SPT_HEP/ic_reflibs/tech_libs and select
the generic13 file and click on OK.
10. Again click on OK then manage external/logic libraries window will pop up, now click
on the Add standard Libraries then the libraries will be added up and click on OK.
11. The project will be appeared on the left side of the screen,
13. Now right click on the project name and select new library then a pop up window asking
for library name is opened, provide the library name as vlsilaband click on Ok.
14. To create a schematic, right click on the library below the project name and go to new &
select schematic.
15. A window will pop up asking for the schematic name & cell name, provide the same
name for both schematic name and cell name and click on OK.
17. From the left icon bar press on add instance icon then double click on the generic13 and
then select the symbols.
18. In the symbols select the two pmos and two nmos and click on OK to place the pmos on
the workspace and press ESC to cancel additional one.
19. Now go to “library” → ”generic library” now select “two PORT INs, PORT OUT,
VDD, GND”.
20. Now connect all the components with wire by clicking on ’add wire’ on the left of the
window or pressing W on keyboard.
22. Select and press Q to change the names and properties of components and click on OK.
23. Select pmos and press Q then change the W=width-0.52u and L=length-0.13u and click
on OK.
24. Now select nmos and press Q then change W=width-0.26u and L=length-0.13u and click
on OK.
25. Press on input port →press ’Q’→ change name as ‘a’→ press ‘ok’
→To close the error report window press scroll on mouse & drag
from right to left
27. Now click on Add in the tool bar and select Generate Symbol then a pop up is opened.
28. Tick the options ‘replace existing’ & ‘activate symbol’ and click on ‘choose symbol’
→now select a symbol as OR according to our need and then click ‘ok’. Again click on Ok,
now pyxis symbol window is opened then drag the o/p line with mouse and add the bubble
by clicking on circle on left side of window. Now move the wire towards bubble. Right click
on wire & select option ”stretch” to move.
29. Now ‘check & save’ and verify the errors and close all tabs.
30. To create a schematic for simulation, right click on the library below the project name
and go to new & select schematic.
31. A window will pop up asking for the schematic name & cell name, provide the same
name for both schematic name and cell name and click on OK.
32. A pyxis schematic editor window is opened.Right click on design sheet and go to
“instance” →” choose symbol” → select schematic name and click ‘ok’.
34. Now go to library → generic library, select two ‘PORT INs’, ‘PORT OUT’, ‘VDD’,
three ‘GNDs’, and press ’back’.
35. Go to sources library → select “DC (V)” and two “PATTERN (V)” and place them on
output side and input side respectively. Now add wires by pressing ‘w’.
36. Select the input and output ports and edit their names by pressing Q and click ‘ok’.
37. Select the DC source and press Q then change voltage to 5V and click on OK, press “
escape F2” and go for ‘check and save’ and close it.
39. Again click on Ok, now click on “lib/temp/inc” → include files →Analysis.
40. In Analysis remove the tick mark for OP and put a tick mark on the Tran box.
41. Mention the start time as 0n and stop time as 500n and click on Apply. Now in the left
side of window select the outputs.
42 .In outputs change the analysis to TRAN from the dropdown and select the PLOT under
Task.
Dept. of ECE, SIET Page 65
VLSI Lab III/II
43. Now minimize it and select all the I/Ps and O/Ps by holding the Ctrl on keyboard.
44. Release the Ctrl and maximize the set up simulation and click on Add and click on
Apply, then close it.
45. On the Right side palette area click on Run ELDO, now check whether the simulation is
completed or not.
46. Click on “view waves”, now the output waveforms will appear on a new window.
47. Now from the top bar select tools and then select measurement tool and select delay
time, rise time, fall time, to mention on graph by selecting i/p or o/p on graph and then press
then add the waves and then click apply.
1. To create a layout select nor cell, right click on the cell and select new layout
2. A new window named New layout will pop up, here name the layout and click Ok
3. Pyxis layout window will be invoked with a new layout sub window in it and keep the
settings and click on OK.
4. Click restore button and click on MGC --> setup and select left right tiling and click ok
5. Creating SDL:
• Make the Schematic window active by selecting it with the LMB. Select the
PMOS and press on the Pick & Place icon from SDL tool bar on the Icon bar.
The tool will place the device on the Workspace of IC layout window. Similarly
select the NMOS and place it on the workspace
• To make SDL toolbar active, go to setup->SDL
6. After adding the layouts of transistor, select any one of the net in schematic window and
click on inst and then on port, now move your cursor towards layout window and place the
ports one by one.
7. Select the layer POLYG from the layer Palette window and select Easyedit -> shape from
IC palette and connect the gates of NMOS and PMOS transistors.
8. Select the option Tools from the top row menu and select IRoute and interconnect PMOS
and NMOS transistor (press 'w' to change the width of the metal track and specify
width as 0.26).
9. Connect the output port to the metal track using Iroute.
10. Create VDD Plane and GND plane using Metal-1 layer. Select metal-1 in layer palette
and choose easyedit -> shape from ic palette and draw planes and place the VDD and
GND ports in the respective planes
11. Connect the Source of PMOS transistor to VDD plane and Drain of NMOS transistor to
GND plane using Iroute (keep the width as 0.26).
12. To connect the Input port to poly layer ( poly to metal contact) we have to follow below
steps
• Extend the poly region (approx 0.5x0.5) and draw a contact to poly by selecting
CO layer on Layer palette and select easy edit and shape draw exactly 0.16x0.16
of CO layer in the extended poly region.
• Now draw metal-1 layer over the CO layer to the input port.
13. To add N-well contacts select the VDD plane in layout area, click on DLA Layout in IC
palette and click on via (right arrow) and select fill selected and select "m1nwell" in IC
device shape via window and click ok.
14. To add P-well contacts select the GND plane in layout area, click on DLA Layout in IC
palette and click on via (right arrow) and select fill selected and select "m1psub" in IC
device shape via window and click ok.
15. This finishes the layout for Inverter, Now select Add (from top row) and select add text
on ports and click ok. This should add the names on the I/O ports.
16. Select back in that select IC rules and check and in top of window we shown a ok tag
and click on it.
Schematic Diagram for NOR Gate:
Result: Hence simulated and verified the schematic and layout of NOR Gate using mentor
graphics tool.
3. FULL ADDER
Date:
Aim: To generate schematic for FULL ADDER using mentor graphics tool.
Tools Required:
Theory: A logic circuit for the addition of three one bit binary numbers at a time is known
as a full adder. The function of the circuit is to add three binary digits, producing
both sum and carry. Hence the basic difference full adder and half adder is, full
adder accepts an additional input that allows for handling input carriers. The
carry is produced with an NAND Gate
Truth Table:
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
8. Beside the project path browse on the folder and click on the look in icon until you reach
the home and click on your user number & give the project name. Now libraries have to
be added to the project.
9. Beside the library browse on the folder and click on the look in icon until you reach
home then click on software/FOUNDRY/GDK/pyris_SPT_HEP/ic_reflibs/tech_libs
and select the generic13 file and click on OK.
10. Again click on OK then manage external/logic libraries window will pop up, now click
on the Add standard Libraries then the libraries will be added up and click on OK.
11. The project will be appeared on the left side of the screen,
12. Now right click on the project name and select new library then a pop up window asking
for library name is opened, provide the library name as vlsilaband click on Ok.
13. To create a schematic, right click on the library below the project name and go to new &
select schematic.
14. A window will pop up asking for the schematic name & cell name, provide the same
name for both schematic name and cell name and click on OK.
15. A pyxis schematic editor window is opened.
16. Right click on design sheet and go to “instance” →” choose symbol” → select nand
schematic and click ‘ok’. Choose nine schematics.
17. Now go to “library” → ”generic library” now select “three PORT IN, two PORT
OUTs”.
18. Now connect all the components with wire by clicking on ’add wire’ on the left of the
window or pressing W on keyboard.
19. After completion of connections press ‘escape F2’.
20. Select and press Q to change the names and properties of components and click on OK.
21. Press on input port →press ’Q’→ change name as ‘a’→ press ‘ok’
Input port → press ‘Q’ → change name as ‘b’→ press ‘ok’
Input port → press ‘Q’ → change name as ‘c’→ press ‘ok’
Output port → press ‘Q’ → change name as ‘Sum’→ press ‘ok’
Output port → press ‘Q’ → change name as ‘carry’→ press ‘ok’
22. Click on ‘check’ and ‘save’→ we will get error report
→To close the error report window press scroll on mouse & drag
from right to left
23. Now click on Add in the tool bar and select Generate Symbol then a pop up is opened.
24. Tick the options ‘replace existing’ & ‘activate symbol’ and click on ‘choose symbol’
→now select a symbol as Full Adder according to our need and then click ‘ok’. Again
click on Ok,
25. Now ‘check & save’ and verify the errors and close all tabs.
26. To create a schematic for simulation, right click on the library below the project name
and go to new & select schematic.
27. A window will pop up asking for the schematic name & cell name, provide the same
name for both schematic name and cell name and click on OK.
28. A pyxis schematic editor window is opened.Right click on design sheet and go to
“instance” →” choose symbol” → select schematic name and click ‘ok’.
Result: Hence simulated and verified the schematic of Full Adder using mentor graphics tool.
4. FULL SUBTRACTOR
Date:
Aim: To generate schematic for a Full Subtractor using mentor graphics tool.
Tools Required:
Theory: A logic circuit for the subtraction of three one bit binary numbers at a time is
known as a full subtractor. The function of the circuit is to subtract three binary
digits, producing both difference and borrow.
Truth Table:
27. A window will pop up asking for the schematic name & cell name, provide the same
name for both schematic name and cell name and click on OK.
28. A pyxis schematic editor window is opened.Right click on design sheet and go to
“instance” →” choose symbol” → select schematic name and click ‘ok’.
29. Now the desired symbol of experiment will appear.
30. Now go to library → generic library, select three ‘PORT INs’, two ‘PORT OUTs’,
‘VDD’, four ‘GND’, and press ’back’.
31. Go to sources library → select “DC (V)” and three “PATTERN (V)” and place them on
output side and input side respectively. Now add wires by pressing ‘w’.
32. Select the input and output ports and edit their names by pressing Q and click ‘ok’.
33. Select the DC source and press Q then change voltage to 5V and click on OK, press “
escape F2” and go for ‘check and save’ and close it.
34. Click on “simulation” → “new configuration” → edit configuration name as
“TRAN_SIM” and click ‘ok’.
35. Again click on Ok, now click on “lib/temp/inc” → include files →Analysis.
36. In Analysis remove the tick mark for OP and put a tick mark on the Tran box.
37. Mention the start time as 0n and stop time as 500n and click on Apply. Now in the left
side of window select the outputs.
38. .In outputs change the analysis to TRAN from the dropdown and select the PLOT under
Task.
39. Now minimize it and select all the I/Ps and O/Ps by holding the Ctrl on keyboard.
40. Release the Ctrl and maximize the set up simulation and click on Add and click on
Apply, then close it.
41. On the Right side palette area click on Run ELDO, now check whether the simulation is
completed or not.
42. .Click on “view waves”, now the output waveforms will appear on a new window.
43. Now from the top bar select tools and then select measurement tool and select delay
time, rise time, fall time, to mention on graph by selecting i/p or o/p on graph and then
press then add the waves and then click apply.
Result: Hence simulated and verified the schematic of Full Subtractor using mentor graphics
tool.
5. DECODER
Date:
Tools Required:
Theory: A decoder is a combinational logic circuit which is used to change the code into a
set of signals. It is the reverse process of an encoder. A decoder circuit takes
multiple inputs and gives multiple outputs. A decoder circuit takes binary data of
‘n’ inputs into ‘2^n’ unique output. Decoding is essential in applications like data
multiplexing, memory address decoding, and 7 segment display. The best
example of decoder circuit would be an AND-gate because when all its inputs are
“High.”, the output of this gate is “High” which is called “active High output”.
As an alternative to AND gate, the NAND gate is connected the output will be
“Low” (0) only when all its inputs are “High”. Such o/p is called “active low
output”.
Truth Table:2 to 4Decoder has two inputs namely A0, A1 and four outputs denoted by D0, D1,
D2, and D3. As you can see in the following truth table – for every input
combination, one o/p line is turned on.
26. To create a schematic for simulation, right click on the library below the project name
and go to new & select schematic.
27. A window will pop up asking for the schematic name & cell name; provide the same
name for both schematic name and cell name and click on OK.
28. A pyxis schematic editor window is opened.Right click on design sheet and go to
“instance” →” choose symbol” → select schematic name and click ‘ok’.
29. Now the desired symbol of experiment will appear.
30. Now go to library → generic library, select three ‘PORT INs’, ‘PORT OUT’, ‘VDD’,
two ‘VSSs’, four ‘GNDs’, and press ’back’.
31. Go to sources library → select four “DCs (V)” and two “PATTERNs (V)” and place
them on output side and input side respectively. Now add wires by pressing ‘w’.
32. Select the input and output ports and edit their names by pressing Q and click ‘ok’.
33. Select the DC source and press Q then change voltage to 5V and click on OK, press “
escape F2” and go for ‘check and save’ and close it.
34. Click on “simulation” → “new configuration” → edit configuration name as
“TRAN_SIM” and click ‘ok’.
35. Again click on Ok, now click on “lib/temp/inc” → include files →Analysis.
36. In Analysis remove the tick mark for OP and put a tick mark on the Tran box.
37. Mention the start time as 0n and stop time as 500n and click on Apply. Now in the left
side of window select the outputs.
38. .In outputs change the analysis to TRAN from the dropdown and select the PLOT under
Task.
39. Now minimize it and select all the I/Ps and O/Ps by holding the Ctrl on keyboard.
40. Release the Ctrl and maximize the set up simulation and click on Add and click on
Apply, then close it.
41. On the Right side palette area click on Run ELDO, now check whether the simulation is
completed or not.
42. .Click on “view waves”, now the output waveforms will appear on a new window.
43. Now from the top bar select tools and then select measurement tool and select delay
time, rise time, fall time, to mention on graph by selecting i/p or o/p on graph and then
press then add the waves and then click apply
Result: Hence simulated and verified the schematic of Decoder using mentor graphics tool.
Dept. of ECE, SIET Page 83
VLSI Lab III/II
7. D-FLIPFLOP
Date:
Aim: To generate schematic and layout for a D-Latch using mentor graphics tool.
Tools Required:
Theory: Latch is an electronic device that can be used to store one bit of information. The
D latch is used to capture, or 'latch' the logic level which is present on the Data
line when the clock input is high. If the data on the D line changes state while the
clock pulse is high, then the output, Q, follows the input, D. When the CLK input
falls to logic 0, the last state of the D input is trapped and held in the latch.
Truth Table:
CLK D Q QBAR
0 0 Q QBAR
0 1 Q QBAR
1 0 0 1
1 1 1 0
Procedure for Schematic:
10. Again click on OK then manage external/logic libraries window will pop up, now click
on the Add standard Libraries then the libraries will be added up and click on OK.
11. The project will be appeared on the left side of the screen,
12. Now right click on the project name and select new library then a pop up window asking
for library name is opened, provide the library name as vlsilaband click on Ok.
13. To create a schematic, right click on the library below the project name and go to new &
select schematic.
14. A window will pop up asking for the schematic name & cell name; provide the same
name for both schematic name and cell name and click on OK.
15. A pyxis schematic editor window is opened.
16. Right click on design sheet and go to “instance” →” choose symbol” → select nand
schematic and click ‘ok’.
17. Similarly consider 3 more nand schematics and one inverter schematic.
18. Now go to “library” → ”generic library” now select two PORT INs and two PORT
OUTs”.
19. Now connect all the components with wire by clicking on ’add wire’ on the left of the
window or pressing W on keyboard.
20. After completion of connections press ‘escape F2’.
21. Select and press Q to change the names of components and click on OK.
22. Press on input port →press ’Q’→ change name as ‘d’→ press ‘ok’
Input port →press ’Q’→ change name as ‘clk’→ press ‘ok’
Output port → press ‘Q’ → change name as ‘q’→ press ‘ok’
Output port → press ‘Q’ → change name as ‘qbar’→ press ‘ok’
23. Click on ‘check’ and ‘save’→ we will get error report
→To close the error report window press scroll on mouse & drag
from right to left
24. Now click on Add in the tool bar and select Generate Symbol then a pop up is opened.
25. Tick the options ‘replace existing’ & ‘activate symbol’ and click on ‘choose symbol’
→now select a symbol as box according to our need and then click ‘ok’.
Again click on Ok, now pyxis symbol window is opened.
26. Now ‘check & save’ and verify the errors and close all tabs.
27. To create a schematic for simulation, right click on the library below the project name
and go to new & select schematic.
28. A window will pop up asking for the schematic name & cell name; provide the same
name for both schematic name and cell name and click on OK.
29. A pyxis schematic editor window is opened.Right click on design sheet and go to
“instance” →” choose symbol” → select schematic name and click ‘ok’.
30. Now the desired symbol of experiment will appear.
31. Now go to library → generic library, select two ‘PORT IN’, two ‘PORT OUT’, ‘VDD’,
three ‘GND’, and press ’back’.
32. Go to sources library → select “DC (V)” and two “PATTERN (V)” and place them on
output side and input side respectively. Now add wires by pressing ‘w’.
33. Select the input and output ports and edit their names by pressing Q and click ‘ok’.
34. Select the DC source and press Q then change voltage to 5V and click on OK, press “
escape F2” and go for ‘check and save’ and close it.
35. Click on “simulation” → “new configuration” → edit configuration name as
“TRAN_SIM” and click ‘ok’.
36. Again click on Ok, now click on “lib/temp/inc” → include files →Analysis.
37. In Analysis remove the tick mark for OP and put a tick mark on the Tran box.
38. Mention the start time as 0n and stop time as 500n and click on Apply. Now in the left
side of window select the outputs.
39. In outputs change the analysis to TRAN from the dropdown and select the PLOT under
Task.
40. Now minimize it and select all the I/Ps and O/Ps by holding the Ctrl on keyboard.
41. Release the Ctrl and maximize the set up simulation and click on Add and click on
Apply, then close it.
42. On the Right side palette area click on Run ELDO, now check whether the simulation is
completed or not.
43. .Click on “view waves”, now the output waveforms will appear on a new window.
44. Now from the menu bar select tools and then select measurement tool and select delay
time, rise time, fall time, to mention on graph by selecting I/P or O/P on graph and then
press then add the waves and then click apply.
Result: Hence simulated and verified the schematic of D-flipflop using mentor graphics tool.