UGRAMM
Loading...
Searching...
No Matches
routing.h
Go to the documentation of this file.
1//===================================================================//
2// Universal GRAaph Minor Mapping (UGRAMM) method for CGRA //
3// file : routing.h //
4// description: contains variables and function declaration related //
5// to routing. //
6//===================================================================//
7
8#ifndef ROUTING_H
9#define ROUTING_H
10
11#include <boost/config.hpp>
12#include <iostream>
13#include <fstream>
14#include <boost/graph/graph_traits.hpp>
15#include <boost/graph/adjacency_list.hpp>
16#include <boost/algorithm/string.hpp>
17#include <boost/graph/dijkstra_shortest_paths.hpp>
18#include <boost/property_map/property_map.hpp>
19#include <boost/graph/graphviz.hpp>
20#include <boost/graph/copy.hpp>
21#include <queue>
22#include <map>
23#include <list>
24#include <bitset>
25#include <algorithm>
26#include <boost/algorithm/string.hpp>
27
28//-------------------------------------------------------------------//
29//------------------- [Routing] Helper function ---------------------//
30//-------------------------------------------------------------------//
31
44bool matchesPattern(const std::string& key, const std::string& gName, const std::string& lockName);
45
54void findGNodeID_FuncCell(const std::string &lockedNodeName, std::vector<int> &suitableGIDs);
55
69
83
95int findRoot(int signal, std::map<int, NodeConfig> *gConfig);
96
103int getSignalCost(int signal);
104
113bool hasOverlap(int signal);
114
122
130
137
145int cmpfunc(const void *a, const void *b);
146
153void sortList(int list[], int n, std::map<int, NodeConfig> *hConfig);
154
155//-------------------------------------------------------------------//
156//-------------------- [Routing] Main function ----------------------//
157//-------------------------------------------------------------------//
158
165void ripup(int signal, std::list<int> *nodes);
166
174void ripUpRouting(int signal, DirectedGraph *G);
175
182void depositRoute(int signal, std::list<int> *nodes);
183
184
191float calculate_cost (int next);
192
205int route(DirectedGraph *G, int signal, std::set<int> sink, std::list<int> *route, std::map<int, NodeConfig> *gConfig, std::map<int, NodeConfig> *hConfig);
206
217int routeSignal(DirectedGraph *G, DirectedGraph *H, int y, std::map<int, NodeConfig> *gConfig, std::map<int, NodeConfig> *hConfig);
218
219#endif
boost::adjacency_list< boost::listS, boost::vecS, boost::bidirectionalS, DotVertex, EdgeProperty > DirectedGraph
Definition UGRAMM.h:91
bool matchesPattern(const std::string &key, const std::string &gName, const std::string &lockName)
Definition routing.cpp:22
int findFuncCellFromOutputPin(int signal, DirectedGraph *G)
Definition routing.cpp:96
void ripup(int signal, std::list< int > *nodes)
Definition routing.cpp:319
void sortList(int list[], int n, std::map< int, NodeConfig > *hConfig)
Definition routing.cpp:304
int routeSignal(DirectedGraph *G, DirectedGraph *H, int y, std::map< int, NodeConfig > *gConfig, std::map< int, NodeConfig > *hConfig)
Definition routing.cpp:602
int route(DirectedGraph *G, int signal, std::set< int > sink, std::list< int > *route, std::map< int, NodeConfig > *gConfig, std::map< int, NodeConfig > *hConfig)
Definition routing.cpp:455
bool hasOverlap(int signal)
Definition routing.cpp:173
int cmpfunc(const void *a, const void *b)
Definition routing.cpp:249
void ripUpRouting(int signal, DirectedGraph *G)
Definition routing.cpp:342
void depositRoute(int signal, std::list< int > *nodes)
Definition routing.cpp:374
int findOutputPinFromFuncCell(int signal, DirectedGraph *G)
Definition routing.cpp:114
int findRoot(int signal, std::map< int, NodeConfig > *gConfig)
Definition routing.cpp:131
float calculate_cost(int next)
Definition routing.cpp:401
int totalUsed(DirectedGraph *G)
Definition routing.cpp:187
int getSignalCost(int signal)
Definition routing.cpp:155
void findGNodeID_FuncCell(const std::string &lockedNodeName, std::vector< int > &suitableGIDs)
Definition routing.cpp:51
void adjustHistoryCosts(DirectedGraph *G)
Definition routing.cpp:229
int totalOveruse(DirectedGraph *G)
Definition routing.cpp:202