OpenCores
URL https://opencores.org/ocsvn/fast-crc/fast-crc/trunk

Subversion Repositories fast-crc

[/] [fast-crc/] [trunk/] [vhdl/] [big_xor.vhd] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trueno
library IEEE;
2
use IEEE.std_logic_1164.all;
3
use IEEE.std_logic_arith.all;
4
use IEEE.std_logic_unsigned.all;
5
 
6
entity big_xor is
7
  port (
8
    reset       : in  std_logic;
9
    -- This reset is more a "set" to the initial FCS value
10
    phi2        : in  std_logic;
11
    input_input : in  std_logic_vector(15 downto 0);
12
    fcs_input   : in  std_logic_vector(15 downto 0);  -- LS Word
13
    gf_input    : in  std_logic_vector(15 downto 0);  -- MS Word
14
    output      : out std_logic_vector(31 downto 0));
15
end big_xor ;
16
 
17
architecture behavior of big_xor is
18
 
19
  signal output_xor : std_logic_vector(15 downto 0);
20
  -- Intermediate signal between the XOR and the FCS register
21
 
22
begin  -- behavior
23
 
24
  -- purpose: This is the final part of the generator. The input and the
25
  -- output from the multiplier are XOR-ed in order to obtain the final value.
26
  -- type   : sequential
27
  -- inputs : phi2, reset, input_input, fcs_input, gf_input
28
  -- outputs: output
29
  p_big_xor_register: process (phi2, reset)
30
  begin  -- process p_big_xor_register
31
    if reset = '0' then                 -- asynchronous reset (active low)
32
      output <= X"46AF6449";
33
--      output_xor <= X"46AF";
34
-- The line before is not needed
35
    elsif phi2'event and phi2 = '1' then  -- rising clock edge
36
      output(15 downto 0)  <= output_xor(15 downto 0);
37
      output(31 downto 16) <= fcs_input(15 downto 0);
38
--    else
39
--      output_xor <= gf_input xor input_input;
40
    end if;
41
  end process p_big_xor_register;
42
 
43
  p_big_xor_combinational: process (gf_input, input_input)
44
  begin  -- process p_big_xor_combinational
45
      output_xor <= gf_input xor input_input;
46
  end process p_big_xor_combinational;
47
 
48
end behavior;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.