Perl

Perl is an incredibly versatile scripting/programming language. It can be used for scripting design compilation and builds, parsing report files for errors or warnings etc. This improves build speed and reliability as you can be confident that no errors have been missed in a build or place and route report. It can also be used to repeat repeditive tasks, an example is the testbench generator.

It can also be used to allow quick debug programs to be written for rapid testing of target hardware. An example is a quick script which was used to keep cycling an SDH Tu pointer control module through it's entire range of pointer values. This was driven via the serial port, alternately the target could have been driven by a telnet session.

Perl can also be used with the Tk extension to create quick GUI applications for manual debug where hardware is ready for test before any software is available to support it.

The Perl/Tk GUI shown below was used to replace Windows Hyperterminal for debug of sections of an SDH Tu design in an embedded target. Register access via Hyperterminal required 22 key strokes which was painfully slow, especially if a sequence of register accesses was needed to initiate an action.

The GUI was written so it could be used like the Hyperterminal, but functionality was added to quickly allow different Tu/Tug mappings to be tested. Entering the required mapping number and hitting return triggered a write to the appropriate register. Other registers in the design could be accessed by entering the register address and new value.

A similar application was written to allow quick testing of an ISA based design. The underlying mechanism for driving the target was some routines written in C which were driven by the Perl/Tk application.


The utility below was written to aid productivity. Having worked for years on Unix boxes it is frustrating not to be able to open a command window at the current windows explorer directory. This was the result of this frustration. Either Windows Explorer or a DOS prompt can be opened with the path pre-set to one of a set of commonly used directories. Double clicking on the path opens Windows explorer, highlighting then right clicking opens a DOS window. The window can be reduced down to minimise desk space used as shown. This can be downloaded from the 'Downloads' page, the code is commented with instructions for use.

Contact us if you want any more details on how Perl might help reduce your debug times.

   
 Copyright © Nial Stewart Developments Limited