zoukankan      html  css  js  c++  java
  • GF(2^8)有限域模乘的verilog组合逻辑实现

    wire [7:0] x, y;
    wire [7:0] z;
    assign z = {
    
        x[7]&y[0] ^ x[6]&y[1] ^ x[5]&y[2] ^ x[4]&y[3] ^ (x[7]^x[3])&y[4] ^ (x[7]^x[6]^x[2])&y[5] ^ (x[6]^x[5]^x[1])&y[6] ^ (x[7]^x[5]^x[4]^x[0])&y[7],
        
        x[6]&y[0] ^ x[5]&y[1] ^ x[4]&y[2] ^ (x[1]^x[3])&y[3] ^ (x[7] ^ x[6]^ x[2])&y[4] ^ (x[6]^x[4]^x[1])&y[5] ^ (x[7]^x[5]^x[4]^x[0])&y[6] ^ (x[3]^x[4]^x[6])&y[7],
        
        x[5]&y[0] ^ x[4]&y[1] ^ (x[7]^x[3])&y[2] ^ (x[7]^x[6]^x[2])&y[3] ^ (x[6]^x[4]^x[1])&y[4] ^ (x[7]^x[5]^x[4]^x[0])&y[5] ^ (x[6]^x[4]^x[3])&y[6] ^ (x[7]^x[4]^x[2]^x[1])&y[7],
        
        x[4]&y[0] ^ (x[7]^x[3])&y[1] ^ (x[7]^x[6]^x[2])&y[2] ^ (x[6]^x[4]^x[1])&y[3] ^ (x[7]^x[5]^x[4]^x[0])&y[4] ^ (x[6]^x[4]^x[3])&y[5] ^ (x[5]^x[3]^x[2])&y[6] ^ (x[7]^x[4]^x[2]^x[1])&y[7],
        
        x[3]&y[0] ^ (x[7]^x[2])&y[1] ^ (x[6]^x[1])&y[2] ^ (x[7]^x[5]^x[0])&y[3] ^ (x[7]^x[6]^x[4])&y[4] ^ (x[7]^x[6]^x[5]^x[3])&y[5] ^ (x[7]^x[6]^x[5]^x[4]^x[2])&y[6] ^ (x[7]^x[6]^x[5]^x[4]^x[3]^x[1])&y[7],
        
        x[2]&y[0] ^ x[1]&y[1] ^ (x[7]^x[0])&y[2] ^ (x[7]^x[6])&y[3] ^ (x[6]^x[5])&y[4] ^ (x[5]^x[4])&y[5] ^ (x[7]^x[4]^x[3])&y[6] ^ (x[6]^x[3]^x[2])&y[7],
        
        x[1]&y[0] ^ (x[7]^x[0])&y[1] ^ (x[7]^x[6])&y[2] ^ (x[6]^x[5])&y[3] ^ (x[5]^x[4])&y[4] ^ (x[7]^x[4]^x[3])&y[5] ^ (x[6]^x[3]^x[2])&y[6] ^ (x[7]^x[5]^x[2]^x[1])&y[7],
        
        x[0]&y[0] ^ x[7]&y[1] ^ x[6]&y[2] ^ x[5]&y[3] ^ x[4]&y[4] ^ (x[7]^x[3])&y[5] ^ (x[7]^x[6]^x[2])&y[6] ^ (x[6]^x[5]^x[1])&y[7]
    
    };
    
  • 相关阅读:
    Daily Scrum 10.31
    Daily Scrum 10.30
    Daily Scrum 10.29
    Daily Scrum 10.28
    扩展设置
    安装
    james+javamail入门
    解决ZF2_PATH environment
    Apache Httpd Server 2.2升级2.4
    缓存,spring
  • 原文地址:https://www.cnblogs.com/chuaner/p/14067191.html
Copyright © 2011-2022 走看看