~ubuntu-branches/ubuntu/precise/gnuradio/precise

« back to all changes in this revision

Viewing changes to gr-trellis/doc/test_tcm.py

  • Committer: Bazaar Package Importer
  • Author(s): Kamal Mostafa
  • Date: 2010-03-13 07:46:01 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100313074601-zjsa893a87bozyh7
Tags: 3.2.2.dfsg-1ubuntu1
* Fix build for Ubuntu lucid (LP: #260406)
  - add binary package dep for libusrp0, libusrp2-0: adduser
  - debian/rules clean: remove pre-built Qt moc files

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
import fsm_utils
11
11
 
12
12
def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
13
 
    fg = gr.flow_graph ()
 
13
    tb = gr.top_block ()
14
14
 
15
15
    # TX
16
16
    src = gr.lfsr_32k_source_s()
29
29
    fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
30
30
    dst = gr.check_lfsr_32k_s(); 
31
31
 
32
 
    fg.connect (src,src_head,s2fsmi,enc,mod)
33
 
    fg.connect (mod,(add,0))
34
 
    fg.connect (noise,(add,1))
35
 
    fg.connect (add,metrics)
36
 
    fg.connect (metrics,va,fsmi2s,dst)
 
32
    tb.connect (src,src_head,s2fsmi,enc,mod)
 
33
    tb.connect (mod,(add,0))
 
34
    tb.connect (noise,(add,1))
 
35
    tb.connect (add,metrics)
 
36
    tb.connect (metrics,va,fsmi2s,dst)
37
37
    
38
 
    fg.run()
 
38
    tb.run()
39
39
    
40
40
    # A bit of cheating: run the program once and print the 
41
41
    # final encoder state.