User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
ee:hydrophones:start [2018/01/24 20:12]
Ryan Summers
ee:hydrophones:start [2018/01/24 20:18]
Ryan Summers
Line 49: Line 49:
  
 ==== Software Design ==== ==== Software Design ====
 +**Note that for ease of use, the HydroZynq is programmed bare-metal. There is no operating system on the board!**
 +
 The software design is straightforward,​ but the most complex of the other systems. Communication with other computers is implemented using UDP sockets provided by the lwIP (lightweight IP) library. When the CPU first boots, it loads the program off the SD card into memory. It then programs the FPGA bit stream and begins program execution after initializing most peripherals (e.g. Xilinx Ethernet). The application then initializes peripherals that were instantiated in the FPGA fabric (such as the ADC reader, the system monitor, and the SPI engine). It then configures the ADC chip and binds/​connects to a variety of UDP ports for communication. ​ The software design is straightforward,​ but the most complex of the other systems. Communication with other computers is implemented using UDP sockets provided by the lwIP (lightweight IP) library. When the CPU first boots, it loads the program off the SD card into memory. It then programs the FPGA bit stream and begins program execution after initializing most peripherals (e.g. Xilinx Ethernet). The application then initializes peripherals that were instantiated in the FPGA fabric (such as the ADC reader, the system monitor, and the SPI engine). It then configures the ADC chip and binds/​connects to a variety of UDP ports for communication. ​
  
Line 96: Line 98:
   ​   ​
 Once XMD has been started, a remote GDB server is automatically instantiated. To connect to the GDB server, simply use the debug.sh script located in `software/` to launch up a GDB session. Once XMD has been started, a remote GDB server is automatically instantiated. To connect to the GDB server, simply use the debug.sh script located in `software/` to launch up a GDB session.
-  ​./debug.sh+  ​[hydrozynq-repo-path]/​software/debug.sh 
 +   
 +  ​
 === Communicating === === Communicating ===
 +The HydroZynq communicates primarily through UDP. A number of user scripts have been created in the `scripts/` folder for ease of use with UDP. For example, the stdout of the application is sent to Cobalt'​s UDP port 3000 (e.g. 192.168.0.2:​3000). A simple python application ([hydrozynq-repo-path]/​scripts.debug_stream.py) can be used to view the standard output of the application (e.g. dbprintf() statements).
  
 +Note that the HydroZynq does not run ROS natively, so python scripts running on cobalt are necessary for interfacing the HydroZynq with ROS. As of now, these scripts are still under initial development.
 +
 +The HydroZynq allows for a number of run-time parameters to be set dynamically,​ including the ping detection threshold. These can be sent to the HydroZynq command port in a simple ASCII string.
 +  [keyword]:​[value],​[keyword]:​[value],​.... (etc)
 +  ​
 +Note that the string must terminate without a trailing comma and that it is able to only have a single key-value pair. The current supported keys are as follows:
 +^ Key String ^ Data Type ^ Description ^
 +| reset      | N/A          | Causes the Zynq to perform a software reset. |
 +| threshold ​ | unsigned int | Sets the HydroZynq ping ADC threshold value. |