Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding when a certain signal has a particular value in Modelsim using tcl

I'm trying to speed up debugging. In a large trace I'm search for particular values of a signal. Im using QuestaSim 10.0b under linux.

I already found out that can be done in Modelsim/QuestaSim with the following command

searchlog -expr { stream == 'h20 } 0

Unfortunately this also matches the signal 'stream' when it has the value 'XX', but I only want it to match 0x20. How can I make sure it only matches the hex value, but not the undefined value?

like image 232
sebs Avatar asked Nov 24 '14 04:11

sebs


Video Answer


1 Answers

After much searching and trying around I found the following solution.

searchlog -expr { stream == 'h20 && ! stream'hasX } 0

It seems weird to me that, if you search for a value you also have to make sure that it is not 'X', but it works.

I still hope to see more answers here.

like image 112
sebs Avatar answered Oct 16 '22 14:10

sebs