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

Subversion Repositories crcahb

[/] [crcahb/] [trunk/] [rtl/] [crc_ip.v] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 redbear
//////////////////////////////////////////////////////////////////
2
////
3
////
4
////    CRCAHB CORE BLOCK
5
////
6
////
7
////
8
//// This file is part of the APB to I2C project
9
////
10
//// http://www.opencores.org/cores/apbi2c/
11
////
12
////
13
////
14
//// Description
15
////
16
//// Implementation of APB IP core according to
17
////
18
//// crcahb IP core specification document.
19
////
20
////
21
////
22
//// To Do: Things are right here but always all block can suffer changes
23
////
24
////
25
////
26
////
27
////
28
//// Author(s): -  Julio Cesar 
29
////
30
///////////////////////////////////////////////////////////////// 
31
////
32
////
33
//// Copyright (C) 2009 Authors and OPENCORES.ORG
34
////
35
////
36
////
37
//// This source file may be used and distributed without
38
////
39
//// restriction provided that this copyright statement is not
40
////
41
//// removed from the file and that any derivative work contains
42
//// the original copyright notice and the associated disclaimer.
43
////
44
////
45
//// This source file is free software; you can redistribute it
46
////
47
//// and/or modify it under the terms of the GNU Lesser General
48
////
49
//// Public License as published by the Free Software Foundation;
50
//// either version 2.1 of the License, or (at your option) any
51
////
52
//// later version.
53
////
54
////
55
////
56
//// This source is distributed in the hope that it will be
57
////
58
//// useful, but WITHOUT ANY WARRANTY; without even the implied
59
////
60
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
61
////
62
//// PURPOSE. See the GNU Lesser General Public License for more
63
//// details.
64
////
65
////
66
////
67
//// You should have received a copy of the GNU Lesser General
68
////
69
//// Public License along with this source; if not, download it
70
////
71
//// from http://www.opencores.org/lgpl.shtml
72
////
73
////
74
///////////////////////////////////////////////////////////////////
75 2 julioameri
module crc_ip
76
(
77
        //OUTPUTS
78
        output [31:0] HRDATA,
79
        output HREADYOUT,
80
        output HRESP,
81
        //INPUTS
82
        input [31:0] HWDATA,
83
        input [31:0] HADDR,
84
        input [ 2:0] HSIZE,
85
        input [ 1:0] HTRANS,
86
        input HWRITE,
87
        input HSElx,
88
        input HREADY,
89
        input HRESETn,
90
        input HCLK
91
);
92
 
93
//Internal Signals
94
wire [31:0] crc_poly_out;
95
wire [31:0] crc_out;
96
wire [31:0] crc_init_out;
97
wire [ 7:0] crc_idr_out;
98
wire buffer_full;
99
wire read_wait;
100
wire [31:0] bus_wr;
101
wire [ 1:0] crc_poly_size;
102
wire [ 1:0] bus_size;
103
wire [ 1:0] rev_in_type;
104
wire rev_out_type;
105
wire crc_init_en;
106
wire crc_idr_en;
107
wire crc_poly_en;
108
wire buffer_write_en;
109
wire reset_chain;
110
 
111
//Instanciation of Host Interface
112
host_interface HOST_INTERFACE
113
(
114
        .HRDATA          ( HRDATA          ),
115
        .HREADYOUT       ( HREADYOUT       ),
116
        .HRESP           ( HRESP           ),
117
        .bus_wr          ( bus_wr          ),
118
        .crc_poly_size   ( crc_poly_size   ),
119
        .bus_size        ( bus_size        ),
120
        .rev_in_type     ( rev_in_type     ),
121
        .rev_out_type    ( rev_out_type    ),
122
        .crc_init_en     ( crc_init_en     ),
123
        .crc_idr_en      ( crc_idr_en      ),
124
        .crc_poly_en     ( crc_poly_en     ),
125
        .buffer_write_en ( buffer_write_en ),
126
        .reset_chain     ( reset_chain     ),
127
        .reset_pending   ( reset_pending   ),
128
        .HWDATA          ( HWDATA          ),
129
        .HADDR           ( HADDR           ),
130
        .HSIZE           ( HSIZE           ),
131
        .HTRANS          ( HTRANS          ),
132
        .HWRITE          ( HWRITE          ),
133
        .HSElx           ( HSElx           ),
134
        .HREADY          ( HREADY          ),
135
        .HRESETn         ( HRESETn         ),
136
        .HCLK            ( HCLK            ),
137
        .crc_poly_out    ( crc_poly_out    ),
138
        .crc_out         ( crc_out         ),
139
        .crc_init_out    ( crc_init_out    ),
140
        .crc_idr_out     ( crc_idr_out     ),
141
        .buffer_full     ( buffer_full     ),
142
        .read_wait       ( read_wait       )
143
);
144
 
145
//Instantiation of crc_unit
146
crc_unit CRC_UNIT
147
(
148
        .crc_poly_out    ( crc_poly_out    ),
149
        .crc_out         ( crc_out         ),
150
        .crc_init_out    ( crc_init_out    ),
151
        .crc_idr_out     ( crc_idr_out     ),
152
        .buffer_full     ( buffer_full     ),
153
        .read_wait       ( read_wait       ),
154
        .bus_wr          ( bus_wr          ),
155
        .crc_poly_size   ( crc_poly_size   ),
156
        .bus_size        ( bus_size        ),
157
        .rev_in_type     ( rev_in_type     ),
158
        .rev_out_type    ( rev_out_type    ),
159
        .crc_init_en     ( crc_init_en     ),
160
        .crc_idr_en      ( crc_idr_en      ),
161
        .crc_poly_en     ( crc_poly_en     ),
162
        .buffer_write_en ( buffer_write_en ),
163
        .reset_chain     ( reset_chain     ),
164
        .reset_pending   ( reset_pending   ),
165
        .clk             ( HCLK            ),
166
        .rst_n           ( HRESETn         )
167
);
168
endmodule

powered by: WebSVN 2.1.0

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