zoukankan      html  css  js  c++  java
  • 每天进步一点点------基础实验_03_编码器 :8位输入3位输出编码器

     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    : 
    18 ********************************************************************************/
    19 `timescale 1ns/1ps
    20 `define    UD  #1
    21 /*******************************************************************************/
    22 module ENCODE_8_3    
    23 ( 
    24     //Interface package
    25     input                        [7:0]        iDAT        ,//
    26     output  reg             [2:0]        oCODE         //
    27 );  
    28 //-------------------------------------------------------------------------------
    29 always@(*)begin
    30     case(iDAT)
    31         8'h1      : oCODE = 3'h0;  
    32         8'h2      : oCODE = 3'h1;  
    33         8'h3      : oCODE = 3'h2;  
    34         8'h4      : oCODE = 3'h3;  
    35         8'h5      : oCODE = 3'h4;  
    36         8'h6      : oCODE = 3'h5;  
    37         8'h7      : oCODE = 3'h6;  
    38         8'h8      : oCODE = 3'h7;  
    39         default : oCODE = 3'hz;  
    40     endcase 
    41 end
    42 //-------------------------------------------------------------------------------
    43 endmodule 
  • 相关阅读:
    牛客练习赛53 B题调和级数
    装备购买(线性基)
    杨氏矩阵与勾长公式
    南昌邀请赛B题(拉格朗日插值)
    徐州网络赛补题
    __int128 输入输出模板
    51 nod1067 Bash游戏 V2(sg函数打表)
    堆优化的dijkstra算法
    ST表求区间最值
    Tree Reconstruction
  • 原文地址:https://www.cnblogs.com/kongqiweiliang/p/3246378.html
Copyright © 2011-2022 走看看