[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] porting ATSC to 2.x and USRP
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] porting ATSC to 2.x and USRP |
Date: |
Thu, 23 Mar 2006 14:46:34 -0800 |
User-agent: |
Mutt/1.5.9i |
gr-atsc has been created!
The directory structure parallels the standard gr-<modules> organization:
gr-atsc/config
gr-atsc/doc
gr-atsc/src
gr-atsc/src/lib
gr-atsc/src/python
Here's what's already done:
* old code with names atsc_<foo> were renamed to atsci_<foo> (internal).
These are the internal guts that are independent of which GNU Radio
implementation we're using. Glad to see that decision pay off now ;)
* old code with names Gr<foo> were renamed (when ported to 2.x)
to atsc_<foo>. These derive from gr_block (or subclasses) and are the
GNU Radio 2.x blocks. Most of the atsc_<foo> blocks use atsci_<foo>
in their implementation.
* The cppunit C++ unit testing framework is in place, and all the
atsci_<foo> code checks out.
* I've added a python based unit testing framework for the atsc_<foo>
code in src/python/qa_atsc.py. This is *so* much easier than how we
did it in gnuradio-0.9.
* I've ported the first four blocks: atsc_randomizer,
atsc_derandomizer, atsc_rs_encoder, and atsc_rs_decoder. I've left
the old GrAtsc<foo> code as a Rosetta stone to aid in understanding
the translation. It's pretty straight forward.
* The first two stages of loopback testing are written and work.
They're in qa_atsc.py:
def test_loopback_000(self):
"""
Loopback randomizer to derandomizer
"""
src_data = make_transport_stream()
expected_result = src_data
src = vector_source_ts(self.fg, src_data)
rand = atsc.randomizer()
derand = atsc.derandomizer()
dst = vector_sink_ts(self.fg)
self.fg.connect(src, rand, derand, dst)
self.fg.run ()
result_data = dst.data ()
self.assertEqual (expected_result, result_data)
def test_loopback_001(self):
"""
Loopback randomizer/rs_encoder to rs_decoder/derandomizer
"""
src_data = make_transport_stream()
expected_result = src_data
src = vector_source_ts(self.fg, src_data)
rand = atsc.randomizer()
rs_enc = atsc.rs_encoder()
rs_dec = atsc.rs_decoder()
derand = atsc.derandomizer()
dst = vector_sink_ts(self.fg)
self.fg.connect(src, rand, rs_enc, rs_dec, derand, dst)
self.fg.run ()
result_data = dst.data ()
self.assertEqual (expected_result, result_data)
At this point, there should be enough "bread crumbs on the trail" to
see that path to completing the port.
Please be sure to read gnuradio-core/README.hacking for coding conventions.
Let me know if you've got any questions, etc.
Eric
P.S., This has been a bit of a trip down memory lane.
It was fun to revisit code that I hadn't looked at in years ;)