Project

General

Profile

Actions

Task #4832

closed

[translator][model] VLIW architectures support

Added by Alexander Kamkin over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Andrei Tatarnikov
Category:
-
Target version:
Start date:
04/04/2014
Due date:
05/31/2014
% Done:

100%

Estimated time:
Detected in build:
svn
Published in build:
141018

Description

The key issue of VLIW architectures is composition of complex instructions (so-called words) from simple ones (so-called syllables). This can be done by enabling multiple operation parameters of the operation type:

op S1(x: arithmetic_instruction) ...
op S2(x: control_instruction) ...

op W2(x: S1, y: S2)
    syntax = format("{%s, %s}", x.syntax, y.syntax)
    image  = format("1101111010101101%b%b", x.image, y.image)
    action = { x.action; y.action; }

op W = W2 | ...

op instruction(x: W)
    syntax = x.syntax
    image  = x.image
    action = { x.action; }

Translation scheme seems to be simple:

public class W2 {
    private S1 x;
    private S2 y;
    ...
    public void action() {
        x.action();
        y.action();
    }
}

public class instruction {
    private W x;
    ...
    public void action() {
        x.action();
    }
}

Instantiation of complex instructions in test templates is done as follows:

    W2_begin
        S1 r(1), r(2), r(3)
        S2 r(4), r(5), r(6)
    W2_end
    ...

In general case it might look as it is shown below:

    Word_begin
        SubWord_begin
            Syllable_1 ...
            ...
        SubWord_end
        Syllable_N ...
    Word_end
    ...

If there is no ambiguity in determining how to compose words from syllables, begin/end brackets may be omitted:

    Syllable_1 ...
    ...
    Syllable_N ...
    ...
Actions

Also available in: Atom PDF