m2isar.backends.isa_manual.writer

Viewer tool to visualize an M2-ISA-R model hierarchy.

Attributes

HEADER_CONTENT

MAKO_TEMPLATE_INSTR

logger

Functions

sort_instruction(entry)

Instruction sort key function. Sorts most restrictive encoding first.

main()

Main app entrypoint.

Module Contents

HEADER_CONTENT = Multiline-String[source]
Show Value
"""
= M2-ISA-R Metamodel
:doctype: article
:encoding: utf-8
:lang: en
:toc: left
:toclevels: 3
:numbered:
:stem: latexmath
:le: ≤
:ge: ≥
:ne: ≠
:approx: ≈
:inf: ∞

:sectnums!:
"""
MAKO_TEMPLATE_INSTR = Multiline-String[source]
Show Value
"""
==== ${name}

===== Assembly

```asm
${mnemonic} ${assembly}
```

===== Behavior

```c
${behavior}
```


===== Encoding

```wavedrom
${encoding}
```

===== Exceptions

% if throws:

Throws: ${throws.name}

% else:

N/A

% endif

===== Attributes

% if attributes:
    % for key, value in attributes.items():
        % if value:
* ${key.name} (${value})
        % else:
* ${key.name}
        % endif
    % endfor
% else:
N/A
% endif

"""
logger[source]
sort_instruction(entry: tuple[tuple[int, int], arch.Instruction])[source]

Instruction sort key function. Sorts most restrictive encoding first.

main()[source]

Main app entrypoint.