-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path__init__.py
35 lines (27 loc) · 1019 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# SPDX-License-Identifier: Apache-2.0
#
# This file is part of the M2-ISA-R project: https://github.com/tum-ei-eda/M2-ISA-R
#
# Copyright (C) 2022
# Chair of Electrical Design Automation
# Technical University of Munich
"""This is the ETISS architecture generation backend of M2-ISA-R. It is used
for automatic generation of architecture plugins for the ETISS instruction
set simulator.
The main entry point for the architecture plugin writer is contained within
:mod:`m2isar.backends.etiss.writer`. Several helper modules in this package
encapsulate the required functionality for outputting complete ETISS architecture
plugins.
"""
from collections import defaultdict
from enum import Enum, auto
class BlockEndType(Enum):
"""Denotes the conditions on which to enforce a translation block end in ETISS."""
NONE = auto()
UNCOND = auto()
ALL = auto()
class CodeInfoTracker:
tracker = defaultdict(dict)
@classmethod
def insert(cls, core_name, code_info):
cls.tracker[core_name][code_info.id] = code_info