mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
More verbose warnings
This commit is contained in:
parent
0c5279b73d
commit
55eed8df57
|
@ -101,7 +101,8 @@ void FstData::extractVarNames()
|
||||||
case FST_HT_SCOPE: {
|
case FST_HT_SCOPE: {
|
||||||
snum++;
|
snum++;
|
||||||
std::string fst_scope_name = fstReaderPushScope(ctx, h->u.scope.name, (void *)(snum));
|
std::string fst_scope_name = fstReaderPushScope(ctx, h->u.scope.name, (void *)(snum));
|
||||||
scopes.push_back(fst_scope_name);
|
if (h->u.scope.typ == FST_ST_VCD_MODULE)
|
||||||
|
scopes.push_back(fst_scope_name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FST_HT_UPSCOPE: {
|
case FST_HT_UPSCOPE: {
|
||||||
|
|
|
@ -809,14 +809,16 @@ struct SimInstance
|
||||||
if (item.second==0) continue; // Ignore signals not found
|
if (item.second==0) continue; // Ignore signals not found
|
||||||
Const fst_val = Const::from_string(shared->fst->valueOf(item.second));
|
Const fst_val = Const::from_string(shared->fst->valueOf(item.second));
|
||||||
Const sim_val = get_state(item.first);
|
Const sim_val = get_state(item.first);
|
||||||
if (sim_val.size()!=fst_val.size())
|
if (sim_val.size()!=fst_val.size()) {
|
||||||
log_error("Signal '%s' size is different in gold and gate.\n", log_id(item.first));
|
log_warning("Signal '%s.%s' size is different in gold and gate.\n", scope.c_str(), log_id(item.first));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (shared->sim_mode == SimulationMode::sim) {
|
if (shared->sim_mode == SimulationMode::sim) {
|
||||||
// No checks performed when using stimulus
|
// No checks performed when using stimulus
|
||||||
} else if (shared->sim_mode == SimulationMode::gate && !fst_val.is_fully_def()) { // FST data contains X
|
} else if (shared->sim_mode == SimulationMode::gate && !fst_val.is_fully_def()) { // FST data contains X
|
||||||
for(int i=0;i<fst_val.size();i++) {
|
for(int i=0;i<fst_val.size();i++) {
|
||||||
if (fst_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
if (fst_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
||||||
log_warning("Signal '%s' in file %s in simulation %s\n", log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
log_warning("Signal '%s.%s' in file %s in simulation %s\n", scope.c_str(), log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
||||||
retVal = true;
|
retVal = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -824,14 +826,14 @@ struct SimInstance
|
||||||
} else if (shared->sim_mode == SimulationMode::gold && !sim_val.is_fully_def()) { // sim data contains X
|
} else if (shared->sim_mode == SimulationMode::gold && !sim_val.is_fully_def()) { // sim data contains X
|
||||||
for(int i=0;i<sim_val.size();i++) {
|
for(int i=0;i<sim_val.size();i++) {
|
||||||
if (sim_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
if (sim_val[i]!=State::Sx && fst_val[i]!=sim_val[i]) {
|
||||||
log_warning("Signal '%s' in file %s in simulation %s\n", log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
log_warning("Signal '%s.%s' in file %s in simulation %s\n", scope.c_str(), log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
||||||
retVal = true;
|
retVal = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fst_val!=sim_val) {
|
if (fst_val!=sim_val) {
|
||||||
log_warning("Signal '%s' in file %s in simulation '%s'\n", log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
log_warning("Signal '%s.%s' in file %s in simulation '%s'\n", scope.c_str(), log_id(item.first), log_signal(fst_val), log_signal(sim_val));
|
||||||
retVal = true;
|
retVal = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue