|
|
|
//// ////
|
|
//// Author: Eyal Hochberg ////
|
|
//// eyal@provartec.com ////
|
|
//// ////
|
|
//// Downloaded from: http://www.opencores.org ////
|
|
/////////////////////////////////////////////////////////////////////
|
|
//// ////
|
|
//// Copyright (C) 2010 Provartec LTD ////
|
|
//// www.provartec.com ////
|
|
//// info@provartec.com ////
|
|
//// ////
|
|
//// This source file may be used and distributed without ////
|
|
//// restriction provided that this copyright statement is not ////
|
|
//// removed from the file and that any derivative work contains ////
|
|
//// the original copyright notice and the associated disclaimer.////
|
|
//// ////
|
|
//// This source file is free software; you can redistribute it ////
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
|
//// Public License as published by the Free Software Foundation.////
|
|
//// ////
|
|
//// This source is distributed in the hope that it will be ////
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
|
//// PURPOSE. See the GNU Lesser General Public License for more////
|
|
//// details. http://www.gnu.org/licenses/lgpl.html ////
|
|
//// ////
|
|
//////////////////////////////////////////////////////////////////##>
|
|
|
INCLUDE def_fir_basic.txt
|
INCLUDE def_fir_basic.txt
|
|
|
##check all input parameters have been given
|
##check all input parameters have been given
|
CHECK CONST(MAC_NUM)
|
CHECK CONST(MAC_NUM)
|
|
|
SWAP SON_DELAY EXPR(COEFF_NUM/MAC_NUM) ##input delay per son
|
SWAP SON_DELAY EXPR(COEFF_NUM/MAC_NUM) ##input delay per son
|
SWAP SON_COEFF MAC_NUM ##number of son coefficients
|
SWAP SON_COEFF MAC_NUM ##number of son coefficients
|
SWAP SON_STAGES LOG2(SON_DELAY) ##number of binary tree adder stages
|
SWAP SON_STAGES LOG2(SON_DELAY) ##number of binary tree adder stages
|
SWAP SON_DOUT EXPR(MULT_BITS+SON_STAGES) ##bits of son output
|
SWAP SON_DOUT EXPR(MULT_BITS+SON_STAGES) ##bits of son output
|
SWAP ADD_DOUT EXPR(SON_DOUT+LOG2(MAC_NUM)) ##bits of adder output
|
SWAP ADD_DOUT EXPR(SON_DOUT+LOG2(MAC_NUM)) ##bits of adder output
|
|
|
VERIFY(EXPR(COEFF_NUM%MAC_NUM)==0) else MAC number (multiplayers) must be a division of the coefficient number (FIR order+1)
|
VERIFY(EXPR(COEFF_NUM%MAC_NUM)==0) else MAC number (multiplayers) must be a division of the coefficient number (FIR order+1)
|
VERIFY(MAC_NUM>1) else MAC number must be larger than 1 (try using fir_serial.v)
|
VERIFY(MAC_NUM>1) else MAC number must be larger than 1 (try using fir_serial.v)
|
VERIFY(MAC_NUM
|
VERIFY(MAC_NUM
|
|
|
|
|