📄 chien10.vhd
字号:
--------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 21:33:14 04/09/08
-- Design Name:
-- Module Name: chien10 - Behavioral
-- Project Name:
-- Target Device:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
--------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity chien10 is
port
(
clk:in std_logic;
reset:in std_logic;
en_all:in std_logic;
en_sel:in std_logic;
err_pol:in std_logic_vector(12 downto 0);
product1:out std_logic_vector(12 downto 0);
product2:out std_logic_vector(12 downto 0);
product3:out std_logic_vector(12 downto 0);
product4:out std_logic_vector(12 downto 0);
product5:out std_logic_vector(12 downto 0);
product6:out std_logic_vector(12 downto 0);
product7:out std_logic_vector(12 downto 0);
product8:out std_logic_vector(12 downto 0)
);
end chien10;
architecture Behavioral of chien10 is
component mul10
port(
mul10_in:in std_logic_vector(12 downto 0);
mul10_out:out std_logic_vector(12 downto 0)
);
end component;
component mul20
port(
mul20_in:in std_logic_vector(12 downto 0);
mul20_out:out std_logic_vector(12 downto 0)
);
end component;
component mul30
port(
mul30_in:in std_logic_vector(12 downto 0);
mul30_out:out std_logic_vector(12 downto 0)
);
end component;
component mul40
port(
mul40_in:in std_logic_vector(12 downto 0);
mul40_out:out std_logic_vector(12 downto 0)
);
end component;
component mul50
port(
mul50_in:in std_logic_vector(12 downto 0);
mul50_out:out std_logic_vector(12 downto 0)
);
end component;
component mul60
port(
mul60_in:in std_logic_vector(12 downto 0);
mul60_out:out std_logic_vector(12 downto 0)
);
end component;
component mul70
port(
mul70_in:in std_logic_vector(12 downto 0);
mul70_out:out std_logic_vector(12 downto 0)
);
end component;
component mul80
port(
mul80_in:in std_logic_vector(12 downto 0);
mul80_out:out std_logic_vector(12 downto 0)
);
end component;
component mul55
port(
mul55_in:in std_logic_vector(12 downto 0);
mul55_out:out std_logic_vector(12 downto 0)
);
end component;
signal d:std_logic_vector(12 downto 0);
signal product1_tmp:std_logic_vector(12 downto 0);
signal product2_tmp:std_logic_vector(12 downto 0);
signal product3_tmp:std_logic_vector(12 downto 0);
signal product4_tmp:std_logic_vector(12 downto 0);
signal product5_tmp:std_logic_vector(12 downto 0);
signal product6_tmp:std_logic_vector(12 downto 0);
signal product7_tmp:std_logic_vector(12 downto 0);
signal product8_tmp:std_logic_vector(12 downto 0);
signal sel_tmp:std_logic_vector(12 downto 0);
signal err_pol_m:std_logic_vector(12 downto 0);
--signal cnt:integer range 1000 downto 0;
--signal en_sel: std_logic;
begin
d_pro:
process(clk,reset)
begin
if(reset='1')then
d<=(others=>'0');
elsif(clk'event and clk='1')then
if(en_all='1')then
d<=product8_tmp;
end if;
end if;
end process;
mul55_pro:
mul55
port map
(
mul55_in=>err_pol,
mul55_out=>err_pol_m
);
sel_pro:
process(clk)
begin
if(en_all='1')then
if(en_sel='0')then
sel_tmp<=d;
else
sel_tmp<=err_pol_m;
end if;
end if;
end process;
mul10_pro:
mul10
port map
(
mul10_in=>sel_tmp,
mul10_out=>product1_tmp
);
mul20_pro:
mul20
port map
(
mul20_in=>sel_tmp,
mul20_out=>product2_tmp
);
mul30_pro:
mul30
port map
(
mul30_in=>sel_tmp,
mul30_out=>product3_tmp
);
mul40_pro:
mul40
port map
(
mul40_in=>sel_tmp,
mul40_out=>product4_tmp
);
mul50_pro:
mul50
port map
(
mul50_in=>sel_tmp,
mul50_out=>product5_tmp
);
mul60_pro:
mul60
port map
(
mul60_in=>sel_tmp,
mul60_out=>product6_tmp
);
mul70_pro:
mul70
port map
(
mul70_in=>sel_tmp,
mul70_out=>product7_tmp
);
mul80_pro:
mul80
port map
(
mul80_in=>sel_tmp,
mul80_out=>product8_tmp
);
product1<=product1_tmp;
product2<=product2_tmp;
product3<=product3_tmp;
product4<=product4_tmp;
product5<=product5_tmp;
product6<=product6_tmp;
product7<=product7_tmp;
product8<=product8_tmp;
--cnt_pro:
-- process(clk,reset)
-- begin
-- if(reset='1')then
-- cnt<=0;
-- elsif(clk'event and clk='1')then
-- if(en_all='1')then
-- if cnt=511 then -- *
-- cnt<=0; --*
-- else
-- cnt<=cnt+1;
-- end if;
-- end if;
-- end if;
-- end process;
--
--
--sel_proc:
-- process(clk)
-- begin
-- if(clk'event and clk='1')then
-- if cnt=0 then ---*---
-- en_sel<='1';
-- else
-- en_sel<='0';
-- end if;
-- end if;
-- end process;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -