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 
  • 相关阅读:
    MQTT的编译和安装(mosquitto)
    四、固件分析-固件逆向
    三、固件分析-固件提取
    二、硬件分析-电路分析
    一、硬件分析
    gdb调试
    AES加密中遇到的坑
    多线程中快速定位段错误位置
    理想的数据加密流程
    Centos进入单用户修改root密码
  • 原文地址:https://www.cnblogs.com/kongqiweiliang/p/3246378.html
Copyright © 2011-2022 走看看