每天进步一点点------基础实验_02_多路解复用器 :4通道8位带三态输出

 1  /*********************************************************************************
 2 * Company                    : 
 3 * Engineer                    : 空气微凉
 4 * 
 5 * Create Date                : 00:00:00 22/03/2013 
 6 * Design Name                : 
 7 * Module Name                :         
 8 * Project Name                :  
 9 * Target Devices            : 
10 * Tool versions            : 
11 * Description                :  
12 *                       http://www.cnblogs.com/kongqiweiliang/             
13 * Dependencies                : 
14 *
15 * Revision                    : 
16 * Revision                    : 0.01 - File Created
17 * Additional Comments    : 基础实验_02_多路解复用器 :4通道8位带三态输出 
18 ********************************************************************************/
19 `timescale 1ns/1ps
20 `define    UD  #1
21 /*******************************************************************************/
22 module DEMUX_4_8    
23 ( 
24     //Interface package
25     input                            [1:0]        iDAT_SEL        ,//
26     output                          [7:0]        oDAT_0        ,//
27     output                          [7:0]        oDAT_1        ,//
28     output                         [7:0]        oDAT_2        ,//
29     output                          [7:0]        oDAT_3        ,//
30     input                            [7:0]        iDAT             //
31 
32 );  
33 //-------------------------------------------------------------------------------
34 assign oDAT_0 = (iDAT_SEL == 2'b00) ? iDAT : 8'hz;
35 assign oDAT_1 = (iDAT_SEL == 2'b01) ? iDAT : 8'hz;
36 assign oDAT_2 = (iDAT_SEL == 2'b10) ? iDAT : 8'hz;
37 assign oDAT_3 = (iDAT_SEL == 2'b11) ? iDAT : 8'hz;
38 //-------------------------------------------------------------------------------
39 endmodule 

 

posted on 2013-08-08 17:57  空气微凉  阅读(287)  评论(0编辑  收藏  举报

导航