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

Subversion Repositories robust_fir

[/] [robust_fir/] [trunk/] [src/] [base/] [fir.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
OUTDIR  PREFIX_NAME
31
OUTFILE PREFIX_NAME.v
32
INCLUDE def_fir.txt
33
 
34
 LIST firlist_NAME.txt
35
 
36
ITER CX COEFF_NUM
37
 
38
##  Expected RobustVerilog parameters:
39
##  SWAP ORDER val       - order of FIR
40
##  SWAP COEFF_BITS val  - precision of coeeficients (bit num)
41
##  SWAP DIN_BITS val    - precision of input data (bit num)
42
##  SWAP MAC_NUM val     - number of multiplayers (determines architecture)
43
 
44
//  Built In Parameters:
45
//  
46
//    Filter Order              = ORDER
47
//    Input Precision           = DIN_BITS
48
//    Coefficient Precision     = COEFF_BITS
49
//    Number of serial FIR sons = MAC_NUM
50
//    Number of multiplayers    = MAC_NUM
51
//    Architecture              = ARCH
52
//    Sum of Products Latency   = LATENCY
53
 
54
 
55
module PREFIX_NAME (PORTS);
56
 
57
   input                            clk;
58
   input                            reset;
59
   input [EXPR(COEFF_BITS-1):0]     kCX;
60
   input [EXPR(DIN_BITS-1):0]       data_in;
61
   output [EXPR(DOUT_BITS-1):0]     data_out;
62
   input                            valid_in;
63
   output                           valid_out;
64
 
65
 
66
IFDEF MAC_EQ(1)
67
  CREATE fir_serial.v def_fir_basic.txt DEFCMD(SWAP CONST(ORDER) ORDER) DEFCMD(SWAP CONST(COEFF_BITS) COEFF_BITS) DEFCMD(SWAP CONST(DIN_BITS) DIN_BITS)
68
  PREFIX_serial_TOPO PREFIX(clk, reset, valid_in, CONCAT.REV(kCX ,), data_in, data_out, valid_out);
69
 
70
ELSE MAC_EQ(1)
71
  IFDEF MAC_EQ(COEFF_NUM)
72
  CREATE fir_parallel.v def_fir_basic.txt DEFCMD(SWAP CONST(ORDER) ORDER) DEFCMD(SWAP CONST(COEFF_BITS) COEFF_BITS) DEFCMD(SWAP CONST(DIN_BITS) DIN_BITS)
73
  PREFIX_parallel_TOPO PREFIX(clk, reset, valid_in, CONCAT.REV(kCX ,), data_in, data_out, valid_out);
74
 
75
  ELSE MAC_EQ(COEFF_NUM)
76
  CREATE fir_Nserial.v def_fir_Nserial.txt DEFCMD(SWAP CONST(ORDER) ORDER) DEFCMD(SWAP CONST(COEFF_BITS) COEFF_BITS) DEFCMD(SWAP CONST(DIN_BITS) DIN_BITS) DEFCMD(SWAP CONST(MAC_NUM) MAC_NUM)
77
  PREFIX_MAC_NUMserial_TOPO PREFIX(clk, reset, valid_in, CONCAT.REV(kCX ,), data_in, data_out, valid_out);
78
 
79
  ENDIF MAC_EQ(COEFF_NUM)
80
ENDIF MAC_EQ(1)
81
 
82
 
83
endmodule

powered by: WebSVN 2.1.0

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