# HG changeset patch # User paul # Date 2013-12-06 14:59:29 # Node ID c74d16760597488f75ffe560f1b50d572cbd1bdc # Parent 90bacf12c04282d2a8d8bca47fc46bbcfeaef5f9 p.367 "Digital Signal Processing with FPGA" diff --git a/butterfly_processor.py b/butterfly_processor.py new file mode 100644 --- /dev/null +++ b/butterfly_processor.py @@ -0,0 +1,14 @@ +# compute the two scaled butterfly equations + +class ButterflyProcessor(object): + """docstring for ClassName""" + def __init__(self, arg): + super(ButterflyProcessor, self).__init__() + self.arg = arg + + def butterfly(self): + Dre = ( Are + Bre ) / 2 + Dim = ( Aim + Bim ) / 2 + Ere = ( Are - Bre ) / 2 + Eim = ( Aim - Bim ) / 2 + diff --git a/efficient_complex_multiplier.py b/efficient_complex_multiplier.py new file mode 100644 --- /dev/null +++ b/efficient_complex_multiplier.py @@ -0,0 +1,13 @@ +# compute the complex twiddle factor multiplication R + jI = (X + jY) x (C + jS) + +class EfficientComplexMultiplier(object): + """docstring for ClassName""" + def __init__(self, arg): + super(EfficientComplexMultiplier, self).__init__() + self.arg = arg + + def multiply(self, X, Y, C, C_plus_S, C_minus_S): + Z = C * ( X - Y) + R = C_minus_S * Y + Z + I = C_plus_S * X - Z + return [R, I] diff --git a/efficient_complex_multiplier.pyc b/efficient_complex_multiplier.pyc new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..34cf088e9ee4ce7b13d05873d31a6e060f8c60d2 GIT binary patch literal 890 zc$}?LOH0E*5S~1mKA>JKD4u%E$s%|ZQ9}hmD{K{PFH21~C6X7}Em%lTdh%cRpZq8O z0cWNU^{h$uOJ;WRee+o7v)y|8co!k8F9+8dE`5M71yBHy1yc)N0bT$`V>E0S`V?m< zrXNLd7^}<#d0Hgu`DUJ&xJY7EZaFPn7sS~GCL|6-drdobh>|{B5G!WAN9uW~O&Mpi zZj_hZAem@An4~JSanD|-8f<6{J{DA%qzz9trD|1dONYdUJ|!{mT?(zyPxC^Rg0eFW z1S#VzHc}cQos=`51Pn!Ml|+KPK5RfAA@uUX^sX<3?BCp9pWoezp4xOmhO1V{blZ!= zVj+l}_mP6BIBaJh*C}7Me7_a_XFN>``3)0dJu6u`XzxLhw45x~% zZ?Tc)(|JN>olQIhQgZ7=`_~ZuGKtMW*E9gn@~oyiSWTQ9`Qwucje!4><0?;9b)B*- GaeV=Ws