PandA-2024.02
|
#include <BambuParameter.hpp>
Public Member Functions | |
BambuParameter (const std::string &program_name, int argc, char **const argv) | |
Constructor. More... | |
~BambuParameter () override=default | |
Destructor. More... | |
int | Exec () override |
Execute parameter parsing. More... | |
void | SetDefaults () override |
Sets default values. More... | |
Public Member Functions inherited from Parameter | |
Parameter (const std::string &program_name, int argc, char **const argv, int debug_level=0) | |
Constructor. More... | |
Parameter (const Parameter &other) | |
Copy Constructor. More... | |
virtual | ~Parameter () |
Destructor. More... | |
void | load_xml_configuration_file (const std::string &filename) |
Loads an XML configuration file. More... | |
void | write_xml_configuration_file (const std::string &filename) |
Write an XML configuration file with the parameters actually stored. More... | |
template<typename G > | |
void | getOption (const std::string &name, G &variable) const |
Returns the value of an option. More... | |
template<typename G > | |
void | getOption (const char *name, G &variable) const |
Returns the value of an option. More... | |
template<typename G > | |
G | getOption (const std::string &name) const |
Returns the value of an option. More... | |
template<typename G > | |
G | getOption (const char *name) const |
Returns the value of an option. More... | |
template<typename G > | |
G | getOption (const enum enum_option name) const |
Returns the value of an option. More... | |
template<typename G > | |
void | setOption (const std::string &name, const G value) |
Sets the value of an option. More... | |
template<typename G > | |
void | setOption (const char *name, const G value) |
Sets the value of an option. More... | |
template<typename G > | |
void | setOption (const enum enum_option name, const G value) |
Sets the value of an option. More... | |
bool | isOption (const std::string &name) const |
Tests if an option has been stored. More... | |
bool | isOption (const char *name) const |
Tests if an option has been stored. More... | |
bool | isOption (const enum enum_option name) const |
Tests if an option has been stored. More... | |
bool | removeOption (const enum enum_option name) |
Remove an option. More... | |
bool | removeOption (const char *name) |
Remove an option. More... | |
bool | removeOption (const std::string &name) |
Remove an option. More... | |
int | get_class_debug_level (const std::string &class_name, int debug_level=-1) const |
Return the debug level for a specific class. More... | |
int | GetFunctionDebugLevel (const std::string &class_name, const std::string &function_name) const |
Return the debug_level of a function. More... | |
void | print (std::ostream &os) const |
void | add_debug_class (const std::string &class_name) |
Add a class to be debugged. More... | |
void | PrintUsage (std::ostream &os) const |
Print the usage of this tool = PrintHeader() + PrintHelp() More... | |
std::string | PrintVersion () const |
This function prints the version of the tool. More... | |
virtual void | PrintFullHeader (std::ostream &os) const |
This function prints the header of the tool = PrintProgramName() + PrintVersion() More... | |
void | PrintBugReport (std::ostream &os) const |
Print the bug report request. More... | |
Parameters_FileFormat | GetFileFormat (const std::filesystem::path &file, bool check_cml_root_node=false) const |
Return the file format given the file name or the extension. More... | |
template<typename G > | |
G | GetParameter (const std::string &name) const |
Returns the value of a parameter. More... | |
bool | IsParameter (const std::string &name) const |
Return if a parameter has been set. More... | |
const std::vector< std::string > | CGetArgv () const |
Return argv. More... | |
template<> | |
CustomSet< std::string > | getOption (const enum enum_option name) const |
template<> | |
std::list< std::string > | getOption (const enum enum_option name) const |
template<> | |
std::vector< std::string > | getOption (const enum enum_option name) const |
template<> | |
Parameters_FileFormat | getOption (const enum enum_option name) const |
Private Member Functions | |
void | CheckParameters () override |
Check the compatibility among the different parameters and compute implicated parameters. More... | |
void | add_bambu_library (std::string lib) |
add the library to the raw to be considered More... | |
void | PrintHelp (std::ostream &os) const override |
Print the usage of this tool. More... | |
void | PrintProgramName (std::ostream &os) const override |
Print the name of the program to be included in the header. More... | |
void | add_experimental_setup_compiler_options (bool kill_printf) |
add the following GCC options: -fwhole-program -fno-ipa-cp -fno-ipa-cp-clone and -D'printf(fmt, ...)=' More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Parameter | |
void | load_xml_configuration_file_rec (const xml_element *node) |
Loads an XML configuration file (recursive method) More... | |
bool | ManageDefaultOptions (int next_option, char *optarg_param, bool &exit_success) |
Manage default options (common to all tools) More... | |
void | PrintGeneralOptionsUsage (std::ostream &os) const |
Print the usage of the general common options. More... | |
void | PrintOutputOptionsUsage (std::ostream &os) const |
Print the usage of the output common options. More... | |
void | SetCommonDefaults () |
Sets the default values common to all tools. More... | |
Protected Attributes inherited from Parameter | |
int | argc |
The number of input paramters. More... | |
char **const | argv |
The input parameters;. More... | |
OptionMap | Options |
Map between the name of the option and the related string-form value. More... | |
CustomMap< std::string, std::string > | panda_parameters |
Map between the name of a parameter and the related string-form value. More... | |
std::map< enum enum_option, std::string > | enum_options |
Map between an enum option and the related string-form value. More... | |
std::map< enum enum_option, std::string > | option_name |
Name of the enum options. More... | |
CustomUnorderedSet< std::string > | debug_classes |
Classes to be debugged. More... | |
int | debug_level |
debug level More... | |
Definition at line 58 of file BambuParameter.hpp.
BambuParameter::BambuParameter | ( | const std::string & | program_name, |
int | argc, | ||
char **const | argv | ||
) |
Constructor.
program_name | is the name of the executable |
argc | is the number of arguments |
argv | is the array of arguments passed to program. |
Definition at line 928 of file BambuParameter.cpp.
References SetDefaults().
|
overridedefault |
Destructor.
|
private |
add the library to the raw to be considered
lib | is the name of the library. |
Definition at line 3885 of file BambuParameter.cpp.
References CompilerWrapper::getCompilerSuffix(), Parameter::isOption(), relocate_compiler_path(), Parameter::setOption(), and STR_CST_string_separator.
Referenced by CheckParameters().
|
private |
add the following GCC options: -fwhole-program -fno-ipa-cp -fno-ipa-cp-clone and -D'printf(fmt, ...)='
kill_printf | when true the option -D'printf(fmt, ...)=' added otherwise only the "whole" program options are added |
Set the default value for OPT_gcc_m32_mx32
Definition at line 2488 of file BambuParameter.cpp.
References CompilerWrapper::hasCompilerCLANGM32(), CompilerWrapper::hasCompilerGCCM32(), CompilerWrapper::hasCompilerM64(), CompilerWrapper::hasCompilerMX32(), Parameter::isOption(), Parameter::setOption(), STR_CST_string_separator, and THROW_ASSERT.
Referenced by CheckParameters().
|
overrideprivatevirtual |
Check the compatibility among the different parameters and compute implicated parameters.
Search for lattice tool
Search for Mentor tools
Search for NanoXplore tools
Search for Xilinx tools
Mixed language simulator
Mixed language simulator
Search for verilator
target device options
circuit debugging options
controller options
chaining options
evaluation options
add -I <ac_types_dir> and -I <ac_math_dir>
Disable proxy when there are multiple top functions
add experimental setup options
GCC SECTION
CLANG SECTION
default for memory allocation policy
base address and initial internal address checks
Checks
When simd is enabled bit value analysis and optimization are disabled
Implements Parameter.
Definition at line 2554 of file BambuParameter.cpp.
References add_bambu_library(), add_evaluation_objective_string(), add_experimental_setup_compiler_options(), ALL_BRAM, Parameter::CheckParameters(), CT_I386_GCC49, CT_I386_GCC5, CT_I386_GCC6, CT_I386_GCC7, CT_I386_GCC8, DATAPATH_CS_CREATOR, tree_helper::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, DOMINATOR_FUNCTION_ALLOCATION, DOMINATOR_MEMORY_ALLOCATION_CS, EXACT, EXT_PIPELINED_BRAM, FSM_CONTROLLER_CREATOR, FSM_CS_CONTROLLER_CREATOR, Parameter::get_class_debug_level(), Parameter::getOption(), GetPath(), INFERRED_INTERFACE_GENERATION, INTERFACE_CS_GENERATION, is_evaluation_objective_string(), CompilerWrapper::isClangCheck(), CompilerWrapper::isCurrentOrNewer(), CompilerWrapper::isGccCheck(), Parameter::isOption(), LSS, MEM_ACC_11, MEM_ACC_CS, MEM_ACC_N1, MEM_ACC_NN, NaturalVersionOrder(), NO_BRAM, NONE, O0, O2, O3, Os, test_panda::parameters, PIPELINE_CONTROLLER_CREATOR, relocate_compiler_path(), Parameter::removeOption(), SCHED_CHAINING, Parameter::setOption(), SplitString(), starts_with(), STR, STR_CST_concat_c_file, STR_CST_string_separator, THROW_ASSERT, THROW_ERROR, THROW_WARNING, unique_path(), VERILOG, VHDL, and WB4_INTERFACE_GENERATION.
Referenced by Exec().
|
overridevirtual |
Execute parameter parsing.
flag to check if scheduling algorithm has been already chosen
variable used into option parsing
General options
Frontend options
Scheduling options
Finite state machine options
module binding
register allocation
Memory allocation
evaluation options
target options
Output options
general options
binding options
target options
evaluation
output options
scheduling options
other options
Implements Parameter.
Definition at line 934 of file BambuParameter.cpp.
References add_evaluation_objective_string(), ALL_BRAM, test_panda::arg, Parameter::argc, Parameter::argv, BIPARTITE_MATCHING, CDFC_MODULE_BINDING, CHANNELS_TYPE_MEM_ACC_11, CHANNELS_TYPE_MEM_ACC_N1, CHANNELS_TYPE_MEM_ACC_NN, CheckParameters(), CHORDAL_COLORING_REGISTER_BINDING, COLORING, COLORING_REGISTER_BINDING, COMMON_LONG_OPTIONS, COMMON_SHORT_OPTIONS_STRING, container_to_string(), DRY_RUN, EXACT, exit_code, EXT_PIPELINED_BRAM, flopoco::filename, GCC_LONG_OPTIONS, GCC_SHORT_OPTIONS_STRING, Parameter::GetFileFormat(), GetPath(), GSS, INDENT_OUT_MEX, INFERRED_INTERFACE_GENERATION, INPUT_OPT_C_NO_PARSE, INPUT_OPT_C_PYTHON_NO_PARSE, INPUT_OPT_DRY_RUN_EVALUATION, INPUT_OPT_FILE_INPUT_DATA, INPUT_OPT_TEST_MULTIPLE_NON_DETERMINISTIC_FLOWS, INPUT_OPT_TEST_SINGLE_NON_DETERMINISTIC_FLOW, Parameter::isOption(), LIST_BASED_SCHEDULING, LSS, Parameter::ManageDefaultOptions(), MEM_ACC_11, MEM_ACC_N1, MEM_ACC_NN, MINIMAL_INTERFACE_GENERATION, NO_BRAM, NONE, OPT_ACCEPT_NONZERO_RETURN, OPT_ADDITIONAL_TOP, OPT_ALIGNED_ACCESS_PARAMETER, OPT_ALTERA_ROOT, OPT_ARCHITECTURE_XML, OPT_AXI_BURST_TYPE, OPT_BACKEND_SCRIPT_EXTENSIONS_PARAMETER, OPT_BACKEND_SDC_EXTENSIONS_PARAMETER, OPT_BRAM_HIGH_LATENCY, OPT_CLOCK_NAME, OPT_CLOCK_PERIOD_RESOURCE_FRACTION, OPT_CONNECT_IOB, OPT_DEVICE_NAME, OPT_DISABLE_BITVALUE_IPA, OPT_DISABLE_BOUNDED_FUNCTION, OPT_DISABLE_FUNCTION_PROXY, OPT_DISABLE_REG_INIT_VALUE, OPT_DISCREPANCY, OPT_DISCREPANCY_FORCE, OPT_DISCREPANCY_HW, OPT_DISCREPANCY_NO_LOAD_POINTERS, OPT_DISCREPANCY_ONLY, OPT_DISCREPANCY_PERMISSIVE_PTRS, OPT_DISTRAM_THRESHOLD, OPT_DO_NOT_CHAIN_MEMORIES, OPT_DO_NOT_USE_ASYNCHRONOUS_MEMORIES, OPT_DONE_NAME, OPT_DSP_ALLOCATION_COEFFICIENT, OPT_DSP_FRACTURING, OPT_DSP_MARGIN_COMBINATIONAL, OPT_DSP_MARGIN_PIPELINED, OPT_ENABLE_FUNCTION_PROXY, OPT_EVALUATION, OPT_EVALUATION_MODE, OPT_EXPERIMENTAL_SETUP, OPT_EXPOSE_GLOBALS, OPT_FLOPOCO, OPT_FP_EXC, OPT_FP_FORMAT, OPT_FP_FORMAT_INTERFACE, OPT_FP_FORMAT_PROPAGATE, OPT_FP_RND, OPT_FP_SUB, OPT_FSM_ENCODING, OPT_GENERATE_VCD, OPT_HLS_DIV, OPT_HLS_FPDIV, OPT_HOST_PROFILING, OPT_ILP, OPT_ILP_NEWFORM, OPT_ILP_SOLVER, OPT_INLINE_FUNCTIONS, OPT_INPUT_CONTEXT_SWITCH, OPT_LATTICE_ROOT, OPT_LIBM_STD_ROUNDING, OPT_LIST_BASED, OPT_MAX_SIM_CYCLES, OPT_MAX_ULP, OPT_MEM_DELAY_READ, OPT_MEM_DELAY_WRITE, OPT_MEMORY_BANKS_NUMBER, OPT_MEMORY_MAPPED_TOP, OPT_MENTOR_OPTIMIZER, OPT_MENTOR_ROOT, OPT_NANOXPLORE_BYPASS, OPT_NANOXPLORE_ROOT, OPT_NO_MIXED_DESIGN, OPT_NUM_ACCELERATORS, OPT_PARALLEL_BACKEND, OPT_PERIOD_CLOCK, OPT_POWER_OPTIMIZATION, OPT_PRAGMA_PARSE, OPT_PRETTY_PRINT, OPT_RANGE_ANALYSIS_MODE, OPT_REGISTER_ALLOCATION, OPT_REGISTERED_INPUTS, OPT_RESET_LEVEL, OPT_RESET_NAME, OPT_RESET_TYPE, OPT_ROM_DUPLICATION, OPT_SCHEDULING_MUX_MARGINS, OPT_SERIALIZE_MEMORY_ACCESSES, OPT_SHARED_INPUT_REGISTERS, OPT_SILP, OPT_SIMULATE, OPT_SKIP_PIPE_PARAMETER, OPT_SOFT_FLOAT, OPT_SOFT_FP, OPT_SPECULATIVE, OPT_START_NAME, OPT_STG, OPT_TB_EXTRA_GCC_OPTIONS, OPT_TB_QUEUE_SIZE, OPT_TESTBENCH, OPT_TESTBENCH_ARGV, OPT_TESTBENCH_MAP_MODE, OPT_TESTBENCH_PARAM_SIZE, OPT_TIMING_MODEL, OPT_TIMING_VIOLATION, OPT_TOP_FNAME, OPT_TOP_RTLDESIGN_NAME, OPT_UNALIGNED_ACCESS_PARAMETER, OPT_USE_ALUS, OPT_VERILATOR_PARALLEL, OPT_VHDL_LIBRARY_PARAMETER, OPT_XILINX_ROOT, OUTPUT_LEVEL_MINIMUM, PAR_LIST_BASED_OPT, PARAMETER_NOTPARSED, PARAMETER_PARSED, PM_BBP, PRINT_MSG, Parameter::PrintUsage(), Parameter::setOption(), SplitString(), starts_with(), STR_CST_string_separator, THROW_ERROR, THROW_WARNING, TrimSpaces(), TS_CLIQUE_COVERING, TS_WEIGHTED_CLIQUE_COVERING, TTT_CLIQUE_COVERING, TTT_CLIQUE_COVERING2, TTT_CLIQUE_COVERING_FAST, TTT_CLIQUE_COVERING_FAST2, UNIQUE_MODULE_BINDING, UNIQUE_REGISTER_BINDING, VERILOG, VHDL, WB4_INTERFACE_GENERATION, WEIGHTED_CLIQUE_REGISTER_BINDING, WEIGHTED_COLORING, and Parameter::write_xml_configuration_file().
|
overrideprivatevirtual |
Print the usage of this tool.
os | is the stream where the message has to be printed |
Implements Parameter.
Definition at line 251 of file BambuParameter.cpp.
References Parameter::PrintGeneralOptionsUsage(), and Parameter::PrintOutputOptionsUsage().
|
overrideprivatevirtual |
Print the name of the program to be included in the header.
os | is the stream on which the program name has to be printed |
Implements Parameter.
Definition at line 913 of file BambuParameter.cpp.
|
overridevirtual |
Sets default values.
Revision
TODO this is a temporary hack. Before starting anything, the directory HLS_output/simulation/ needs to be removed.
Debugging level
maximum execution time: 0 means no time limit
pragmas related
-——— HLS process options –——— //
-——— HLS specification reference –——— //
High-level synthesis constraints dump – //
– Scheduling – // Scheduling algorithm (default is list based one)
ilp solver
speculative execution flag
– Module binding – // module binding algorithm
– Finite state machine – // flag to check if finite state machine has to be created
state transition graph creation algorithm
– Dataflow analysis – //
– Register allocation – // register allocation algorithm
storage value insertion algorithm
Function allocation
Enable function proxy by default
Disable memory mapped interface for top function by default
– Memory allocation – //
– Datapath – // Datapath interconnection architecture
Datapath architecture
– Controller – // target architecture for the controller
– top entity – // Output file name for top entity
backend HDL
– Module Interfaces – //
– Module Characterization – //
– Module Synthesis – //
– Compiler options – //
-------— Simulation options --------— //
Implements Parameter.
Definition at line 3664 of file BambuParameter.cpp.
References BB_STG_CREATOR, CDFC_MODULE_BINDING, CLASSIC_DATAPATH_CREATOR, CLASSICAL_HLS_SYNTHESIS_FLOW, DEBUG_LEVEL_NONE, DOMINATOR_FUNCTION_ALLOCATION, DOMINATOR_MEMORY_ALLOCATION, DYNAMIC_MOBILITY, FSM_CONTROLLER_CREATOR, FSM_NI_SSA_LIVENESS, CompilerWrapper::getCompatibleCompilers(), CompilerWrapper::getDefaultCompiler(), GetPath(), Parameter::isOption(), LIST_BASED_SCHEDULING, MINIMAL_INTERFACE_GENERATION, MUX_INTERCONNECTION_BINDING, NONE, NUM_CST_allocation_default_allocation_coefficient, OBAMBU, OUTPUT_LEVEL_MINIMUM, Parameter::panda_parameters, PM_NONE, Parameter::setOption(), STANDARD_HLS_FLOW, STR_CST_string_separator, TS_WEIGHTED_CLIQUE_COVERING, VALUES_SCHEME_STORAGE_VALUE_INSERTION, VERILOG, and WEIGHTED_CLIQUE_REGISTER_BINDING.
Referenced by BambuParameter().