Fix PULSE model bug of adding multiple same values to orddict

This commit is contained in:
Scott Lystig Fritchie 2014-02-20 23:09:57 +09:00
parent 8ec5f04903
commit 88d44722be

View file

@ -381,7 +381,13 @@ check_trace(Trace0, _Cmds, _Seed) ->
orddict:append(LPN, Pg, D); orddict:append(LPN, Pg, D);
({mod_start, WType, LPN, _Pg}, D) ({mod_start, WType, LPN, _Pg}, D)
when WType == w_ft; WType == w_tt -> when WType == w_ft; WType == w_tt ->
case lists:member(error_trimmed,
orddict:fetch(LPN, D)) of
true ->
D;
false ->
orddict:append(LPN, error_trimmed,D) orddict:append(LPN, error_trimmed,D)
end
end, Dict1, [X || X={mod_start,_,_,_} <- StEnds]), end, Dict1, [X || X={mod_start,_,_,_} <- StEnds]),
Dict3 = lists:foldl( Dict3 = lists:foldl(
fun({mod_end, w_1, LPN, Pg}, D) -> fun({mod_end, w_1, LPN, Pg}, D) ->