Hacker News new | ask | show | jobs
by viggio24 4126 days ago
I'm in the EDA world since 15 years at least and I'm still surprised why many (but not all) vendors have adopted TCL as their scripting language of choice for their public API; my opinion is because it is quite close to shell scripting and so more suitable than Perl or Python for engineers which are not experienced with real software development. Another reason is due probably to the good integration with the Tk UI library that allows to easily associate a UI interface to some of the scripting tasks, something that is highly appreciated by many engineers: this is not easy to accomplish if you use Pyhton or Perl. However I agree that Tcl is a terrible language that I would avoid for any modern project.
3 comments

I think Tcl's popularity in EDA has to do with the fact that the very first EDA tool, Magic, was scripted in Tcl. In fact, Magic and Tcl were written by the same person.

http://en.wikipedia.org/wiki/Magic_(software)

I think there is another reason, besides Magic being scripted in Tcl. Back in the days when some EDA companies decided on Tcl there were only a few languages which could be embedded. Tcl was the only one with some popularity, documentation about embedding including sample code and a commercially viable license. For Perl for instance the embedding feature was largely undocumented at the time (early 90s I think) and Perl is GPL which is a no-go for commercial software. Ruby did not exist yet and Python maybe just was not visible enough.
Very good point, especially the GPL license one.
have you ever seen a GUI interface for EDA tool scripts?
Mentor Grpahics Calibre has a very good interface written in Tk. Also some utilities from the Encounter suite have Tk interfaces (not the whole suite of course as Tk is not suitable for graphicslly intensive applications)
sorry, I meant a GUI written for in-house scripts, not from the vendor.
The other thing I use Tk for at work is writing test scripts for hardware. Often the hardware has a serial port or an ethernet connection in it somewhere. Tcl includes serial port support, and also has an event loop that supports callbacks for both serial port and sockets. I don't think _any_ other solution beats Tcl/Tk for this type of thing. In a way, it's a shame so few people know about Tcl/Tk these days ...
For my modelsim scripts, I usually incorporate a menu in the main modelsim toolbar for my projects. The menu will incorporate menu items for things like library compile, rtl compile, testbench compile, listing all available testbenches for selecting and running. Usually my menu will be organised using submenus. That sort of thing is very quick to do, and it makes developing RTL a little less painful.