describe existing code.
[debian/gnuradio] / README.organization
1 [This file is currently not baked and does not claim to represent
2 consensus.]
3
4 * Introduction
5
6 This file describes the current organization of the GNU Radio source
7 tree.  It is intended to be both descriptive and normative.
8
9 * Unresolved issues in organization
10
11 The big issues are:
12
13 1) Should we separate by "code needed to implement protocol/modulation
14 foo", or related blocks. to (that are therefore not so likely to be
15 used together).
16
17 2) How do m-blocks impact organization?  If m-blocks are in a separate
18 module, which seems reasonable, then do we have most modules depend on
19 m-blocks rather than just core, or do we have two versions of blocks -
20 the classic continuous block and the m-block wrapped block?  If
21 m-blocks become the main path, what will be less awkward?
22
23 3) Because some (ADROIT at BBN) have proposed to implement MACs in
24 click instead of GNU Radio, should we have a clean separation of
25 MAC/PHY within GNU Radio, to facilitate using MACs implemented in
26 various places?
27
28 4) Examples abound, and many are in gnuradio-examples.  It might be
29 better to put examples near the code they use, and to separate useful
30 programs (like USRP benchmarks) from true examples.  Examples should
31 probably be installed in $prefix/share/examples/gnuradio.
32
33 * Plan (normative) [[NOT BAKED!!!  NO CONSENSUS!!!]]
34
35 Create a new module gr-packet, to hold blocks generally relevant to
36 sending blocks of data.  Create subdirectories within gr-packet for
37 specific protocols (e.g. 802.11, GNU Radio's GMSK "protocol").
38
39 Convert tunnel.py to be OS-independent and a general source/sink
40 block, decoupling modulation from OS plumbing.
41
42 * Pointers to code to be integrated
43
44 The immediate question is how to integrate the 802.11 implementation
45 done by BBN (and assigned to FSF), available at:
46
47   http://acert.ir.bbn.com/viewvc/adroitgrdevel/adroitgrdevel/gr-bbn/
48
49 This contains blocks at various places in the stack, and gdt believs
50 that putting them in an 802.11 module will lead to less reuse and less
51 of a tendency to generalize.
52
53 * Organization of the GNU Radio source tree (mostly descriptive)
54
55 The GNU Radio source tree is rooted at the directory containing this
56 file; see README for how to get it if you're using a release or
57 tarball.
58
59 Within this directory, there are a number of subdirectories, most of
60 which can be enabled or disabled independently.  See README for how to
61 do that; this document is concerned with describing what each module
62 does enough to help someone who is familiar enough with GNU Radio to
63 write new code to choose where to put it.  The list is not exhaustive.
64 The description of some modules also lists things that don't belong,
65 tagged with ?M.
66
67 ** gnuradio-core [foundational code for the rest of GNU Radio]
68
69 (gen_interpolator_taps is not installed.  Why?  How is it used?)
70
71 doc: glue to use with doxygen
72
73 ?M doc/other/tv-channel-frequencies: (TV specific) 
74
75 ?M src/lib/g72x:
76   G.711 family codec
77
78 src/lib/filter:
79   implementation and coefficient generation
80 src/lib/general:
81   foundational blocks not specific to any technology:
82     type conversion, {de,}vectorization, add, sub
83     rms power, throttle, sources, sinks, squelch base class
84
85   general blocks:
86     agc, pll, sync, costas loop, power squelch, quadrature demod
87   
88   ?M framer/correlator 
89   ?M packet source/sink
90
91 src/lib/io:
92   basic file io, message io
93   oscope (trigger support)
94   i2c bus
95   ?M microtune eval board (like USRP; should probably have own module)
96   ?M SDR1000
97
98 src/lib/omnithread:
99   portable threading library (for when POSIX isn't portable enough)
100
101 src/lib/reed-solomon:
102   reed-solomon implementation.  Unclear how/whether it's wrapped into
103   blocks.
104
105 src/lib/runtime:
106   blocks (basic, hier) and associated buffering
107   flowgraphs
108   timers
109   doubly-mapped circular buffers
110
111 src/lib/swig:
112   code to wrap the rest in python
113   ?M atsc.i (cruft? moved?)
114
115 src/python:
116   build utilities
117
118 src/python/bin:
119   ?M microtune.py: microtune control program (installed and EXTRA_DIST!)
120
121 src/python/gnuradio:
122   audio base class
123   engineering notation support
124   test harness support
125   test code (not installed)
126   basic block/flow_graph
127
128 src/tests:
129   test code
130   ?M test_atsc.cc (# in Makefile.am, but still present)
131
132 src/utils:
133   octave and Scheme scripts (not installed)
134
135 ** usrp
136
137 This contains code to deal with the USRP, but not GNU Radio support.
138
139 ?M fusb
140   The "fusb" abstraction is arguably useful for all interface devices
141   that use USB, not just the USRP.
142
143 ** gr-usrp
144
145 Code to use the USRP with GNU Radio.
146
147 ?M Arguably the Gnu Radio/USRP benchmarks belong here, but are in -examples
148
149 ** gr-audio-alsa
150 ** gr-audio-jack
151 ** gr-audio-oss
152 ** gr-audio-osx
153 ** gr-audio-portaudio
154 ** gr-audio-windows
155   [All of these support audio for some particular audio backend.
156
157 ** gr-atsc
158   ATSC (HDTV) transmitter and receiver.
159   All blocks seem to be specific to ATSC.
160   ?M Perhaps some blocks should be abstracted out for reuse with other
161      than ATSC parameters.
162
163 ** gr-comedi
164   This module is missing a README that explains what it does.
165   http://www.comedi.org/
166
167 ** gr-error-correcting-codes
168   This module intends to provide generic error-correcting code
169   support, rather than implementing coding for a particular standard.
170   Currently it has support for convolutional, viterbi, and turbo
171   codes.
172
173 ** gr-gsm-fr-vocoder
174   GSM 06.10 full rate vocoder, and gsm library
175   (Note that the presence of this argues for moving the G.711 code discussed above.)
176
177 ** gr-pager
178   POCSAG and FLEX
179   (gdt suspects there are blocks in here that could be generalized.)
180
181 ** gr-radar
182   ?radar  (not clear)
183
184 ** gr-radio-astronomy
185   seems to use only standard blocks from python
186
187 ** gr-trellis
188   This module provides trellis code support, and appears generic.
189
190 ** gr-video-sdl
191   This appears to be like the audio modules, but for video and
192   specifically for SDL.  Unlike audio which has a base class, there
193   does not appear to be an abstract video class in gnuradio-core.
194
195 ** gr-wxgui
196   Support for using wxwidgets from python.
197   ?M (Linux-specific??) code to use the Griffin Powermate (and hook it to a GUI)
198   glue to connect FFT and scope to gui
199   
200 ** pmt
201   polymorphic types (building block)
202
203 ** mblock
204   Message block implementation.
205   Note that mblock being a module means that signal processing blocks
206   that are mblock-aware must depend on this module and thus probably
207   cannot be in gnuradio-core.  Thus, m-block wrappers for the blocks
208   in gnuradio-core must be elsewhere and it is maybe a good idea to
209   move them to someplace like gnuradio-common where the streaming and
210   m-block versions can be together.
211
212 ** ezdop
213   Code to deal with the ezdop direction-finding hardware.
214
215 ** gr-ezdop
216   Glue code to use the ezdop from GNU Radio.
217
218 ** gr-rdf
219   (Currently empty) code to perform direction finding.
220
221 ** gnuradio-examples
222
223   It's arguable that all of these are misplaced, and that examples
224   belong with the code that they use.
225
226   Bona fide examples (code not intended to be useful except for reading):
227     c++/dial_tone (how to do things only in C++)
228     python/audio
229
230   Test programs:
231     python/channel-coding
232     python/digital-voice
233     python/multi-antenna (?)
234
235   Programs in between test and useful:
236     python/digital
237       ?M tunnel.py: glue to get packets to Linux, conflates modulation
238       and packet handling
239     python/multi_usrp
240     python/networking/measurement_slave (goes with what?)
241
242   ?M Programs intended to be useful
243     python/apps/hf_{explorer,radio}
244
245   ?M Kitchen sink:
246     python/usrp
247       benchmarks, test, basic fm/wfm/tv receivers, spectrum sensing,
248       fft, oscope