通信原理设计报告(7,4)汉明码的编解码设计(5)

2019-01-12 16:38

通信系统课程设计报告

(7,4)汉明码译码源程序

LIBRARY IEEE ;

USE IEEE.STD_LOGIC_1164.ALL ; USE IEEE.STD_LOGIC_ARITH.ALL ; USE IEEE.STD_LOGIC_UNSIGNED.ALL; Entity ym is

port(a:in std_logic_vector(6 downto 0); --汉明码输入 b:out std_logic_vector(3 downto 0); --译码输出 n:out std_logic_vector(2 downto 0);

s:out std_logic_vector(2 downto 0) --指示错码位置 ); end ;

architecture one of ym is

signal bbb:std_logic_vector(3 downto 0); begin process(a)

variable ss:std_logic_vector(2 downto 0); variable bb:std_logic_vector(6 downto 0); begin --指示错码位置

ss(2):=a(6) xor a(5) xor a(4) xor a(2); ss(1):=a(6) xor a(5) xor a(3) xor a(1); ss(0):=a(6) xor a(4) xor a(3) xor a(0); bb:=a;

if ss> \case ss is --纠1位错码

when \

第21页 共22页

通信系统课程设计报告

when \when \when \when \when \when \when others => null; end case;

else b<= a(6)&a(5)&a(4)&a(3); n<=\end if; s<=ss;

bbb<=bb(6)&bb(5)&bb(4)&bb(3); b<=bbb; end process; end;

第22页 共22页


通信原理设计报告(7,4)汉明码的编解码设计(5).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:北理工信号与系统精品课程习题

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: