crc校验码MATLAB和FPGA实现.docVIP

  • 48
  • 0
  • 约5.3千字
  • 约 3页
  • 2018-04-17 发布于河南
  • 举报
crc校验码MATLAB和FPGA实现

1.掌握按字节编码的过程,试着写出CRC 校验编码的Matlab 程序? %main program clear all; input=[1 1 0 0] CRC_Number=[3 8 12 16]; for crc_index = 1:size(CRC_Number,2) crc_no = CRC_Number(crc_index) output = crc_add(input, crc_no) [output_after_check, indicate] =crc_check(output,crc_no) end function [ output, indicate] = crc_check( input, crc_no ) % the function is proposed for deleting crc bits from the input sequence n = size(input,2); generator = zeros(1,crc_no+1); output = zeros(1,n-crc_no); switch crc_no case 3 generator = [1 0 1 1]; case 8 generator = [1 1 0 0 1 1 0 1 1]; %D^8+D^7+D^4+D^3+D+1 case 12 gener

文档评论(0)

1亿VIP精品文档

相关文档