https://blackmesalabs.wordpress.com/2016/12/22/sump2-100-msps-32bit-logic-analyzer...
[BML_sump2] / sump2_execution.txt
1 This document describes how to execute the sump2 software.\r
2 It assumes the following are already completed:\r
3   1) iCEstick FPGA configuration PROM loaded with sump2 firmware ( *.bin file ).\r
4   2) FTDI device driver for "Converter B" enabled as Virtual Com Port (VCP).\r
5   3) Python 3.x for Windows installed.\r
6   4) PySerial installed.\r
7   5) PyGame installed.\r
8 \r
9 Executing software involves launching two Python Scripts in proper sequence. \r
10 When everything is configured and working properly, double-clicking the script\r
11 name should be sufficient. When things are not working properly, launching each\r
12 script via a command window ("DOS>python script_name.py") is recommend so that\r
13 any error messages are displayed and readable.\r
14 \r
15 [ bd_server.py ]\r
16   "Backdoor Server" is the 1st script to launch.  It provides a layer in a \r
17   protocol stack separating the low-level hardware device driver and the \r
18   high-level user application.  When bd_server.py is launched for the 1st time,\r
19   it generates a bd_server.ini file which contains settings for subsequent \r
20   executions. The line "usb_port = AUTO" tells bd_server.py to communicate to \r
21   the hardware using the 1st FTDI VCP COM port it can find. If you have \r
22   multiple FTDI devices, you may need to change "AUTO" to a hard coded port \r
23   number instead, such as "COM32".  The bd_server.ini line "tcp_port=21567" \r
24   specifies the TCP socket number the server is to listen for requests on. If \r
25   TCP socket 21567 is unavailable, it may be necessary to change the socket \r
26   number both here and in the sump2.ini file to match.  Normally communication\r
27   between bd_server.py and sump2.py is via TCP "localhost" ( both processes \r
28   running on one PC ), but certain firewalls may still balk and require this \r
29   port be opened for localhost communications.\r
30 \r
31 \r
32 [ sump2.py ]\r
33   Once bd_server.py is running, it is safe to launch the sump2.py application.\r
34   Assuming the TCP socket number 21567 for bd_server.py has not changed, the      default created sump2.ini should be sufficient. The sump2.py will start in a \r
35   VCD demo mode if launched and unable to communicate with the sump2 hardware.\r
36 \r
37 \r
38 Users may opt to create the following "Batch" file for launching bd_server.py\r
39 and sump2.py together in proper sequence.  One caveat is that bd_server.py \r
40 AUTO detection of the FTDI COM port does not work for some strange Windows\r
41 reason. The workaround is to change bd_server.ini line "usb_port = AUTO"\r
42 to "usb_port = COM99" where 99 is the COM number assigned to your iCEstick.\r
43 \r
44 [ sump2_launcher.bat ]\r
45   start bd_server.py\r
46   start sump2.py\r
47    \r
48 \r