UGRAMM
|
Functions | |
std::string | removeCurlyBrackets (const std::string &input) |
std::string | gNames_deliemter_changes (std::string gNames) |
std::string | string_remover (std::string original_string, std::string toRemove) |
void | jsonUppercase (json &j) |
std::string | readCommentSection (std::ifstream &inputFile) |
bool | skipPlacement (std::string hOpcode, json &jsonParsed) |
bool | needLocking (int HID, json &jsonParsed, std::string &jsonLockNode) |
void | readDeviceModelPragma (std::ifstream &deviceModelFile, json &UgrammPragmaConfig) |
void | readApplicationGraphPragma (std::ifstream &applicationGraphFile, json &UgrammPragmaConfig) |
bool | widthCheck (int hWidth, int gWidth) |
Checks if the application graph's node width is less than or equal to the device model's node width. | |
bool | compatibilityCheck (int gID, int hID, std::map< int, NodeConfig > *hConfig, std::map< int, NodeConfig > *gConfig) |
void | printRoutingResults (int y, std::ofstream &positionedOutputFile, std::ofstream &unpositionedOutputFile, std::map< int, NodeConfig > *hConfig, std::map< int, NodeConfig > *gConfig) |
void | mandatoryFunCellConnections (int gNumber, std::string FunCellName, DirectedGraph *G, std::ofstream &positionedOutputFile, std::ofstream &unpositionedOutputFile) |
void | printPlacementResults (int gNumber, std::string gName, DirectedGraph *G, std::ofstream &positionedOutputFile, std::ofstream &unpositionedOutputFile, std::map< int, NodeConfig > *gConfig, json &UgrammPragmaConfig) |
void | printMappedResults (DirectedGraph *H, DirectedGraph *G, std::map< int, NodeConfig > *hConfig, std::map< int, NodeConfig > *gConfig, json &UgrammPragmaConfig) |
void | printName (int n) |
void | printVertexModels (DirectedGraph *H, DirectedGraph *G, std::map< int, NodeConfig > *hConfig, std::map< int, int > &invUsers) |
void | printRouting (int signal) |
void | readDeviceModel (DirectedGraph *G, std::map< int, NodeConfig > *gConfig) |
void | readApplicationGraph (DirectedGraph *H, std::map< int, NodeConfig > *hConfig, std::map< int, NodeConfig > *gConfig) |
Variables | |
std::vector< std::string > | colors |
std::string | input_pin_color = "#ADD8E6" |
std::string | output_pin_color = "#FFB6C1" |
std::string | unused_cell_color = "#A9A9A9" |
std::map< std::string, std::string > | funCellMapping |
bool compatibilityCheck | ( | int | gID, |
int | hID, | ||
std::map< int, NodeConfig > * | hConfig, | ||
std::map< int, NodeConfig > * | gConfig ) |
Checks whether the current opcode required by the application node is supported by the device model node.
This function determines if the opcode needed by the application node (represented by hOpcode
) is compatible with or supported by the device model node type (represented by gType
).
gType | The type of the device model node. [ALU, MemPort etc..] |
hOpcode | The opcode required by the application node. [FMUL, FADD, INPUT, OUTPUT] |
hConfig | A map containing node configuration details of device-model graph. |
gConfig | A map containing node configuration details of device-model graph. |
std::string gNames_deliemter_changes | ( | std::string | gNames | ) |
Changes the delimiters in the given string from "." to "_" (neato dot format does not support "." delimiter in the node name)
void jsonUppercase | ( | json & | j | ) |
Converts all keys and values of the parsed JSON object to uppercase for normalization.
void mandatoryFunCellConnections | ( | int | gNumber, |
std::string | FunCellName, | ||
DirectedGraph * | G, | ||
std::ofstream & | positionedOutputFile, | ||
std::ofstream & | unpositionedOutputFile ) |
Connects associated pins to the specified FunCell in the device model graph.
bool needLocking | ( | int | HID, |
json & | jsonParsed, | ||
std::string & | jsonLockNode ) |
Checks whether locking is required for the given hNamed based on the information given in the JSON. In JSON, we define the locking code as "hName::gName"
void printMappedResults | ( | DirectedGraph * | H, |
DirectedGraph * | G, | ||
std::map< int, NodeConfig > * | hConfig, | ||
std::map< int, NodeConfig > * | gConfig, | ||
json & | UgrammPragmaConfig ) |
Prints mapping results in neato format: First displays the layout and then shows connections between the nodes.
void printName | ( | int | n | ) |
Prints the device model cell name corresponding to a given boost id number from device model graph.
void printPlacementResults | ( | int | gNumber, |
std::string | gName, | ||
DirectedGraph * | G, | ||
std::ofstream & | positionedOutputFile, | ||
std::ofstream & | unpositionedOutputFile, | ||
std::map< int, NodeConfig > * | gConfig, | ||
json & | UgrammPragmaConfig ) |
Prints placement information to a mapping-output file.
void printRouting | ( | int | signal | ) |
Prints the routing details for the given signal.
void printRoutingResults | ( | int | y, |
std::ofstream & | positionedOutputFile, | ||
std::ofstream & | unpositionedOutputFile, | ||
std::map< int, NodeConfig > * | hConfig, | ||
std::map< int, NodeConfig > * | gConfig ) |
Prints routing information to a mapping-output file.
void printVertexModels | ( | DirectedGraph * | H, |
DirectedGraph * | G, | ||
std::map< int, NodeConfig > * | hConfig, | ||
std::map< int, int > & | invUsers ) |
Prints vertex models of the application graph's nodes.
void readApplicationGraph | ( | DirectedGraph * | H, |
std::map< int, NodeConfig > * | hConfig, | ||
std::map< int, NodeConfig > * | gConfig ) |
Reads a DOT file and stores attributes into the application graph.
void readApplicationGraphPragma | ( | std::ifstream & | applicationGraphFile, |
json & | UgrammPragmaConfig ) |
Reads, checks, and stores PRAGMA directives from the application graph file.
std::string readCommentSection | ( | std::ifstream & | inputFile | ) |
Reads a multi-line comment containing PRAGMA from the given file.
void readDeviceModel | ( | DirectedGraph * | G, |
std::map< int, NodeConfig > * | gConfig ) |
Reads a DOT file and stores attributes into the device model graph.
void readDeviceModelPragma | ( | std::ifstream & | deviceModelFile, |
json & | UgrammPragmaConfig ) |
Reads, checks, and stores PRAGMA directives from the device model file.
std::string removeCurlyBrackets | ( | const std::string & | input | ) |
Removes the curly brackets '{' and '}' from the given string. The kernels present in CGRA-ME have {} included in the node names, which hinders dot visualization.
bool skipPlacement | ( | std::string | hOpcode, |
json & | jsonParsed ) |
Checks whether placement is required for the given opcode based on the information given in the JSON. In JSON, we can either have opcode("Reg") or nodeType("ALU/Memport") to be skipped.
std::string string_remover | ( | std::string | original_string, |
std::string | toRemove ) |
Removes a specified substring from the original string.
bool widthCheck | ( | int | hWidth, |
int | gWidth ) |
Checks if the application graph's node width is less than or equal to the device model's node width.
Checks if the application graph's node width is less than or equal to the device model's node width.
std::vector<std::string> colors |
std::map<std::string, std::string> funCellMapping |
std::string input_pin_color = "#ADD8E6" |
std::string output_pin_color = "#FFB6C1" |
std::string unused_cell_color = "#A9A9A9" |