Reference. Scripting.
Generating Timing Diagrams from Verilog and VHDL Simulations. Introduction to Timing Analysis.