Friday, November 6, 2009

An useful way to avoid Zero simulation time warning in Modelsim

You could have noticed few simulation warnings at 0 ns time in Modelsim. Normally therse warnings are not a useful one. Though there is a switch available for NC simulator (ncsim -messages -NOTIMEZEROASRTMSG), I could not find a similar one for Modelsim (especially 5.7g which I use). Here is the trick to avoid it in Modelsim.

quietly set StdArithNoWarnings 1
run 0 ns
quietly set StdArithNoWarnings 0
run -all

Thursday, November 5, 2009

Replace more than 2 spaces by newline in Vim

:%s/ \s*/^M/gc

To get ^M, press ^Q and ^M in vim. i.e. Press visual block key followed by ctrl m.