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]
    
    };
    
  • 相关阅读:
    小白安装使用Redis
    Mysql的Sql语句优化
    maximo入门----用户使用提要
    时不时刷刷BOSS 看看技术需求
    2019.7.10整理
    docker使用入门
    docker之windows安装&centOS安装
    HashTable学习
    Hashmap学习
    红黑树学习
  • 原文地址:https://www.cnblogs.com/chuaner/p/14067191.html
Copyright © 2011-2022 走看看