m2isar.backends.isa_manual.writer

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

Attributes

HEADER_CONTENT

MAKO_TEMPLATE_INSTR

logger

Classes

CoreDSL2Writer

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]
class CoreDSL2Writer[source]
text = ''[source]
indent_str = '    '[source]
level = 0[source]
property indent[source]
property isstartofline[source]
property needsspace[source]
write(text, nl=False)[source]
write_line(text)[source]
enter_block(br=True, nl=True)[source]
leave_block(br=True, nl=True)[source]
write_type(data_type, size)[source]
write_behavior2(operation, drop_first=False)[source]
write_behavior(instruction)[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.