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

Subversion Repositories robust_fir

[/] [robust_fir/] [trunk/] [src/] [base/] [fir_parallel.v] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 eyalhoc
<##//////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  Author: Eyal Hochberg                                      ////
4
////          eyal@provartec.com                                 ////
5
////                                                             ////
6
////  Downloaded from: http://www.opencores.org                  ////
7
/////////////////////////////////////////////////////////////////////
8
////                                                             ////
9
//// Copyright (C) 2010 Provartec LTD                            ////
10
//// www.provartec.com                                           ////
11
//// info@provartec.com                                          ////
12
////                                                             ////
13
//// This source file may be used and distributed without        ////
14
//// restriction provided that this copyright statement is not   ////
15
//// removed from the file and that any derivative work contains ////
16
//// the original copyright notice and the associated disclaimer.////
17
////                                                             ////
18
//// This source file is free software; you can redistribute it  ////
19
//// and/or modify it under the terms of the GNU Lesser General  ////
20
//// Public License as published by the Free Software Foundation.////
21
////                                                             ////
22
//// This source is distributed in the hope that it will be      ////
23
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
24
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
25
//// PURPOSE.  See the GNU Lesser General Public License for more////
26
//// details. http://www.gnu.org/licenses/lgpl.html              ////
27
////                                                             ////
28
//////////////////////////////////////////////////////////////////##>
29
 
30
OUTFILE PREFIX_parallel_TOPO.v
31
 
32
ITER OX ORDER
33
ITER CX COEFF_NUM
34
ITER SX ADD_STAGES
35
 
36
//  Built In Parameters:
37
//  
38
//    Filter Order             = ORDER
39
//    Input Precision          = DIN_BITS
40
//    Coefficient Precision    = COEFF_BITS
41
//    Sum of Products Latency  = LATENCY
42
//    Number of multiplayers   = COEFF_NUM
43
 
44
module PREFIX_parallel_TOPO (PORTS);
45
 
46
        input  clk;
47
        input  reset;
48
        input  clken;
49
        input  [EXPR(COEFF_BITS-1):0] kCX;
50
        input  [EXPR(DIN_BITS-1):0] data_in;
51
        output [EXPR(DOUT_BITS-1):0] data_out;
52
        output valid_out;
53
 
54
        wire [EXPR(DIN_BITS-1):0] data_in_d0;
55
        wire [EXPR(DIN_BITS-1):0] data_in_dEXPR(OX+1);
56
        reg [EXPR(MULT_BITS-1):0] multCX;
57
 
58
        //delay inputs per multiplayer
59
    assign data_in_d0 = data_in;
60
    CREATE prgen_delayN.v DEFCMD(SWAP DELAY 1) DEFCMD(DEFINE CLKEN)
61
    prgen_delay1_en #(DIN_BITS) delay_dinOX (clk, reset, clken, data_in_dOX, data_in_dEXPR(OX+1));
62
 
63
        always @(posedge clk or posedge reset)
64
          if (reset)
65
            begin
66
                  multCX <= #FFD {MULT_BITS{1'b0}};
67
            end
68
      else if (clken)
69
            begin
70
                  multCX <= #FFD kCX * data_in_dCX;
71
            end
72
 
73
        //Pipline the output additions
74
        CREATE prgen_bintree_adder.v DEFCMD(SWAP INPUT_NUM COEFF_NUM)
75
        prgen_bintree_adder_COEFF_NUM #(MULT_BITS) prgen_bintree_adder(
76
                .clk(clk),
77
                .reset(reset),
78
                .data_inCX(multCX),
79
                .data_out(data_out),
80
                .valid_in(clken),
81
                .valid_out(valid_out)
82
        );
83
 
84
endmodule
85
 
86
 
87
 
88
 

powered by: WebSVN 2.1.0

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