»»»Home «««
Framework
Screenshots
FAQ
»»»TELL «««
Types
Operators
Functions
Example
»»»Toped «««
Database
Cells
Add
Select
Edit
Properties
Rendering
GUI
Miscellaneous
»»»Ifaces «««
GDSII
OASIS
CIF
DRC

TELL Example

A basic functions to draw a CMOS transistors, using W and L as an input parameters. The design rules are not listed, their names start with underscore. The lines below demonstrate the use of TELL functions. After creating a new design and opening a cell, two inverters will be created. The second call will wait for a binding point to be selected from the user.

newdesign("default_test");
newcell("cell_1");
opencell("cell_1");
Inverter({0,0},10,3,30,3);
Inverter(getpoint(),20,2,60,2);
Example: Invertor
#include "desrul.tll"

box MOStran(point bound, real W, real L) {
   // active
   real activeW = L + 2*_gate2cont + 2*_mincont + 2*_actOverCont;
   addbox(bound,activeW,W,2);
   // gate
   point gateB = {bound.x + (activeW - L)/2, bound.y -_polyOverActive};
   addbox(gateB, L,  W + 2*_polyOverActive,4); // as above
   // add contacts...
   point contBL = bound /| _actOverCont;
   point contBR = bound |\ _actOverCont;
   contBR = {contBR.x + activeW, contBR.y};
   point metlBL = contBL |/  _metalovercont;
   point metlBR = contBR \|  _metalovercont;

   box zerobox = {{0,0},{0,0}};
   box contactL = zerobox /| _mincont;
   box contactR = zerobox |\ _mincont;
   // calculate the number of contacts
   if (W < 2*_actOverCont + _mincont) {
      echo("Can't fit even a single contact !")
   }
   else {
      usinglayer(7);
      real numconts = (W - 2*_actOverCont) / (_mincont + _contspace);
      while (numconts > 0) {
         addbox(contactL+contBL);
         addbox(contactR+contBR);
         contBL.y = contBL.y + _contspace + _mincont;
         contBR.y = contBR.y + _contspace + _mincont;
         numconts = numconts - 1;
      };
      usinglayer(8);
      point metlTL = {contBL.x + _metalovercont + _mincont ,
                      contBL.y - _contspace + _metalovercont};
      point metlTR = {contBR.x - _metalovercont - _mincont ,
                      contBR.y - _contspace + _metalovercont};
      addbox(metlBL, metlTL);
      addbox(metlBR, metlTR);
   };
   return {{bound.x, bound.y}, {bound.x + activeW, bound.y + W}};
}

void Invertor(point bound, real NW, real NL, real PW, real PL) {
   MOStran(bound,NW,NL);
   bound.y = bound.y + NW + _nwelltonactive + _welloverpwell;
   box ptrActive = MOStran(bound,PW,PL);
   addbox((ptrActive /| _welloverpwell ) |/ _welloverpwell , 1);
   addbox((ptrActive /| _implantoveract) |/ _implantoveract, 6);
}