mirror of https://github.com/KLayout/klayout.git
WIP (MALY reader)
This commit is contained in:
parent
07eb49d482
commit
f1b35d0826
|
|
@ -25,6 +25,8 @@
|
|||
#define HDR_dbMALY
|
||||
|
||||
#include "dbPoint.h"
|
||||
#include "dbTrans.h"
|
||||
#include "dbBox.h"
|
||||
|
||||
#include "tlException.h"
|
||||
#include "tlInternational.h"
|
||||
|
|
@ -56,6 +58,205 @@ public:
|
|||
virtual void warn (const std::string &txt, int warn_level) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A class representing a title field on a mask
|
||||
*/
|
||||
class MALYTitle
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
MALYTitle ()
|
||||
: width (0.0), height (0.0), pitch (0.0), type (String), font (Standard)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief The type of the title
|
||||
*/
|
||||
enum Type
|
||||
{
|
||||
String = 0, // A user-defined string
|
||||
Date = 1, // The date
|
||||
Serial = 2 // A serial number
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The font to be used
|
||||
*/
|
||||
enum Font
|
||||
{
|
||||
Standard = 0, // Standard font
|
||||
Native = 1 // Native tool font
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The string for "String" type
|
||||
*/
|
||||
std::string string;
|
||||
|
||||
/**
|
||||
* @brief The transformation of the title
|
||||
*
|
||||
* The origin of the title is supposed to be in the center of
|
||||
* the title field.
|
||||
*/
|
||||
db::DTrans transformation;
|
||||
|
||||
/**
|
||||
* @brief Optional font parameters: character width
|
||||
*/
|
||||
double width;
|
||||
|
||||
/**
|
||||
* @brief Optional font parameters: character height
|
||||
*/
|
||||
double height;
|
||||
|
||||
/**
|
||||
* @brief Optional font parameters: character pitch
|
||||
*/
|
||||
double pitch;
|
||||
|
||||
/**
|
||||
* @brief The type of the title
|
||||
*/
|
||||
Type type;
|
||||
|
||||
/**
|
||||
* @brief The font to be used
|
||||
*/
|
||||
Font font;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A class representing a structure (pattern) on a mask
|
||||
*/
|
||||
class MALYStructure
|
||||
{
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
MALYStructure ()
|
||||
: nx (1), ny (1), dx (0.0), dy (0.0), layer (-1)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief The (expanded) path of the pattern file
|
||||
*/
|
||||
std::string path;
|
||||
|
||||
/**
|
||||
* @brief The name of the top cell
|
||||
* If empty, the topcell is determined automatically
|
||||
*/
|
||||
std::string topcell;
|
||||
|
||||
/**
|
||||
* @brief The pattern window in the original file
|
||||
*/
|
||||
db::DBox size;
|
||||
|
||||
/**
|
||||
* @brief The transformation needed to place the original file
|
||||
*/
|
||||
db::DCplxTrans transformation;
|
||||
|
||||
/**
|
||||
* @brief The number of placements in x direction
|
||||
*/
|
||||
int nx;
|
||||
|
||||
/**
|
||||
* @brief The number of placements in y direction
|
||||
*/
|
||||
int ny;
|
||||
|
||||
/**
|
||||
* @brief The placement pitch in x direction (if nx > 1)
|
||||
*/
|
||||
double dx;
|
||||
|
||||
/**
|
||||
* @brief The placement pitch in y direction (if ny > 1)
|
||||
*/
|
||||
double dy;
|
||||
|
||||
/**
|
||||
* @brief The design name
|
||||
*/
|
||||
std::string dname;
|
||||
|
||||
/**
|
||||
* @brief The name for the mask process
|
||||
*/
|
||||
std::string mname;
|
||||
|
||||
/**
|
||||
* @brief The name for the mask tool
|
||||
*/
|
||||
std::string ename;
|
||||
|
||||
/**
|
||||
* @brief The layer used from the OASIS file
|
||||
*
|
||||
* A value of -1 means "all".
|
||||
*/
|
||||
int layer;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A class representing one mask
|
||||
*/
|
||||
class MALYMask
|
||||
{
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
MALYMask ()
|
||||
: size_um (0.0)
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief Size of the mask in micrometers
|
||||
*/
|
||||
double size_um;
|
||||
|
||||
/**
|
||||
* @brief Name of the mask
|
||||
*
|
||||
* This is also the name of the layer generated
|
||||
*/
|
||||
std::string name;
|
||||
|
||||
/**
|
||||
* @brief The list of structures
|
||||
*/
|
||||
std::list<MALYStructure> structures;
|
||||
|
||||
/**
|
||||
* @brief The list of titles
|
||||
*/
|
||||
std::list<MALYTitle> titles;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A class representing the MALY file
|
||||
*/
|
||||
class MALYData
|
||||
{
|
||||
/**
|
||||
* @brief Default constructor
|
||||
*/
|
||||
MALYData ()
|
||||
{ }
|
||||
|
||||
/**
|
||||
* @brief The masks defined by the file
|
||||
*/
|
||||
std::list<MALYMask> masks;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -83,14 +83,18 @@ gsi::ClassExt<db::LoadLayoutOptions> maly_reader_options (
|
|||
"@param map The layer map to set.\n"
|
||||
"@param create_other_layers The flag indicating whether other layers will be created as well. Set to false to read only the layers in the layer map.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.26.2."
|
||||
"Layer maps can also be used to map the named MALY mask layers to GDS layer/datatypes.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.30.2."
|
||||
) +
|
||||
gsi::method_ext ("maly_layer_map=", &set_layer_map1, gsi::arg ("map"),
|
||||
"@brief Sets the layer map\n"
|
||||
"This sets a layer mapping for the reader. Unlike \\maly_set_layer_map, the 'create_other_layers' flag is not changed.\n"
|
||||
"@param map The layer map to set.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.26.2."
|
||||
"Layer maps can also be used to map the named MALY mask layers to GDS layer/datatypes.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.30.2."
|
||||
) +
|
||||
gsi::method_ext ("maly_select_all_layers", &select_all_layers,
|
||||
"@brief Selects all layers and disables the layer map\n"
|
||||
|
|
@ -98,13 +102,13 @@ gsi::ClassExt<db::LoadLayoutOptions> maly_reader_options (
|
|||
"This disables any layer map and enables reading of all layers.\n"
|
||||
"New layers will be created when required.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.26.2."
|
||||
"This method has been added in version 0.30.2."
|
||||
) +
|
||||
gsi::method_ext ("maly_layer_map", &get_layer_map,
|
||||
"@brief Gets the layer map\n"
|
||||
"@return A reference to the layer map\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.26.2."
|
||||
"This method has been added in version 0.30.2."
|
||||
) +
|
||||
gsi::method_ext ("maly_create_other_layers?", &create_other_layers,
|
||||
"@brief Gets a value indicating whether other layers shall be created\n"
|
||||
|
|
@ -112,19 +116,28 @@ gsi::ClassExt<db::LoadLayoutOptions> maly_reader_options (
|
|||
"This attribute acts together with a layer map (see \\maly_layer_map=). Layers not listed in this map are created as well when "
|
||||
"\\maly_create_other_layers? is true. Otherwise they are ignored.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.26.2."
|
||||
"This method has been added in version 0.30.2."
|
||||
) +
|
||||
gsi::method_ext ("maly_create_other_layers=", &set_create_other_layers, gsi::arg ("create"),
|
||||
"@brief Specifies whether other layers shall be created\n"
|
||||
"@param create True, if other layers will be created.\n"
|
||||
"See \\maly_create_other_layers? for a description of this attribute.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.26.2."
|
||||
"This method has been added in version 0.30.2."
|
||||
) +
|
||||
gsi::method_ext ("maly_dbu=", &set_maly_dbu, gsi::arg ("dbu"),
|
||||
"@brief Specifies the database unit which the reader uses and produces\n"
|
||||
"The database unit is the final resolution of the produced layout. This physical resolution is usually "
|
||||
"defined by the layout system - GDS for example typically uses 1nm (maly_dbu=0.001).\n"
|
||||
"All geometry in the MALY pattern files is brought to the database unit by scaling.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.30.2."
|
||||
) +
|
||||
gsi::method_ext ("maly_dbu", &get_maly_dbu,
|
||||
"@brief Specifies the database unit which the reader uses and produces\n"
|
||||
"See \\maly_dbu= method for a description of this property.\n"
|
||||
"\nThis property has been added in version 0.26.2.\n"
|
||||
"\n"
|
||||
"This method has been added in version 0.30.2."
|
||||
),
|
||||
""
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue