From 77c578fc639bb3d54c6730402de04a22636b1d6d Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 18 Apr 2010 00:37:24 -0700 Subject: Created a docs directory to house restructured text documentation. Moved doxygen build rules into the docs build directory. Created rst docs for building and burning usrp2. --- host/docs/CMakeLists.txt | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 host/docs/CMakeLists.txt (limited to 'host/docs/CMakeLists.txt') diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt new file mode 100644 index 000000000..e90f1e9a1 --- /dev/null +++ b/host/docs/CMakeLists.txt @@ -0,0 +1,71 @@ +# +# Copyright 2010 Ettus Research LLC +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +######################################################################## +# List of manual sources +######################################################################## +SET(manual_sources + index.rst + build.rst + usrp2.rst +) + +######################################################################## +# Setup Manual +######################################################################## +MESSAGE(STATUS "Checking for rst2html (docutils)") +FIND_PROGRAM(RST2HTML rst2html) +IF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") + MESSAGE(STATUS "Checking for rst2html (docutils) - not found") +ELSE(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") + MESSAGE(STATUS "Checking for rst2html (docutils) - found") + FOREACH(rstfile ${manual_sources}) + SET(rstfile ${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}) + GET_FILENAME_COMPONENT(rstfile_we ${rstfile} NAME_WE) + SET(htmlfile ${CMAKE_CURRENT_BINARY_DIR}/${rstfile_we}.html) + ADD_CUSTOM_COMMAND( + OUTPUT ${htmlfile} DEPENDS ${rstfile} ${CMAKE_CURRENT_SOURCE_DIR}/style.css + COMMAND ${RST2HTML} ${rstfile} ${htmlfile} + --stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/style.css --no-toc-backlinks + COMMENT "Generating ${htmlfile}" + ) + LIST(APPEND manual_html_files ${htmlfile}) + INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html) + ENDFOREACH(rstfile ${manual_sources}) + ADD_CUSTOM_TARGET(manual_html ALL DEPENDS ${manual_html_files}) +ENDIF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") + +INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst) + +######################################################################## +# Setup Doxygen +######################################################################## +INCLUDE(FindDoxygen) + +IF(DOXYGEN_FOUND) + SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY) + ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + COMMENT "Generating documentation with doxygen" + ) + ADD_CUSTOM_TARGET(doxygen_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR}) +ENDIF(DOXYGEN_FOUND) -- cgit v1.2.3 From b3d0c68ceaff1562c32fb8fe41c1e6845a0aad37 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 18 Apr 2010 14:55:05 -0700 Subject: added usrp2 networking notes, tweaked style and build --- host/docs/CMakeLists.txt | 17 ++++++++++--- host/docs/style.css | 14 ++++++++--- host/docs/usrp2.rst | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 7 deletions(-) (limited to 'host/docs/CMakeLists.txt') diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index e90f1e9a1..52376fe8c 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -31,16 +31,24 @@ MESSAGE(STATUS "Checking for rst2html (docutils)") FIND_PROGRAM(RST2HTML rst2html) IF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") MESSAGE(STATUS "Checking for rst2html (docutils) - not found") + MESSAGE(STATUS " Disabled generation of HTML manual.") ELSE(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") MESSAGE(STATUS "Checking for rst2html (docutils) - found") + MESSAGE(STATUS " Enabled generation of HTML manual.") + SET(stylesheet ${CMAKE_CURRENT_SOURCE_DIR}/style.css) + SET(rst2html_options + --stylesheet=${stylesheet} + --no-toc-backlinks + --date + --time + ) FOREACH(rstfile ${manual_sources}) SET(rstfile ${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}) GET_FILENAME_COMPONENT(rstfile_we ${rstfile} NAME_WE) SET(htmlfile ${CMAKE_CURRENT_BINARY_DIR}/${rstfile_we}.html) ADD_CUSTOM_COMMAND( - OUTPUT ${htmlfile} DEPENDS ${rstfile} ${CMAKE_CURRENT_SOURCE_DIR}/style.css - COMMAND ${RST2HTML} ${rstfile} ${htmlfile} - --stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/style.css --no-toc-backlinks + OUTPUT ${htmlfile} DEPENDS ${rstfile} ${stylesheet} + COMMAND ${RST2HTML} ${rstfile} ${htmlfile} ${rst2html_options} COMMENT "Generating ${htmlfile}" ) LIST(APPEND manual_html_files ${htmlfile}) @@ -57,6 +65,7 @@ INSTALL(FILES ${manual_sources} DESTINATION ${PKG_DOC_DIR}/manual/rst) INCLUDE(FindDoxygen) IF(DOXYGEN_FOUND) + MESSAGE(STATUS " Enabled generation of Doxygen documentation.") SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in @@ -68,4 +77,6 @@ IF(DOXYGEN_FOUND) ) ADD_CUSTOM_TARGET(doxygen_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR}) +ELSE(DOXYGEN_FOUND) + MESSAGE(STATUS " Disabled generation of Doxygen documentation.") ENDIF(DOXYGEN_FOUND) diff --git a/host/docs/style.css b/host/docs/style.css index a50dce04a..7bd84c9c7 100644 --- a/host/docs/style.css +++ b/host/docs/style.css @@ -4,7 +4,7 @@ font-size:10pt; color:black; background-color:#FEFEFE; width:90%; -margin:0 auto; +margin:0 auto 0 auto; } div.document div.contents{ @@ -45,7 +45,7 @@ background-color:inherit; div.document h2.subtitle, div.section h1{ margin-top:50px; -border-top:1px solid #333333; +border-bottom:1px solid #333333; font-size:140%; text-align:center; padding:20px 0px 10px 0px; @@ -56,13 +56,13 @@ background-color:inherit; div.section h2{ font-size:110%; text-align:left; -padding:15px 0px 5px 10px; +padding:15px 0px 5px 0px; text-decoration:underline; color:#333333; background-color:inherit; } -div.document pre{ +div.document pre.literal-block{ border:1px inset #333333; padding:5px; margin:10px 5px 10px 5px; @@ -94,3 +94,9 @@ text-align:center; color:inherit; background-color:#FCFCFC; } + +div.footer{ +margin:50px auto 30px auto; +text-align:center; +font-size:85%; +} diff --git a/host/docs/usrp2.rst b/host/docs/usrp2.rst index 1de61b734..48ef60683 100644 --- a/host/docs/usrp2.rst +++ b/host/docs/usrp2.rst @@ -61,3 +61,68 @@ Load the firmware image: cd /firmware/microblaze directory sudo ./u2_flash_tool --dev=/dev/sd -t s/w -w + +------------------------------------------------------------------------ +Setup networking +------------------------------------------------------------------------ +The USRP2 only supports gigabit ethernet, and +will not work with a 10/100 Mbps interface. +Because the USRP2 uses gigabit ethernet pause frames for flow control, +you cannot use multiple USRP2s with a switch or a hub. +It is recommended that each USRP2 be plugged directly into its own +dedicated gigabit ethernet interface on the host computer. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Setup the host interface +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The USRP2 communicates at the IP/UDP layer over the gigabit ethernet. +The default IP address of the USRP2 is **192.168.10.2** +You will need to configure the host's ethernet interface with a static IP address to enable communication. +An address of **192.168.10.1** is recommended. + +**Note:** +When using the UHD, if an IP address for the USRP2 is not specified, +the software will use UDP broadcast packets to locate the USRP2. +On some systems, the firewall will block UDP broadcast packets. +It is recommended that you change or disable your firewall settings. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Change the USRP2's IP address +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +You may need to change the USRP2's IP address for several reasons: + +* to satisfy your particular network configuration +* to use multiple USRP2s on the same host computer +* to set a known IP address into USRP2 (in case you forgot) + +**Method 1:** +To change the USRP2's IP address +you must know the current address of the USRP2, +and the network must be setup properly as described above. +Run the following commands: +:: + + cd /share/uhd/utils + ./usrp_burner --addr=192.168.10.2 --new-ip=192.168.10.3 + +**Method 2 (Linux Only):** +This method assumes that you do not know the IP address of your USRP2. +It uses raw ethernet packets to bypass the IP/UDP layer to communicate with the USRP2. +Run the following commands: +:: + + cd /share/uhd/utils + ./usrp2 recovery.py --ifc=eth0 --new-ip=192.168.10.3 + +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Debugging networking problems +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +**Monitor the USRP2:** +You can read the serial port on the rear of the USRP2 +to get debug verbose from the embedded microcontroller. +Use a standard USB to tty-level serial converter at 230400 baud. +The microcontroller prints useful information about IP addresses, +MAC addresses, control packets, and fast-path settings. + +**Monitor the host network traffic:** +Use wireshark to monitor packets send to and received from the USRP2. -- cgit v1.2.3 From 6b015b1c517733e85cb0c08a379e8d20377bf2fa Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 19 Apr 2010 23:48:00 -0700 Subject: added comments to cmakelists, makedir in file generation script so python doesnt have to --- host/docs/CMakeLists.txt | 30 +++++++++++++++++++++++------- host/include/uhd/types/metadata.hpp | 10 ++++++++-- host/lib/CMakeLists.txt | 7 +++++++ host/lib/ic_reg_maps/common.py | 4 ---- host/lib/ic_reg_maps/gen_ad5624_regs.py | 2 -- host/lib/ic_reg_maps/gen_ad7922_regs.py | 2 -- host/lib/ic_reg_maps/gen_ad9510_regs.py | 2 -- host/lib/ic_reg_maps/gen_ad9777_regs.py | 2 -- host/lib/ic_reg_maps/gen_adf4360_regs.py | 2 -- 9 files changed, 38 insertions(+), 23 deletions(-) (limited to 'host/docs/CMakeLists.txt') diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index 52376fe8c..476023a1e 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -35,25 +35,33 @@ IF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") ELSE(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") MESSAGE(STATUS "Checking for rst2html (docutils) - found") MESSAGE(STATUS " Enabled generation of HTML manual.") - SET(stylesheet ${CMAKE_CURRENT_SOURCE_DIR}/style.css) + + #setup rst2html options SET(rst2html_options - --stylesheet=${stylesheet} - --no-toc-backlinks - --date - --time + --stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/style.css + --no-toc-backlinks --date --time ) + + #create generation rule for each source FOREACH(rstfile ${manual_sources}) + #set input and output file names SET(rstfile ${CMAKE_CURRENT_SOURCE_DIR}/${rstfile}) GET_FILENAME_COMPONENT(rstfile_we ${rstfile} NAME_WE) SET(htmlfile ${CMAKE_CURRENT_BINARY_DIR}/${rstfile_we}.html) + + #make the html file depend on the rst file ADD_CUSTOM_COMMAND( OUTPUT ${htmlfile} DEPENDS ${rstfile} ${stylesheet} COMMAND ${RST2HTML} ${rstfile} ${htmlfile} ${rst2html_options} COMMENT "Generating ${htmlfile}" ) + + #make the manual target depend on the html file LIST(APPEND manual_html_files ${htmlfile}) INSTALL(FILES ${htmlfile} DESTINATION ${PKG_DOC_DIR}/manual/html) ENDFOREACH(rstfile ${manual_sources}) + + #make the html manual a build-time dependency ADD_CUSTOM_TARGET(manual_html ALL DEPENDS ${manual_html_files}) ENDIF(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") @@ -66,16 +74,24 @@ INCLUDE(FindDoxygen) IF(DOXYGEN_FOUND) MESSAGE(STATUS " Enabled generation of Doxygen documentation.") + + #generate the doxygen configuration file SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) - ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} + + #make doxygen directory depend on the header files + FILE(GLOB_RECURSE header_files ${CMAKE_SOURCE_DIR}/include/*.hpp) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DEPENDS ${header_files} COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile COMMENT "Generating documentation with doxygen" ) - ADD_CUSTOM_TARGET(doxygen_html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) + + #make the doxygen generation a built-time dependency + ADD_CUSTOM_TARGET(doxygen_docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN}) INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR_DOXYGEN} DESTINATION ${PKG_DOC_DIR}) ELSE(DOXYGEN_FOUND) MESSAGE(STATUS " Disabled generation of Doxygen documentation.") diff --git a/host/include/uhd/types/metadata.hpp b/host/include/uhd/types/metadata.hpp index d93b38b50..55add71cc 100644 --- a/host/include/uhd/types/metadata.hpp +++ b/host/include/uhd/types/metadata.hpp @@ -70,7 +70,10 @@ namespace uhd{ * Timed-out on receive? */ - //default constructor + /*! + * The default constructor: + * Sets the fields to default values (flags set to false). + */ rx_metadata_t(void); }; @@ -103,7 +106,10 @@ namespace uhd{ bool start_of_burst; bool end_of_burst; - //default constructor + /*! + * The default constructor: + * Sets the fields to default values (flags set to false). + */ tx_metadata_t(void); }; diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index 7b8149802..7cb74d30a 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -66,11 +66,18 @@ SET(libuhd_sources # Generate Files ######################################################################## MACRO(UHD_PYTHON_GEN_SOURCE_FILE pyfile outfile) + #ensure that the directory exists for outfile + GET_FILENAME_COMPONENT(outfile_dir ${outfile} PATH) + FILE(MAKE_DIRECTORY ${outfile_dir}) + + #make the outfile depend on the python script ADD_CUSTOM_COMMAND( OUTPUT ${outfile} DEPENDS ${pyfile} COMMAND ${PYTHON_EXECUTABLE} ${pyfile} ${outfile} COMMENT "Generating ${outfile}" ) + + #make libuhd depend on the outfile LIST(APPEND libuhd_sources ${outfile}) ENDMACRO(UHD_PYTHON_GEN_SOURCE_FILE) diff --git a/host/lib/ic_reg_maps/common.py b/host/lib/ic_reg_maps/common.py index b7fa27bbe..bf51073ae 100644 --- a/host/lib/ic_reg_maps/common.py +++ b/host/lib/ic_reg_maps/common.py @@ -19,16 +19,12 @@ # Boston, MA 02110-1301, USA. import re -import os import math from Cheetah.Template import Template def parse_tmpl(_tmpl_text, **kwargs): return str(Template(_tmpl_text, kwargs)) -def safe_makedirs(path): - not os.path.isdir(path) and os.makedirs(path) - class reg: def __init__(self, reg_des): x = re.match('^(\w*)\s*(\w*)\[(.*)\]\s*(\w*)\s*(.*)$', reg_des) diff --git a/host/lib/ic_reg_maps/gen_ad5624_regs.py b/host/lib/ic_reg_maps/gen_ad5624_regs.py index 378a6912f..a809d2f47 100755 --- a/host/lib/ic_reg_maps/gen_ad5624_regs.py +++ b/host/lib/ic_reg_maps/gen_ad5624_regs.py @@ -19,7 +19,6 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -import os import sys from common import * @@ -83,5 +82,4 @@ struct ad5624_regs_t{ if __name__ == '__main__': regs = map(reg, parse_tmpl(REGS_DATA_TMPL).splitlines()) - safe_makedirs(os.path.dirname(sys.argv[1])) open(sys.argv[1], 'w').write(parse_tmpl(HEADER_TEXT, regs=regs, file=__file__)) diff --git a/host/lib/ic_reg_maps/gen_ad7922_regs.py b/host/lib/ic_reg_maps/gen_ad7922_regs.py index e1e67d617..512dcdc46 100755 --- a/host/lib/ic_reg_maps/gen_ad7922_regs.py +++ b/host/lib/ic_reg_maps/gen_ad7922_regs.py @@ -19,7 +19,6 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -import os import sys from common import * @@ -89,5 +88,4 @@ struct ad7922_regs_t{ if __name__ == '__main__': regs = map(reg, parse_tmpl(REGS_DATA_TMPL).splitlines()) - safe_makedirs(os.path.dirname(sys.argv[1])) open(sys.argv[1], 'w').write(parse_tmpl(HEADER_TEXT, regs=regs, file=__file__)) diff --git a/host/lib/ic_reg_maps/gen_ad9510_regs.py b/host/lib/ic_reg_maps/gen_ad9510_regs.py index 32a8a04c6..4f28d5597 100755 --- a/host/lib/ic_reg_maps/gen_ad9510_regs.py +++ b/host/lib/ic_reg_maps/gen_ad9510_regs.py @@ -19,7 +19,6 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -import os import sys from common import * @@ -174,5 +173,4 @@ struct ad9510_regs_t{ if __name__ == '__main__': regs = map(reg, parse_tmpl(REGS_DATA_TMPL).splitlines()) - safe_makedirs(os.path.dirname(sys.argv[1])) open(sys.argv[1], 'w').write(parse_tmpl(HEADER_TEXT, regs=regs, file=__file__)) diff --git a/host/lib/ic_reg_maps/gen_ad9777_regs.py b/host/lib/ic_reg_maps/gen_ad9777_regs.py index e4369291a..65a9657a4 100755 --- a/host/lib/ic_reg_maps/gen_ad9777_regs.py +++ b/host/lib/ic_reg_maps/gen_ad9777_regs.py @@ -19,7 +19,6 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -import os import sys from common import * @@ -152,5 +151,4 @@ struct ad9777_regs_t{ if __name__ == '__main__': regs = map(reg, parse_tmpl(REGS_DATA_TMPL).splitlines()) - safe_makedirs(os.path.dirname(sys.argv[1])) open(sys.argv[1], 'w').write(parse_tmpl(HEADER_TEXT, regs=regs, file=__file__)) diff --git a/host/lib/ic_reg_maps/gen_adf4360_regs.py b/host/lib/ic_reg_maps/gen_adf4360_regs.py index f82e8c7c5..c659766dc 100755 --- a/host/lib/ic_reg_maps/gen_adf4360_regs.py +++ b/host/lib/ic_reg_maps/gen_adf4360_regs.py @@ -19,7 +19,6 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -import os import sys from common import * @@ -123,5 +122,4 @@ struct adf4360_regs_t{ if __name__ == '__main__': regs = map(reg, parse_tmpl(REGS_DATA_TMPL).splitlines()) - safe_makedirs(os.path.dirname(sys.argv[1])) open(sys.argv[1], 'w').write(parse_tmpl(HEADER_TEXT, regs=regs, file=__file__)) -- cgit v1.2.3 From cf5a45b140163ae330f0017a85c0a9fd9a29cc0c Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 20 Apr 2010 16:18:39 -0700 Subject: added coding docs --- host/docs/CMakeLists.txt | 1 + host/docs/coding.rst | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ host/docs/index.rst | 1 + 3 files changed, 65 insertions(+) create mode 100644 host/docs/coding.rst (limited to 'host/docs/CMakeLists.txt') diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index 476023a1e..1bbd52fee 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -21,6 +21,7 @@ SET(manual_sources index.rst build.rst + coding.rst usrp2.rst ) diff --git a/host/docs/coding.rst b/host/docs/coding.rst new file mode 100644 index 000000000..689667f30 --- /dev/null +++ b/host/docs/coding.rst @@ -0,0 +1,63 @@ +======================================================================== +UHD - Coding to the API +======================================================================== + +.. contents:: Table of Contents + +------------------------------------------------------------------------ +Low-Level: The device API +------------------------------------------------------------------------ +A device is an abstraction for hardware that is connected to the host system. +For a USRP, this means that the motherboard and everything on it would be considered to be a "device". +The device API provides ways to: + +* Discover devices that are physical connected to the host system. +* Create a device object for a particular physical device identified by address. +* Register a device driver into the discovery and factory sub-system. +* Streaming samples with metadata into and out of the device. +* Set and get properties on the device object. + +See the documentation in device.hpp for reference. + +------------------------------------------------------------------------ +High-Level: The simple usrp +------------------------------------------------------------------------ +The goal of the simple usrp is to wrap high level functions around the device properties. +The simple usrp provides a fat interface to access the most common properties. +The simple usrp provides ways to: + +* Set and get daughterboard gains. +* Set and get daughterboard antennas. +* Set and get the streaming rates. +* Tune the DSPs and daughterboards. +* Issue stream commands. +* Set the clock configuration. +* Set the usrp time registers. +* Get the underlying device (as discussed above). + +It is recommended that users code to the simple_usrp api when possible. +See the documentation in usrp/simple_usrp.hpp for reference. + +------------------------------------------------------------------------ +Integrating custom hardware +------------------------------------------------------------------------ +Creators of custom hardware can create drivers that use the UHD API. +These drivers can be built as dynamically lodable modules that the UHD will load at runtime. +For a module to be loaded at runtime, it must be found in the UHD_MODULE_PATH environment variable. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Custom motherboard +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Create a new device driver when the driver in lib/usrp/ +cannot support your custom FPGA or hardware modifications. +Make a copy of the relevant driver code in lib/usrp/, make mods, and rename the class. +The new device code should register itself into the discovery and factory system. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Custom daughterboard +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Use code from an existing daughterboard in lib/usrp/dboard/* as an example. +Your daughterboard code should subclass an rx dboard, rx dboard, or xcvr dboard; +and it should respond to calls to get and set properties. +The new daughterboard code should register itself into the dboard manager +with a unique rx and/or tx 16 bit identification number. diff --git a/host/docs/index.rst b/host/docs/index.rst index 51dba26b5..37853b0b6 100644 --- a/host/docs/index.rst +++ b/host/docs/index.rst @@ -16,6 +16,7 @@ Contents API Documentation ^^^^^^^^^^^^^^^^^^^^^ * `Doxygen <./../../doxygen/html/index.html>`_ +* `Using the API <./coding.html>`_ ^^^^^^^^^^^^^^^^^^^^^ Supported Devices -- cgit v1.2.3 From 05d0a14a2eaf6054d304c153dc9035eaca8039b2 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 22 Apr 2010 12:55:54 -0700 Subject: pulled in some dboard docs and fixes --- host/docs/CMakeLists.txt | 4 ++- host/docs/dboards.rst | 64 ++++++++++++++++++++++++++++++++++++++++++++++++ host/docs/index.rst | 12 +++++---- host/docs/style.css | 4 +-- host/docs/usrp2.rst | 8 +++--- 5 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 host/docs/dboards.rst (limited to 'host/docs/CMakeLists.txt') diff --git a/host/docs/CMakeLists.txt b/host/docs/CMakeLists.txt index 1bbd52fee..61eede8b7 100644 --- a/host/docs/CMakeLists.txt +++ b/host/docs/CMakeLists.txt @@ -22,6 +22,7 @@ SET(manual_sources index.rst build.rst coding.rst + dboards.rst usrp2.rst ) @@ -38,8 +39,9 @@ ELSE(${RST2HTML} STREQUAL "RST2HTML-NOTFOUND") MESSAGE(STATUS " Enabled generation of HTML manual.") #setup rst2html options + SET(stylesheet ${CMAKE_CURRENT_SOURCE_DIR}/style.css) SET(rst2html_options - --stylesheet=${CMAKE_CURRENT_SOURCE_DIR}/style.css + --stylesheet=${stylesheet} --no-toc-backlinks --date --time ) diff --git a/host/docs/dboards.rst b/host/docs/dboards.rst new file mode 100644 index 000000000..d08b752a6 --- /dev/null +++ b/host/docs/dboards.rst @@ -0,0 +1,64 @@ +======================================================================== +UHD - Daughterboard Application Notes +======================================================================== + +.. contents:: Table of Contents + +------------------------------------------------------------------------ +Daughterboard Properties +------------------------------------------------------------------------ + +The following contains interesting notes about each daughterboard. +Eventually, this page will be expanded to list out the full +properties of each board as well. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Basic RX and and LFRX +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The Basic RX and LFRX boards have 3 subdevices: + +* **Subdevice A:** real signal on antenna RXA +* **Subdevice B:** real signal on antenna RXB +* **Subdevice AB:** quadrature subdevice using both antennas + +The boards have no tunable elements or programmable gains. +Though the magic of aliasing, you can down-convert signals +greater than the nyquist rate of the ADC. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Basic TX and and LFTX +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The Basic TX and LFTX boards have 1 quadrature subdevice using both antennas. + +The boards have no tunable elements or programmable gains. +Though the magic of aliasing, you can up-convert signals +greater than the nyquist rate of the DAC. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +RFX Series +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Transmit Antennas: **TX/RX** + +Receive Antennas: **TX/RX** or **RX2** + +The user may set the receive antenna to be TX/RX or RX2. +However, when using an RFX board in full-duplex mode, +the receive antenna will always be set to RX2, regardless of the settings. + +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +XCVR 2450 +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The XCVR2450 has a non-contiguous tuning range consiting of a high band and a low band. +The high band consists of frequencies between...TODO + +Transmit Antennas: **J1** or **J2** + +Receive Antennas: **J1** or **J2** + +When using the XCVR2450 in full-duplex mode, +the user must set the receive antenna and the transmit antenna to be different; +not doing so will yeild undefined results. + +The XCVR2450 uses a common LO for both receive and transmit. +Even though the API allows the RX and TX LOs to be individually set, +a change of one LO setting will be reflected in the other LO setting. diff --git a/host/docs/index.rst b/host/docs/index.rst index 37853b0b6..3dc7a2d98 100644 --- a/host/docs/index.rst +++ b/host/docs/index.rst @@ -13,17 +13,19 @@ Contents ------------------------------------------------------------------------ ^^^^^^^^^^^^^^^^^^^^^ -API Documentation +Building the UHD ^^^^^^^^^^^^^^^^^^^^^ -* `Doxygen <./../../doxygen/html/index.html>`_ -* `Using the API <./coding.html>`_ +* `Build Guide <./build.html>`_ ^^^^^^^^^^^^^^^^^^^^^ Supported Devices ^^^^^^^^^^^^^^^^^^^^^ * `USRP2 App Notes <./usrp2.html>`_ +* `Daughterboard App Notes <./dboards.html>`_ ^^^^^^^^^^^^^^^^^^^^^ -Building the UHD +API Documentation ^^^^^^^^^^^^^^^^^^^^^ -* `Build Guide <./build.html>`_ +* `Doxygen <./../../doxygen/html/index.html>`_ +* `Using the API <./coding.html>`_ + diff --git a/host/docs/style.css b/host/docs/style.css index 7bd84c9c7..bf97bf007 100644 --- a/host/docs/style.css +++ b/host/docs/style.css @@ -1,8 +1,8 @@ body{ font-family:Arial, Helvetica, sans-serif; -font-size:10pt; +font-size:11pt; color:black; -background-color:#FEFEFE; +background-color:white; width:90%; margin:0 auto 0 auto; } diff --git a/host/docs/usrp2.rst b/host/docs/usrp2.rst index 48ef60683..32e7374c8 100644 --- a/host/docs/usrp2.rst +++ b/host/docs/usrp2.rst @@ -1,5 +1,5 @@ ======================================================================== -UHD - USRP2 App Notes +UHD - USRP2 Application Notes ======================================================================== .. contents:: Table of Contents @@ -36,7 +36,7 @@ Run the following commands: cd /firmware/microblaze ./boostrap - ./configure host=mb + ./configure --host=mb make *The image file will be ./apps/txrx.bin* @@ -112,7 +112,7 @@ Run the following commands: :: cd /share/uhd/utils - ./usrp2 recovery.py --ifc=eth0 --new-ip=192.168.10.3 + ./usrp2_recovery.py --ifc=eth0 --new-ip=192.168.10.3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Debugging networking problems @@ -125,4 +125,4 @@ The microcontroller prints useful information about IP addresses, MAC addresses, control packets, and fast-path settings. **Monitor the host network traffic:** -Use wireshark to monitor packets send to and received from the USRP2. +Use wireshark to monitor packets sent to and received from the USRP2. -- cgit v1.2.3