Welcome to the reference page for QisMNtrc, an extension of QisMLib, Artwork Conversion's CAD processing framework.
QisMNtrc traces nets. In a chip or circuit board layout, a net is the set of metal shapes that are electrically connected to one another, joined from one metal layer to the next by vias, the small openings that link layers together. Given a description of which layers are metal and which are vias, called a stackup, the extension follows the connections and hands back every polygon that belongs to the net. It works in two ways:
Point tracing starts from a single point on a metal layer and finds the one net that passes through it.
Region tracing takes one or more rectangular hot-spots and finds every net that touches them. It can also report which regions each net crosses and which nets cross each region.
Tracing runs on multiple threads, can be limited to a range of layers, can locate driver points where a net reaches the diffusion layer through a contact, and can stop early when a net grows beyond a chosen size. Since version 1.8 it also handles non-semiconductor designs such as printed circuit boards, including data imported from ODB++, a common circuit board exchange format.
This page is the complete reference for the extension. Here is what you will find, in the order it appears:
C++ programming interface. The notification handler through which your program receives net polygons and progress updates, the parameter objects for point and region tracing, the options that stay fixed for a tracer and those that may change from one trace to the next, the tracer object itself, and the gateway that creates stackups and tracers.
Technology file syntax. The text format of a legacy technology file that defines the stackup: its metal and via layers, layer name mappings, layers synthesized from formulas, and the layers used for driver detection.
Stackup programming interface. The objects that represent a single order in the stackup and the stackup as a whole, including how to write layer formulas in either postfix or infix notation and how to check that a stackup is valid.
Script commands. The equivalent commands for loading a stackup from a file, opening and closing a tracer, and running point or region traces from the framework's scripting language, with the resulting nets written to a GDSII file.
Licensing. Two short tables showing that each open tracer holds one license until it is closed, for both the programming interface and scripts.
Version history. A release log from the first release in May 2017 through version 1.8 in August 2026, which added support for non-semiconductor designs and for scripting.
Developers new to the extension should start with the technology file syntax to see how a stackup is described, then move to the C++ programming interface. Anyone who just wants to trace a net can go straight to the script commands.
QisMNtrc QisMNtrc C++ API (qismntrc.h)QisMNtrcFlagsQisMNtrcNotifyVersion ControlBegin_netNet_boundaryNet_boundary_mtEnd_netNet_markerNet_infoNet_refresh_mtPointTraceArgsVersion ControlSet_view_cellGet_view_cellSet_seed_layerGet_seed_layerGet_seed_datatypeSet_seed_PointGet_seed_point_xGet_seed_point_yRegionTraceArgsVersion ControlSet_view_cellGet_view_cellSet_seed_layersGet_seed_layer_countGet_seed_layer_numbersGet_seed_dttp_numbersClear_regionsAdd_region_llurAdd_region_llwhAdd_region_cwhRegion_countGet_regionPreTraceOptionsVersion ControlCloneSet_optimal_tileGet_optimal_tile_nxGet_optimal_tile_nySet_max_via_sizeGet_max_via_sizeSet_order_rangeGet_start_orderGet_stop_orderPreTraceOptionsV2Set_design_is_semiGet_design_is_semiTraceOptionsVersion ControlSet_thread_numGet_thread_numSet_max_net_verticesGet_max_net_verticesSet_ignore_truncated_netsGet_ignore_truncated_netsSet_find_driversGet_find_driversSet_live_traceGet_live_traceQisMNtrcTracerVersion ControlGet_last_error_msgPoint_traceRegion_traceGet_regions_crossing_netGet_nets_crossing_regionQisMNtrcVersion ControlGet_last_error_msgNew_objectDelete_objectNew_stackupDelete_stackupOptimal_tilingOpen_traceClose_traceTechnology File SyntaxSyntax for METALSyntax for LAYERMAPSyntax for SYNTHESIZESyntax for DRIVER_INFOQisMNtrc Stackup C++ API (qismstackupdb.h)QisMNtrcOrderVersion ControlGet_last_error_msgOrder_numberSet_nameGet_nameSet_layer_expression_postfixSet_layer_expression_infixGet_layer_expression_postfixHas_layerIs_validResetQisMNtrcStackupVersion ControlObject_nameGet_last_error_msgResetResizeSizeEdit_orderGet_orderFind_by_layerFind_by_nameGet_stackup_layersIs_validPrint_stackupSet_driver_metalGet_driver_metalSet_driver_contactGet_driver_contactEdit_driver_diffusionGet_driver_diffusionQisMNtrc Commandsntrc.new_stackup_from_filestackup.layer_mapntrc.delete_stackupntrc.open_tracentrc.close_tracentrcer.point_tracentrcer.region_traceQisMNtrc Licensing (C++ API)QisMNtrc Licensing (Script)Version Historyv1.8 (2026-08)v1.7, v1.7.1 (2018-07-05)v1.6 (2018-03-30)v1.5 (2018-02-13)v1.4 (2017-11-16)v1.3 (2017-08-15)v1.2 (2017-07-26)v1.1 (2017-07-12)v1.0 (2017-05-09)
struct QISMNTRC_LNX_DECLSPEC QisMNtrcFlags{ /***************************************************************************** QisMNtrcStackup creation flags ----------------------------------------------------------------------------*/ enum StackupFileType { SFT_NONE = 0 /* Create an empty stackup */ ,SFT_TLIB = 1 /* Create stackup from a legacy technology (.tlib) file */ }; enum ObjectType { OBJ_PNTTRACEARGS=1 ,OBJ_RGNTRACEARGS=2 ,OBJ_PRETRACEOPTS=3 ,OBJ_TRACEOPTS=4 };};Notification (Callback) API for a client requesting Point, Region tracing
xxxxxxxxxxclass QisMNtrcNotify { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMNtrcNotify_cast(const int version) = 0;/* PLEASE ADD THE FOLLOWING IMPLEMENTATION IN YOUR HANDLER { switch(version) { case 0: return this; case 1: return dynamic_cast<QisMNtrcNotify*>(this); //Add more casts based on the implementation of your handler } return 0;} */virtual const void* QisMNtrcNotify_cast(const int version) const = 0;/* PLEASE ADD THE FOLLOWING IMPLEMENTATION IN YOUR HANDLER { switch(version) { case 0: return this; case 1: return dynamic_cast<const QisMNtrcNotify*>(this); //Add more casts based on the implementation of your handler } return 0;} */virtual int QisMNtrcNotify_latest_version() const = 0;/* PLEASE ADD THE FOLLOWING IMPLEMENTATION IN YOUR HANDLER { return 1; //Return the newest version implemented by your handler} */Notification at the start of receiving polygons for a net
netID: A number (>0) that uniquely identifies a net within an instance of QisMNtrcTracer
The return code from this notification is ignored
At the moment, this notification originates from the same thread from which the tracing was invoked
xxxxxxxxxxvirtual int Begin_net(const int netID) { return 0; }Notification to receive a single polygon for a net
xy: Polygon co-ordinates (in database-units)
numVert: Number of integer pairs in 'xy' (xy is an array of numVert vertices or (numVert*2) integers)
order: Stackup order (>= 1) to which the polygon belongs
grid: Resolution of the data (same as QisMFile::Grid()). To convert a co-ordinate from database-unit (int) to file-unit (double), multiply by the grid
The return code from this notification is ignored
The array of xy-coordinates obtained via this notification is only valid during this notification. The client should not store this address/pointer for later use. Instead, the client should copy this array to another buffer during this notification
The polygon in question may have been synthesized from one or more layers and therefore may not correspond to a specific layer:datatype in the CAD file
Net_boundary notification originates from the same thread from which the tracing was invoked AFTER the entire net has been traced ( TraceOptions::Get_live_trace() is false)
Net_boundary_mt notification originates from various tracer threads WHILE the net is being traced (TraceOptions::Get_live_trace() is true). Since may threads will emit this notification at the same time, the client MUST ensure that the code executed within this notification is thread safe
xxxxxxxxxxvirtual int Net_boundary( const int* xy, const int numVert, const unsigned short order, const double grid ) { return 0; }virtual int Net_boundary_mt( const int* xy, const int numVert, const unsigned short order, const double grid ) { return 0; }Notification at the end of receiving polygons for a net
netID: A number (>0) that uniquely identifies a net within an instance of QisMNtrcTracer
truncated: If true, the net in question was truncated (not completely traced beacuse of client-specified tracing options)
If TraceOptions::Set_ignore_truncated_nets(..) option is ON, the client will not receive any truncated nets and therefore 'truncated' will only be false
At the moment, this notification originates from the same thread from which the tracing was invoked
xxxxxxxxxxvirtual void End_net(const int netID, const bool truncated) { }Used to notify driver points
txt: Name of the marker
x,y: X,Y co-ordinate (in database units)
o: Stackup order number
Currently only used for driver points
txt format is D<net-number>.<driver-number>
o should be ignored
In the future, this could be used to identify other useful x,y points
xxxxxxxxxxvirtual void Net_marker( const char* txt, const int x, const int y, const unsigned short o ) { }Progress/Information regarding a particular trace
pre, post: Strings to be used as prefix, suffux to msg for the purpose of formatting
msg: String containing information
Can be used to report progress updates while the tracing is in progress
xxxxxxxxxxvirtual void Net_info(const char* pre, const char* msg, const char* post) { }A periodic refresh while the tracing is in progress so that the client can process essential GUI events etc.
This notification can originate from one of the many trace threads. The client may also receive more that one of these notifications at the same time from different threads. The client must apply appropriate protections to guarantee mutual exlusion to whichever resources are accessed during this notification
In order to stop/terminate the trace, return a non-zero integer from this callback. In that case, the trace function will return false (error), QisMNtrcTracer::Get_last_error_msg will contain the integer code issued by the client that caused the termination
xxxxxxxxxxvirtual int Net_refresh_mt() { return 0; }A data structure to store Point-tracing parameters
Create an instance using QisMNtrc::New_object(QisMNtrcFlags::OBJ_PNTTRACEARGS) and destroy using QisMNtrc::Delete_object
xxxxxxxxxxclass PointTraceArgs { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* PointTraceArgs_cast(const int version) = 0;virtual const void* PointTraceArgs_cast(const int version) const = 0;virtual int PointTraceArgs_latest_version() const = 0;Set/Get the view cell (to trace nets on)
cellname: Name of a valid cell
xxxxxxxxxxvirtual void Set_view_cell(const char* cellname) = 0;virtual const char* Get_view_cell() const = 0;Set/Get the layer (metal) of the seed point from where tracing begins
layer, dttp: Layer and datatype for the seed point
The seed layer:dttp MUST corresponds to/participates in a METAL order in the stackup
xxxxxxxxxxvirtual void Set_seed_layer( const unsigned short layer, const unsigned short dttp ) = 0;virtual unsigned short Get_seed_layer() const = 0;virtual unsigned short Get_seed_datatype() const = 0;Set/Get the co-ordinates of the point where the tracing begins
x, y: xy co-ordinates in file units
The seed point MUST lie on a polygons that corresponds to/participates in a METAL order in the stackup
xxxxxxxxxxvirtual void Set_seed_Point(const double x, const double y) = 0;virtual double Get_seed_point_x() const = 0;virtual double Get_seed_point_y() const = 0;A data structure to store Region-tracing (hot-spot tracing) parameters
Create an instance using QisMNtrc::New_object(QisMNtrcFlags::OBJ_RGNTRACEARGS) and destroy using QisMNtrc::Delete_object
xxxxxxxxxxclass RegionTraceArgs { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* RegionTraceArgs_cast(const int version) = 0;virtual const void* RegionTraceArgs_cast(const int version) const = 0;virtual int RegionTraceArgs_latest_version() const = 0;Set/Get the view cell (to trace nets on)
cellname: Name of a valid cell
xxxxxxxxxxvirtual void Set_view_cell(const char* cellname) = 0;virtual const char* Get_view_cell() const = 0;Set/Get the list of layer and datatype numbers (metal) to be used to find the seed points for tracing within the specified regions (hot-spots)
nLayers: Number of items (layers, dttps) in the list
layerList, dttpList: List of layer/dttp numbers
The seed layer:dttp(s) MUST corresponds to/participates in a METAL order in the stackup
Atleast one such layer:dttp MUST be specified to do region tracing
xxxxxxxxxxvirtual void Set_seed_layers( const int nLayers, const unsigned short* layerList, const unsigned short* dttpList ) = 0;virtual int Get_seed_layer_count() const = 0;virtual const unsigned short* Get_seed_layer_numbers() const = 0;virtual const unsigned short* Get_seed_dttp_numbers() const = 0;Clear the list of regions (hot-spots)
xxxxxxxxxxvirtual void Clear_regions() = 0;Add a region (hot-spot) to the list
minX, minY: Co-ordinates of the lower left point of the rectangular region in file units
maxX, maxY: Co-ordinates of the upper right point of the rectangular region in file units
width, height: Width and height of the rectangular region in file units
cx, cy: Co-ordinates of the center-point of the rectangular region in file units
Atleast one region MUST be specified to do region tracing
xxxxxxxxxxvirtual void Add_region_llur( const double minX, const double minY, const double maxX, const double maxY ) = 0;virtual void Add_region_llwh( const double minX, const double minY, const double width, const double height ) = 0;virtual void Add_region_cwh( const double cx, const double cy, const double width, const double height ) = 0;Get a region (hot-spot) from the list
minX, minY: Co-ordinates of the lower left point of the rectangular region in file units
maxX, maxY: Co-ordinates of the upper right point of the rectangular region in file units
index: Index of the region in the list. 0 <= index < Region_count()
xxxxxxxxxxvirtual int Region_count() const = 0;virtual bool Get_region( const int index, double& minX, double& minY, double& maxX, double& maxY ) const = 0;Data structure to store trace options that remain the same for a given view cell and stackup (and therefore QisMNtrcTracer)
These options determine how the input data set is computed and organized
The input data set, once computed, remains persistant through the life of the QisMNtrcTracer object and can be used over and over again for multiple traces
Create an instance using QisMNtrc::New_object(QisMNtrcFlags::OBJ_PRETRACEOPTS) and destroy using QisMNtrc::Delete_object
xxxxxxxxxxclass PreTraceOptions { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* PreTraceOptions_cast(const int version) = 0;virtual const void* PreTraceOptions_cast(const int version) const = 0;virtual int PreTraceOptions_latest_version() const = 0;Create a new copy
xxxxxxxxxxvirtual PreTraceOptions* Clone() const = 0;Control the manner in which the data space is divided (tiling) for faster and parallel computation
nx, ny: Number of tiles along X,Y (>= 1)
By default, QisMNtrcTracer auto-computes the number of tiles along X and Y based on the estimated number of vertices in the data space. This computation is only applied over the layers in the stackup and is multi-threaded. Auto-tiling will be a one-time computation for a given view cell and stackup
If the optimal tiling parameters are already known to the client, this computation can be avoided
xxxxxxxxxxvirtual void Set_optimal_tile(const int nx, const int ny) = 0;virtual int Get_optimal_tile_nx() const = 0;virtual int Get_optimal_tile_ny() const = 0;Specify the maximum size of a rectangle to be treated as a via
maxDxDy: Max. Dx or Dy in file units for a rectangle to be treated as a via
Any polygon on a VIA order that is not a simple rectangle and has a dx,dy larger than the specified limit will be dropped from the list of vias
By default (0.0), there is no limit to the size of what should be treated as a via
A via is determined to be connected to a neighboring metal polygon ONLY if it's centroid lies on/inside that metal polygon
xxxxxxxxxxvirtual void Set_max_via_size(const double maxDxDy) = 0;virtual double Get_max_via_size() const = 0;Limit the range of order numbers involved in computation of nets
start, stop: Order numbers indicating the lower and upper bounds for tracing
start, stop orders MUST correspond to METAL. 1 <= start <= stop <= 65535
By default, start == 1, stop == 65535
xxxxxxxxxxvirtual void Set_order_range( const unsigned short start, const unsigned short stop ) = 0;virtual unsigned short Get_start_order() const = 0;virtual unsigned short Get_stop_order() const = 0;Extension (version = 2) for PreTraceOptions
xxxxxxxxxxclass PreTraceOptionsV2: public PreTraceOptions { ... };Set/Get tracer made to indicate that the design is semiconductor (true) or non-semiconductor (false, PCB etc.)
For semi data, via's are assumed to be rectangles and of a certain max. size. Also, it is assumed that in this mode, polygons are not very complex
Default: true
xxxxxxxxxxvirtual void Set_design_is_semi(const bool yesNo) = 0;virtual bool Get_design_is_semi() const = 0;Data structure to store trace options that can change between traces
Create an instance using QisMNtrc::New_object(QisMNtrcFlags::OBJ_TRACEOPTS) and destroy using QisMNtrc::Delete_object
xxxxxxxxxxclass TraceOptions { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* TraceOptions_cast(const int version) = 0;virtual const void* TraceOptions_cast(const int version) const = 0;virtual int TraceOptions_latest_version() const = 0;Set/Get number of threads to be used for tracing
thrnum: No. of threads. If 0, `QisMNtrcTracer1 auto-computes the number of threads based on the number of processors available
xxxxxxxxxxvirtual void Set_thread_num(const int thrnum) = 0;virtual int Get_thread_num() const = 0;Set/Get Maximum number of vertices after which tracing of a net is to be truncated
numVert: Max. number of vertices
If the Set_ignore_truncated_nets(..) option is set to true, truncated net will not be returned to the user via QisMNtrcNotify. Otherwise, all nets will be returned and the 'truncated' flag in QisMNtrcNotify::End_net(..) will indicate if a net is truncated
xxxxxxxxxxvirtual void Set_max_net_vertices(const long long numVert) = 0;virtual long long Get_max_net_vertices() const = 0;Set/Get flag to ignore truncated nets
yesNo: If true, truncated net will not be returned to the user via QisMNtrcNotify. Otherwise, all nets will be returned and the 'truncated' flag in QisMNtrcNotify::End_net(..) will indicate if a net is truncated
xxxxxxxxxxvirtual void Set_ignore_truncated_nets(const bool yesNo) = 0;virtual bool Get_ignore_truncated_nets() const = 0;Set/Get driver detection ON/OFF
The stackup definition MUST correctly specify the layers participating in driver detection. The following MUST be true for driver detection to work:
QisMNtrcStackup::Get_driver_metal() > 0, <= QisMNtrcStackup::Size(), is ODD
QisMNtrcStackup::Get_driver_contact() > 0, <= QisMNtrcStackup::Size(), is EVEN
QisMNtrcStackup::Get_driver_diffusion()->Is_valid() returns true
The client shall recieve the QisMNtrcNotify::Net_marker notification for each net containing drivers (between QisMNtrcNotify::Begin_net and QisMNtrcNotify::End_net but after the net has been traced)
The QisMNtrcNotify::Net_marker notification always comes from the same client thread that started the trace
xxxxxxxxxxvirtual void Set_find_drivers(const bool set = true) = 0;virtual bool Get_find_drivers() const = 0;Set/Get live tracing (recieve net polygons on-the-fly) ON/OFF
When live tracing is ON, net polygons are sent to the client from multiple tracer threads as they are being generated. This results in the QisMNtrcNotify::Net_boundary_mt notification
When live tracing is OFF, net polygons are sent to the client from the same client thread that started the trace after the entire net has been traced. This results in the QisMNtrcNotify::Net_boundary notifications
xxxxxxxxxxvirtual void Set_live_trace(const bool set = true) = 0;virtual bool Get_live_trace() const = 0;API to perform point and region (hot-spot) tracing
xxxxxxxxxxclass QisMNtrcTracer { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMNtrcTracer_cast(const int version) = 0;virtual const void* QisMNtrcTracer_cast(const int version) const = 0;virtual int QisMNtrcTracer_latest_version() const = 0;Get error message and code corresponding to the last error condition
xxxxxxxxxxvirtual const char* Get_last_error_msg() const = 0;Trace a net from a single point on metal
args: Point tracing parameters
client: Callback handler to receive net polygons and trace information
opts: Optional tracing parameters
Success: true
Failure: false. Call Get_last_error_msg() to get more information about the error
Once the tracing begins, the client receives a series of QisMNtrcNotify::Net_info(..) and QisMNtrcNotify::Net_refresh_mt() notifications for progress updates and client refresh respectively
Once the tracing is complete, the client receives a QisMNtrcNotify::Begin_net(..) notification followed by a series of QisMNtrcNotify::Net_boundary(..) and finally a QisMNtrcNotify::End_net(..) notification
The entire data space is divided into equally sized tiles and input data for tracing is computed for a tile only once for a given cell when that tile is visited for the first time. This data persists for the life of QisMNtrcTracer unless the view cell changes and is reused for subsequent traces
Net polygons that cross multiple tiles are clipped at the tile boundary with a tiny amount of overlap
See PointTraceArgs and TraceOptions for more information about the trace parameters
xxxxxxxxxxvirtual bool Point_trace( const PointTraceArgs* args, QisMNtrcNotify* client, const TraceOptions* opts = 0 ) = 0; Trace nets that cross one or more regions (hot-spots)
args: Region tracing parameters
client: Callback handler to receive net polygons and trace information
opts: Optional tracing parameters
Success: true
Failure: false. Call Get_last_error_msg() to get more information about the error
Once the tracing begins, the client receives a series of QisMNtrcNotify::Net_info(..) and QisMNtrcNotify::Net_refresh_mt() notifications for progress updates and client refresh respectively
For each net encountered, the client receives a QisMNtrcNotify::Begin_net(..) notification followed by a series of QisMNtrcNotify::Net_boundary(..) and finally a QisMNtrcNotify::End_net(..) notification
The entire data space is divided into equally sized tiles and input data for tracing is computed for a tile only once for a given cell when that tile is visited for the first time. This data persists for the life of QisMNtrcTracer unless the view cell changes and is reused for subsequent traces
Net polygons that cross multiple tiles are clipped at the tile boundary with a tiny amount of overlap
See RegionTraceArgs and TraceOptions for more information about the trace parameters
xxxxxxxxxxvirtual bool Region_trace( const RegionTraceArgs* args, QisMNtrcNotify* client, const TraceOptions* opts = 0 ) = 0;Get a list of regions that a specified net crosses
netID: Net identifier as obtained via QisMNtrcNotify::Begin_net(..)
regionIDs: A buffer to store the addeess of a list of region identifiers
The number of regions in the list (pointed to by regionIDs)
A region-id identifies the location of a region in the list specified by the user (RegionTraceArgs). 1 <= region-id <= RegionTraceArgs::Region_count()
To retreive the co-ordinates of a region-id 'i', call RegionTraceArgs::Get_region(..) with index = i+1
xxxxxxxxxxvirtual int Get_regions_crossing_net( const int netID, const int*& regionIDs ) = 0;Get a list of nets that cross a specified region
regionID: 1 <= region-id <= RegionTraceArgs::Region_count()
netIDs: A buffer to store the net identifiers
The number of nets in the list (pointed to by netIDs)
A region-id identifies the location of a region in the list specified by the user (RegionTraceArgs). 1 <= region-id <= RegionTraceArgs::Region_count()
To retreive the co-ordinates of a region-id 'i', call RegionTraceArgs::Get_region(..) with index = i+1
xxxxxxxxxxvirtual int Get_nets_crossing_region( const int regionID, const int*& netIDs ) = 0;The QisMLib Extension API that serves as a gateway to tracing nets
xxxxxxxxxxclass QisMNtrc: public NsQisMLib::QisMExtensionAPI { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMNtrc_cast(const int version) = 0;virtual const void* QisMNtrc_cast(const int version) const = 0;virtual int QisMNtrc_latest_version() const = 0;Get error message and code corresponding to the last error condition
xxxxxxxxxxvirtual const char* Get_last_error_msg() const = 0;Create an instance of any one of the various QisMNtrc data structures
type: Type of the class whose instance is to be created
A handle to an instance of the newly created object. It must be down-casted to the appropriate class using dynamic_cast
Use this method of creation for object of the following classes:
PointTraceArgs
RegionTraceArgs
PreTraceOptions
TraceOptions
To avoid memory leak, every object created using this method must be destroyed using the Delete_object method
xxxxxxxxxxvirtual void* New_object(const QisMNtrcFlags::ObjectType type) = 0;virtual void Delete_object(const QisMNtrcFlags::ObjectType type, void* handle) = 0;Create/Destroy an instance of the QisMNtrc stackup definition
type: Type of the stackup definition to be created
QisMNtrcFlags::SFT_NONE : Empty definition to be configured by the client
QisMNtrcFlags::SFT_TLIB : Import stackup definition from a legacy technology file (.tlib used with the old QIS/Nettrace system, syntax below). In this case, 'filePath' MUST contain the path of the technology file In the future, this could be extended to other import formats
filePath: Path of the file to import the stackup definition from. Only used if type == QisMNtrcFlags::SFT_TLIB or any other future import types
handle: Handle to a valid stackup to be destroyed
Success: A handle to an instance of the newly created stackup. It must be down-casted to the appropriate class using dynamic_cast
Failure: NULL. Call Get_last_error_msg() for details
To avoid memory leak, every stackup created using New_stackup(..) must be destroyed using the Delete_stackup(..)
xxxxxxxxxxvirtual QisMNtrcStackup* New_stackup( const QisMNtrcFlags::StackupFileType type = QisMNtrcFlags::SFT_NONE, const char* filePath = 0 ) = 0;virtual void Delete_stackup(QisMNtrcStackup* handle) = 0;Compute the optimal tiling parameters for a given stackup and view cell
filedb: Handle to a QisMFile database obtained when a GDSII/OASIS/DbLoad file is loaded using QisMFile::Load_file
stackup: Handle to a valid stackup definition. QisMNtrcStackup::Is_valid() MUST return true
cell: Name of the view cell
Success: true. nxOptimal, nyOptimal would contain meaninful values to be supplied to PreTraceOptions::Optimal_tile(..). vertexCount, polygonCount if not NULL, will point to the respective counts (exploded)
Failure: false. Call Get_last_error_msg() for details
Use this as an alternative to auto-tiling computation (default behavior) during Open_trace.
As long as the file, stackup and cell has not changed, the tiling values can be used to specify PreTraceOptions::Optimal_tile(..) during Open_trace
Since this operation traverses the home view of the cell, it may take some time depending on the data size, hierarchy, repeating cell references etc.
xxxxxxxxxxvirtual bool Optimal_tiling( NsQisMLib::QisMFile* fileDb, const QisMNtrcStackup* stackup, const char* cell, int& nxOptimal, int& nyOptimal, long long* vertexCount = 0, long long* polygonCount = 0 ) = 0;Create an instance of the net tracer
fileDb: Handle to a QisMFile database obtained when a GDSII/OASIS/DbLoad file is loaded using QisMFile::Load_file
stackup: Handle to a valid stackup definition. QisMNtrcStackup::Is_valid() MUST return true
opts: Tracing options that remain consistent for a given view cell and stackup
argC, argT, argV: Reserved for future use
Success: A non-NULL handle to a new tracer object
Each Open_trace requires 1 QisMNtrc license and that license is held until the tracer is destroyed using Close_trace
xxxxxxxxxxvirtual QisMNtrcTracer* Open_trace( NsQisMLib::QisMFile* fileDb, const QisMNtrcStackup* stackup, const PreTraceOptions* opts, const int argC = 0, const char* const* argT = 0, void* const* argV = 0 ) = 0;Destroy an instance of the net tracer
handle: Handle to a valid QisMNtrcTracer object to be destroyed
Every tracer created using QisMNtrc::Open_trace MUST be destroyed using this method to avoid memory and license leak
xxxxxxxxxxvirtual void Close_trace(QisMNtrcTracer* handle) = 0;The technology file is a text file containing THREE sections of relevance to QisMNtrc as follows:
METAL (required)
LAYERMAP (optional)
SYNTHESIZE (optional)
DRIVER_INFO (optional)
The order of the occurence sections is not important
<order> MUST start at 1 and increase continuously in sequence
<layer> can be one of the following:
L indicating all datatypes belonging to a specific layer L
L:D indicating a specific layer L and datatype D
00N indicating a synthesized/derived layer identified by the number N (>0) as defined in the SYNTHESIZE section
<type> MUST be 'M' (metal) or 'V' (via)
The first and last order must be METAL
+ : UNION
- : DIFFERENCE
& : INTERSECTION
^ : XOR
| : OR/AGGREGATION (merge layers without union)
, : OR/AGGREGATION (merge layers without union)
Lines starting with a # as the first character will be trated as a comment and ignored
xxxxxxxxxxMETAL<order> <layer> <name> <type>...<order> <layer> <name> <type>ENDMETAL
xxxxxxxxxxLAYERMAPASSIGN <name> <layer> [<layer>]*...ASSIGN <name> <layer> [<layer>]*ENDLAYERMAP
xxxxxxxxxxSYNTHESIZE00N <layer> <op> <layer> [<op> <layer>]*...00N <layer> <op> <layer> [<op> <layer>]*ENDSYNTHESIZE
xxxxxxxxxxDRIVER_INFOMETAL <layer>CONTACT <layer>DIFF <layer> [<layer>]*ENDDRIVER_INFO
Representation of a single stackup order
xxxxxxxxxxclass QisMNtrcOrder { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMNtrcOrder_cast(const int version) = 0;virtual const void* QisMNtrcOrder_cast(const int version) const = 0;virtual int QisMNtrcOrder_latest_version() const = 0;Get the details of the last error
xxxxxxxxxxvirtual const char* Get_last_error_msg() const = 0;Get the order number. ODD => METAL, EVEN => VIA. Order_number() >= 1
xxxxxxxxxxvirtual unsigned short Order_number() const = 0;Set/Get the name of this stackup order
xxxxxxxxxxvirtual void Set_name(const char* name) = 0;virtual const char* Get_name() const = 0;Set the layer expression for this stackup order as a postfix string. Eg:
xxxxxxxxxx"1:0""1" (all datatypes of layer 1 (1:*))"1:0 2 +" (union of 1:0 and 2:*)"1 2:0 -" (1:* minus 2:0)"1 2 &" (1:* and 2:*)"1 2 ^" (1:* xor 2:*)"1 2 |" (1:* or 2:* - no union)"1 2 & 3 4 - +" ((1:* and 2:*) union (3:* minus 4:*))"1 2 & 3 - 4 +" (interesect 1:* and 2:*, then subtract 3:*, then union with 4:*)
Allowed operators:
+ (union)
- (difference/minus)
& (intersection/and)
^ (xor)
| (or, combine without union)
Allowed operands:
<L> (0 <= L < 65535 represents all datattypes of layer number L)
<L>:<D> (0 <= L,D < 65535 repesents a specific layer:datatype)
The entire expression MUST result in a SINGLE result. E.g
xxxxxxxxxx1 2 + 3 4 - & (OK)1 2 + 3 4 - (not OK)
It is necessary to use 'space' to separate operands, operators
xxxxxxxxxxvirtual bool Set_layer_expression_postfix(const char* exp) = 0;Set the layer expression for this stackup order as an infix string. Eg:
xxxxxxxxxx"1:0""1" (all datatypes of layer 1 (1:*))"1:0 + 2" (union of 1:0 and 2:*)"(1 - 2:0)" (1:* minus 2:0)"1 & 2" (1:* and 2:*)"((1 ^ 2))" (1:* xor 2:*)"1 | 2" (1:* or 2:* - no union)"(1 & 2) + (3 - 4)" ((1:* and 2:*) union (3:* minus 4:*))"1 & 2 - 3 + 4" (interesect 1:* and 2:*, then subtract 3:*, then union with 4:*)
Allowed operators:
+ (union)
- (difference/minus)
& (intersection/and)
^ (xor)
| (or, combine without union)
Allowed operands:
<L> (0 <= L < 65535 represents all datattypes of layer number L)
<L>:<D> (0 <= L,D < 65535 repesents a specific layer:datatype)
Use of 'space' to seperate operands, operators not necessary
xxxxxxxxxxvirtual bool Set_layer_expression_infix(const char* exp) = 0;Get the layer expression for this order as postfix
For example, "1 2 + 3:0 - 4:1 4:2 & +" which represents the operation:
((1 + 2) - 3:0) + (4:1 & 4:2)
xxxxxxxxxxvirtual const char* Get_layer_expression_postfix() const = 0;Returns
true: If layer[:datatype] is associated with this order. If datatype == NULL, then layerNum MUST be fully associated with this order for return to be true.
In the above example:
Has_layer(1, NULL) => true
Has_layer(1, 1) => true
Has_layer(2, 2) => true
Has_layer(3, NULL) => false
Has_layer(4, 0) => true
Has_layer(10, 0) => false
xxxxxxxxxxvirtual bool Has_layer( const unsigned short layerNum, const unsigned short* datatype = 0 ) const = 0;
trueifGet_layer_expression_postfix()is non-empty string
xxxxxxxxxxvirtual bool Is_valid() const = 0;Reset this order
xxxxxxxxxxvirtual void Reset() = 0;Representation of an entire stackup
xxxxxxxxxxclass QisMNtrcStackup { ... };Cast a pointer to your handler to any type in the QisMNtrcNotify hierarchy using the version number
The version of a class is embedded in the name in form of a suffix V
The version of the topmost base class is 1
Return NULL if the version number is not recognized/implemented
xxxxxxxxxxvirtual void* QisMNtrcStackup_cast(const int version) = 0;virtual const void* QisMNtrcStackup_cast(const int version) const = 0;virtual int QisMNtrcStackup_latest_version() const = 0;Get the implentation name and version
xxxxxxxxxxvirtual const char* Object_name() const = 0;Get details about the last error
xxxxxxxxxxvirtual const char* Get_last_error_msg() const = 0;Clear the entire stackup. Size() == 0
xxxxxxxxxxvirtual void Reset() = 0;Specify a stackup size. MUST be an ODD number
xxxxxxxxxxvirtual void Resize(const unsigned short numOrders) = 0;Get the stackup size (>= 1 if valid. 0 means empty)
xxxxxxxxxxvirtual unsigned short Size() const = 0;Retreive a specific order for editing or info.
1 <= orderNum <= Size()
Return NULL => Invalid order no.
xxxxxxxxxxvirtual QisMNtrcOrder* Edit_order(const unsigned short orderNum) = 0;virtual const QisMNtrcOrder* Get_order(const int orderNum) const = 0;Get order number associated with the specified layer[:datatype].
Returns order number for which QisMNtrcOrder::Has_layer(layerNum, datatype) == true
Return >=1 if found. 0 => Not found
xxxxxxxxxxvirtual unsigned short Find_by_layer( const unsigned short layerNum, const unsigned short* datatype ) const = 0;Get order number associated with the specified name
Returns >=1 if found. 0 => Not found
xxxxxxxxxxvirtual unsigned short Find_by_name(const char* name) const = 0;Get a comma-separated list of all layer[:datatype] that participate in the current stackup (for all orders)
xxxxxxxxxxvirtual const char* Get_stackup_layers() const = 0;
trueifSize() >= 1and for each order number,QisMNtrcOrder::Is_valid() == true. If false, callGet_last_error_msgfor details
xxxxxxxxxxvirtual bool Is_valid() const = 0;Print the stackup definition to a file (expressed in postfix)
xxxxxxxxxxvirtual void Print_stackup(FILE* fp) const = 0;Set/Get the METAL order that connects to DIFFUSION via CONTACT for driver detection.
0 < Get_driver_metal() <= Size()andGet_driver_metal()is ODD
xxxxxxxxxxvirtual void Set_driver_metal(const unsigned short order) = 0;virtual unsigned short Get_driver_metal() const = 0;Set/Get the VIA order that connects DIFFUSION to CONTACT for driver detection.
0 < Get_driver_metal() < Size()andGet_driver_contact()is EVEN
xxxxxxxxxxvirtual void Set_driver_contact(const unsigned short order) = 0;virtual unsigned short Get_driver_contact() const = 0;Edit/Get the DIFFUSION layer that connects to METAL via CONTACT for driver detection.
Get_driver_diffusion()->Is_valid() MUST be true. layer[:datatype](s) participating in diffusion cannot participate elsewhere in the stackup as METAL or VIA
xxxxxxxxxxvirtual QisMNtrcOrder* Edit_driver_diffusion() = 0;virtual const QisMNtrcOrder* Get_driver_diffusion() const = 0;QisMScript Commands associated with QisMNtrc
See qismntrc.h for the corresponding C++ api
Some commands require a license
xxxxxxxxxxntrc.new_stackup_from_file&stackup={id}tlib={file_path}
Create a new stackup db from a text (.tlib) file
{id} is the name to be associated with the new stackup
{file_path} is the path to a valid stackup file
See Technology File Syntax for the syntax
Use ntrc.delete_stackup to delete this stackup db eventually
xxxxxxxxxxstackup.layer_map$stackup={id}&var={id}
Generate a layer-map string from a stackup db so that only the layers of interest are loaded
$stackup={id} is the name associated with a valid stackup db
&var={id} will save the layermap-string string to the specified variable that can be de-referenced as (({id})) during lib.load_file
xxxxxxxxxxntrc.delete_stackup$stackup={id}
Delete a stackup db
xxxxxxxxxxntrc.open_trace$filedb={id}&tracer={id}$stackup={id}[tiling=optimal | {nx},{ny}][maxvia={uu}][order={start},{stop}][[!]semi]
Create a new instance of the nettrace object
$filedb= is the name associated with the database to be used as the source
&tracer= is a name to be associated with the new nettrace object
$stackup= is the name associated with the stackup that will be used to determine connectivity
tiling= determines how the design is partitioned for multi-threaded tracing. optimal allows QisMNtrc to determine the tiling on it's own. {nx},{ny} allows the user to control the partitioning
maxvia= determines how big a via can be in file/user units (only in semi-conductor mode). By default (0.0), this check is omitted
order= informs the tracer which order numbers in the stackup to limit the tracing to
semi or !semi informs the tracer if the design is semi-conductor based or not (e.g PCB). For semi-conductor designs, the via(s) are assumed to be rectangle and no bigger than a certain size. Also, the polygons are assumed to be simpler
Default: semi
This object MUST be eventually destroyed to prevent resource leaks
xxxxxxxxxxntrc.close_trace$tracer={id}
Destroy the tracer object associated with the name {id}
xxxxxxxxxxntrcer.point_trace$tracer={id}gds={output_path}metal={l}:{d}point={x},{y}[cell={name}][thrnum={n}][maxv={n}][notruncated][units={u_m},{g_m}]
Trace a net from a single point (x, y, metal layer)
$tracer={id} is the name associated with a nettrace object
{output_path} is the path of a GDSII file with the resulting net
{l}:{d} is a valid metal layer per the stackup
{x},{y} is the seed point (in file/user units)
cell= if used specifies the view cell. Default: Deepest top cell
thrnum= if used specifies the no. threads to be used for tracing. Default (0): no. cpu(s) in the system
maxv= if used specifies the max. no. vertices for a net. If a net is larger than this value, it will be truncated unless notruncated is also used. Default (0): No truncation
{u_m},{g_m} are the units and grid in meter for the output. Default: 1e-6,1e-9 (um,nm)
xxxxxxxxxxntrcer.region_trace$tracer={id}gds={output_path}metal={l}:{d}[,{l}:{d}]*$regions={id}[cell={name}][thrnum={n}][maxv={n}][notruncated][units={u_m},{g_m}]
Trace all nets that originate from a collection of regions (hot-spots)
$tracer={id} is the name associated with a nettrace object
{output_path} is the path of a GDSII file with the resulting net
{l}:{d}... is a list of metal layers per the stackup to be used to find seed points
$regions={id} is a set of boxes containing the seed points for tracing nets
cell= if used specifies the view cell. Default: Deepest top cell
thrnum= if used specifies the no. threads to be used for tracing. Default (0): no. cpu(s) in the system
maxv= if used specifies the max. no. vertices for a net. If a net is larger than this value, it will be truncated unless notruncated is also used. Default (0): No truncation
{u_m},{g_m} are the units and grid in meter for the output. Default: 1e-6,1e-9 (um,nm)
| Operation | Code | Policy |
|---|---|---|
Open_trace | 11059 | Check out ONE license per call |
Close_trace | 11059 | Check in ONE license per call |
| Operation | Code | Policy |
|---|---|---|
ntrc.open_trace | 11059 | Check out ONE license per call |
ntrc.close_trace | 11059 | Check in ONE license per call |
Support for non-semi designs (from ODB++)
Support for scripting
Compatible with QisMLib 3.20 (API break)
Breaking changes to QisMNtrc API - all overloaded methods have been replaced because of incompatibilities with non-MSVC builds on Windows
This extension will not load with older versions of QisMLib
QisMNtrcObject base class has been removed, New_object and Delete_object methods changed
Bug-fix: In defining the stackup, it's OK to use a layer:dttp multiple times within the same order/expression. Previously, this caused an error. It's not OK to use layer:dttp across multiple order/expressions though
Net_refresh_mt callbacks are sent even as nets are being computed. Previously, they originated only at the begiining of processing a tile
API Breaking change. Compatible with QisMLib 3.9
Bug fix: Possibility of a deadlock in the trace thread if the trace is interrupted
New API to define driver related METAL/CONTACT/DIFF in the stackup
New API to enable/diable driver detection for any trace
New API function to pre-compute optimal tiling parameters for a given file/stackup/cell
New API to control when the net polygons are sent to the client - during trace (live, multiple threads) or after trace (default, single thread)
New API to define a stackup
Redisigned data processor resulting in 2x speed up
Using a faster and more precise vertex counter for improved auto-tiling
In point trace, if the seed layer is 65535, all metal layers containing the seed point are treated as seeds for tracing nets (Open point trace) potentially resulting in multiple nets
First cut
Last Updated -- Fri Oct 2 00:13:09 UTC 2026