CGRAOmp  0.1
Classes | Namespaces | Macros | Typedefs | Functions
CGRAModel.hpp File Reference
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/JSON.h"
#include "CGRAInstMap.hpp"
#include <string>
#include <climits>

Go to the source code of this file.

Classes

class  CGRAOmp::CGRAModel
 A base class of CGRA model for DFG extraction. More...
 
class  CGRAOmp::AddressGenerator
 An abstract class representing a type of address generator. More...
 
class  CGRAOmp::DecoupledCGRA
 CGRA model for category "decoupled". More...
 
class  CGRAOmp::AffineAG
 A model of address generator compatible to memory access with affine expression the accessed memory address must be expressed in. More...
 
class  CGRAOmp::FullStateAG
 a model of address generator without any constraints More...
 
class  CGRAOmp::TMCGRA
 CGRA model for category "time-multiplexed". More...
 
class  CGRAOmp::ModelError
 A custom error used to notice the specified configuration file is invalid. More...
 

Namespaces

 CGRAOmp
 

Macros

#define CATEGORY_KEY   "category"
 
#define AG_CONF_KEY   "address_generator"
 
#define AG_STYLE_KEY   "control"
 
#define AG_MAX_NEST_KEY   "max_nested_level"
 
#define COND_STYLE_KEY   "conditional"
 
#define IDP_STYLE_KEY   "inter-loop-dependency"
 
#define OPT_ENABLE_KEY   "allowed"
 
#define OPT_TYPE_KEY   "type"
 
#define CUSTOM_INST_KEY   "custom_instructions"
 
#define GEN_INST_KEY   "generic_instructions"
 
#define INST_MAP_KEY   "instruction_map"
 

Typedefs

using CGRAOmp::AGGen_t = std::function< Expected< AddressGenerator * >(json::Object *, StringRef)>
 

Functions

Expected< CGRAModel * > CGRAOmp::parseCGRASetting (StringRef filepath, ModuleAnalysisManager &MAM)
 a helper function to instantiate CGRAModel based on JSON configfile More...
 
template<typename SettingT >
SmallVector< StringRef > CGRAOmp::get_setting_values (StringMap< SettingT > settingMap)
 a template to extract only values from SettingMap More...
 
template<typename SettingT >
bool CGRAOmp::containsValidData (StringMap< SettingT > settingMap, StringRef val)
 Check if val is a valid setting for SettingT. More...
 
Expected< CGRAModel::CGRACategoryCGRAOmp::getCategory (json::Object *json_obj, StringRef filename)
 Get CGRACategory from JSON config. More...
 
template<char const * key_str, typename SettingT >
Expected< SettingT > CGRAOmp::getOption (json::Object *json_obj, StringRef filename, StringMap< SettingT > settingMap)
 Get common option from JSON config. More...
 
Expected< AddressGenerator * > CGRAOmp::parseAGConfig (json::Object *json_obj, StringRef filename)
 parse a JSON config and instantiate AddressGenerator More...
 
Expected< AddressGenerator * > CGRAOmp::createAffineAG (json::Object *json_obj, StringRef filename)
 Create a AffineAG object according to JSON config. More...
 

Macro Definition Documentation

◆ AG_CONF_KEY

#define AG_CONF_KEY   "address_generator"

◆ AG_MAX_NEST_KEY

#define AG_MAX_NEST_KEY   "max_nested_level"

◆ AG_STYLE_KEY

#define AG_STYLE_KEY   "control"

◆ CATEGORY_KEY

#define CATEGORY_KEY   "category"

◆ COND_STYLE_KEY

#define COND_STYLE_KEY   "conditional"

◆ CUSTOM_INST_KEY

#define CUSTOM_INST_KEY   "custom_instructions"

◆ GEN_INST_KEY

#define GEN_INST_KEY   "generic_instructions"

◆ IDP_STYLE_KEY

#define IDP_STYLE_KEY   "inter-loop-dependency"

◆ INST_MAP_KEY

#define INST_MAP_KEY   "instruction_map"

◆ OPT_ENABLE_KEY

#define OPT_ENABLE_KEY   "allowed"

◆ OPT_TYPE_KEY

#define OPT_TYPE_KEY   "type"