News for hackers. Stuff that matters.

smiletoday

Re:What is Tcl? on Thursday February 26, 2015 @05:42PM (#9116078)
OK. I'd stick with procedural, but if you want OO there are plenty of options, your best choice would depend on how OO intensive your use of OO would be. If you want to use a lot of OO features (inheritance, etc) then a Tcl extension would be your best bet. You should be able to find something suitable even for Tcl8.4, which I think is still used in some EDA tools, even though 8.4 it's no longer developed :). At the other extreme, if you were just thinking of classes for scoping variables and procedures, but aren't going to be creating more than one object of a "type", then consider using namespaces instead. Another alternative, somewhere in the middle ground, if you wanted a class for scoping and for creating multiple objects of a "type", without heavy use of other OO techniques, then you don't need a Tcl extension for that, you can do that with about half a page of code. Dare I say it, you should be able to find all that stuff on the Tclers Wiki :)
Re:What is Tcl? on Thursday February 26, 2015 @05:20PM (#9115971)
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 ...
Re:What is Tcl? on Thursday February 26, 2015 @05:09PM (#9115905)
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.
Re:What is Tcl? on Tuesday February 24, 2015 @03:52PM (#9103423)
And that's a good thing. Scripting EDA tools OO style? No thanks. Simple procedural code is all that's needed for that kind of stuff.
Re:What is Tcl? on Tuesday February 24, 2015 @03:50PM (#9103411)
Yeah, I'm a hardware engineer, and I've come across code like that! But it's not Tcl's fault that hardware engineers can't write code, or even comments to go with the code.
Re:What is Tcl? on Tuesday February 24, 2015 @03:46PM (#9103385)
I guess beauty is in the eye in the beholder. I like the syntax, but you're right that a lot are put off by what the syntax looks. If you get past that however, it's a very, very nice bit of kit.