SlideShare a Scribd company logo
2
Most read
Verilog coding of DEMUX 1X8 using if else statement
module demux(d, sel, z);
input d;
input [2:0] sel;
output [7:0] z;
reg [7:0] z;
always @( d or sel)
begin
if( sel==3'b000)
z[0]=d;
else if( sel==3'b001)
z[1]=d;
else if( sel==3'b010)
z[2]=d;
else if( sel==3'b011)
z[3]=d;
else if( sel==3'b100)
z[4]=d;
else if( sel==3'b101)
z[5]=d;
else if( sel==3'b110)
z[6]=d;
else
z[7]=d;
end
endmodule
Verilog coding of DEMUX 1X8 using case statement
module demux(d, sel, z);
input d;
input [2:0] sel;
output [7:0] z;
reg [7:0] z;
always @( d or sel)
begin
case(sel)
3'b000 : z[0] = d;
3'b001 : z[1] = d;
3'b010 : z[2] = d;
3'b011 : z[3] = d;
3'b100 : z[4] = d;
3'b101 : z[5] = d;
3'b110 : z[6] = d;
3'b111 : z[7] = d;
endcase
end
endmodule
Ad

Recommended

Verilog coding of mux 8 x1
Verilog coding of mux 8 x1
Rakesh kumar jha
 
Asynchronous Sequential Circuit-Unit 4 ppt
Asynchronous Sequential Circuit-Unit 4 ppt
SIVALAKSHMIPANNEERSE
 
DIFFERENTIAL AMPLIFIER using MOSFET
DIFFERENTIAL AMPLIFIER using MOSFET
Praveen Kumar
 
state diagrams of flip flops
state diagrams of flip flops
Unsa Shakir
 
OPERATIONS ON SIGNALS
OPERATIONS ON SIGNALS
vishalgohel12195
 
MULTIPLEXER
MULTIPLEXER
Siddhi Shrivas
 
Computing DFT using Matrix method
Computing DFT using Matrix method
Sarang Joshi
 
DOMINO LOGIC CIRCUIT (VLSI)
DOMINO LOGIC CIRCUIT (VLSI)
AmiBokasoda
 
Logic families
Logic families
SARITHA REDDY
 
Signals and Systems Formula Sheet
Signals and Systems Formula Sheet
Haris Hassan
 
Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer
Bharti Airtel Ltd.
 
Distortionless Transmission Line
Distortionless Transmission Line
RCC Institute of Information Technology
 
Switch level modeling
Switch level modeling
Devi Pradeep Podugu
 
Demultiplexer presentation
Demultiplexer presentation
Shaikat Saha
 
Two port network
Two port network
Rajput Manthan
 
Pass Transistor Logic
Pass Transistor Logic
Diwaker Pant
 
Eca unit 2
Eca unit 2
Pavan Mukku
 
Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar
 
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
Naveen Jakhar, I.T.S
 
carry look ahead adder
carry look ahead adder
ASHISH MANI
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
Omkar Rane
 
Transistor Transistor Logic
Transistor Transistor Logic
surat murthy
 
Vhdl programming
Vhdl programming
Yogesh Mashalkar
 
Sequential cmos logic circuits
Sequential cmos logic circuits
Sakshi Bhargava
 
Digital electronics logic families
Digital electronics logic families
BLESSINAR0
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
Ankur Mahajan
 
Verilog hdl
Verilog hdl
Muhammad Uzair Rasheed
 
Latches and flip flop
Latches and flip flop
Shuaib Hotak
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
Dutch media landscape 2015 Q4 update by Starcom
Dutch media landscape 2015 Q4 update by Starcom
starcomNL
 

More Related Content

What's hot (20)

Logic families
Logic families
SARITHA REDDY
 
Signals and Systems Formula Sheet
Signals and Systems Formula Sheet
Haris Hassan
 
Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer
Bharti Airtel Ltd.
 
Distortionless Transmission Line
Distortionless Transmission Line
RCC Institute of Information Technology
 
Switch level modeling
Switch level modeling
Devi Pradeep Podugu
 
Demultiplexer presentation
Demultiplexer presentation
Shaikat Saha
 
Two port network
Two port network
Rajput Manthan
 
Pass Transistor Logic
Pass Transistor Logic
Diwaker Pant
 
Eca unit 2
Eca unit 2
Pavan Mukku
 
Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar
 
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
Naveen Jakhar, I.T.S
 
carry look ahead adder
carry look ahead adder
ASHISH MANI
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
Omkar Rane
 
Transistor Transistor Logic
Transistor Transistor Logic
surat murthy
 
Vhdl programming
Vhdl programming
Yogesh Mashalkar
 
Sequential cmos logic circuits
Sequential cmos logic circuits
Sakshi Bhargava
 
Digital electronics logic families
Digital electronics logic families
BLESSINAR0
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
Ankur Mahajan
 
Verilog hdl
Verilog hdl
Muhammad Uzair Rasheed
 
Latches and flip flop
Latches and flip flop
Shuaib Hotak
 
Signals and Systems Formula Sheet
Signals and Systems Formula Sheet
Haris Hassan
 
Verilog VHDL code Multiplexer and De Multiplexer
Verilog VHDL code Multiplexer and De Multiplexer
Bharti Airtel Ltd.
 
Demultiplexer presentation
Demultiplexer presentation
Shaikat Saha
 
Pass Transistor Logic
Pass Transistor Logic
Diwaker Pant
 
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
Naveen Jakhar, I.T.S
 
carry look ahead adder
carry look ahead adder
ASHISH MANI
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
Omkar Rane
 
Transistor Transistor Logic
Transistor Transistor Logic
surat murthy
 
Sequential cmos logic circuits
Sequential cmos logic circuits
Sakshi Bhargava
 
Digital electronics logic families
Digital electronics logic families
BLESSINAR0
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
Ankur Mahajan
 
Latches and flip flop
Latches and flip flop
Shuaib Hotak
 

Viewers also liked (20)

Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
Dutch media landscape 2015 Q4 update by Starcom
Dutch media landscape 2015 Q4 update by Starcom
starcomNL
 
Ea conference st albert feb 2014
Ea conference st albert feb 2014
tobylscott
 
Aspire one series service guide
Aspire one series service guide
Setyo Prasadja
 
fdgdfgdfg
fdgdfgdfg
sotirov
 
CV Roy Basoeki
CV Roy Basoeki
time4web
 
Hwswb
Hwswb
Saranya Ram
 
Lulusan SMK PI class of 2014
Lulusan SMK PI class of 2014
SMK Prakarya Internasional [SMK PI]
 
Filtros de cabine
Filtros de cabine
tuliovmg1
 
Creando Enlaces a Prueba de Penguin
Creando Enlaces a Prueba de Penguin
Ignacio Santiago Pérez
 
Zhuangzi
Zhuangzi
Ton Ball
 
C++ Chapter I
C++ Chapter I
Sorn Chanratha
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase client
Shashwat Shriparv
 
Rules around us
Rules around us
Оксана Димова
 
Monografia fic
Monografia fic
romercen
 
Yg Ini 1
Yg Ini 1
septiyan_123pradita
 
Chafer, 52 Bible Doctines: Man and sin part 2
Chafer, 52 Bible Doctines: Man and sin part 2
Richard Chamberlain
 
Miquel Martí i Pol
Miquel Martí i Pol
Quim Civil
 
Microorganisms
Microorganisms
sunilbhil
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
Dutch media landscape 2015 Q4 update by Starcom
Dutch media landscape 2015 Q4 update by Starcom
starcomNL
 
Ea conference st albert feb 2014
Ea conference st albert feb 2014
tobylscott
 
Aspire one series service guide
Aspire one series service guide
Setyo Prasadja
 
fdgdfgdfg
fdgdfgdfg
sotirov
 
CV Roy Basoeki
CV Roy Basoeki
time4web
 
Filtros de cabine
Filtros de cabine
tuliovmg1
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase client
Shashwat Shriparv
 
Monografia fic
Monografia fic
romercen
 
Chafer, 52 Bible Doctines: Man and sin part 2
Chafer, 52 Bible Doctines: Man and sin part 2
Richard Chamberlain
 
Miquel Martí i Pol
Miquel Martí i Pol
Quim Civil
 
Microorganisms
Microorganisms
sunilbhil
 
Ad

More from Rakesh kumar jha (10)

matlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequences
Rakesh kumar jha
 
MATLAB CODE OF Shifting sequence
MATLAB CODE OF Shifting sequence
Rakesh kumar jha
 
Matlab implementation of fast fourier transform
Matlab implementation of fast fourier transform
Rakesh kumar jha
 
Verilog code for decoder
Verilog code for decoder
Rakesh kumar jha
 
VERILOG CODE FOR Adder
VERILOG CODE FOR Adder
Rakesh kumar jha
 
verilog code for logic gates
verilog code for logic gates
Rakesh kumar jha
 
Reversible code converter
Reversible code converter
Rakesh kumar jha
 
Ujt
Ujt
Rakesh kumar jha
 
Pin diode
Pin diode
Rakesh kumar jha
 
Schottky diode
Schottky diode
Rakesh kumar jha
 
Ad

Verilog coding of demux 8 x1

  • 1. Verilog coding of DEMUX 1X8 using if else statement module demux(d, sel, z); input d; input [2:0] sel; output [7:0] z; reg [7:0] z; always @( d or sel) begin if( sel==3'b000) z[0]=d; else if( sel==3'b001) z[1]=d; else if( sel==3'b010) z[2]=d; else if( sel==3'b011) z[3]=d; else if( sel==3'b100) z[4]=d; else if( sel==3'b101) z[5]=d; else if( sel==3'b110) z[6]=d; else z[7]=d; end endmodule
  • 2. Verilog coding of DEMUX 1X8 using case statement module demux(d, sel, z); input d; input [2:0] sel; output [7:0] z; reg [7:0] z; always @( d or sel) begin case(sel) 3'b000 : z[0] = d; 3'b001 : z[1] = d; 3'b010 : z[2] = d; 3'b011 : z[3] = d; 3'b100 : z[4] = d; 3'b101 : z[5] = d; 3'b110 : z[6] = d; 3'b111 : z[7] = d; endcase end endmodule