zoukankan      html  css  js  c++  java
  • 每天进步一点点------基础实验_06_优先译码器 :优先译码器

     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    : 基础实验_06_优先译码器 :优先译码器 
    18 ********************************************************************************/
    19 `timescale 1ns/1ps
    20 `define    UD  #1
    21 /*******************************************************************************/
    22 module DECODE_PRIORITY    
    23 ( 
    24     //Interface package
    25     input                            [7:0]         iCODE    ,//50MHz
    26     output  reg                    [7:0]         oDAT      //system interface
    27 );  
    28 //-------------------------------------------------------------------------------
    29 always@(*)begin
    30     if(iCODE[7])         oDAT = 8'b1000_0000;
    31     else if(iCODE[6]) oDAT = 8'b0100_0000;
    32     else if(iCODE[5]) oDAT = 8'b0010_0000;
    33     else if(iCODE[4]) oDAT = 8'b0001_0000;
    34     else if(iCODE[3]) oDAT = 8'b0000_1000;
    35     else if(iCODE[2]) oDAT = 8'b0000_0100;
    36     else if(iCODE[1]) oDAT = 8'b0000_0010;
    37     else if(iCODE[0]) oDAT = 8'b0000_0001;
    38     else                    oDAT = 8'bz;
    39 end
    40 //-------------------------------------------------------------------------------
    41 endmodule 
  • 相关阅读:
    第10组 Beta冲刺 (3/5)
    第10组 Beta冲刺 (2/5)
    第10组 Beta冲刺 (1/5)
    第10组 Alpha冲刺 (3/6)
    第10组 Alpha冲刺 (2/6)
    第10组 Alpha冲刺 (1/6)
    第一次作业
    第二次作业
    机器学习_第一次个人作业
    软工实践个人总结
  • 原文地址:https://www.cnblogs.com/kongqiweiliang/p/3246415.html
Copyright © 2011-2022 走看看