PandA-2024.02
Macros | Functions
string_manipulation.hpp File Reference

Auxiliary methods for manipulating string. More...

#include <boost/lexical_cast.hpp>
#include <string>
#include <type_traits>
#include <vector>
Include dependency graph for string_manipulation.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STR(s)   boost::lexical_cast<std::string>(s)
 Macro which performs a lexical_cast to a string. More...
 
#define GET_CLASS(obj)   cxa_demangle(typeid(obj).name())
 Macro returning the actual type of an object. More...
 

Functions

const std::vector< std::string > SplitString (const std::string &input, const std::string &separators)
 Function which splits a string into tokens. More...
 
void add_escape (std::string &ioString, const std::string &to_be_escaped)
 Function which adds escape to selected characters. More...
 
void remove_escaped (std::string &ioString)
 Function converting all the escaped characters in the associated character. More...
 
std::string TrimSpaces (const std::string &value)
 
std::string cxa_demangle (const std::string &input)
 
std::string cxa_rename_mangled (const std::string &signature, const std::string &new_fname)
 
std::string cxa_prefix_mangled (const std::string &signature, const std::string &prefix)
 
std::string capitalize (const std::string &str)
 
std::string & capitalize (std::string &str)
 
bool starts_with (const std::string &str, const std::string &pattern)
 
bool ends_with (const std::string &str, const std::string &pattern)
 
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
std::string NumberToString (const T number, const size_t precision, const size_t size)
 Function with print number in desired format. More...
 
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
std::string NumberToString (const T number, const size_t precision)
 Function with print number in desired format. More...
 
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
std::string NumberToBinaryString (const T number, const size_t precision=0)
 Function which print number in binary format. More...
 
std::string convert_fp_to_string (std::string num, unsigned long long precision)
 convert a real number stored in a string into a string of bits with a given precision More...
 
unsigned long long convert_fp_to_bits (std::string num, unsigned long long precision)
 convert a real number stored in a string into bits with a given precision More...
 
std::string ConvertInBinary (const std::string &C_value, unsigned long long precision, const bool real_type, bool unsigned_type)
 Convert a string storing a number in decimal format into a string in binary format. More...
 
std::string FixedPointReinterpret (const std::string &FP_vector, const std::string &fp_typename)
 
unsigned long long ac_type_bitwidth (const std::string &intType, bool &is_signed, bool &is_fixed)
 

Detailed Description

Auxiliary methods for manipulating string.

Author
Marco Lattuada marco.nosp@m..lat.nosp@m.tuada.nosp@m.@pol.nosp@m.imi.i.nosp@m.t

Definition in file string_manipulation.hpp.

Macro Definition Documentation

◆ GET_CLASS

#define GET_CLASS (   obj)    cxa_demangle(typeid(obj).name())

Macro returning the actual type of an object.

Definition at line 178 of file string_manipulation.hpp.

Referenced by AadlParser::AadlParser(), add_library::add_library(), datapath_cs::add_ports(), AddArtificialCallFlowEdges::AddArtificialCallFlowEdges(), AddBbEcfgEdges::AddBbEcfgEdges(), AddOpExitFlowEdges::AddOpExitFlowEdges(), AddOpLoopFlowEdges::AddOpLoopFlowEdges(), AddOpPhiFlowEdges::AddOpPhiFlowEdges(), allocation::allocation(), AllocationInformation::AllocationInformation(), AlteraBackendFlow::AlteraBackendFlow(), ApplicationFrontendFlowStep::ApplicationFrontendFlowStep(), AsnParser::AsnParser(), BackendFlow::BackendFlow(), BambuFrontendFlow::BambuFrontendFlow(), BasicBlocksCfgComputation::BasicBlocksCfgComputation(), BasicBlocksProfiling::BasicBlocksProfiling(), BasicBlocksProfilingCWriter::BasicBlocksProfilingCWriter(), BB_based_stg::BB_based_stg(), bb_feedback_edges_computation::bb_feedback_edges_computation(), BBOrderComputation::BBOrderComputation(), BBReachabilityComputation::BBReachabilityComputation(), Bit_Value::Bit_Value(), Bit_Value_opt::Bit_Value_opt(), BitValueIPA::BitValueIPA(), BitValueRange::BitValueRange(), BlockFix::BlockFix(), BuildVirtualPhi::BuildVirtualPhi(), call_expr_fix::call_expr_fix(), call_graph_computation::call_graph_computation(), CallGraphBuiltinCall::CallGraphBuiltinCall(), CBackend::CBackend(), CBackendStepFactory::CBackendStepFactory(), cdfc_module_binding::cdfc_module_binding(), CheckSystemType::CheckSystemType(), CInitializationParser::CInitializationParser(), classic_datapath::classic_datapath(), commutative_expr_restructuring::commutative_expr_restructuring(), CompleteBBGraph::CompleteBBGraph(), CompleteCallGraph::CompleteCallGraph(), compute_implicit_calls::compute_implicit_calls(), CondExprRestructuring::CondExprRestructuring(), conn_binding_cs::conn_binding_cs(), ControlFlowChecker::ControlFlowChecker(), create_tree_manager::create_tree_manager(), CreateAddressTranslation::CreateAddressTranslation(), cs_interface::cs_interface(), CSE::CSE(), CTestbenchExecution::CTestbenchExecution(), dataflow_cg_ext::dataflow_cg_ext(), datapath_cs::datapath_cs(), datapath_parallel_cs::datapath_parallel_cs(), dead_code_elimination::dead_code_elimination(), dead_code_eliminationIPA::dead_code_eliminationIPA(), DesignFlowManager::DesignFlowManager(), determine_memory_accesses::determine_memory_accesses(), dom_post_dom_computation::dom_post_dom_computation(), DryRunEvaluation::DryRunEvaluation(), easy_module_binding::easy_module_binding(), EdgeCWriter::EdgeCWriter(), eSSA::eSSA(), Evaluation::Evaluation(), extract_patterns::extract_patterns(), ExtractGimpleCondOp::ExtractGimpleCondOp(), ExtractOmpAtomic::ExtractOmpAtomic(), ExtractOmpFor::ExtractOmpFor(), fanout_opt::fanout_opt(), FindMaxTransformations::FindMaxTransformations(), FixCharacterization::FixCharacterization(), FixStructsPassedByValue::FixStructsPassedByValue(), FixVdef::FixVdef(), FrontendFlowStep::FrontendFlowStep(), fsm_controller::fsm_controller(), FSM_NI_SSA_liveness::FSM_NI_SSA_liveness(), fu_binding_cs::fu_binding_cs(), fun_dominator_allocation::fun_dominator_allocation(), FunctionCallOpt::FunctionCallOpt(), FunctionCallTypeCleanup::FunctionCallTypeCleanup(), FunctionFrontendFlowStep::FunctionFrontendFlowStep(), GenerateFuList::GenerateFuList(), GenerateSimulationScripts::GenerateSimulationScripts(), GenerateSynthesisScripts::GenerateSynthesisScripts(), HDLFunctionDeclFix::HDLFunctionDeclFix(), HDLVarDeclFix::HDLVarDeclFix(), hls_div_cg_ext::hls_div_cg_ext(), HLSCWriter::HLSCWriter(), HLSFlowStepFactory::HLSFlowStepFactory(), HLSFunctionBitValue::HLSFunctionBitValue(), HostProfiling::HostProfiling(), HWCallInjection::HWCallInjection(), HWDiscrepancyAnalysis::HWDiscrepancyAnalysis(), InstructionWriter::InstructionWriter(), InterfaceInfer::InterfaceInfer(), IR_lowering::IR_lowering(), LoadFileTechnology::LoadFileTechnology(), LoadTechnology::LoadTechnology(), loops_computation::loops_computation(), LoopsAnalysisBambu::LoopsAnalysisBambu(), lut_transformation::lut_transformation(), mem_dominator_allocation::mem_dominator_allocation(), mem_dominator_allocation_cs::mem_dominator_allocation_cs(), memory_allocation::memory_allocation(), MemoryInitializationCWriter::MemoryInitializationCWriter(), MemoryInitializationWriter::MemoryInitializationWriter(), multi_way_if::multi_way_if(), MultipleEntryIfReduction::MultipleEntryIfReduction(), mux_connection_binding::mux_connection_binding(), NanoXploreBackendFlow::NanoXploreBackendFlow(), NI_SSA_liveness::NI_SSA_liveness(), OmpAllocation::OmpAllocation(), OmpFunctionAllocation::OmpFunctionAllocation(), OmpFunctionAllocationCS::OmpFunctionAllocationCS(), op_feedback_edges_computation::op_feedback_edges_computation(), OpCdgComputation::OpCdgComputation(), operations_cfg_computation::operations_cfg_computation(), OpOrderComputation::OpOrderComputation(), OpReachabilityComputation::OpReachabilityComputation(), ParallelMemoryFuBinding::ParallelMemoryFuBinding(), parametric_list_based::parametric_list_based(), parm2ssa::parm2ssa(), parm_decl_taken_address_fix::parm_decl_taken_address_fix(), PhiOpt::PhiOpt(), pipeline_controller::pipeline_controller(), port_swapping::port_swapping(), PragmaAnalysis::PragmaAnalysis(), PragmaSubstitution::PragmaSubstitution(), PredicateStatements::PredicateStatements(), rebuild_initialization::rebuild_initialization(), rebuild_initialization2::rebuild_initialization2(), Factory< Base, Args >::Registrar< T >::RegisterType(), remove_clobber_ga::remove_clobber_ga(), RemoveEndingIf::RemoveEndingIf(), RTLCharacterization::RTLCharacterization(), ScalarSsaDataDependenceComputation::ScalarSsaDataDependenceComputation(), sched_based_chaining_computation::sched_based_chaining_computation(), SDCCodeMotion::SDCCodeMotion(), SDCScheduling::SDCScheduling(), SerializeMutualExclusions::SerializeMutualExclusions(), short_circuit_taf::short_circuit_taf(), simple_code_motion::simple_code_motion(), SimulationEvaluation::SimulationEvaluation(), soft_float_cg_ext::soft_float_cg_ext(), SplitReturn::SplitReturn(), string_cst_fix::string_cst_fix(), SwitchFix::SwitchFix(), SymbolicApplicationFrontendFlowStep::SymbolicApplicationFrontendFlowStep(), system_verilog_writer::system_verilog_writer(), TasteInterfaceGeneration::TasteInterfaceGeneration(), technology_manager::technology_manager(), TestbenchGeneration::TestbenchGeneration(), TestVectorParser::TestVectorParser(), top_entity::top_entity(), top_entity_cs::top_entity_cs(), top_entity_parallel_cs::top_entity_parallel_cs(), TopEntityMemoryMapped::TopEntityMemoryMapped(), UnComparisonLowering::UnComparisonLowering(), UpdateSchedule::UpdateSchedule(), use_counting::use_counting(), VarComputation::VarComputation(), VarDeclFix::VarDeclFix(), vcd_utility::vcd_utility(), VcdSignalSelection::VcdSignalSelection(), Vectorize::Vectorize(), verilog_writer::verilog_writer(), VHDL_writer::VHDL_writer(), virtual_hls::virtual_hls(), virtual_phi_nodes_split::virtual_phi_nodes_split(), VirtualAggregateDataFlowAnalysis::VirtualAggregateDataFlowAnalysis(), XilinxBackendFlow::XilinxBackendFlow(), XilinxTasteBackendFlow::XilinxTasteBackendFlow(), functional_unit::xload(), and xst_wrapper::xst_wrapper().

◆ STR

#define STR (   s)    boost::lexical_cast<std::string>(s)

Macro which performs a lexical_cast to a string.

Definition at line 52 of file string_manipulation.hpp.

Referenced by __arg_suffix(), tree_helper::AccessedMaximumBitsize(), BasicBlocksGraphConstructor::add_bb_edge_info(), conn_binding::add_command_ports(), ASLAP::add_constraints_to_ALAP(), top_entity_cs::add_context_switch_port(), top_entity_cs::add_context_switch_port_kernel(), mux_connection_binding::add_conversion(), conn_binding::add_datapath_connection(), coloring_based_clique_covering< vertex_type >::add_edge(), memory::add_external_symbol(), flopoco_wrapper::add_FU(), dead_code_elimination::add_gimple_nop(), top_entity_cs::add_input_register(), memory::add_internal_symbol(), conn_binding_creator::add_parameter_ports(), memory::add_parameter_symbol(), datapath_cs::add_ports(), top_entity::add_ports(), classic_datapath::add_ports(), datapath_parallel_cs::add_ports(), controller_cs::add_selector_register_file_port(), conn_binding::add_sparse_logic_dp(), allocation::add_tech_constraint(), ParallelMemoryFuBinding::add_to_SM(), reg_binding::add_to_SM(), fu_binding::add_to_SM(), conn_binding::add_to_SM(), vcd_parser::add_variation(), pragma_manager::addBlackBoxPragma(), CallGraphManager::AddCallPoint(), module_interface::AddConnection(), conn_binding::AddConnectionCB(), SDCScheduling::AddDelayConstraints(), CallGraphManager::AddFunction(), Vectorize::AddGuards(), pragma_manager::AddOmpSimdPragma(), operations_graph_constructor::AddOperation(), OmpAllocation::AddPandaPthreadMutex(), module_interface::AddSignal(), SDCScheduling::AddStageConstraints(), tree_manager::AddTreeNode(), ssa_name::AddUseStmt(), vcd_trace_head::advance(), TopEntityMemoryMapped::allocate_parameters(), memory_allocation::allocate_parameters(), tree_helper::AllocatedMemorySize(), determine_memory_accesses::analyze_node(), RTLCharacterization::AnalyzeCell(), FunctionalUnitStep::AnalyzeFu(), CBackend::AnalyzeInclude(), PhiOpt::ApplyDiffNothing(), PhiOpt::ApplyGimpleNothing(), PhiOpt::ApplyIfMerge(), PhiOpt::ApplyIfNothing(), PhiOpt::ApplyIfRemove(), PhiOpt::ApplyMultiMerge(), PhiOpt::ApplyMultiNothing(), PhiOpt::ApplyMultiRemove(), IR_lowering::array_ref_lowering(), Bit_Value::backward(), Bit_Value::backward_chain(), Bit_Value::backward_transfer(), tree_manipulation::bb_add_stmt(), tree_manipulation::bb_remove_predecessor(), tree_manipulation::bb_remove_successor(), fu_binding::bind(), conn_binding::bind_selector_port(), build_bus_interface(), operations_cfg_computation::build_operation_recursive(), WB4_interface::build_WB4_bus_interface(), WB4_interface::build_WB4_complete_logic(), minimal_interface::build_wrapper(), HWCallInjection::buildBuiltinCall(), buildCircuit(), allocation::BuildProxyWrapper(), CallGraphBuiltinCall::buildTypeToDeclaration(), CallGraphManager::call_graph_computation_recursive(), AllocationInformation::CanBeChained(), AllocationInformation::CanBeMerged(), Schedule::CanBeMoved(), BehavioralHelper::CanBeMoved(), BehavioralHelper::CanBeSpeculated(), cannot_have_struct_parameters(), ssa_name::CGetDefStmt(), application_manager::CGetFunctionBehavior(), tree_helper::CGetPointedType(), tree_manager::CGetTreeNode(), tree_manager::CGetTreeReindex(), PhiOpt::ChainOptimization(), InterfaceInfer::ChasePointerInterfaceRecurse(), HLS_manager::check_bitwidth(), tree_manager::check_for_decl(), tree_manager::check_for_type(), short_circuit_taf::check_merging_candidate(), allocation::check_templated_units(), pragma_manager::CheckAddOmpFor(), pragma_manager::CheckAddOmpSimd(), MemoryInitializationWriterBase::CheckEnd(), simple_code_motion::CheckMovable(), SpiderParameter::CheckParameters(), BambuParameter::CheckParameters(), EucalyptusParameter::CheckParameters(), CompilerWrapper::clang_recipes(), Vectorize::ClassifyLoop(), Vectorize::ClassifyTreeNode(), tree_manager::collapse_into(), Translator::LatexColumnFormat::Compare(), CompilerWrapper::CompileFile(), ASLAP::compute_ALAP_fast(), ASLAP::compute_ASAP(), reg_binding::compute_bitsize(), BB_based_stg::compute_EPP_edge_increments(), parametric_list_based::compute_exec_stage_time(), vcd_utility::compute_fsm_state_from_vcd_string(), parametric_list_based::compute_starting_ending_time_asap(), CreateAddressTranslation::ComputeAddress(), NonDeterministicFlows::ComputeArgString(), FindMaxTransformations::ComputeArgString(), Schedule::ComputeCriticalPath(), AllocationInformation::ComputeDrivenCondExpr(), AllocationInformation::ComputeRoots(), DesignFlow::ComputeSignature(), ApplicationFrontendFlowStep::ComputeSignature(), SymbolicApplicationFrontendFlowStep::ComputeSignature(), ParserFlowStep::ComputeSignature(), AuxDesignFlowStep::ComputeSignature(), HLSFunctionStep::ComputeSignature(), TechnologyFlowStep::ComputeSignature(), FunctionFrontendFlowStep::ComputeSignature(), tree_helper::ComputeSsaUses(), top_entity_parallel_cs::connect_loop_iter(), datapath_parallel_cs::connect_module_kernel(), top_entity_parallel_cs::connect_port_parallel(), fu_binding_cs::connect_selector(), fu_binding_cs::connect_selector_kernel(), operations_cfg_computation::connect_start_nodes(), mux_connection_binding::connect_to_registers(), conn_binding_cs::connectOutOr(), BitLatticeManipulator::constructor_bitstring(), constructor_range(), convert_fp_to_bits(), convert_fp_to_string(), convertUsesToDFSOrdered(), port_o::copy(), tree_manipulation::create_basic_block(), tree_manipulation::create_binary_operation(), mux_connection_binding::create_connections(), create_control_flow_checker(), tree_manipulation::create_extract_bit_expr(), tree_manipulation::create_function_decl(), tree_manipulation::create_gimple_call(), short_circuit_taf::create_gimple_cond(), tree_manipulation::create_gimple_cond(), tree_manipulation::create_gimple_modify_stmt(), tree_manipulation::create_gimple_return(), tree_manipulation::create_goto(), tree_manipulation::create_identifier_node(), tree_manipulation::create_label(), tree_manipulation::create_lut_expr(), PragmaAnalysis::create_map_pragma(), CWriter::create_new_identifier(), PragmaAnalysis::create_omp_pragma(), tree_manipulation::create_parm_decl(), tree_manipulation::create_phi_node(), tree_manipulation::create_quaternary_operation(), InterfaceInfer::create_resource_array(), tree_manipulation::create_result_decl(), mux_connection_binding::create_single_conn(), tree_manipulation::create_ssa_name(), fsm_controller::create_state_machine(), tree_manipulation::create_ternary_operation(), tree_manipulation::create_translation_unit_decl(), tree_node_factory::create_tree_node(), tree_manager::create_tree_node(), tree_manipulation::create_unary_operation(), tree_manager::create_unique_const(), tree_manipulation::create_var_decl(), tree_manipulation::CreateAddrExpr(), tree_manipulation::CreateAndExpr(), tree_manipulation::CreateCallExpr(), create_tree_manager::createCostTable(), tree_manipulation::CreateEqExpr(), tree_manipulation::CreateIntegerCst(), tree_manipulation::CreateNopExpr(), tree_manipulation::CreateNotExpr(), tree_manipulation::CreateOrExpr(), BackendFlow::CreateScripts(), tree_manager::CreateUniqueIntegerCst(), tree_manipulation::CreateUnsigned(), tree_manipulation::CreateVectorBooleanType(), Meet::crop(), VcdSignalSelection::CrossPropagateAddrSsa(), soft_float_cg_ext::cstCast(), CWriter::DeclareFunctionTypes(), DiscrepancyAnalysisCWriter::DeclareLocalVariables(), CWriter::DeclareLocalVariables(), CWriter::DeclareType(), CWriter::DeclareVariable(), vcd_utility::detect_address_mismatch(), vcd_utility::detect_binary_double_mismatch(), vcd_utility::detect_binary_float_mismatch(), vcd_utility::detect_fixed_address_mismatch(), FunctionCallOpt::detect_loops(), vcd_utility::detect_mismatch(), vcd_utility::detect_mismatch_element(), vcd_utility::detect_mismatch_simple(), vcd_utility::detect_regular_mismatch(), Loops::DetectIrreducibleLoop(), mux_connection_binding::determine_connection(), HWCallPathCalculator::discover_vertex(), djgraph_dfs_tree_visitor::discover_vertex(), DiscrepancyAnalysisCWriter::DiscrepancyAnalysisCWriter(), IR_lowering::division_by_a_constant(), DataDependenceComputation::do_dependence_reduction(), OrderedInstructions::dominates(), Vectorize::DuplicateIncrement(), encode_op_type_prec(), CWriter::EndFunctionBody(), tree_manager::erase_usage_info(), AllocationInformation::estimate_call_delay(), estimate_muxes(), AllocationInformation::estimate_muxNto1_delay(), AllocationInformation::EstimateControllerDelay(), BinaryOpNode::eval(), LoadOpNode::eval(), evaluateBranch(), Schedule::EvaluateCondsMerging(), Schedule::EvaluateMultiWayIfsMerging(), CallSitesCollectorVisitor::examine_edge(), HWCallPathCalculator::examine_edge(), HWDiscrepancyAnalysis::Exec(), OmpFunctionAllocation::Exec(), GenerateTasteHDLArchitecture::Exec(), TestVectorParser::Exec(), fun_dominator_allocation::Exec(), HDLFunctionDeclFix::Exec(), SynthesisEvaluation::Exec(), call_graph_computation::Exec(), LoadDefaultTechnology::Exec(), BitValueIPA::Exec(), dead_code_eliminationIPA::Exec(), FixCharacterization::Exec(), FindMaxTransformations::Exec(), Evaluation::Exec(), string_cst_fix::Exec(), vcd_utility::Exec(), PragmaAnalysis::Exec(), TestbenchGeneration::Exec(), CreateAddressTranslation::Exec(), InterfaceInfer::Exec(), DesignFlowManager::Exec(), VcdSignalSelection::Exec(), parametric_list_based::exec(), bipartite_matching_clique_covering< vertex_type >::exec(), FindMaxTransformations::ExecuteBambu(), NonDeterministicFlows::ExecuteTool(), IR_lowering::expand_MC(), tree_helper::extract_array_indexes(), AllocationInformation::extract_bambu_provided_name(), tree_manipulation::ExtractCondition(), memory_allocation::finalize_memory_allocation(), tree_helper::find_obj_type_ref_function(), RTLCharacterization::fix_muxes(), multi_way_if::FixCfg(), Meet::fixed(), FixedPointReinterpret(), Vectorize::FixPhis(), Bit_Value::forward(), Bit_Value::forward_transfer(), FunctionBehavior::FunctionBehavior(), soft_float_cg_ext::generate_interface(), ModuleGeneratorManager::GenerateHDL(), XilinxTasteBackendFlow::GenerateSynthesisScripts(), BackendFlow::GenerateSynthesisScripts(), tree_helper::get_array_dim_and_bitsize(), tree_helper::get_array_var(), AllocationInformation::get_attribute_of_fu_per_op(), BehavioralHelper::get_attributes(), memory::get_base_address(), PragmaAnalysis::get_call_parameter(), StorageValueInformation::get_compatibility_weight(), allocation::get_compliant_pipelined_unit(), AllocationInformation::get_correction_time(), Schedule::get_cstep(), Schedule::get_cstep_end(), AllocationInformation::get_execution_time(), operations_cfg_computation::get_first_node(), AllocationInformation::get_fu(), fsm_controller::get_guard_value(), tree_manager::get_implementation_node(), module::get_in_port(), tree_helper::get_integer_cst_value(), HDL_manager::get_mod_typename(), tree_helper::get_multi_way_if_pos(), tree_manager::get_next_vers(), Translator::get_normalization(), BehavioralHelper::get_operand_from_unary_expr(), BehavioralHelper::get_parameters(), tree_helper::get_pointed_type(), port_o::get_port(), signal_o::get_port(), AllocationInformation::get_prec(), memory::get_proxied_internal_variables(), functions::get_proxied_shared_functions(), memory::get_rangesize(), tree_helper::get_required_values(), signal_o::get_signal(), ModuleGeneratorManager::get_specialized_name(), AllocationInformation::get_string_name(), memory::get_symbol(), tree_manager::get_tree_node_const(), tree_helper::get_type_index(), tree_helper::get_type_name(), attribute::get_value_type_str(), MultipleEntryIfReduction::GetAreaCost(), tree_helper::GetArrayDimensions(), tree_helper::GetBaseVariable(), Schedule::GetBBEndingTime(), tree_manipulation::GetBitsizeType(), tree_manipulation::GetBooleanType(), vcd_utility::GetClockPeriod(), CompilerWrapper::GetCompiler(), AllocationInformation::GetCondExprTimeLatency(), AllocationInformation::GetConnectionTime(), tree_helper::GetConstValue(), tree_manipulation::GetCustomIntegerType(), ASLAP::GetCycleLatency(), AllocationInformation::GetCycleLatency(), Schedule::GetEndingTime(), application_manager::GetFunctionBehavior(), tree_manipulation::GetFunctionType(), AllocationInformation::GetFuType(), BehavioralHelper::GetInit(), FunctionFrontendFlowStep::GetName(), HLSFunctionStep::GetName(), AllocationInformation::GetNodeTypePrec(), BehavioralHelper::GetParameters(), tree_helper::GetParameterTypes(), AllocationInformation::GetPhiConnectionLatency(), tree_manipulation::GetPointerType(), Schedule::GetReadyTime(), WeightedCliqueRegisterBindingSpecialization::GetSignature(), CDFCModuleBindingSpecialization::GetSignature(), MemoryAllocationSpecialization::GetSignature(), tree_manipulation::GetSignedIntegerType(), tree_manipulation::GetSizeType(), Schedule::GetStartingTime(), AllocationInformation::GetStatementArea(), bash_flow_wrapper::getStringValue(), NanoXploreWrapper::getStringValue(), AlteraWrapper::getStringValue(), LatticeWrapper::getStringValue(), XilinxWrapper::getStringValue(), AllocationInformation::GetTimeLatency(), AllocationInformation::GetToDspRegisterDelay(), tree_manager::GetTreeNode(), tree_manager::GetTreeReindex(), tree_helper::GetTypeName(), tree_manipulation::GetUnsignedIntegerType(), tree_manipulation::GetUnsignedLongLongType(), CallGraphManager::GetVertex(), StateTransitionGraph::GetVertex(), tree_manipulation::GetVoidType(), AllocationInformation::GetZeroDistanceOperations(), GimpleWriter::GimpleWriter(), MemoryInitializationWriterBase::GoDown(), MemoryInitializationWriterBase::GoUp(), Meet::growth(), FunctionCallOpt::HasConstantArgs(), CSE::hash_check(), tree_helper::HasToBeDeclared(), PhiOpt::IdentifyPattern(), BitLatticeManipulator::inf(), BashBackendFlow::InitDesignParameters(), NanoXploreBackendFlow::InitDesignParameters(), XilinxBackendFlow::InitDesignParameters(), StorageValueInformation::Initialize(), SDCScheduling::Initialize(), FunctionCallOpt::Initialize(), Bit_Value::initialize(), Bit_Value::Initialize(), cdfc_module_binding::initialize_connection_relation(), AllocationInformation::InitializeMuxDB(), VcdSignalSelection::InitialPhiResIsAddress(), VcdSignalSelection::InitialSsaIsAddress(), tree_manipulation::InlineFunctionCall(), mux_connection_binding::input_logic(), tree_manager::insert_usage_info(), TopEntityMemoryMapped::insertMemoryMappedRegister(), fu_binding_cs::instantiate_component_kernel(), datapath_parallel_cs::instantiate_component_parallel(), cs_interface::instantiate_component_parallel(), conn_binding_cs::instantiate_suspension_component(), IntegerToBitArray(), allocation::IntegrateTechnologyLibraries(), FixStructsPassedByValue::InternalExec(), parm_decl_taken_address_fix::InternalExec(), TestbenchArrayModuleGenerator::InternalExec(), OpenModuleGenerator::InternalExec(), PrintfModuleGenerator::InternalExec(), OpenCSModuleGenerator::InternalExec(), OpenNModuleGenerator::InternalExec(), OpenP1NModuleGenerator::InternalExec(), PrintfCSModuleGenerator::InternalExec(), PrintfP1NModuleGenerator::InternalExec(), PrintfNModuleGenerator::InternalExec(), pipeline_controller::InternalExec(), HWCallInjection::InternalExec(), BB_based_stg::InternalExec(), FSM_NI_SSA_liveness::InternalExec(), SerializeMutualExclusions::InternalExec(), PredicateStatements::InternalExec(), UnComparisonLowering::InternalExec(), easy_module_binding::InternalExec(), SDCCodeMotion::InternalExec(), TasteInterfaceGeneration::InternalExec(), ExtractOmpFor::InternalExec(), AddArtificialCallFlowEdges::InternalExec(), BasicBlocksCfgComputation::InternalExec(), SwitchFix::InternalExec(), FixVdef::InternalExec(), UpdateSchedule::InternalExec(), extract_patterns::InternalExec(), LoopsAnalysisBambu::InternalExec(), AddOpPhiFlowEdges::InternalExec(), BuildVirtualPhi::InternalExec(), TopEntityMemoryMapped::InternalExec(), CallGraphBuiltinCall::InternalExec(), ControlFlowChecker::InternalExec(), mem_dominator_allocation::InternalExec(), AddBbEcfgEdges::InternalExec(), bb_feedback_edges_computation::InternalExec(), op_feedback_edges_computation::InternalExec(), eSSA::InternalExec(), fanout_opt::InternalExec(), rebuild_initialization::InternalExec(), NI_SSA_liveness::InternalExec(), SplitReturn::InternalExec(), compute_implicit_calls::InternalExec(), parm2ssa::InternalExec(), FunctionCallTypeCleanup::InternalExec(), hls_div_cg_ext::InternalExec(), add_library::InternalExec(), CondExprRestructuring::InternalExec(), commutative_expr_restructuring::InternalExec(), simple_code_motion::InternalExec(), datapath_parallel_cs::InternalExec(), short_circuit_taf::InternalExec(), dead_code_elimination::InternalExec(), CSE::InternalExec(), FunctionCallOpt::InternalExec(), multi_way_if::InternalExec(), MultipleEntryIfReduction::InternalExec(), operations_cfg_computation::InternalExec(), IR_lowering::InternalExec(), port_swapping::InternalExec(), mux_connection_binding::InternalExec(), Vectorize::InternalExec(), SDCScheduling::InternalExec(), PhiOpt::InternalExec(), soft_float_cg_ext::InternalExec(), allocation::InternalExec(), parametric_list_based::InternalExec(), cdfc_module_binding::InternalExec(), tree_helper::is_a_misaligned_vector(), is_exec(), is_large_integer(), BehavioralHelper::is_named_pointer(), memory::is_sds_var(), is_start(), tree_helper::IsAligned(), CallGraphManager::IsCallPoint(), tree_helper::IsPointerResolved(), tree_helper::IsPositiveIntegerValue(), fu_binding::join_merge_split(), fu_binding::kill_proxy_memory_units(), dead_code_elimination::kill_uses(), dead_code_elimination::kill_vdef(), XmlFlexLexer::LexerError(), rebuild_initialization2::look_for_ROMs(), CallGraphBuiltinCall::lookForBuiltinCall(), main(), Range::makeSatisfyingCmpRegion(), datapath_parallel_cs::manage_extern_global_port_parallel(), fu_binding::manage_killing_memory_proxies(), fu_binding::manage_memory_ports_parallel_chained(), functions::map_shared_function(), materializeStack(), verilog_writer::may_slice_string(), tree_manager::merge_tree_managers(), multi_way_if::MergeCondCond(), multi_way_if::MergeCondMulti(), multi_way_if::MergeMultiCond(), multi_way_if::MergeMultiMulti(), PhiOpt::MergePhi(), BitLatticeManipulator::mix(), dead_code_elimination::move2emptyBB(), AllocationInformation::mux_area_unit_raw(), conn_binding::mux_connection(), AllocationInformation::mux_time_unit_raw(), Meet::narrow(), tree_helper::op_symbol(), PhiOpNode::opCtorGenerator(), LoadOpNode::opCtorGenerator(), APInt::operator T(), operator"" _apint(), BBEdgeWriter::operator()(), resource_ordering_functor::operator()(), BBWriter::operator()(), Bit_Value_opt::optimize(), BB_based_stg::optimize_cycles(), flopoco_wrapper::outputPortDeclaration(), flopoco_wrapper::outputPortMap(), flopoco_wrapper::outputSignals(), flopoco_wrapper::outputWrapVHDL(), PandaSystem(), FunctionCallTypeCleanup::ParametersTypeCleanup(), vcd_parser::parse_vcd(), TestVectorParser::ParseXMLFile(), Bit_Value::pointer_resizing(), StateInfo::print(), RealRange::print(), Schedule::print(), structural_type_descriptor::print(), conn_binding::print(), operation::print(), AllocationInformation::print(), port_o::print(), AllocationInformation::print_allocated_resources(), Bit_Value::print_bitstring_map(), vcd_utility::print_discrepancy(), BasicBlocksProfilingCWriter::print_edge(), reg_binding::print_el(), vcd_utility::print_failed_vcd_head(), BehavioralHelper::print_forward_declaration(), StateTransitionGraphManager::print_statistics(), BehavioralHelper::print_type_declaration(), BehavioralHelper::PrintConstant(), BehavioralHelper::PrintInit(), BehavioralHelper::PrintNode(), hls::PrintResources(), MemoryInitializationWriterBase::PrintStatus(), FrontendFlowStep::PrintTreeManager(), tree_helper::PrintType(), BehavioralHelper::PrintVarDeclaration(), BehavioralHelper::PrintVariable(), PrintVirtualDataMemoryUsage(), MemoryInitializationCWriter::Process(), MemoryInitializationWriter::Process(), lut_transformation::ProcessBasicBlock(), processBranch(), processMultiWayIf(), Bit_Value_opt::propagateValue(), bloc::PushBefore(), Range::Range(), Translator::read_column_formats(), RealRange::RealRange(), parm2ssa::recursive_analysis(), string_cst_fix::recursive_analysis(), hls_div_cg_ext::recursive_examinate(), VarDeclFix::recursive_examinate(), CheckSystemType::recursive_examinate(), soft_float_cg_ext::RecursiveExaminate(), tree_helper::RecursiveGetTypesToBeDeclared(), DesignFlowManager::RecursivelyAddSteps(), VarComputation::RecursivelyAnalyze(), tree_manager::RecursiveReplaceTreeNode(), vertex_coloring_register::RegisterBinding(), chordal_coloring_register::RegisterBinding(), weighted_clique_register::RegisterBinding(), application_manager::RegisterTransformation(), CallGraphManager::RemoveCallPoint(), gimple_phi::RemoveDefEdge(), bloc::RemoveStmt(), ssa_name::RemoveUse(), eSSA::renameUses(), bloc::Replace(), compute_implicit_calls::replace_with_memcpy(), compute_implicit_calls::replace_with_memset(), tree_manager::ReplaceTreeNode(), soft_float_cg_ext::replaceWithCall(), top_entity_parallel_cs::resize_controller_parallel(), port_o::resize_std_port(), short_circuit_taf::restructure_CFG(), tree_helper::return_C_qualifiers(), tree_helper::return_qualifier_prefix(), VcdSignalSelection::SelectInternalSignals(), fu_binding_cs::set_atomic_memory_parameter(), functional_unit::set_clock_period(), functional_unit::set_clock_period_resource_fraction(), vcd_trace_head::set_consecutive_state_executions(), Parameter::setOption(), Vectorize::SetPredication(), application_manager::setSSAFromParm(), Range::shr(), soft_float_cg_ext::signature_lowering(), PhiOpt::SinglePhiOptimization(), VcdSignalSelection::SingleStepPropagateAddrSsa(), tree_helper::Size(), soft_float_cg_ext::soft_float_cg_ext(), fu_binding::specialise_fu(), conn_binding::specialise_mux(), reg_binding_cs::specialise_reg(), reg_binding::specialise_reg(), ModuleGeneratorManager::specialize_fu(), fu_binding::specialize_memory_unit(), soft_float_cg_ext::ssa_lowering(), structural_type_descriptor::structural_type_descriptor(), BitLatticeManipulator::sup(), Loops::tarjan_scc(), TernaryOpNode::TernaryOpNode(), bash_flow_wrapper::toString(), NanoXploreWrapper::toString(), AlteraWrapper::toString(), LatticeWrapper::toString(), XilinxWrapper::toString(), FunctionVersion::ToString(), Vectorize::Transform(), verilog_writer::type_converter_size(), VHDL_writer::type_converter_size(), structural_object::type_resize(), vcd_trace_head::unbounded_find_end_time(), Unfold(), NI_SSA_liveness::Up_and_Mark(), vcd_trace_head::update(), InterfaceInfer::interface_info::update(), library_manager::update(), cdfc_module_binding::update_slack_starting_time(), VarNode::updateIR(), Schedule::UpdateTime(), vcd_parser::vcd_parse_def(), vcd_parser::vcd_parse_sim(), vcd_parser::vcd_push_def_scope(), vcd_utility::vcd_utility(), VcdSignalSelection::VcdSignalSelection(), tree_manipulation::VersionFunctionCall(), virtual_phi_nodes_split::virtual_split_phi(), Nuutila::visit(), cdfc_module_binding::weight_computation(), Meet::widen(), HDL_manager::write_flopoco_module(), HDL_manager::write_fsm(), fu_binding::write_init(), verilog_writer::write_io_signal_post_fix(), VHDL_writer::write_module_parametrization(), verilog_writer::write_module_parametrization(), verilog_writer::write_module_parametrization_decl(), VHDL_writer::write_port_binding(), verilog_writer::write_port_binding(), verilog_writer::write_present_state_update(), VHDL_writer::write_signal_declaration(), verilog_writer::write_signal_declaration(), VHDL_writer::write_state_declaration(), verilog_writer::write_state_declaration(), Translator::write_to_latex(), VHDL_writer::write_transition_output_functions(), verilog_writer::write_transition_output_functions(), VHDL_writer::write_vector_port_binding(), verilog_writer::write_vector_port_binding(), FunctionFrontendFlowStep::WriteBBGraphDot(), DiscrepancyAnalysisCWriter::WriteBBHeader(), VHDL_writer::WriteBuiltin(), verilog_writer::WriteBuiltin(), CWriter::WriteBuiltinWaitCall(), Loops::WriteDot(), DiscrepancyAnalysisCWriter::WriteExtraInitCode(), BasicBlocksProfilingCWriter::WriteGlobalDeclarations(), CWriter::WriteGlobalDeclarations(), CBackend::writeIncludes(), DesignFlowManager::WriteLoopDot(), HLSCWriter::WriteMainTestbench(), DiscrepancyAnalysisCWriter::WriteMainTestbench(), HLSCWriter::WriteParamInitialization(), DiscrepancyAnalysisCWriter::writePostInstructionInfo(), DiscrepancyAnalysisCWriter::writePreInstructionInfo(), CWriter::writeRoutineInstructions(), EdgeCWriter::writeRoutineInstructions_rec(), CWriter::writeRoutineInstructions_rec(), HLSCWriter::WriteSimulatorInitMemory(), CompilerWrapper::WriteXml(), technology_manager::xload(), operation::xwrite(), structural_object::xwrite(), functional_unit::xwrite(), memory::xwrite(), and RTLCharacterization::xwrite_characterization().

Function Documentation

◆ ac_type_bitwidth()

unsigned long long ac_type_bitwidth ( const std::string &  intType,
bool is_signed,
bool is_fixed 
)

Definition at line 535 of file string_manipulation.cpp.

References AC_GROUP_SIGN, AC_GROUP_T, AC_GROUP_U, AC_GROUP_W, and ac_type_def().

Referenced by ConvertInBinary(), and InterfaceInfer::interface_info::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_escape()

void add_escape ( std::string &  ioString,
const std::string &  to_be_escaped 
)

Function which adds escape to selected characters.

Parameters
ioStringis the string to be escaped
to_be_escapedis the list of characters to be escaped

Function which adds escape to selected characters.

Definition at line 52 of file string_manipulation.cpp.

Referenced by FunctionWriter::operator()(), and Translator::write_to_latex().

Here is the caller graph for this function:

◆ capitalize() [1/2]

std::string capitalize ( const std::string &  str)

Definition at line 151 of file string_manipulation.cpp.

References capitalize().

Referenced by capitalize(), and TestbenchGeneration::Exec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ capitalize() [2/2]

std::string& capitalize ( std::string &  str)

Definition at line 157 of file string_manipulation.cpp.

References fixed_def(), and str.

Here is the call graph for this function:

◆ convert_fp_to_bits()

unsigned long long convert_fp_to_bits ( std::string  num,
unsigned long long  precision 
)

convert a real number stored in a string into bits with a given precision

Definition at line 462 of file string_manipulation.cpp.

References ac_type_def(), and STR.

Referenced by NumberToBinaryString(), and soft_float_cg_ext::RecursiveExaminate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert_fp_to_string()

std::string convert_fp_to_string ( std::string  num,
unsigned long long  precision 
)

convert a real number stored in a string into a string of bits with a given precision

Definition at line 384 of file string_manipulation.cpp.

References STR, and U.

Referenced by BitLatticeManipulator::constructor_bitstring(), ConvertInBinary(), HLS_manager::get_constant_string(), NumberToBinaryString(), and fu_binding::write_init().

Here is the caller graph for this function:

◆ ConvertInBinary()

std::string ConvertInBinary ( const std::string &  C_value,
unsigned long long  precision,
const bool  real_type,
bool  unsigned_type 
)

Convert a string storing a number in decimal format into a string in binary format.

Parameters
C_valueis the decimal format
precisionis the precision of the number
real_typeis true if the type of the number is real
unsigned_typeis true if the type of the number is unsigned

Definition at line 169 of file string_manipulation.cpp.

References ac_type_bitwidth(), convert_fp_to_string(), FD_GROUP_D, FD_GROUP_SIGN, FD_GROUP_U, FD_GROUP_W, fixed_def(), fixp_val(), THROW_ASSERT, and THROW_ERROR.

Referenced by MemoryInitializationCWriter::Process(), and MemoryInitializationWriter::Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxa_demangle()

std::string cxa_demangle ( const std::string &  input)

Definition at line 109 of file string_manipulation.cpp.

Referenced by InterfaceInfer::ChasePointerInterfaceRecurse(), InterfaceInfer::Exec(), and tree_manager::GetFunction().

Here is the caller graph for this function:

◆ cxa_prefix_mangled()

std::string cxa_prefix_mangled ( const std::string &  signature,
const std::string &  prefix 
)

Definition at line 134 of file string_manipulation.cpp.

References distance().

Referenced by SimulationTool::GenerateLibraryBuildScript(), and HLSCWriter::WriteMainTestbench().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cxa_rename_mangled()

std::string cxa_rename_mangled ( const std::string &  signature,
const std::string &  new_fname 
)

Definition at line 116 of file string_manipulation.cpp.

References distance().

Here is the call graph for this function:

◆ ends_with()

bool ends_with ( const std::string &  str,
const std::string &  pattern 
)
inline

◆ FixedPointReinterpret()

std::string FixedPointReinterpret ( const std::string &  FP_vector,
const std::string &  fp_typename 
)

Definition at line 339 of file string_manipulation.cpp.

References FD_GROUP_D, FD_GROUP_W, fixed_def(), fixp_val(), STR, and THROW_ASSERT.

Here is the call graph for this function:

◆ NumberToBinaryString()

template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
std::string NumberToBinaryString ( const T  number,
const size_t  precision = 0 
)
inline

Function which print number in binary format.

Parameters
numberis the number to be printed
precisionis the minimum number of digits to be printed

Definition at line 138 of file string_manipulation.hpp.

References convert_fp_to_bits(), and convert_fp_to_string().

Referenced by fu_binding::add_to_SM(), HWDiscrepancyAnalysis::Exec(), VHDL_writer::write_module_parametrization_decl(), VHDL_writer::write_state_declaration(), and VHDL_writer::write_transition_output_functions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NumberToString() [1/2]

template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
std::string NumberToString ( const T  number,
const size_t  precision,
const size_t  size 
)
inline

Function with print number in desired format.

Parameters
numberis the number to be printed
precisionis the precision
sizeis the size of the string

Definition at line 106 of file string_manipulation.hpp.

References test_panda::type, and symmetry::value.

Referenced by StateInfo::print(), and Schedule::PrintTimingInformation().

Here is the caller graph for this function:

◆ NumberToString() [2/2]

template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
std::string NumberToString ( const T  number,
const size_t  precision 
)
inline

Function with print number in desired format.

Parameters
numberis the number to be printed
precisionis the precision

Definition at line 123 of file string_manipulation.hpp.

References test_panda::type, and symmetry::value.

◆ remove_escaped()

void remove_escaped ( std::string &  ioString)

Function converting all the escaped characters in the associated character.

Parameters
ioStringis the string where the escaped character are changed

Definition at line 68 of file string_manipulation.cpp.

Referenced by bash_flow_wrapper::generate_synthesis_script(), NanoXploreWrapper::generate_synthesis_script(), QuartusPowerWrapper::generate_synthesis_script(), LatticeWrapper::generate_synthesis_script(), AlteraWrapper::generate_synthesis_script(), and XilinxWrapper::generate_synthesis_script().

Here is the caller graph for this function:

◆ SplitString()

const std::vector<std::string> SplitString ( const std::string &  input,
const std::string &  separators 
)

Function which splits a string into tokens.

Parameters
inputis the string to be split
separatorsis the set of characters to be used to compute the tokens
Returns
the identified tokens

Definition at line 366 of file string_manipulation.cpp.

References input.

Referenced by structural_manager::add_port(), FunctionalUnitStep::AnalyzeFu(), xml_child::CGetDescendants(), BambuParameter::CheckParameters(), EucalyptusParameter::CheckParameters(), RTLCharacterization::ComputeCells(), RTLCharacterization::ComputeComponent(), create_tree_manager::createCostTable(), DECODE_FU_LIB(), SimulationTool::DetermineCycles(), BasicBlocksProfiling::Exec(), fun_dominator_allocation::Exec(), FixCharacterization::Exec(), SpiderParameter::Exec(), BambuParameter::Exec(), pragma_manager::ExtractClauses(), FunctionBehavior::FunctionBehavior(), GenerateFuList::GenerateFuList(), allocation::get_compliant_pipelined_unit(), NP_functionality::get_port_list(), CompilerWrapper::GetSystemIncludes(), tree_helper::HasToBeDeclared(), FunctionalUnitStep::Initialize(), FunctionCallOpt::Initialize(), AllocationInformation::InitializeDSPDB(), AllocationInformation::InitializeMuxDB(), HWCallInjection::InternalExec(), Parameter::ManageDefaultOptions(), TestVectorParser::ParseUserString(), tree_helper::PrintType(), Translator::read_column_formats(), PragmaParser::recognize_call_point_hw_pragma(), soft_float_cg_ext::soft_float_cg_ext(), TrimSpaces(), HDL_manager::write_behavioral(), HDL_manager::write_fsm(), operation::xload(), and module::xload().

Here is the caller graph for this function:

◆ starts_with()

bool starts_with ( const std::string &  str,
const std::string &  pattern 
)
inline

◆ TrimSpaces()

std::string TrimSpaces ( const std::string &  value)

Definition at line 90 of file string_manipulation.cpp.

References SplitString().

Referenced by BambuParameter::Exec().

Here is the call graph for this function:
Here is the caller graph for this function:

Generated on Mon Feb 12 2024 13:03:35 for PandA-2024.02 by doxygen 1.8.13