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

Subversion Repositories robust_fir

[/] [robust_fir/] [trunk/] [src/] [base/] [fir_Nserial.v] - Blame information for rev 11

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

Line No. Rev Author Line
1 5 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 2 eyalhoc
OUTFILE fir_MAC_NUMserial_TOPO.v
31
 
32
ITER CX COEFF_NUM
33
ITER MX MAC_NUM
34
ITER DX SON_DELAY
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 serial FIR sons = MAC_NUM
43
//    Number of multiplayers    = MAC_NUM
44
 
45
 
46
module fir_MAC_NUMserial_TOPO (PORTS);
47
 
48
    input clk;
49
    input reset;
50
    input clken;
51
        input  [EXPR(COEFF_BITS-1):0] kCX;
52
        input  [EXPR(DIN_BITS-1):0] data_in;
53
        output [EXPR(DOUT_BITS-1):0] data_out;
54
        output valid;
55
 
56
 
57
        wire [EXPR(DIN_BITS-1):0] data_inMX;
58
    wire [EXPR(SON_DOUT-1):0] data_outMX;
59
        wire validMX;
60
        wire null;
61
 
62
        //delay inputs per son
63
    assign data_in0 = data_in;
64
    CREATE prgen_delayN.v DEFCMD(SWAP CONST(DELAY) SON_DELAY) DEFCMD(DEFINE CLKEN)
65
    prgen_delaySON_DELAY_en #(DIN_BITS) delay_dinMX (clk, reset, clken, data_inMX, data_inEXPR(MX+1));
66
        STOMP LINE
67
 
68
 
69
        //the FIR sons
70
LOOP MX MAC_NUM
71
        CREATE fir_serial.v def_fir_basic.txt DEFCMD(SWAP CONST(ORDER) EXPR(SON_DELAY-1)) DEFCMD(SWAP CONST(COEFF_BITS) COEFF_BITS) DEFCMD(SWAP CONST(DIN_BITS) DIN_BITS)
72
    fir_serial_EXPR(SON_DELAY-1)_INPUT_BITS firMX
73
                                                                (
74
                                                                .clk(clk),
75
                                                                .reset(reset),
76
                                                                .clken(clken),
77
                                                                .kDX(kEXPR((MX*SON_DELAY)+DX)) ,
78
                                                                .data_in(data_inMX),
79
                                                                .data_out(data_outMX),
80
                                                                .valid(validMX)
81
                                                                );
82
 
83
ENDLOOP MX
84
 
85
        //Pipline the output additions  
86
        CREATE bintree_adder.v DEFCMD(SWAP INPUT_NUM MAC_NUM)
87
        bintree_adder_MAC_NUM #(SON_DOUT) bintree_adder
88
                (
89
                .clk(clk),
90
                .reset(reset),
91
                .data_inMX(data_outMX),
92
IF TRUE(ADD_DOUT!=DOUT_BITS) .data_out({null, data_out}),
93
IF TRUE(ADD_DOUT==DOUT_BITS) .data_out(data_out),
94
                .valid_in(valid0),
95
                .valid_out(valid)
96
                );
97
 
98
endmodule
99
 
100
 
101
 
102
 
103
 
104
 
105
 

powered by: WebSVN 2.1.0

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