1 #ifndef PORT_MAPPING_CACHE_H_INCLUDED_
2 #define PORT_MAPPING_CACHE_H_INCLUDED_
4 #include <unordered_map>
21 template <
typename T,
typename U>
24 return std::hash<T>()(x.first) ^ std::hash<U>()(x.second);
47 typedef std::unordered_map< std::pair<int, SgSymbol*>,
48 std::pair<risc::InstanceTree,int>,
62 std::list<std::pair<int, InstanceTree>>
Definition: instance_tree.h:15
MappingInfo()
Definition: mapping_info.cpp:20
std::list< std::pair< int, InstanceTree > > get_mapped_module(int channel_id, SgClassDefinition *channel_definition)
This returns for a given channel instance the mapped modules.
Definition: mapping_info.cpp:740
void print()
Definition: mapping_info.cpp:719
This class can be used as a lookup table between an instance id of a module or hierarchical channel a...
Definition: path_instance_mapper.h:13
Definition: mapping_info.h:19
bool is_initialized_
Definition: mapping_info.h:72
std::unordered_map< std::pair< int, SgSymbol * >, std::pair< risc::InstanceTree, int >, pairhash > Mapping_
This maps stores the mapping for ports to channels (instance id of the module where the port is decla...
Definition: mapping_info.h:49
TreeMap inst_tree_mapping
Definition: mapping_info.h:66
std::unordered_map< std::pair< int, SgVariableDefinition * >, risc::InstanceTree, pairhash > TreeMap
Definition: mapping_info.h:65
Mapping_ mapping_
Definition: mapping_info.h:50
void initialize(PathInstanceMapper *path_instance_mapper)
This function initializes the mapping.
Definition: mapping_info.cpp:24
TreeMap backward_inst_tree_mapping
Definition: mapping_info.h:67
Definition: mapping_info.h:31
std::size_t operator()(const std::pair< T, U > &x) const
Definition: mapping_info.h:22