Source code for m2isar.backends.etiss.replacements

# 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

"""CRUD to statically replace certain objects in ETISS."""

[docs] default_prefix = '((${ARCH_NAME}*)cpu)->'
[docs] prefixes = { 'PC': 'cpu->', #'X': '*((${ARCH_NAME}*)cpu)->', #'R': '*((${ARCH_NAME}*)cpu)->' }
[docs] rename_write = { 'PC': 'cpu->nextPc' # 'PC': 'cpu->instructionPointer' }
[docs] rename_static = { 'PC': 'ic.current_address_' }
[docs] rename_dynamic = { 'PC': 'cpu->instructionPointer' }
[docs] exception_mapping = { (0, 0): 'ETISS_RETURNCODE_IBUS_READ_ERROR', (0, 2): 'ETISS_RETURNCODE_ILLEGALINSTRUCTION', (0, 11): 'ETISS_RETURNCODE_SYSCALL', (0, 3): 'ETISS_RETURNCODE_CPUFINISHED' }