Implements USRP2 peek() command, allowing arbitrary reads from the internal
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 27 Dec 2008 21:09:26 +0000 (21:09 +0000)
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 27 Dec 2008 21:09:26 +0000 (21:09 +0000)
commit297479844e3d9a6eea54fa69147e6a20c0bfc412
tree786591a2e3c8aa77d8149630a6a5d00974585af7
parenta09700c26a39ebddbeb56b5ecddedf50f0cc7ac4
Implements USRP2 peek() command, allowing arbitrary reads from the internal
Wishbone bus.  Minor fix for USRP2 sync_to_pps() (uses correct packet type.)

Example:

>>> from gnuradio import usrp2
>>> u = usrp2.source_32fc()
>>> u.peek(0x1234, 4) # Read four bytes at offset 0x1234 (code)
(185, 244, 253, 164)
>>>

The return value will be zero length upon error.

The read address must be 32-bit aligned, and only the lower 16 bits are
significant.  The length must be an integral multiple of 4 bytes. There is
currently a read limit of 176 bytes per read; to change requires some additional
firmware changes to allocate a larger reply packet.

WARNING: Trying to read from memory locations not serviced by RAM or by a
Wishbone peripheral may result in a hang requiring a USRP2 power cycle.  The
USRP2 internal memory map is documented in usrp2/firmware/lib/memory_map.h.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10172 221aa14e-8319-0410-a670-987f0aec2ac5
gr-usrp2/src/usrp2.i
gr-usrp2/src/usrp2_base.cc
gr-usrp2/src/usrp2_base.h
usrp2/firmware/apps/app_common_v2.c
usrp2/firmware/include/usrp2_eth_packet.h
usrp2/host/include/usrp2/usrp2.h
usrp2/host/lib/control.h
usrp2/host/lib/usrp2.cc
usrp2/host/lib/usrp2_impl.cc
usrp2/host/lib/usrp2_impl.h