|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include <iostream>#include <iomanip>#include <netlist_simulator_controller/saleae_directory.h>#include <netlist_simulator_controller/saleae_file.h>#include <netlist_simulator_controller/vcd_serializer.h>#include <netlist_simulator_controller/wave_data.h>#include <hal_core/utilities/program_options.h>#include <hal_core/utilities/program_arguments.h>#include <hal_core/utilities/log.h>#include <QFileInfo>#include <QString>#include <sys/resource.h>
Go to the source code of this file.
Functions | |
| bool | file_exists (const std::string &path) |
| template<typename T > | |
| void | print_element (T t, const int &width, bool align) |
| bool | check_size (bool necessary, char op, int size_val, int compare_val) |
| bool | check_ids (bool necessary, std::unordered_set< int > id_set, int id_to_check) |
| std::unordered_set< int > | parse_list_of_ids (std::string list_of_ids) |
| std::tuple< int, int > | parse_timerange (std::string timerange) |
| int | time_within_tolerance (const std::vector< uint64_t > &time_vec, int cur_time, int tolerance) |
| void | saleae_ls (std::string p_path, std::string size, std::string ids, bool validate) |
| void | saleae_cat (std::string path, std::string file_name, bool dump_header, bool dump_data) |
| void | saleae_diff (std::string path_1, std::string path_2, std::string ids, bool only_diff, int tolerance) |
| void | saleae_export (std::string path_1, std::string path_2, std::string ids, std::string timerange) |
| int | main (int argc, const char *argv[]) |
| bool check_ids | ( | bool | necessary, |
| std::unordered_set< int > | id_set, | ||
| int | id_to_check | ||
| ) |
Definition at line 56 of file saleae.cpp.
Referenced by saleae_diff(), and saleae_ls().
| bool check_size | ( | bool | necessary, |
| char | op, | ||
| int | size_val, | ||
| int | compare_val | ||
| ) |
Definition at line 41 of file saleae.cpp.
Referenced by saleae_ls().
| bool file_exists | ( | const std::string & | path | ) |
Definition at line 17 of file saleae.cpp.
References hal::ff.
Referenced by saleae_cat(), saleae_diff(), and saleae_ls().
| int main | ( | int | argc, |
| const char * | argv[] | ||
| ) |
Definition at line 783 of file saleae.cpp.
References hal::ProgramOptions::A_REQUIRED_PARAMETER, hal::ProgramOptions::add(), hal::LogManager::add_channel(), hal::LogManager::create_file_sink(), hal::LogManager::create_gui_sink(), hal::LogManager::create_stdout_sink(), hal::LogManager::deactivate_all_channels(), hal::LogManager::get_instance(), hal::ProgramOptions::get_options_string(), hal::ProgramArguments::get_parameter(), hal::ProgramOptions::get_unknown_arguments(), hal::ProgramArguments::is_option_set(), hal::ProgramOptions::parse(), saleae_cat(), saleae_diff(), saleae_export(), and saleae_ls().
| std::unordered_set<int> parse_list_of_ids | ( | std::string | list_of_ids | ) |
Definition at line 62 of file saleae.cpp.
Referenced by saleae_diff(), saleae_export(), and saleae_ls().
| std::tuple<int,int> parse_timerange | ( | std::string | timerange | ) |
Definition at line 103 of file saleae.cpp.
Referenced by saleae_export().
| void print_element | ( | T | t, |
| const int & | width, | ||
| bool | align | ||
| ) |
Definition at line 28 of file saleae.cpp.
Referenced by saleae_cat(), saleae_diff(), and saleae_ls().
| void saleae_cat | ( | std::string | path, |
| std::string | file_name, | ||
| bool | dump_header, | ||
| bool | dump_data | ||
| ) |
Definition at line 296 of file saleae.cpp.
References hal::SaleaeHeader::Coded, hal::SaleaeHeader::Double, file_exists(), hal::SaleaeInputFile::get_buffered_data(), hal::SaleaeInputFile::header(), hal::SaleaeHeader::mBeginTime, hal::SaleaeHeader::mEndTime, hal::SaleaeHeader::mNumTransitions, hal::SaleaeDataBuffer::mTimeArray, hal::SaleaeHeader::mValue, hal::SaleaeDataBuffer::mValueArray, print_element(), hal::SaleaeHeader::storageFormat(), and hal::SaleaeHeader::Uint64.
Referenced by main().
| void saleae_diff | ( | std::string | path_1, |
| std::string | path_2, | ||
| std::string | ids, | ||
| bool | only_diff, | ||
| int | tolerance | ||
| ) |
Definition at line 409 of file saleae.cpp.
References check_ids(), hal::SaleaeDirectory::dump(), file_exists(), hal::SaleaeInputFile::get_buffered_data(), hal::SaleaeInputFile::header(), id, hal::SaleaeDataBuffer::mCount, hal::SaleaeHeader::mNumTransitions, hal::SaleaeDataBuffer::mTimeArray, hal::SaleaeDataBuffer::mValueArray, parse_list_of_ids(), print_element(), and time_within_tolerance().
Referenced by main().
| void saleae_export | ( | std::string | path_1, |
| std::string | path_2, | ||
| std::string | ids, | ||
| std::string | timerange | ||
| ) |
Definition at line 697 of file saleae.cpp.
References QList::append(), hal::VcdSerializer::exportCsv(), hal::VcdSerializer::exportVcd(), QString::fromStdString(), parse_list_of_ids(), parse_timerange(), hal::WaveDataTimeframe::sceneMaxTime(), hal::WaveDataTimeframe::sceneMinTime(), QList::size(), QFileInfo::suffix(), hal::WaveDataList::timeFrame(), QString::toLower(), hal::WaveDataList::updateFromSaleae(), and hal::WaveDataList::waveDataById().
Referenced by main().
| void saleae_ls | ( | std::string | p_path, |
| std::string | size, | ||
| std::string | ids, | ||
| bool | validate | ||
| ) |
Definition at line 151 of file saleae.cpp.
References check_ids(), check_size(), hal::SaleaeDirectory::dump(), file_exists(), QString::fromStdString(), hal::SaleaeInputFile::get_buffered_data(), hal::SaleaeInputFile::header(), hal::SaleaeHeader::mBeginTime, hal::SaleaeHeader::mEndTime, hal::SaleaeHeader::mNumTransitions, parse_list_of_ids(), print_element(), and size.
Referenced by main().
| int time_within_tolerance | ( | const std::vector< uint64_t > & | time_vec, |
| int | cur_time, | ||
| int | tolerance | ||
| ) |
Definition at line 111 of file saleae.cpp.
Referenced by saleae_diff().