I am a ASIC and FPGA designer and started to use Tk/Tcl as scripting langusge in ModelSim VHDL simulator. Has used TCL for debugging and test in product development. Has implemented a SPI Master by the use of lpttcl.dll refer to [Parallell port].