Templates and Revisions in MicroTESK

Home / New Features / Templates and Revisions in MicroTESK

The recent MicroTESK build (2.4.34) supports two nML extensions that ease developing and maintaining ISA specifications: templates and revisions.

Templates allow defining families of operations whose operands differ only in their data types. To describe an operation in a generic way, the following constructs have been introduced: type_of, size_of, and is_type. Here is an example.

op cmd_B(op1: BYTE, ...)
op cmd_D(op1: DWORD, ...)
  action = { ... }

Revisions allows enabling/disabling ISA elements (registers, operations, etc.) depending on the current ISA version. In the example below, the cmd_v2 operation is enabled only when the CPU_V2 revision is turned on.

@rev(CPU_V2) op cmd_v2(rd: REG, rn: REG)

To define different versions of the same ISA element, the @rev construct can be applied to the element attributes (syntax, action, etc.). Here comes an example.

op cmd()
  @rev(CPU_V1) action = { … }
  @rev(CPU_V2) action = { … }

There is a possibility to describe relations between ISA revisions, i.e. to specify whether a revision includes another one.

The build can be downloaded from the link below: http://forge.ispras.ru/…/microtesk-2.4.34-beta-170901.tar.gz

Leave a Reply

Your email address will not be published. Required fields are marked *