OpenCores
URL https://opencores.org/ocsvn/udp_ipv4_for_10g_ethernet/udp_ipv4_for_10g_ethernet/trunk

Subversion Repositories udp_ipv4_for_10g_ethernet

[/] [udp_ipv4_for_10g_ethernet/] [trunk/] [src/] [hdl/] [crc/] [crc32_fast_tab.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 DFC
--
2
-- crc32_fast_tab.vhd: A 32-bit CRC (IEEE) table for processing generic number of unmasked bits in parallel
3
-- Copyright (C) 2011 CESNET
4
-- Author(s): Lukas Kekely <xkekel00@stud.fit.vutbr.cz>
5
--
6
-- Redistribution and use in source and binary forms, with or without
7
-- modification, are permitted provided that the following conditions
8
-- are met:
9
-- 1. Redistributions of source code must retain the above copyright
10
--    notice, this list of conditions and the following disclaimer.
11
-- 2. Redistributions in binary form must reproduce the above copyright
12
--    notice, this list of conditions and the following disclaimer in
13
--    the documentation and/or other materials provided with the
14
--    distribution.
15
-- 3. Neither the name of the Company nor the names of its contributors
16
--    may be used to endorse or promote products derived from this
17
--    software without specific prior written permission.
18
--
19
-- This software is provided ``as is'', and any express or implied
20
-- warranties, including, but not limited to, the implied warranties of
21
-- merchantability and fitness for a particular purpose are disclaimed.
22
-- In no event shall the company or contributors be liable for any
23
-- direct, indirect, incidental, special, exemplary, or consequential
24
-- damages (including, but not limited to, procurement of substitute
25
-- goods or services; loss of use, data, or profits; or business
26
-- interruption) however caused and on any theory of liability, whether
27
-- in contract, strict liability, or tort (including negligence or
28
-- otherwise) arising in any way out of the use of this software, even
29
-- if advised of the possibility of such damage.
30
--
31
-- $Id$
32
--
33
-- TODO:
34
--
35
--
36
 
37
library IEEE;
38
use IEEE.std_logic_1164.all;
39
use IEEE.std_logic_arith.all;
40
use IEEE.std_logic_unsigned.all;
41
use IEEE.numeric_std.all;
42
use WORK.math_pack.all;
43
-- ----------------------------------------------------------------------------
44
--                        Entity declaration
45
-- ----------------------------------------------------------------------------
46
entity crc32_fast_tab is
47
   generic(
48
      DATA_WIDTH : integer := 64
49
   );
50
   port(
51
      DI    : in  std_logic_vector(DATA_WIDTH-1 downto 0);
52
      DO    : out std_logic_vector(31 downto 0)
53
   );
54
end entity crc32_fast_tab;
55
 
56
-- ----------------------------------------------------------------------------
57
--                      Architecture declaration
58
-- ----------------------------------------------------------------------------
59
architecture arch of crc32_fast_tab is
60
begin
61
   DW8_gen : if DATA_WIDTH = 8 generate
62
      crc_tab_i : entity work.crc32_fast8_tab
63
      port map (
64
         DI => DI,
65
         DO => DO);
66
   end generate;
67
 
68
   DW16_gen : if DATA_WIDTH = 16 generate
69
      crc_tab_i : entity work.crc32_fast16_tab
70
      port map (
71
         DI => DI,
72
         DO => DO);
73
   end generate;
74
 
75
   DW24_gen : if DATA_WIDTH = 24 generate
76
      crc_tab_i : entity work.crc32_fast24_tab
77
      port map (
78
         DI => DI,
79
         DO => DO);
80
   end generate;
81
 
82
   DW32_gen : if DATA_WIDTH = 32 generate
83
      crc_tab_i : entity work.crc32_fast32_tab
84
      port map (
85
         DI => DI,
86
         DO => DO);
87
   end generate;
88
 
89
   DW64_gen : if DATA_WIDTH = 64 generate
90
      crc_tab_i : entity work.crc32_fast64_tab
91
      port map (
92
         DI => DI,
93
         DO => DO);
94
   end generate;
95
 
96
   DW128_gen : if DATA_WIDTH = 128 generate
97
      crc_tab_i : entity work.crc32_fast128_tab
98
      port map (
99
         DI => DI,
100
         DO => DO);
101
   end generate;
102
 
103
   DW256_gen : if DATA_WIDTH = 256 generate
104
      crc_tab_i : entity work.crc32_fast256_tab
105
      port map (
106
         DI => DI,
107
         DO => DO);
108
   end generate;
109
 
110
   DW512_gen : if DATA_WIDTH = 512 generate
111
      crc_tab_i : entity work.crc32_fast512_tab
112
      port map (
113
         DI => DI,
114
         DO => DO);
115
   end generate;
116
 
117
   DW1024_gen : if DATA_WIDTH = 1024 generate
118
      crc_tab_i : entity work.crc32_fast1024_tab
119
      port map (
120
         DI => DI,
121
         DO => DO);
122
   end generate;
123
 
124
end architecture;

powered by: WebSVN 2.1.0

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