NAME OF STUDENT –Alok Singh KANPUR
(ALOK.LPU@YAHOO.COM)
Registration Number-11504455
Roll Number-26
SECTION –E1508 GROUP -2
Course Code: ECE-419
PROJECT TOPIC-2:4 DECODER USING SWITCH
LEVEL MODELLING
Under the Guidance of
(Mr sandeep dhariwal Assistant Professor)
Switch Level Modeling:-
The switch level of modeling provides a level of
abstraction between the logic and analog-
levels of abstraction, describing the
of transmission gates which are abstractions of
individual MOS and CMOS transistors. The switch
transistors are modeled as being either on or off,
conducting or not conducting. Further, the values
carried by the interconnections are abstracted
the whole range of analog voltages or currents to
small number of discrete values. These values are
referred to as signal strengths.
GATES USING PMOS AND
NMOS
NOT GATE NAND GATE
SYNTEX:-
Nmos
n1(output,data,control)
Pmos
p1(output,data,control)
DECODER
In digital electronics, a binary
decoder is a combinational
logic circuit that converts binary
information from the n coded
inputs to a maximum of
outputs. They are used in a wide
variety of applications, including
data DE multiplexing, seven
segment displays,
and memory address decoding.
BLOCK DIAGRAM USING
BASIC GATES:-
TRUTH TABLE:-
PROGRAM:-
 module notgate1(x,y);
 input x;
 output y;
 supply0 gnd;
 supply1 vdd;
 pmos x1(y,vdd,x);
 nmos x2(y,gnd,x);
 endmodule
NAND GATE:-
 module andgate(a,b,y);
 input a,b;
 output y;
 wire w,w1;
 supply0 gnd;
 supply1 vdd;
 pmos y1(w,vdd,a);
 pmos y2(w,vdd,b);
 nmos y3(w1,gnd,b);
 nmos y4(w,w1,a);
 notgate1 y5(w,y);
 endmodule
MAIN PROGRAM DECODER:-
 module decoder(a,b,i);
 input a,b;
 output [3:0]i;
 wire abar,bbar;
 notgate1 z1(a,abar);
 notgate1 z2(b,bbar);
 andgate z3(abar,bbar,i[0]);
 andgate z4(abar,b,i[1]);
 andgate z5(a,bbar,i[2]);
 andgate z6(a,b,i[3]);
 endmodule
TEST BENCH:-
 module decoder_test();
 reg a,b;
 wire [3:0]i;
 decoder d1(a,b,i);
 initial
 begin
 a=1'b0;b=1'b0;
 #5 a=1'b0;b=1'b1;
 #5 a=1'b1;b=1'b0;
 #5 a=1'b1;b=1'b1;
 #5 $stop;
 end
 endmodule
OUTPUT WAVEFORM:-
SCHEMATIC DIAGRAM:-
PROGRAM IN CADENCE:-
2 x4 decoder using switch level(Alok singh kanpur)

2 x4 decoder using switch level(Alok singh kanpur)

  • 1.
    NAME OF STUDENT–Alok Singh KANPUR (ALOK.LPU@YAHOO.COM) Registration Number-11504455 Roll Number-26 SECTION –E1508 GROUP -2 Course Code: ECE-419 PROJECT TOPIC-2:4 DECODER USING SWITCH LEVEL MODELLING Under the Guidance of (Mr sandeep dhariwal Assistant Professor)
  • 3.
    Switch Level Modeling:- Theswitch level of modeling provides a level of abstraction between the logic and analog- levels of abstraction, describing the of transmission gates which are abstractions of individual MOS and CMOS transistors. The switch transistors are modeled as being either on or off, conducting or not conducting. Further, the values carried by the interconnections are abstracted the whole range of analog voltages or currents to small number of discrete values. These values are referred to as signal strengths.
  • 4.
    GATES USING PMOSAND NMOS NOT GATE NAND GATE
  • 5.
  • 6.
    DECODER In digital electronics,a binary decoder is a combinational logic circuit that converts binary information from the n coded inputs to a maximum of outputs. They are used in a wide variety of applications, including data DE multiplexing, seven segment displays, and memory address decoding.
  • 8.
  • 9.
  • 11.
    PROGRAM:-  module notgate1(x,y); input x;  output y;  supply0 gnd;  supply1 vdd;  pmos x1(y,vdd,x);  nmos x2(y,gnd,x);  endmodule
  • 12.
    NAND GATE:-  moduleandgate(a,b,y);  input a,b;  output y;  wire w,w1;  supply0 gnd;  supply1 vdd;  pmos y1(w,vdd,a);  pmos y2(w,vdd,b);  nmos y3(w1,gnd,b);  nmos y4(w,w1,a);  notgate1 y5(w,y);  endmodule
  • 13.
    MAIN PROGRAM DECODER:- module decoder(a,b,i);  input a,b;  output [3:0]i;  wire abar,bbar;  notgate1 z1(a,abar);  notgate1 z2(b,bbar);  andgate z3(abar,bbar,i[0]);  andgate z4(abar,b,i[1]);  andgate z5(a,bbar,i[2]);  andgate z6(a,b,i[3]);  endmodule
  • 14.
    TEST BENCH:-  moduledecoder_test();  reg a,b;  wire [3:0]i;  decoder d1(a,b,i);  initial  begin  a=1'b0;b=1'b0;  #5 a=1'b0;b=1'b1;  #5 a=1'b1;b=1'b0;  #5 a=1'b1;b=1'b1;  #5 $stop;  end  endmodule
  • 15.
  • 16.
  • 17.