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 
  • 相关阅读:
    ubuntu文件夹建立软链接方法
    编译android内核和文件系统,已经安装jdk,提示build/core/config.mk:268: *** Error: could not find jdk tools.jar
    ubuntu12.04配置NFS服务详解
    解决ubuntu10.04不能上网
    GC
    IO
    HashMap
    JavaBean的介绍
    SSO二 之CAS
    SSO一 之介绍
  • 原文地址:https://www.cnblogs.com/kongqiweiliang/p/3246378.html
Copyright © 2011-2022 走看看