16QAM
-
Upload
madan-r-honnalagere -
Category
Documents
-
view
5 -
download
1
description
Transcript of 16QAM
![Page 1: 16QAM](https://reader036.fdocuments.in/reader036/viewer/2022073121/55cf91ad550346f57b8f8d4c/html5/thumbnails/1.jpg)
-- library declaration library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;-- entity declarationentity qam_new_n isPort ( clk : in std_logic; -- global clockreset : in std_logic; -- asynchronous active high resetvalid_in : in std_logic; -- when high din is validdin : in std_logic_vector(3 downto 0); -- data indout_rl : out std_logic_vector(15 downto 0); -- real outdout_ig : out std_logic_vector(15 downto 0); -- imag outvalid_out : out std_logic -- when high real and imag is valid);end qam_new_n;-- architecture declarationarchitecture Behavioral of qam_new_n issignal count : std_logic;signal dout_rl_s : std_logic_vector(15 downto 0);signal dout_ig_s : std_logic_vector(15 downto 0);begin
-- process to map 16 point constellationprocess(clk, reset)beginif(reset = '1') thendout_rl_s <= (others => '0');dout_ig_s <= (others => '0');count <= '0';valid_out <= '0';elsif(clk'event and clk = '1') thenif(valid_in = '1') thencount <= '0';case din iswhen"0000" =>dout_rl_s <= x"143d"; --x"0051";dout_ig_s <= x"143d"; --x"0051";valid_out <= '1';when"0001" =>dout_rl_s <= x"143d"; --x"0051";dout_ig_s <= x"3CB7"; --x"00F2";valid_out <= '1';when"0010" =>dout_rl_s <= x"143d"; --x"0051";dout_ig_s <= x"EBC3"; --x"FFAE";valid_out <= '1';when"0011" =>dout_rl_s <= x"143d"; --x"0051";dout_ig_s <= x"C349"; --x"FF0D";valid_out <= '1';
![Page 2: 16QAM](https://reader036.fdocuments.in/reader036/viewer/2022073121/55cf91ad550346f57b8f8d4c/html5/thumbnails/2.jpg)
when"0100" =>dout_rl_s <= x"3CB7"; --x"00F2";dout_ig_s <= x"143d"; --x"0051";valid_out <= '1';when"0101" =>dout_rl_s <= x"3CB7"; --x"00F2";dout_ig_s <= x"3CB7"; --x"00F2";valid_out <= '1';when"0110" =>dout_rl_s <= x"3CB7"; --x"00F2";dout_ig_s <= x"EBC3"; --x"FFAE";valid_out <= '1';when"0111" =>dout_rl_s <= x"3CB7"; --x"00F2";dout_ig_s <= x"C349"; --x"FFC3";valid_out <= '1';when"1000" => dout_rl_s <= x"EBC3"; dout_ig_s <= x"143d"; --x"0051";valid_out <= '1';when"1001" =>dout_rl_s <= x"EBC3"; --x"FFAE";dout_ig_s <= x"3CB7"; --x"00F2";valid_out <= '1';when"1010" =>dout_rl_s <= x"EBC3"; --x"FFAE";dout_ig_s <= x"EBC3"; --x"FFAE";valid_out <= '1';when"1011" =>dout_rl_s <= x"EBC3"; --x"FFAE";dout_ig_s <= x"C349"; --x"FF0E";valid_out <= '1';when"1100" =>dout_rl_s <= x"C349"; --x"FF0E";dout_ig_s <= x"143d"; --x"0051";valid_out <= '1';when"1101" =>dout_rl_s <= x"C349"; --x"FF0E";dout_ig_s <= x"3CB7"; --x"00F2";valid_out <= '1';when"1110" =>dout_rl_s <= x"C349"; --x"FF0E";dout_ig_s <= x"EBC3"; --x"FFAE";valid_out <= '1';when"1111" =>dout_rl_s <= x"C349"; --x"FF0E";dout_ig_s <= x"C349"; --x"FF0E";valid_out <= '1';when others => null;end case;elsedout_rl_s <= (others => '0');
![Page 3: 16QAM](https://reader036.fdocuments.in/reader036/viewer/2022073121/55cf91ad550346f57b8f8d4c/html5/thumbnails/3.jpg)
dout_ig_s <= (others => '0');valid_out <= valid_in;end if;end if;end process;
dout_rl <= dout_rl_s; dout_ig <= dout_ig_s;
end Behavioral;