⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitnode_behavioral.txt

📁 LDPC码的消息节点(Bitnode)消息更新过程的VHDL语言实现
💻 TXT
字号:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity bitNode is
    Port (
		clock		: in STD_LOGIC;

		fromCheck0 	: in SIGNED(7 downto 0);
		fromCheck1 	: in SIGNED(7 downto 0);

		toCheck0 	: out SIGNED(7 downto 0);
        toCheck1 	: out SIGNED(7 downto 0);

		corrected	: out SIGNED(7 downto 0);
		init	 	: in STD_LOGIC;
		received 	: in SIGNED(7 downto 0)
	);
end bitNode;

architecture Behavioral of bitNode is
begin
	process(clock, init, received, fromCheck0, fromCheck1)
	VARIABLE correctedSignal : SIGNED(7 DOWNTO 0);
	VARIABLE toCheck0Signal : SIGNED(7 DOWNTO 0);
	VARIABLE toCheck1Signal : SIGNED(7 DOWNTO 0);
	begin
		if(clock'event and clock = '1') then
			if init = '1' then
				correctedSignal := received;
				toCheck0Signal := received;
				toCheck1Signal := received;
			else
				correctedSignal := fromCheck0 + fromCheck1 + received;
				toCheck0Signal := fromCheck1 + received;
				toCheck1Signal := fromCheck0 + received;
			end if;
		end if;
		corrected <= correctedSignal;
		toCheck0 <= toCheck0Signal;
		toCheck1 <= toCheck1Signal;
	end process;
end Behavioral;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -