We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 293b9ab commit de69630Copy full SHA for de69630
python/qemu/ot/top/__init__.py
@@ -0,0 +1,27 @@
1
+# Copyright (c) 2025 2025 lowRISC contributors.
2
+# SPDX-License-Identifier: Apache2
3
+
4
+"""OpenTitan Tops."""
5
6
+from ot.util.misc import classproperty
7
+from typing import Optional
8
9
10
+class OpenTitanTop:
11
+ """OpenTitan supported tops."""
12
13
+ SHORT_MAP = {
14
+ 'darjeeling': 'dj',
15
+ 'earlgrey': 'eg',
16
+ }
17
18
+ @classproperty
19
+ def names(cls) -> list[str]:
20
+ """Supported top names."""
21
+ # pylint: disable=no-self-argument
22
+ return list(cls.SHORT_MAP)
23
24
+ @classmethod
25
+ def short_name(cls, topname: str) -> Optional[str]:
26
+ """Get the short form of a top."""
27
+ return cls.SHORT_MAP.get(topname.lower())
0 commit comments