MCPcopy Create free account
hub / github.com/CMU-SAFARI/ramulator2 / parse_interface_keys

Function parse_interface_keys

python/ramulator/cpp_parser.py:113–121  ·  view source on GitHub ↗

Scan for RAMULATOR_REGISTER_INTERFACE, return {interface_class: config_key}.

(src_dir)

Source from the content-addressed store, hash-verified

111
112
113def parse_interface_keys(src_dir):
114 """Scan for RAMULATOR_REGISTER_INTERFACE, return {interface_class: config_key}."""
115 result = {}
116 for filepath in _scan_files(src_dir, extensions=(".h",)):
117 with open(filepath) as f:
118 content = f.read()
119 for m in _RE_REGISTER_IFCE.finditer(content):
120 result[m.group(1)] = m.group(2)
121 return result
122
123
124def parse_registrations(src_dir):

Callers 1

generate_componentsFunction · 0.90

Calls 2

_scan_filesFunction · 0.85
openFunction · 0.85

Tested by

no test coverage detected