57 const DesignFlowManagerConstRef _design_flow_manager)
71 for(boost::tie(operation, operation_end) = boost::vertices(*op_graph); operation != operation_end; operation++)
74 if(current_op ==
"panda_pthread_mutex")
87 const auto TreeM =
HLSMgr->get_tree_manager();
89 std::string fu_name =
"panda_pthread_mutex";
90 std::string op_name =
"panda_pthread_mutex";
95 GetPointer<module>(
top)->set_description(
"Implementation of panda_pthread_mutex");
96 GetPointer<module>(
top)->set_copyright(
"Copyright (C) 2012-2024 Politecnico di Milano");
97 GetPointer<module>(
top)->set_authors(
"Marco Lattuada marco.lattuada@polimi.it");
98 GetPointer<module>(
top)->set_license(
"PANDA_GPLv3");
104 auto* fu = GetPointer<functional_unit>(tn);
105 auto op = GetPointer<operation>(fu->get_operation(op_name));
111 const auto behavioral_helper =
112 HLSMgr->CGetFunctionBehavior(TreeM->GetFunction(
"panda_pthread_mutex")->index)->CGetBehavioralHelper();
113 size_t parameter_index = 0;
114 const auto function_parameters = behavioral_helper->get_parameters();
115 THROW_ASSERT(function_parameters.size() == 2,
STR(function_parameters.size()));
116 for(
const auto function_parameter : function_parameters)
119 parameter_index == 0 ?
"mutex" :
"locking", port_o::IN,
top,
124 for(
const auto function_parameter : function_parameters)
127 parameter_index == 0 ?
"out_mutex" :
"out_locking", port_o::OUT,
top,
const HLS_managerRef HLSMgr
information about all the HLS synthesis
Data structure representing the entire HLS information.
void * top(node_stack *head)
Collect information about resource area.
refcount< structural_type_descriptor > structural_type_descriptorRef
RefCount type definition of the structural_type_descriptor class structure.
technology_nodeRef get_fu(const std::string &fu_name, const std::string &Library) const
Return the reference to a component given its name.
Structure representing the most relevant information about the type of a structural object...
#define GET_CLASS(obj)
Macro returning the actual type of an object.
const structural_objectRef get_circ() const
Get a reference to circ field.
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
This class manages the circuit structures.
#define OPENMP_LIBRARY
OpenMP library.
Collect information about resource performance.
Class specification of the manager of the technology library data structures.
technology_nodeRef add_operation(const std::string &Library, const std::string &fu_name, const std::string &operation_name)
Add an operation to the specified functional unit.
~OmpAllocation() override
Destructor.
#define STR(s)
Macro which performs a lexical_cast to a string.
const OpNodeInfoConstRef CGetOpNodeInfo(const vertex node) const
Returns the info associated with a node.
static void add_NP_functionality(structural_objectRef cir, NP_functionality::NP_functionaly_type dt, std::string functionality_description)
Add a not-parsed functionality.
This class specifies the characteristic of a particular operation working on a given functional unit...
void set_top_info(const std::string &id, const technology_managerRef &LM, const std::string &Library="")
Class specification of the data structures used to manage technology information. ...
static structural_objectRef add_port(const std::string &id, port_o::port_direction pdir, structural_objectRef owner, structural_type_descriptorRef type_descr, unsigned int treenode=0)
Create a new port.
boost::graph_traits< graph >::vertex_iterator VertexIterator
vertex_iterator definition.
static std::string NormalizeTypename(const std::string &id)
Return normalized name of types and variables.
const ParameterConstRef parameters
Set of input parameters.
void IntegrateTechnologyLibraries() override
Integrate technology libraries with special functional units.
This file collects some utility functions and macros.
This wrapper collects all the methods used by the High-level synthesis classes to retrieve informatio...
refcount< structural_manager > structural_managerRef
RefCount type definition of the structural_manager class structure.
This file collects some utility functions.
technology_managerRef TechM
The technology manager.
static area_infoRef factory(const ParameterConstRef &Param)
Factory method.
OmpAllocation(const ParameterConstRef Param, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager)
Constructor.
void AddPandaPthreadMutex()
Add the module implementing panda_pthread_mutex.
const OpGraphConstRef CGetOpGraph(FunctionBehavior::graph_type gt) const
This method returns the operation graphs.
Data structures used in operations graph.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
virtual void IntegrateTechnologyLibraries()
Integrate technology libraries with special functional units.
this class is used to manage the command-line or XML options.
Class implementation of the structural_manager.
int debug_level
The debug level.
This package is used by all HLS packages to manage resource constraints and characteristics.
static time_infoRef factory(const ParameterConstRef Param)
Class specification of the manager of the tree structures extracted from the raw file.
HLS specialization of generic_device.
A brief description of the C++ Header File.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...