Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


timeout on blocking function call

timeout on blocking function call

timeout on blocking function call


We're using TCL as our build script for our FPGA (= programmable HW) builds. This is done on top of xtclsh, a Xilinx (= FPGA vendor) specific command layer with support for TCL.

The problem is that an FPGA build can sometimes take several hours. An FPGA build has several steps, one of them is invoking the placer (to place the logic in the device) and router (to route the connections between the placed logic). This is done by executing the following call: process run "Place & Route"

Now this call is blocking, it only returns when the placer and router have finished (or failed). Normally this takes about 1 or 2 hours, but occasionally it takes over 20 hours. In this case I want to stop the placer and router, make some option changes and retry.

So how can I make sure that this call (process run "Place & Route") is interrupted after a given timeout?

Best regards,

RE: timeout on blocking function call

I don't recognize "process" as a Tcl function so I suppose it's a proc inside XTCLSH.  If you have access to that code, that would be where you would put the timer.

Bob Rashkin

RE: timeout on blocking function call

It's indeed a proc inside XTCLSH, but I don't have access to that code. It is provided by the FPGA vendor (Xilinx)...

RE: timeout on blocking function call

I did something similar now. I've launched a shell script with a time-out value and the current directory as arguments. This script will look up the matching linux process ID and kill it if it times out or just stop if the process stops without timing out...

Not the nicest way to do things, but quick to implement...

Thanks for your help.

Best regards,

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close