37 #include <QTemporaryDir>
85 std::vector<const Net*>
nets;
118 void add_clock_frequency(
const Net* clock_net,
u64 frequency,
bool start_at_zero =
true);
129 void add_clock_period(
const Net* clock_net,
u64 period,
bool start_at_zero =
true,
u64 duration=0);
134 void set_no_clock_used();
140 bool is_no_clock_used()
const;
148 u32 add_waveform_group(
const std::string&
name,
const std::vector<Net*>& nets);
181 u32 add_boolean_expression_waveform(
const std::string& expression);
189 u32 add_boolean_accept_list_waveform(
const std::vector<WaveData*>& input_waves,
const std::vector<int>& accepted_combination);
197 u32 add_trigger_time(
const std::vector<WaveData*>& trigger_waves,
const std::vector<int>& trigger_on_values = std::vector<int>());
203 void remove_waveform_group(
u32 group_id);
211 void add_gates(
const std::vector<Gate*>& gates);
219 void compute_waveform_groups();
226 void load_waveform_groups(
bool inputs);
250 void set_input(
const std::vector<Net*>& nets,
const std::vector<BooleanFunction::Value>& values);
258 void set_input(
const WaveDataGroup* wdg,
const std::vector<BooleanFunction::Value>& values);
266 void set_input(
const u32 id,
const std::vector<BooleanFunction::Value>& values);
274 void set_input(
const PinGroup<ModulePin>* pin_group,
const std::vector<BooleanFunction::Value>& values);
289 void simulate(
u64 picoseconds);
300 const std::unordered_set<const Gate*>& get_gates()
const;
310 std::vector<InputColumnHeader> get_input_column_headers()
const;
320 const std::vector<const Net*>& get_partial_netlist_nets()
const;
326 std::vector<std::string> get_engine_names()
const;
340 std::string
get_name()
const {
return mName.toStdString(); }
358 u64 get_max_simulated_time()
const;
364 bool run_simulation();
371 bool import_vcd(
const std::string& filename, FilterInputFlag filter);
379 void import_csv(
const std::string& filename, FilterInputFlag filter,
u64 timescale = 1000000000);
387 void import_saleae(
const std::string& dirname, std::unordered_map<Net*,int> lookupTable,
u64 timescale = 1000000000);
395 void import_simulation(
const std::string& dirname, FilterInputFlag filter,
u64 timescale = 1000000000);
401 void set_saleae_timescale(
u64 timescale = 1000000000);
412 bool generate_vcd(
const std::filesystem::path& path,
u32 start_time=0,
u32 end_time=0, std::set<const Net*> nets = {})
const;
418 std::string get_working_directory()
const;
424 bool is_legal_directory_name()
const;
430 std::filesystem::path get_saleae_directory_filename()
const;
484 void set_timeframe(
u64 tmin=0,
u64 tmax=0);
490 void emitLoadProgress(
int percent);
496 bool can_import_data()
const;
502 void simulate_only_probes(
const std::vector<const Net*>& probes);
508 void simulate_only_probes(
const QSet<u32>& probes);
514 bool persist()
const;
525 void handleOpenInputFile(
const QString& filename);
526 void handleSelectGates();
527 void handleRunFinished(
bool success);
537 void initSimulator();
539 bool getResultsInternal();
541 bool isInputSet()
const;
542 void checkReadyState();
544 void loadStoredController(
const QDir& workDir);
Value
represents the type of the node
void engineFinished(bool success)
SimulationState get_state() const
void stateChanged(hal::NetlistSimulatorController::SimulationState state)
WaveDataList * get_waves() const
static const char * sPersistFile
void loadProgress(int percent)
std::string get_name() const
NetlistSimulatorController * controller(u32 id) const
void controllerRemoved(u32 id)
static NetlistSimulatorControllerMap * instance()
void removeController(u32 id)
void addController(NetlistSimulatorController *ctrl)
void controllerAdded(u32 id)
QList< NetlistSimulatorController * > toList() const
The SaleaeDirectory class provides the API for the SALEAE directory file. The SALEAE directory file w...
std::vector< Net * > get_input_nets(const std::vector< Gate * > &gates)
Get input nets from a list of gates.
std::vector< Net * > get_output_nets(const std::vector< Gate * > &gates, bool only_external_destinations=true)
Get output nets from a list of gates.