On Thu, Mar 15, 2007 at 04:36:56PM +0100, Davide A. wrote:
reasonable, because after I can use unpacked_to_packed and
Regards,
Davide A.
web: http://www.davideanastasia.com/
email: [email protected]
I Davide,
I think you’ll find it easier to do the unpacking in a separate block
downstream from the usrp1_source_s. Modifying usrp1_source* to handle
samples smaller than 1 byte is going to take quite a bit of work. Part
of the problem is that the code is written in terms of functions such
as sizeof_basic_sample() which returns a size in bytes. In your case,
your basic sample is smaller than a byte. The current code doesn’t
know how to deal with that.
After unpacking, what representation do you want for your samples?
If bytes containing 1-bit per byte are OK, then perhaps the easiest
approach is to create a gr_packed_to_unpacked_sb.*
You should be able to do this by changing:
other blocks
others = (
(‘gr_chunks_to_symbols_XX’, (‘bf’, ‘bc’, ‘sf’, ‘sc’, ‘if’,
‘ic’)),
(‘gr_unpacked_to_packed_XX’, (‘bb’,‘ss’,‘ii’)),
(‘gr_packed_to_unpacked_XX’, (‘bb’,‘ss’,‘ii’))
)
to
other blocks
others = (
(‘gr_chunks_to_symbols_XX’, (‘bf’, ‘bc’, ‘sf’, ‘sc’, ‘if’,
‘ic’)),
(‘gr_unpacked_to_packed_XX’, (‘bb’,‘ss’,‘ii’)),
(‘gr_packed_to_unpacked_XX’, (‘bb’,‘ss’,‘ii’, ‘sb’))
)
in gnuradio-core/src/lib/gengen/generate_common.py
On the other hand, I assume that ultimately these end up as some kind
of complex data type, so perhaps some other kind of mapping to
gr_complex would be useful.
Eric