当MASK中M等于四时,MASK解调的VHDL代码。
1条回答 默认 最新
天`南 2024-04-24 13:25关注以下代码仅供参考:
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity MaskDemodulator is Port ( CLK : in STD_LOGIC; RESET : in STD_LOGIC; DATA_IN : in STD_LOGIC_VECTOR(7 downto 0); MASK : in STD_LOGIC_VECTOR(7 downto 0); DEMOD_OUT : out STD_LOGIC); end MaskDemodulator; architecture Behavioral of MaskDemodulator is begin process(CLK, RESET) begin if RESET = '1' then DEMOD_OUT <= '0'; elsif rising_edge(CLK) then if DATA_IN = MASK then DEMOD_OUT <= '1'; else DEMOD_OUT <= '0'; end if; end if; end process; end Behavioral;解决 无用评论 打赏 举报