add failure modes to sim output artifact

This commit is contained in:
Fabian Posch 2025-01-03 12:47:02 +01:00
parent 679fd93555
commit 87aabba22b

View file

@ -29,7 +29,6 @@
#include <unordered_map>
#include <string>
#include <memory>
#include "util.h"
namespace pl {
@ -160,7 +159,7 @@ class ActArtifact: public Artifact {
*
* @return long
*/
long get_size() { return 1; };
long get_size() override { return 1; };
private:
@ -219,7 +218,7 @@ class SimConfigArtifact: public Artifact {
*
* @return long The size of the testcase vector
*/
long get_size() { return testcases.size(); };
long get_size() override { return testcases.size(); };
const bool& has_reference = has_reference_;
@ -284,7 +283,7 @@ class SignalListArtifact: public Artifact {
*
* @return long The size of the signals vector
*/
long get_size() { return signals.size(); };
long get_size() override { return signals.size(); };
private:
@ -337,12 +336,38 @@ class SimOutputArtifact: public Artifact {
*
* @return long The size of the log lines vector
*/
long get_size() { return sim_log.size(); };
long get_size() override { return sim_log.size(); };
const bool& fault_timing_deviation = fault_timing_deviation_;
const bool& fault_value = fault_value_;
const bool& fault_coding = fault_coding_;
const bool& fault_glitch = fault_glitch_;
const bool& fault_deadlock = fault_deadlock_;
const bool& fault_token_count = fault_token_count_;
const int& output_tokens = output_tokens_;
inline void set_fault_timing_deviation (bool fault_timing_deviation) { this->fault_timing_deviation_ = fault_timing_deviation; };
inline void set_fault_value (bool fault_value) { this->fault_value_ = fault_value; };
inline void set_fault_coding (bool fault_coding) { this->fault_coding_ = fault_coding; };
inline void set_fault_glitch (bool fault_glitch) { this->fault_glitch_ = fault_glitch; };
inline void set_fault_deadlock (bool fault_deadlock) { this->fault_deadlock_ = fault_deadlock; };
inline void set_fault_token_count (bool fault_token_count) { this->fault_token_count_ = fault_token_count; };
inline void set_output_tokens(int output_tokens) { this->output_tokens_ = output_tokens; };
private:
std::vector<std::string> sim_log;
std::vector<std::string> sim_err_log;
bool fault_timing_deviation_ = false;
bool fault_value_ = false;
bool fault_coding_ = false;
bool fault_glitch_ = false;
bool fault_deadlock_ = false;
bool fault_token_count_ = false;
int output_tokens_;
};
};