42 #ifndef CDFC_MODULE_BINDING_HPP 43 #define CDFC_MODULE_BINDING_HPP 68 struct spec_hierarchical_clustering;
98 template <
typename Graph>
121 return support->find(v) != support->end();
131 template <
typename Graph>
157 template <
typename Edge>
160 return selector & (*g)[e].selector;
199 using boost_cdfc_graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS,
206 using cdfc_graph = boost::filtered_graph<boost_cdfc_graph, cdfc_graph_edge_selector<boost_cdfc_graph>,
213 using cdfc_vertex = boost::graph_traits<cdfc_graph>::vertex_descriptor;
221 using cdfc_edge = boost::graph_traits<cdfc_graph>::edge_descriptor;
282 THROW_ASSERT(not ExistsEdge(source, target),
"Trying to add an already existing edge");
295 if(ExistsEdge(source, target))
297 return AddSelector(source, target, selector);
348 void WriteDot(
const std::string& file_name,
const int detail_level = 0)
const;
385 std::deque<cdfc_edge>& candidate_edges);
388 std::deque<cdfc_edge>& candidate_edges, std::vector<bool>& visited,
389 std::vector<bool>& cg_visited, std::vector<bool>& cdfc_visited);
392 std::deque<cdfc_edge>& candidate_edges, std::vector<bool>& visited,
393 std::vector<bool>& cg_visited, std::vector<bool>& cdfc_visited);
397 int weight_computation(
bool cond1,
bool cond2,
vertex v1,
vertex v2,
const double mux_time,
402 spec_hierarchical_clustering& hc,
409 bool only_backward,
bool only_forward);
413 static const int CD_EDGE = 1;
414 static const int COMPATIBILITY_EDGE = 2;
425 const DesignFlowManagerConstRef design_flow_manager,
The info associated with a cdfc graph.
bool operator()(const Edge &e) const
edge selector operator
Base class storing user data information to the whole graph.
boost::graph_traits< cdfc_graph >::in_edge_iterator cdfc_in_edge_iterator
in_edge_iterator definition.
Predicate functor object used to select the proper set of edges.
Class specification of the graph structures.
const EdgeInfoConstRef CGetEdgeInfo(typename boost::graph_traits< graphs_collection >::vertex_descriptor source, typename boost::graph_traits< graphs_collection >::vertex_descriptor target) const
Get the edge property.
CliqueCovering_Algorithm
Defines all clique covering algorithm.
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMapUnstable
cdfc_graph_edge_selector()
all edges selector
CustomUnorderedMap< vertex, std::vector< CustomOrderedSet< std::pair< conn_code, std::pair< unsigned int, vertex > >> >> connection_relation
put into relation an operation vertex with its sources op vertex -> vector of port index -> set of pa...
redefinition of map to manage ordered/unordered structures
A set of operation vertices.
boost::filtered_graph< boost_cdfc_graph, cdfc_graph_edge_selector< boost_cdfc_graph >, cdfc_graph_vertex_selector< boost_cdfc_graph > > cdfc_graph
compatibility graph
const CdfcEdgeInfoConstRef CGetCdfcEdgeInfo(const EdgeDescriptor e) const
Returns the info associated with an edge.
conn_code
connection code can be no_def - source is not defined because is a parameter or a constan value in th...
std::string GetSignature() const override
Return the contribution to the signature of a step given by the specialization.
typename boost::graph_traits< Graph >::vertex_descriptor vertex_descriptor
CustomUnorderedMap< vertex, bool > can_be_clustered_table
record if a vertex has to be clustered or not
REF_FORWARD_DECL(fu_binding)
Abstract class containing information about specialization of the single steps.
EdgeDescriptor AddEdge(const vertex source, const vertex target, const int selector)
Add an edge with empty information associated.
Cdfc collection of graphs.
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMap
Class managing the module allocation.
static const uint32_t k[]
bool operator()(const vertex_descriptor &v) const
selector operator
cdfc_graph_vertex_selector(const SET_container *_support)
constructor
int selector
The selector associated with the edge.
std::string GetKindText() const override
Return the string representation of this.
refcount< EdgeInfo > EdgeInfoRef
RefCount type definition of the edge_info class structure.
edge_cdfc_selector(int _selector, int _weight)
Constructor with selector.
const CliqueCovering_Algorithm clique_covering_algorithm
The cdfc module binding algorithm.
redefinition of set to manage ordered/unordered structures
const CustomUnorderedMap< vertex, vertex > & c2s
const OpGraphConstRef operation_graph
The operation graph associated with the cdfc graph.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
edge_cdfc_selector()
default constructor
General class used to describe a graph in PandA.
CONSTREF_FORWARD_DECL(AllocationInformation)
STD include.
DesignFlowStep_Status
The status of a step.
Base class storing user data information.
Base class for all module binding algorithms.
edge_cdfc_selector(int _selector)
Constructor with selector only.
const double small_normalized_resource_area
Threshold used in sharing of functional units.
boost::graph_traits< cdfc_graph >::edge_descriptor cdfc_edge
edge definition.
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, boost::property< boost::vertex_index_t, std::size_t >, edge_cdfc_selector > boost_cdfc_graph
bulk compatibility graph
boost::graph_traits< cdfc_graph >::edge_iterator cdfc_edge_iterator
edge_iterator definition.
cdfc_graph_vertex_selector()
constructor
CDFCModuleBindingSpecialization(const CliqueCovering_Algorithm clique_covering_algorithm)
Constructor.
EdgeDescriptor AddEdge(const vertex source, const vertex target, const int selector, const int weight)
Add an edge with a weight.
const SET_container * support
Predicate functor object used to select the proper set of vertices.
This file collects some hash functors.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
int selector
The selector associated with the filtered graph.
Class managing the functional-unit binding.
boost::graph_traits< cdfc_graph >::vertex_descriptor cdfc_vertex
vertex definition
Class used to describe a particular graph with operations as nodes.
CustomUnorderedMapUnstable< std::pair< vertex, unsigned int >, bool > is_complex
cdfc_graph_edge_selector(const int _selector, Graph *_g)
Constructor for filtering only on selector.
boost::graph_traits< cdfc_graph >::out_edge_iterator cdfc_out_edge_iterator
out_edge_iterator definition.
Generic class managing module binding algorithms.
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...