Lines Matching +full:soc +full:-
4 # SPDX-License-Identifier: Apache-2.0
21 SOC_SCHEMA_PATH = str(Path(__file__).parent / 'schemas' / 'soc-schema.yml')
25 ARCH_SCHEMA_PATH = str(Path(__file__).parent / 'schemas' / 'arch-schema.yml')
29 SOC_YML = 'soc.yml'
54 socs = [(Soc(soc['name'],
55 [c['name'] for c in soc.get('cpuclusters', [])],
57 for soc in s.get('socs', [])]
63 socs = [(Soc(soc['name'],
64 [c['name'] for c in soc.get('cpuclusters', [])],
66 for soc in f.get('socs', [])]
72 socs = [(Soc(soc['name'],
73 [c['name'] for c in soc.get('cpuclusters', [])],
75 for soc in s.get('socs', [])]
80 for soc in data.get('socs', []):
82 if len(mutual_exclusive - soc.keys()) < 1:
83 sys.exit(f'ERROR: Malformed content in SoC file: {soc_yaml}\n'
85 if soc.get('name') is not None:
86 self._socs.append(Soc(soc['name'], [c['name'] for c in soc.get('cpuclusters', [])],
88 elif soc.get('extend') is not None:
89 self._extended_socs.append(Soc(soc['extend'],
90 [c['name'] for c in soc.get('cpuclusters', [])],
93 sys.exit(f'ERROR: Malformed "socs" section in SoC file: {soc_yaml}\n'
97 # soc.yml file
106 for soc in self._socs + self._extended_socs:
107 if re.match(fr'^{soc_name}$', soc.name) is not None:
112 sys.exit(f'ERROR: SoC qualifier match unresolved: {qualifiers}')
116 '''Load SoCs from a soc.yml file.
168 sys.exit(f"ERROR: SoC '{name}' is not found, please ensure that the SoC exists "
169 f"and that soc-root containing '{name}' has been correctly defined.")
173 class Soc: class
180 def extend(self, soc): argument
181 if self.name == soc.name:
182 self.cpuclusters.extend(soc.cpuclusters)
183 self.folder.extend(soc.folder)
191 socs: List[Soc]
199 socs: List[Soc]
213 with Path(archs_yml).open('r', encoding='utf-8') as f:
239 yml_files.extend(sorted((root / 'soc').rglob(SOC_YML)))
257 parser.add_argument("--soc-root", dest='soc_roots', default=[],
259 help='add a SoC root, may be given more than once')
260 parser.add_argument("--soc", default=None, help='lookup the specific soc')
261 parser.add_argument("--soc-series", default=None, help='lookup the specific soc series')
262 parser.add_argument("--soc-family", default=None, help='lookup the specific family')
263 parser.add_argument("--socs", action='store_true', help='lookup all socs')
264 parser.add_argument("--arch-root", dest='arch_roots', default=[],
267 parser.add_argument("--arch", default=None, help='lookup the specific arch')
268 parser.add_argument("--archs", action='store_true', help='lookup all archs')
269 parser.add_argument("--format", default=default_fmt,
270 help='''Format string to use to list each soc.''')
271 parser.add_argument("--cmakeformat", default=None,
272 help='''CMake format string to use to list each arch/soc.''')
338 dump_v2_system(args, 'soc', s)
343 if any([args.socs, args.soc, args.soc_series, args.soc_family]):