您现在的位置:首页 >> 通信 >> 内容

m基于FPGA的CRC循环冗余校验系统verilog实现,包含testbench

时间:2023/5/13 0:34:57 点击:

  核心提示:00_012m,包括程序操作录像...

1.完整项目描述和程序获取

>面包多安全交易平台:

vivado:https://mbd.pub/o/bread/ZJicm59r

qii:https://mbd.pub/o/bread/ZJicm59u

>如果链接失效,可以直接打开本站店铺搜索相关店铺:

点击店铺

>如果链接失效,程序调试报错或者项目合作可以加微信或者QQ联系。

2.部分仿真图预览



3.算法概述

       CRC(Cyclic Redundancy Check)是一种广泛应用于通信和存储系统中的数据校验技术。它通过对数据进行多项式除法操作来生成冗余校验码,并将其附加到数据中发送到接收方,接收方在接收到数据后再次进行多项式除法计算,如果计算得到的校验码与接收到的校验码相同,则表明数据没有发生错误。

      CRC校验的基本原理是通过对数据进行多项式除法操作来生成冗余校验码。具体来说,假设要对一个N位的数据进行CRC校验,生成一个M位的校验码,其中M通常比N小,一般取16位或32位。生成多项式一般表示为G(x),它是一个M+1位的二进制数,最高位和最低位均为1。生成多项式的选择对于CRC校验的性能至关重要。

4.部分源码

`timescale 1ns / 1ps

.......................................................................

//x^16+x^15+x^2+1

//1- 1 0 0 0 -0 0 0 0 -0 0 0 0- 0 1 0 1 

assign tmp2[0] = xtmp0[8] ^ xtmp0[9] ^ xtmp0[10] ^ xtmp0[11] ^ xtmp0[12] ^ xtmp0[13] ^ xtmp0[14] ^ xtmp0[15] ^ i_x[0] ^ i_x[1] ^ i_x[2] ^ i_x[3] ^ i_x[4] ^ i_x[5] ^ i_x[6] ^ i_x[7];

assign tmp2[1] = xtmp0[9] ^ xtmp0[10] ^ xtmp0[11] ^ xtmp0[12] ^ xtmp0[13] ^ xtmp0[14] ^ xtmp0[15] ^ i_x[1] ^ i_x[2] ^ i_x[3] ^ i_x[4] ^ i_x[5] ^ i_x[6] ^ i_x[7];

assign tmp2[2] = xtmp0[8] ^ xtmp0[9] ^ i_x[0] ^ i_x[1];

assign tmp2[3] = xtmp0[9] ^ xtmp0[10] ^ i_x[1] ^ i_x[2];

assign tmp2[4] = xtmp0[10] ^ xtmp0[11] ^ i_x[2] ^ i_x[3];

assign tmp2[5] = xtmp0[11] ^ xtmp0[12] ^ i_x[3] ^ i_x[4];

assign tmp2[6] = xtmp0[12] ^ xtmp0[13] ^ i_x[4] ^ i_x[5];

assign tmp2[7] = xtmp0[13] ^ xtmp0[14] ^ i_x[5] ^ i_x[6];

assign tmp2[8] = xtmp0[0] ^ xtmp0[14] ^ xtmp0[15] ^ i_x[6] ^ i_x[7];

assign tmp2[9] = xtmp0[1] ^ xtmp0[15] ^ i_x[7];

assign tmp2[10] = xtmp0[2];

assign tmp2[11] = xtmp0[3];

assign tmp2[12] = xtmp0[4];

assign tmp2[13] = xtmp0[5];

assign tmp2[14] = xtmp0[6];

......................................................................

endmodule

00_012m

作者:我爱C编程 来源:我爱C编程
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
本类固顶
  • 没有
  • FPGA/MATLAB商业/科研类项目合作(www.store718.com) © 2025 版权所有 All Rights Reserved.
  • Email:1480526168@qq.com 站长QQ: 1480526168