Merge branch 'feature/reduced_output' of
https://git.minres.com/DBT-RISE/DBT-RISE-TGC.git into feature/reduced_output
This commit is contained in:
parent
ad8dc09bee
commit
58311b37db
|
@ -89,39 +89,6 @@ inline string formatPC(uint64_t pc) {
|
|||
}
|
||||
|
||||
void iss::plugin::cov::callback(instr_info_t iinfo, const exec_info& einfo) {
|
||||
auto delay = 0;
|
||||
auto entry = delays[iinfo.instr_id];
|
||||
bool taken = einfo.branch_taken;
|
||||
if (einfo.branch_taken)
|
||||
delay = entry.taken;
|
||||
else
|
||||
delay = entry.not_taken;
|
||||
|
||||
if (first){
|
||||
output << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
first = false;
|
||||
}
|
||||
if(instr_if->get_next_pc()-instr_if->get_pc() != delays[iinfo.instr_id].size/8){
|
||||
//The goal is to keep the output in start-target pairs, so after a jump the target address needs to get written
|
||||
//to the output. If the target happens to also be a start, we keep the pairing by adding a 0-delay entry.
|
||||
if (jumped)
|
||||
output <<"\n" <<formatPC(instr_if->get_pc()) << "," << 0;
|
||||
output <<"\n" << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
jumped = true;
|
||||
}
|
||||
else{
|
||||
if (jumped){
|
||||
output <<"\n" << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
jumped = false;
|
||||
}
|
||||
else if(delay!=1){
|
||||
output <<"\n" << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
output <<"\n" << formatPC(instr_if->get_pc()) << "," << 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//source code for the full output
|
||||
// auto delay = 0;
|
||||
// auto entry = delays[iinfo.instr_id];
|
||||
// bool taken = einfo.branch_taken;
|
||||
|
@ -129,5 +96,38 @@ void iss::plugin::cov::callback(instr_info_t iinfo, const exec_info& einfo) {
|
|||
// delay = entry.taken;
|
||||
// else
|
||||
// delay = entry.not_taken;
|
||||
// output<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay << "\n";
|
||||
//
|
||||
// if (first){
|
||||
// output << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
// first = false;
|
||||
// }
|
||||
// if(instr_if->get_next_pc()-instr_if->get_pc() != delays[iinfo.instr_id].size/8){
|
||||
// //The goal is to keep the output in start-target pairs, so after a jump the target address needs to get written
|
||||
// //to the output. If the target happens to also be a start, we keep the pairing by adding a 0-delay entry.
|
||||
// if (jumped)
|
||||
// output <<"\n" <<formatPC(instr_if->get_pc()) << "," << 0;
|
||||
// output <<"\n" << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
// jumped = true;
|
||||
// }
|
||||
// else{
|
||||
// if (jumped){
|
||||
// output <<"\n" << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
// jumped = false;
|
||||
// }
|
||||
// else if(delay!=1){
|
||||
// output <<"\n" << formatPC(instr_if->get_pc()) << "," << delay;
|
||||
// output <<"\n" << formatPC(instr_if->get_pc()) << "," << 0;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
//source code for the full output
|
||||
auto delay = 0;
|
||||
auto entry = delays[iinfo.instr_id];
|
||||
bool taken = einfo.branch_taken;
|
||||
if (einfo.branch_taken)
|
||||
delay = entry.taken;
|
||||
else
|
||||
delay = entry.not_taken;
|
||||
output<<std::hex <<"0x" << instr_if->get_pc() <<"," << delay << "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue