Design of 1 : 4 Demultiplexer using Conditional Operator (Data Flow Modeling Style).
Output Waveform : 1 : 4 Demultiplexer |
Verilog CODE-
//-----------------------------------------------------------------------------
//
// Title : demultiplexer4_1
// Design : verilog upload
// Author : Naresh Singh Dobal
// Company : nsd
//
//-----------------------------------------------------------------------------
//
// File : 1 to 4 Demultiplexer using Conditional Operator.v
module demultiplexer4_1 ( din ,sel ,dout );
output [3:0] dout ;
input din ;
input [1:0] sel ;
assign dout[3] = (sel==2'b00) ? din : 1'b0;
assign dout[2] = (sel==2'b01) ? din : 1'b0;
assign dout[1] = (sel==2'b10) ? din : 1'b0;
assign dout[0] = (sel==2'b11) ? din : 1'b0;
endmodule
0 comments :
Post a Comment