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

Subversion Repositories cxd9731

[/] [cxd9731/] [CRC_CAL.v] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 regttycomi
`timescale 1ns / 1ps
2
//////////////////////////////////////////////////////////////////////////////////
3
// Company: 
4
// Engineer: 
5
// 
6
// Create Date:    17:46:11 02/27/2009 
7
// Design Name: 
8
// Module Name:    CRC_CAL 
9
// Project Name: 
10
// Target Devices: 
11
// Tool versions: 
12
// Description: 
13
//
14
// Dependencies: 
15
//
16
// Revision: 
17
// Revision 0.01 - File Created
18
// Additional Comments: 
19
//
20
//////////////////////////////////////////////////////////////////////////////////
21
module CRC_CAL(CLK4, D, CRC_ARM, CRC_ENB, CRC_Q);
22
    input CLK4;
23
    input [15:0] D;
24
    input CRC_ARM;
25
    input CRC_ENB;
26
    output [15:0] CRC_Q;
27
 
28
wire [15:0] R_D;
29
reg  [15:0] R_Q;
30
 
31
 
32
// CRC combination logic block
33
CRC_CL CF(      .D(D),                  // one input is the data block
34
                                .C(R_Q),                        //      other input is the register feed back
35
                                .Q(R_D)                 // result feed into the data register data port
36
                                );
37
 
38
assign CRC_Q =  R_Q;
39
 
40
 
41
always @(posedge CLK4) begin //negedge
42
  if(CRC_ARM == 1'b0) begin
43
    R_Q <= 16'h4ABA;
44
  end else if(CRC_ENB == 1'b1) begin
45
    R_Q <= R_D;                                 // clock the data into the port
46
  end
47
end
48
 
49
endmodule

powered by: WebSVN 2.1.0

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