UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
790 Views
Registered: ‎10-29-2018

How to access XSDB using python

Jump to solution

Hi,

I want to know, is there is any way to pass multiple inputs to XSDB from python and get the respective outputs into a python script. 

 

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
722 Views
Registered: ‎10-21-2010

Re: How to access XSDB using python

Jump to solution

XSDB supports a TCP server, to which you can connect and issue commands from any client. Check "xsdbserver start -help". Below is an example

Ex. xsdb -eval "xsdbserver start -host localhost -port 12000"

 

Connecting to this server:

telnet localhost 12000

Trying localhost...

Connected to localhost.

Escape character is '^]'.

help

okay Available Help Categories\n\nconnections   - Target Connection Management\nregisters     - Target Registers\nrunning       - Program Execution\nmemory        - Target Memory\ndownload      - Target Download FPGA/BINARY\nreset         - Target Reset\nbreakpoints   - Target Breakpoints/Watchpoints\nstreams       - Jtag UART\nmiscellaneous - Miscellaneous\njtag          - JTAG Access\ntfile         - Target File System\nsvf           - SVF Operations\n\nType "help" followed by above "category" for more details or\nhelp" followed by the keyword "commands" to list all the commands\n

test

error invalid command name "test"

For each command you send to the server, the reply is preceded with okay/error. You should be able to replace the telnet part with python interface

 

View solution in original post

0 Kudos
2 Replies
Moderator
Moderator
730 Views
Registered: ‎10-06-2016

Re: How to access XSDB using python

Jump to solution

Hi @vamsikrish95

Don't think so, I mean each time you call to a system call (run xsdb) you will have a different instance of XSDB. I am not aware of any way to keep XSDB running in background and send "commands" from a different CMD.

The only thing I can figure out is just to run a script to perform multiple operation in a single XSDB.

Regards

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Xilinx Employee
Xilinx Employee
723 Views
Registered: ‎10-21-2010

Re: How to access XSDB using python

Jump to solution

XSDB supports a TCP server, to which you can connect and issue commands from any client. Check "xsdbserver start -help". Below is an example

Ex. xsdb -eval "xsdbserver start -host localhost -port 12000"

 

Connecting to this server:

telnet localhost 12000

Trying localhost...

Connected to localhost.

Escape character is '^]'.

help

okay Available Help Categories\n\nconnections   - Target Connection Management\nregisters     - Target Registers\nrunning       - Program Execution\nmemory        - Target Memory\ndownload      - Target Download FPGA/BINARY\nreset         - Target Reset\nbreakpoints   - Target Breakpoints/Watchpoints\nstreams       - Jtag UART\nmiscellaneous - Miscellaneous\njtag          - JTAG Access\ntfile         - Target File System\nsvf           - SVF Operations\n\nType "help" followed by above "category" for more details or\nhelp" followed by the keyword "commands" to list all the commands\n

test

error invalid command name "test"

For each command you send to the server, the reply is preceded with okay/error. You should be able to replace the telnet part with python interface

 

View solution in original post

0 Kudos