STREAMフォーマット解析結果

by K.I

Index


概要

ストリームの構造単位について

データ形式 バイト数
00 なし 0
01 1〜数bit単位のフラグ(2) 2
02 int2 2
03 int4 4
04 ? ?
05 float(8) 8
06 ascii(奇数の場合はnullを1個追加する) 不定(偶数)

1フォーマット上は0〜65535まで可能で。拡張ストリームは、単にLayerの制限を0〜255に拡張したもので、フォーマット上の違いは無い。

[top]

データ構造

ヘッダ部

        VERSION         →(0,3:Ver3、4:Ver4、5:Ver5、600(0x258):Ver6.0)
        BGNLIB
        (LIBDIRSIZE)    →使用方法不明(SXでは未使用)
        (SRFNAME)       →参照ライブラリ名?(それぞれ44byte、SXでは未使用)
        (LIBSECUR)      →(SXでは未使用)
        LIBNAME
        (REFLIBS)       →使用方法不明(SXでは未使用)
        (FONTS)         →フォント名(44byte×4)、SXが生成するGDSにはあるが、省略可能?
        (ATTRTABLE)     →アトリビュートファイル名?(MAX44byte、SXでは未使用)
        (GENERATE)      →生成したプログラムのversion?(SXでは未使用)
        UNITS           →最小unitのデータ上での値と、メートル単位での実際上の値(例:1E-3, 1E-9 →最小グリッド0.001umの場合)
          :
        セル構造
          :
        ENDLIB

セル構造


[top]

エレメント

PATH

        PATH
        (ELFLAGS)       →使用方法不明(SXでは未使用)
        (PLEX)          →使用方法不明(SXでは未使用)
        LAYER
        DTYPE
        (PATHTYPE)      →0:突出し無し、1:丸突出し、2:半幅突出し、4:可変突出し
        (WIDTH)         →線幅
        (BGNEXTN)       →pathtype4の始端点突き出し量
        (ENDEXTN)       →pathtype4の終端点突き出し量
        XY              →頂点数分
        ENDEL

BOUNDARY

        BOUNDARY
        (ELFLAGS)       →使用方法不明(SXでは未使用)
        (PLEX)          →使用方法不明(SXでは未使用)
        LAYER
        DTYPE
        XY              →頂点数分
        ENDEL

TEXT

        TEXT
        (ELFLAGS)       →使用方法不明(SXでは未使用)
        (PLEX)          →使用方法不明(SXでは未使用)
        LAYER
        TTYPE
        PRESENT
        (PATHTYPE)      →SXの生成するGDSには無いし、本来は全く不要だが、
        (WIDTH)         →付加されているデータが存在する!
        (STRANS (MAG) (ANGLE))
        XY              →1点
        STRING          →文字列
        ENDEL

NODE(使用方法不明)

        NODE
        (ELFLAGS)       →使用方法不明(SXでは未使用)
        (PLEX)          →使用方法不明(SXでは未使用)
        LAYER
        NODETYPE
        XY              →1〜50点(詳細不明)
        ENDEL

BOX(使用方法不明)

        BOX
        (ELFLAGS)       →使用方法不明(SXでは未使用)
        (PLEX)          →使用方法不明(SXでは未使用)
        LAYER
        BOXTYPE
        XY              →5点(詳細不明)
        ENDEL

SREF(セル引用)

        SREF
        (ELFLAGS)       →使用方法不明(SXでは未使用)
        (PLEX)          →使用方法不明(SXでは未使用)
        SNAME
        (STRANS (MAG) (ANGLE))
        XY              →1点
        ENDEL

AREF(アレイセル引用)

        AREF
        (ELFLAGS)       →使用方法不明(SXでは未使用)
        (PLEX)          →使用方法不明(SXでは未使用)
        SNAME
        (STRANS (MAG) (ANGLE))
        COLROW
        XY              →3点(原点,列方向のピッチ×個数位置の点,行方向も同様)
        ENDEL

プロパティ

        PROPATTR 番号(1〜256?)
        PROPVAL 文字列

2手持ちのデータが少ないので、確認不十分だが、多分そうらしい。

[top]

各フラグの詳細(分かったものだけ)

PRESENT -- TEXTのフォントと原点の指定

151413121110 9 8 7 6 5 4 3 2 1 0
f1f0v1v0h1h0
原点位置
0:TopLeft 1:TopCenter 2:TopRight
4:MiddleLeft 5:MiddleCenrer 6:MiddleRight
8:BottomLeft 9:BottomCenter 10:BottomRight

STRANS -- 図形のミラー反転の有無,拡大や回転の形式を表す.

15 1413121110 9 8 7 6 5 4 3 2 1 0
refl magang

ELFLAGS -- 不明

151413121110 9 8 7 6 5 4 3 2 1 0
extntmpl

浮動小数点数

データの向きの指定

GDS2 SX-1 SX-2
0 noa nom haa XYmir
90 qua nom tqa XYmir
180 haa nom noa XYmir
270 tqa nom qua XYmir
ref0 noa Xmir haa Ymir
ref90 tqa Xmir qua Ymir
ref180 haa Xmir noa Ymir
ref270 qua Xmir tqa Ymir

3SXでは2通りの表し方があるが、formatとしては冗長と言えるだろう。

[top]

GDS2レコード一覧

Record type Data type
0x00 HEADER 0x02 INTEGER_2 Start of stream, contains version number of
stream file.
< v3.0 0x0000 0
v3.0 0x0003 3
v4.0 0x0004 4
v5.0 0x0005 5
v6.0 0x0258 600
0x01 BGNLIB 0x02 INTEGER_2 Beginning of library, plus mod and access
dates.
Modification:
year, month, day, hour, minute, second
Last access:
year, month, day, hour, minute, second
0x02 LIBNAME 0x06 STRING The name of the library, supposedly following
Calma DOS conventions. Using later tools,
such as ISS LTL-100, it seems more flexible
than that, but it won't allow any old thing
you want. If memory serves, Calma DOS allowed
6 characters in a file name, with a 2
character extension.
0x03 UNITS 0x05 REAL_8 Size of db unit in user units, size of db
unit in meters. To calculate the size of
a user unit in meters, divide the second
number by the first.
0x04 ENDLIB 0x00 NO_DATA End of the library.
0x05 BGNSTR 0x02 INTEGER_2 Begin structure, plus create and mod dates in
the same format as the BGNLIB record.
0x06 STRNAME 0x06 STRING Name of a structure. Up to 32 characters in
GDSII, A-Z, a-z, 0-9, _, ?, and $ are all
legal characters.
0x07 ENDSTR 0x00 NO_DATA End of a structure.
0x08 BOUNDARY 0x00 NO_DATA The beginning of a BOUNDARY element.
0x09 PATH 0x00 NO_DATA The beginning of a PATH element.
0x0a SREF 0x00 NO_DATA The beginning of an SREF element.
0x0b AREF 0x00 NO_DATA The beginning of an AREF element.
0x0c TEXT 0x00 NO_DATA The beginning of a TEXT element.
0x0d LAYER 0x02 INTEGER_2 Layer specification. On GDSII this could be
0 to 63, LTL allows 0 to 255. Of course a
3 byte integer allows up to 65535...
0x0e DATATYPE 0x02 INTEGER_2 Datatype specification. On GDSII this could
be 0 to 63, LTL allows 0 to 255. Of course a
3 byte integer allows up to 65535...
0x0f WIDTH 0x03 INTEGER_4 Width specification, negative means absolute
In data base units.
0x10 XY 0x03 INTEGER_4 An array of XY coordinates. An array of
coordinates in data base units.
Path: 2 to 200 pairs in GDSII
Boundary: 4 to 200 pairs in GDSII
Text: Exactly 1 pair
SREF: Exactly 1 pair
AREF: Exactly 3 pairs
1: Array reference point
2: column_space*columns+reference_x
3: row_space*rows+reference_y
Node: 1 to 50 pairs in GDSII
Box: Exactly 5 pairs
0x11 ENDEL 0x00 NO_DATA The end of an element.
0x12 SNAME 0x06 STRING The name of a referenced structure.
0x13 COLROW 0x02 INTEGER_2 Columns and rows for an AREF. Two 2 byte
integers. The first is the number of columns.
The second is the number of rows. In an AREF
of course. Neither may exceed 32767
0x14 TEXTNODE 0x00 NO_DATA "Not currently used" per GDSII Stream Format
Manual, v6.0. Would be the beginning of a
TEXTNODE element if it were.
0x15 NODE 0x00 NO_DATA The beginning of a NODE element.
0x16 TEXTTYPE 0x02 INTEGER_2 Texttype specification. On GDSII this could
be 0 to 63, LTL allows 0 to 255. Of course a
3 byte integer allows up to 65535...
0x17 PRESENTATION 0x01 BIT_ARRAY Text origin and font specification.
bits 15 to 0, l to r
bits 0 and 1: 00 left, 01 center, 10 right
bits 2 and 3: 00 top 01, middle, 10 bottom
bits 4 and 5: 00 font 0, 01 font 1,
10 font 2, 11 font 3,
0x18 SPACING UNKNOWN "Discontinued" per GDSII Stream Format
Manual, v6.0.
0x19 STRING 0x06 STRING Character string. Up to 512 char in GDSII
0x1a STRANS 0x01 BIT_ARRAY Bits 15 to 0, l to r
15=refl, 2=absmag, 1=absangle, others
reserved for future use.
0x1b MAG 0x05 REAL_8 Magnification, 1 is the default if omitted.
0x1c ANGLE 0x05 REAL_8 Angular rotation factor in ccw direction.
If omitted, the default is 0.
0x1d UINTEGER UNKNOWN User integer, used only in V2.0, when
instreamed, should be converted to property
attribute 126.
0x1e USTRING UNKNOWN User string, used only in V2.0, when
instreamed, should be converted to property
attribute 127.
0x1f REFLIBS 0x06 STRING Names of the reference libraries. Starts with
name of the first library and is followed by
the second. There are 44 bytes in each, NULLS
are used for padding, including filling in an
entire unused field.
0x20 FONTS 0x06 STRING Names of the textfont definition files. 4 44
byte fields, padded with NULLS if a field is
unused or less than 44 bytes.
0x21 PATHTYPE 0x02 INTEGER_2 Type of path ends.
0: Square ended paths
1: Round ended
2: Square ended, extended 1/2 width
4: Variable length extensions, CustomPlus
The default is 0
0x22 GENERATIONS 0x02 INTEGER_2 Number of deleted or backed up structures to
retain. Seems a bit odd in an archive...
From 2-99, default is 3.
0x23 ATTRTABLE 0x06 STRING Name of the attribute definition file. Max
size 44 bytes.
0x24 STYPTABLE 0x06 STRING "Unreleased feature" per GDSII Stream Format
Manual, v6.0.
0x25 STRTYPE 0x02 INTEGER_2 "Unreleased feature" per GDSII Stream Format
Manual, v6.0
0x26 ELFLAGS 0x01 BIT_ARRAY Flags for template and exterior data.
bits 15 to 0, l to r
0=template, 1=external data, others unused
0x27 ELKEY 0x03 INTEGER_4 "Unreleased feature" per GDSII Stream Format
Manual, v6.0.
0x28 LINKTYPE UNKNOWN "Unreleased feature" per GDSII Stream Format
Manual, v6.0.
0x29 LINKKEYS UNKNOWN "Unreleased feature" per GDSII Stream Format
Manual, v6.0.
0x2a NODETYPE 0x02 INTEGER_2 Nodetype specification. On GDSII this could
be 0 to 63, LTL allows 0 to 255. Of course a
3 byte integer allows up to 65535...
0x2b PROPATTR 0x02 INTEGER_2 Property number.
0x2c PROPVALUE 0x06 STRING Property value. On GDSII, 128 characters max,
unless an SREF, AREF, or NODE, which may
have 512 characters.
0x2d BOX 0x00 NO_DATA The beginning of a BOX element.
0x2e BOXTYPE 0x02 INTEGER_2 Boxtype specification. On GDSII this could be
0 to 63, LTL allows 0 to 255. Of course a
3 byte integer allows up to 65535...
0x2f PLEX 0x03 INTEGER_4 Plex number and plexhead flag. The least
significant bit of the most significant byte
is the plexhead flag. Because of this, you
can "only" have 2^24 plex groups. Or is that
2^24-1? I'm not sure if 0 is a valid plex
group in a stream file.
0x30 BGNEXTN 0x03 INTEGER_4 Path extension beginning for pathtype 4 in
CustomPlus. In database units, may be
negative.
0x31 ENDEXTN 0x03 INTEGER_4 Path extension end for pathtype 4 in
CustomPlus. In database units, may be
negative.
0x32 TAPENUM 0x02 INTEGER_2 Tape number for multi-reel stream file.
0x33 TAPECODE 0x02 INTEGER_2 Tape code to verify that the reel is from the
proper set. 12 bytes that are supposed to
form a unique tape code.
0x34 STRCLASS 0x01 BIT_ARRAY Calma use only. In stream files created by
non-Calma programs, this should be missing or
all field should be 0.
0x35 RESERVED 0x03 INTEGER_4 Used to be NUMTYPES per GDSII Stream Format
Manual, v6.0.
0x36 FORMAT 0x02 INTEGER_2 Archive or Filtered flag.
0: Archive
1: filtered
0x37 MASK 0x06 STRING Only in filtered streams. Layers and
datatypes used for mask in a filtered stream
file. A string giving ranges of layers and
datatypes separated by a semicolon. There may
be more than one mask in a stream file.
0x38 ENDMASKS 0x00 NO_DATA The end of mask descriptions.
0x39 LIBDIRSIZE 0x02 INTEGER_2 Number of pages in library director, a GDSII
thing, it seems to have only been used when
Calma INFORM was creating a new library.
0x3a SRFNAME 0x06 STRING Sticks rule file name.
0x3b LIBSECUR 0x02 INTEGER_2 Access control list stuff for CalmaDOS,
ancient. INFORM used this when creating a new
library. Had 1 to 32 entries with group
numbers, user numbers and access rights.

[top]

参考文献


[top] [Homeに戻る]

comments powered by Disqus