commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10827 - in gnuradio/branches/releases/3.2: . gnuradio


From: jcorgan
Subject: [Commit-gnuradio] r10827 - in gnuradio/branches/releases/3.2: . gnuradio-core/src/python/gnuradio/gr gr-trellis/src/examples gr-trellis/src/lib gr-wxgui/src/python/plotter
Date: Tue, 14 Apr 2009 13:13:01 -0600 (MDT)

Author: jcorgan
Date: 2009-04-14 13:13:00 -0600 (Tue, 14 Apr 2009)
New Revision: 10827

Modified:
   gnuradio/branches/releases/3.2/
   gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
   gnuradio/branches/releases/3.2/gr-trellis/src/examples/fsm_utils.py
   gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.cc
   gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.h
   gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.i
   
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
Log:
Applied changeset r10673 to release 3.2 branch


Property changes on: gnuradio/branches/releases/3.2
___________________________________________________________________
Modified: svn:mergeinfo
   - /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671
   + /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671,10673


Property changes on: 
gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671
   + 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671,10673

Modified: gnuradio/branches/releases/3.2/gr-trellis/src/examples/fsm_utils.py
===================================================================
--- gnuradio/branches/releases/3.2/gr-trellis/src/examples/fsm_utils.py 
2009-04-14 19:11:21 UTC (rev 10826)
+++ gnuradio/branches/releases/3.2/gr-trellis/src/examples/fsm_utils.py 
2009-04-14 19:13:00 UTC (rev 10827)
@@ -61,34 +61,7 @@
 
 
 
-######################################################################
-# Generate a new FSM representing n stages through the original FSM
-######################################################################
-def fsm_radix(f,n):
-    I=f.I()**n
-    S=f.S()
-    O=f.O()**n
-    nsm=list([0]*I*S)
-    osm=list([0]*I*S)
-    for s in range(f.S()):
-        for i in range(I):
-            ii=dec2base(i,f.I(),n) 
-            oo=list([0]*n)
-            ns=s
-            for k in range(n):
-                oo[k]=f.OS()[ns*f.I()+ii[k]]
-                ns=f.NS()[ns*f.I()+ii[k]]
 
-            nsm[s*I+i]=ns
-            osm[s*I+i]=base2dec(oo,f.O())
-
-
-    f=trellis.fsm(I,S,O,nsm,osm)
-    return f
-
-
-
-
 ######################################################################
 # Automatically generate the lookup table that maps the FSM outputs
 # to channel inputs corresponding to a channel 'channel' and a modulation

Modified: gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.cc
===================================================================
--- gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.cc    2009-04-14 
19:11:21 UTC (rev 10826)
+++ gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.cc    2009-04-14 
19:13:00 UTC (rev 10827)
@@ -315,7 +315,49 @@
 }
 
 
+
+
 //######################################################################
+//# Generate a new FSM representing n stages through the original FSM
+//# AKA radix-n FSM
+//######################################################################
+fsm::fsm(const fsm &FSM, int n)
+{
+  d_I=(int) (pow(1.0*FSM.I(),1.0*n)+0.5);
+  d_S=FSM.S();
+  d_O=(int) (pow(1.0*FSM.O(),1.0*n)+0.5);
+
+  d_NS.resize(d_I*d_S);
+  d_OS.resize(d_I*d_S);
+
+  for(int s=0;s<d_S;s++ ) {
+    for(int i=0;i<d_I;i++ ) {
+      std::vector<int> ii(n);
+      dec2base(i,FSM.I(),ii);
+      std::vector<int> oo(n);
+      int ns=s;
+      for(int k=0;k<n;k++) {
+        oo[k]=FSM.OS()[ns*FSM.I()+ii[k]];
+        ns=FSM.NS()[ns*FSM.I()+ii[k]];
+      }
+      d_NS[s*d_I+i]=ns;
+      d_OS[s*d_I+i]=base2dec(oo,FSM.O());
+    }
+  }
+
+  generate_PS_PI();
+  generate_TM();
+}
+
+
+
+
+
+
+
+
+
+//######################################################################
 //# generate the PS and PI tables for later use
 //######################################################################
 void fsm::generate_PS_PI()

Modified: gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.h
===================================================================
--- gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.h     2009-04-14 
19:11:21 UTC (rev 10826)
+++ gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.h     2009-04-14 
19:13:00 UTC (rev 10827)
@@ -52,6 +52,7 @@
   fsm(int mod_size, int ch_length);
   fsm(int P, int M, int L);
   fsm(const fsm &FSM1, const fsm &FSM2);
+  fsm(const fsm &FSM, int n);
   int I () const { return d_I; }
   int S () const { return d_S; }
   int O () const { return d_O; }

Modified: gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.i
===================================================================
--- gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.i     2009-04-14 
19:11:21 UTC (rev 10826)
+++ gnuradio/branches/releases/3.2/gr-trellis/src/lib/fsm.i     2009-04-14 
19:13:00 UTC (rev 10827)
@@ -42,6 +42,7 @@
   fsm(int mod_size, int ch_length);
   fsm(int P, int M, int L);
   fsm(const fsm &FSM1, const fsm &FSM2);
+  fsm(const fsm &FSM, int n);
   int I () const { return d_I; }
   int S () const { return d_S; }
   int O () const { return d_O; }


Property changes on: 
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py:10673





reply via email to

[Prev in Thread] Current Thread [Next in Thread]