GDS II File Format
GDS II File Format
GDSII files are composed of a series of data block links. These data
blocks define file headers, library file heads, library file names, data
units, module structure heads, module structure names, graph
elements, layer names, data types, and graph elements respectively.
Coordinates, graph element tail, module structure tail, file tail.
Some data blocks are optional. Note that the first four bytes of
each module flag the meta-information of the section, the first two
bytes describe the size of the section, and the third four bytes
describe the type of the section.
Ashwani DFT
Ashwani DFT
As an example, this is a binary source file for a GSDII file:
It is mentioned above that the first four bytes of each module flag
the meta-information of the section, the first two bytes describe the
size of the section and the third four bytes describe the type of the
section. So,
Filehead(HEADER):
00 1C 01 02 00 65 00 0100 05 00 0F 00 2F 00 32 00 65 00 01 00 05
00 0F 00 2F 00 32: The first two bytes 00 1C get a total of 28 bytes
of this module, 01 02 can be seen as the library file header (BGNLIB),
Two 00 65 00 01 00 05 00 0F 00 2F 00 32 00 indicate that the start
time and update time are both 15:47:50 on January 5, 2001. 【 The
first 8 bytes record the most recent modification time, and the last
Ashwani DFT
8 bytes record the most recent access time. 00 65 should be 101.
Table 2001 is a millennium problem 】
Data unit(UNITS):
00 14 03 05 3E 41 89 374B C6 A7 F0 39 44 B8 2F A0 9B 5A 54: 20
bytes, 00 14 03 05 defines the graphical data unit (UNITS), followed
by two 8-byte floating point numbers, which define each internal
unit respectively How many user setting units are equal to and how
many microns are equal to each user setting unit.
00 1C 05 02 00 65 00 0100 05 00 0F 00 2F 00 32 00 65 00 01 00 05
00 0F 00 2F 00 32:28 bytes, 00 1C 05 02 is the module structure
header (BGNSTR), and the following 24 bytes record the module
structure creation time and last modification time.
Ashwani DFT
Tuple type:
Layer name:
Graph coordinates:
00 2C 10 03 00 00 00 00 0032 C8 00 00 90 B8 00 00 32 C8 00 00 90
B8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 32 C8 00 00: 44 bytes, 00 2C 10 03 refers to the filling polygon
The coordinates XY occupy a total of 44 bytes, specifically, This
polygon is a rectangle, there should be 5 points, the coordinates of
each coordinate point occupy 8 bytes, the first 4 bytes represent X
coordinates, the last 4 bytes represent Y coordinates, note that the
coordinates of its last point must be the same as the coordinates of
the first point ( closed ). 5 pairs of XY coordinates of type int32.
ENDNET:
Ashwani DFT
Module structure tail ENDSTR:
Ashwani DFT
00 04 04 00: 4 bytes, ENDLIB end library file, that is, the file is
finally defined by 00 04 04 00 end GDSII file.
Ashwani DFT