Line 66... |
Line 66... |
);
|
);
|
end entity;
|
end entity;
|
|
|
architecture behave of o8_crc16_ccitt is
|
architecture behave of o8_crc16_ccitt is
|
|
|
constant Poly_Init : std_logic_vector(15 downto 0) := x"0000";
|
constant Poly_Init : std_logic_vector(15 downto 0) :=
|
|
(others => '0');
|
|
|
constant User_Addr : std_logic_vector(15 downto 2)
|
constant User_Addr : std_logic_vector(15 downto 2)
|
:= Address(15 downto 2);
|
:= Address(15 downto 2);
|
alias Comp_Addr is Bus_Address(15 downto 2);
|
alias Comp_Addr is Bus_Address(15 downto 2);
|
alias Reg_Addr is Bus_Address(1 downto 0);
|
alias Reg_Addr is Bus_Address(1 downto 0);
|
signal Reg_Sel : std_logic_vector(1 downto 0);
|
signal Reg_Sel : std_logic_vector(1 downto 0) :=
|
|
(others => '0');
|
signal Addr_Match : std_logic;
|
signal Addr_Match : std_logic;
|
signal Wr_En : std_logic;
|
signal Wr_En : std_logic;
|
signal Wr_Data_q : DATA_TYPE;
|
signal Wr_Data_q : DATA_TYPE := (others => '0');
|
signal Rd_En : std_logic;
|
signal Rd_En : std_logic;
|
|
|
signal Next_Byte : DATA_TYPE;
|
signal Next_Byte : DATA_TYPE := (others => '0');
|
signal Byte_Count : DATA_TYPE;
|
signal Byte_Count : DATA_TYPE := (others => '0');
|
|
|
signal Calc_En : std_logic;
|
signal Calc_En : std_logic := '0';
|
signal Buffer_En : std_logic;
|
signal Buffer_En : std_logic := '0';
|
signal Data : DATA_TYPE;
|
signal Data : DATA_TYPE := (others => '0');
|
signal Exr : DATA_TYPE;
|
signal Exr : DATA_TYPE := (others => '0');
|
signal Reg : std_logic_vector(15 downto 0);
|
signal Reg : std_logic_vector(15 downto 0) :=
|
signal Comp_Data : std_logic_vector(15 downto 0);
|
(others => '0');
|
|
signal Comp_Data : std_logic_vector(15 downto 0) :=
|
|
(others => '0');
|
|
|
begin
|
begin
|
|
|
Addr_Match <= '1' when Comp_Addr = User_Addr else '0';
|
Addr_Match <= '1' when Comp_Addr = User_Addr else '0';
|
|
|