In reply to ridgemao:
You need to turn off "-event" switch when you are opening the shm waveform database. The default behavior is not to record these glitches (that you want), and it happens only when you specify "-event" option of 'database' tcl command.
The following is copy-paste from NCVLOG product documentation (<ius_inst_dir>/doc/ncvlog/ncvlog.pdf ) on "-event" option of database
database Command Modifiers and Options
Dumps all value changes to the database.
By default, when probing to an SHM database, the simulator discards multiple value changes for an object during one simulation time and dumps only the final value at the end of that simulation time. Use -event if you want to dump all value changes to the SHM database. You can then use the SimVision waveform viewer to expand a single moment of simulation time to show the sequence of value changes that occurred at that time.
In reply to Amit Dua:
As a side-note, sometimes one sees behavior that seems inexplicable, such as a flip-flop whose output changes although its data input looks constant all the time. In such cases, one should suspect a zero-width glitch and turn on -event. I had such a case just recently.