@@ -1307,11 +1307,10 @@ def _get_xlx(self, name):
13071307 return drv
13081308
13091309 def xlx_run_xsdb (self ):
1310- drv = self ._get_xlx (self .args .name )
1310+ _ , drv = self ._get_xlx (self .args .name )
13111311
1312- processwrapper .enable_print ()
1313- drv .run ([self .args .tcl_cmds ])
1314- processwrapper .disable_print ()
1312+ drv .run ([self .args .tcl_cmds ],
1313+ interactive = self .args .interactive or not bool (self .args .tcl_cmds ))
13151314
13161315 def xlx_program_bitstream (self ):
13171316 drv = self ._get_xlx (self .args .name )
@@ -1912,8 +1911,9 @@ def main():
19121911 metavar = "SUBCOMMAND" ,
19131912 )
19141913
1915- xlx_subparser = xlx_subparsers .add_parser ('xsdb' , help = "run XSDB" )
1916- xlx_subparser .add_argument ('tcl_cmds' , help = "Tcl commands" )
1914+ xlx_subparser = xlx_subparsers .add_parser ('xsdb' , help = "run XSDB and connect to Vivado hardware server" )
1915+ xlx_subparser .add_argument ('tcl_cmds' , nargs = '?' , default = '' , help = "Tcl command to execute" )
1916+ xlx_subparser .add_argument ('-i' , '--interactive' , action = 'store_true' , help = "enter interactive mode after executing Tcl command" )
19171917 xlx_subparser .set_defaults (func = ClientSession .xlx_run_xsdb )
19181918
19191919 xlx_subparser = xlx_subparsers .add_parser ('program-bitstream' , help = "program bitstream" )
0 commit comments