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

Subversion Repositories pci_express_crc

[/] [pci_express_crc/] [trunk/] [crc32d16N.v] - Blame information for rev 6

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

Line No. Rev Author Line
1 2 cmagleby
// ===========================================================================
2
// File    : crc32d16N.v
3
// Author  : cwinward
4
// Date    : Sat Dec 8 14:00:37 MST 2007
5
// Project : TI PHY design
6
//
7
// Copyright (c) notice
8
// This code adheres to the GNU public license
9
//
10
// ===========================================================================
11
//
12
// $Id: crc32d16N.v,v 1.1.1.1 2007-12-08 22:26:59 cmagleby Exp $
13
//
14
// ===========================================================================
15
//
16
// $Log: not supported by cvs2svn $
17
//
18
// ===========================================================================
19
// Function :  This provides the lcrc for the end of the pci express TLP 
20
//             packet.  This is 16 bits in 32 bits out.
21
//             For more data widths see www.gutzlogic.com
22
// ===========================================================================
23
// ===========================================================================
24
 
25
module crc32d16N (/*AUTOARG*/
26
   // Outputs
27
   crc32N,
28
   // Inputs
29
   clk, resetN, load, d, en
30
   );
31
   input        clk;
32
   input        resetN;
33
   input        load;  //load the seed value
34
   input [15:0] d;     //16 bit of tlp data starting with seq. num
35
   input        en;    //should be high the entire packet.
36
 
37
   output [31:0] crc32N; //inverted and swapped per pci spec.
38
   wire [31:0]    crc32N;
39
 
40
   assign        crc32N = {~crc32[0],~crc32[1],~crc32[2],~crc32[3],~crc32[4],~crc32[5],~crc32[6],~crc32[7],
41
                           ~crc32[8],~crc32[9],~crc32[10],~crc32[11],~crc32[12],~crc32[13],~crc32[14],~crc32[15],
42
                           ~crc32[16],~crc32[17],~crc32[18],~crc32[19],~crc32[20],~crc32[21],~crc32[22],~crc32[23],
43
                           ~crc32[24],~crc32[25],~crc32[26],~crc32[27],~crc32[28],~crc32[29],~crc32[30],~crc32[31]};
44
 
45
   /*AUTOWIRE*/
46
   // Beginning of automatic wires (for undeclared instantiated-module outputs)
47
   wire [31:0]           crc;                    // From make_crc32d16 of crc32d16.v
48
   // End of automatics
49
 
50
   /* -----\/----- EXCLUDED -----\/-----
51
   crc32d16 AUTO_TEMPLATE (.init(32'hFFFF_FFFF));
52
    -----/\----- EXCLUDED -----/\----- */
53
 
54
   crc32d16 make_crc32d16 (/*AUTOINST*/
55
                           // Outputs
56
                           .crc         (crc[31:0]),
57
                           // Inputs
58
                           .clk         (clk),
59
                           .resetN      (resetN),
60
                           .load        (load),
61
                           .d           (d[15:0]),
62
                           .init        (32'hFFFF_FFFF),         // Templated
63
                           .en          (en));
64
 
65
endmodule
66
 

powered by: WebSVN 2.1.0

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