OEP

138

Title

Type attribute syntax

Summary

Standard syntax for type attributes such as alignment.

Owner

Adam Sampson <ats@offog.org>

Status

Proposed

Date-Proposed

2006-03-14

Keywords

language types placed

There are a number of possible cases where we might wish to decorate a type description -- add some extra attributes to it. While there are a number of ways we could do this, the simplest way would be to echo the C-style syntax already used for SHARED channels:

BUFFERED (3) CHAN BYTE foo:
ALIGNED (128) [N]INT array:
PARTIAL (3) BARRIER b:

Indeed, this syntax could be used to replace the slightly clumsy existing syntax for PLACED and PLACED PORT, allowing the IO width for port operations to be specified (necessary for many IO tasks on modern machines, and not currently supported by the language):

PLACED (addr.p) INT32 p:
PORT (port.q, 4) INT32 q:

This syntax is now partially implemented in occ21 for mobile allocation:

m := MOBILE ALIGNED (128) DMA [256]BYTE

OEP/138 (last edited 2007-11-16 11:10:26 by ats)