1 : 4 Demultiplexer Design using Logical Gates (Data Flow Modeling Style)-
Program-
//-----------------------------------------------------------------------------
//
// Title : demultiplexer1_4
// Design : vhdl_test
// Author : Naresh Singh Dobal
// Company : nsd
//
//-----------------------------------------------------------------------------
//
// File : 1 : 4 Demultiplexer using Logical Expression.v
module demultiplexer1_4 ( din ,x ,y ,a ,b ,c ,d );
output a ;
output b ;
output c ;
output d ;
input din ;
input x ;
input y ;
assign a = din & (~x) & (~y);
assign b = din & (~x) & y;
assign c = din & x & (~y);
assign d = din & x & y;
endmodule
Output WaveForm : 1 : 4 Demultiplexer |
Program-
//-----------------------------------------------------------------------------
//
// Title : demultiplexer1_4
// Design : vhdl_test
// Author : Naresh Singh Dobal
// Company : nsd
//
//-----------------------------------------------------------------------------
//
// File : 1 : 4 Demultiplexer using Logical Expression.v
module demultiplexer1_4 ( din ,x ,y ,a ,b ,c ,d );
output a ;
output b ;
output c ;
output d ;
input din ;
input x ;
input y ;
assign a = din & (~x) & (~y);
assign b = din & (~x) & y;
assign c = din & x & (~y);
assign d = din & x & y;
endmodule
3 comments :
Thanks sir
I want to know the difference in code between structural modeling and behaviour modeling
We have to write output variables first and then input in 1st line
Post a Comment