When I run my design, there is an unexpected value in a signal. I
would like to know who (which statement) is the responsible for that.
Well, that's an easy question to answer. Your design, you're
responsible.
If by 'unexpected' you mean an 'X' or 'U' or something like
that...then use the 'drivers' command. It lists all of the drivers of
a net, helps you find 'unexpected' cases of multiple drivers. Then
try using type 'std_ulogic' rather than 'std_logic' as your basic type
and you won't have to debug to find such errors ever again; the
compiler will flag multiple drivers as an error. Use std_logic only
for the few cases where it really is permissible to have multiple
drivers.
If by 'unexpected' you mean you got 'ABCD' on some data bus rather
than '1234' than you'll have to debug that yourself. Modelsim has all
of the debug utilities (wave, list, source code, dataflow windows,
breakpoints, etc.). Log all of the signals in your design at the
start of sim (command "log -r /*") and you'll have the complete
history of every change that ever occurs on every signal. Can't get
more complete than that.
KJ