/* ICDPCR (ICD) -- IC Design Report */ /* ICDPCR (ICD) -- IC-Design-Report */ /* -- INTENDED FOR KEY-CALL USE -- */ /* // Copyright (c) 2001-2012 Oliver Bartels F+E, Muenchen // Author: Roman Ludwig // Changes History: // rl (120427) RELEASED FOR BAE V7.8. // rl (101019) RELEASED FOR BAE V7.6. // rl (091021) RELEASED FOR BAE V7.4. // rl (081014) RELEASED FOR BAE V7.2. // rl (071029) RELEASED FOR BAE V7.0. // rl (060829) RELEASED FOR BAE V6.8. // rl (050906) RELEASED FOR BAE V6.6. // rl (040811) RELEASED FOR BAE V6.4. // rl (030904) RELEASED FOR BAE V6.2. // rl (021209) RELEASED FOR BAE V6.0. // rl (020618) RELEASED FOR BAE V5.4. // rl (010806) ORIGINAL CODING. DERIVED FROM LAYPCR.ULC. // // DESCRIPTION // // The icdpcr User Language program provides detailed information // about the currently loaded IC Design element such as // DDB file name, element name, element origin coordinates, // element boundary coordinates, element size, DRC checking // parameter settings, reference listing (cells on IC layout, // pins/cells on cell). The report output is displayed in a // popup menu with file output option. */ // Includes #include "pop.ulh" // User Language popup utilities #include "icd.ulh" // User Language IC Design utilities // Disable undo state request #pragma ULCALLERNOUNDO // Messages string REPSCNPRT = M("Scannen Makros (Abbruch mit Tastendruck)...", "Scanning macros (hit any key to abort)..."); string REPHEADER = M("%s Report :","%s Report :"); string REPFILE = M("Dateiname ...............: '%s'", "File Name ...............: '%s'"); string REPELEM = M("Elementname .............: '%s'", "Element Name ............: '%s'"); string REPSAVE = M("Plan gesichert ..........: %s", "Element saved ...........: %s"); string REPORIG = M("Nullpunkt ...............: %8.3f,%8.3f %s", "Origin ..................: %8.3f,%8.3f %s"); string REPUBND = M("Obere Grenze ............: %8.3f,%8.3f %s", "Upper Boundary ..........: %8.3f,%8.3f %s"); string REPLBND = M("Untere Grenze ...........: %8.3f,%8.3f %s", "Lower Boundary ..........: %8.3f,%8.3f %s"); string REPSIZE = M("Plan Groesse ............: %8.3f,%8.3f %s", "Element Size ............: %8.3f,%8.3f %s"); string REPPRTCNT = M("Makroanzahl .............: %d", "Macro Count..............: %d"); string REPPINCNT = M("Pin/Makroanzahl .........: %d", "Pin/Macro count .........: %d"); string REPECNLAY = M("Connectivity-Lagen ......:", "Connectivity Layers .....:"); string REPLAYEN = M(" Lage %2d : %s"," Layer %2d : %s"); string UPRPARTLA = M("Makroliste Alle","Macro List All"); string UPRPARTLP = M("Makroliste Platziert","Macro List Placed"); string UPRPARTLU = M("Makroliste Unplatziert","Macro List Unplaced"); string UPRPARTLC = M("Makroliste Konstruktive", "Macro List Constructive"); string ITMHDPRT = M("Makro","Macro"); string ITMHDPIN = M("Pin","Pin"); string ITMHDMAC = M("Makro","Macro"); string ITMHDPLC = M("Platzierung","Placement"); string ITMPLCUM = M("ungespiegelt","not mirrored"); string ITMPLCMI = M("gespiegelt","mirrored"); string ITMUNPLC = M("-unplatziert-","-unplaced-"); string ITMINVPLC = M("-falsches Makro-","-wrong macro-"); string ITMHDMIR = M("Spiegelung","Mirror"); string ITMYES = M("ja","yes"); string ITMNO = M("nein","no"); string ITMON = M("ein","on"); string ITMOFF = M("aus","off"); string ITMCELL = M("- Makro -","- Macro -"); // General item and format strings #define ITMULINE "========================================" #define ITMELLIPS "..." #define FMTHEADUL "%.*s" #define FMTPRTH1 "%*s %-*s %-*s" #define FMTPRTH2 "%.*s %.*s %.*s" #define FMTPLCH1 "%*s %-*s %8s %8s Rotation %s %s" #define FMTPINH1 "%*s %-*s %8s %8s Rotation %s" #define FMTPINH2 "%.*s %.*s ======== ======== ======== %-.*s" #define FMTPLC "%*s %-*s %8.3f %8.3f %8.3f %s" #define FMTPIND "%*s %-*s %8.3f %8.3f %8.3f %*s %8.3f" // Destination unit designators string UNIT = bae_getcoorddisp() ? "[mil]" : "[um]"; // Unit designator double ITOB = baecvtl(1.0) /* Scale factor int. to BAE disp. */; // Globals double nx = bae_planwsnx()/* Plan origin X coordinate */; double ny = bae_planwsny()/* Plan origin Y coordinate */; double ux = bae_planwsux()/* Plan upper X coordinate */; double uy = bae_planwsuy()/* Plan upper Y coordinate */; double lx = bae_planwslx()/* Plan lower X coordinate */; double ly = bae_planwsly()/* Plan lower Y coordinate */; STRINGS headl /* Header list */; int headn = 0 /* Header count */; STRINGS entryl /* Entry list */; int entryn = 0 /* Entry count */; // Main program void main() { int mc = 0 /* Requested popup column count */; int i /* Loop variable */; // Print the plan characteristics sprintf(headl[0],REPHEADER,ddbclassname(bae_planddbclass())); sprintf(headl[1],FMTHEADUL,strlen(headl[0]),ITMULINE); sprintf(headl[2],REPFILE,bae_planfname()); sprintf(headl[3],REPELEM,bae_planename()); sprintf(headl[4],REPSAVE,bae_plannotsaved()?ITMNO:ITMYES); sprintf(headl[5],REPORIG,ITOB*nx,ITOB*ny,UNIT); sprintf(headl[6],REPUBND,ITOB*ux,ITOB*uy,UNIT); sprintf(headl[7],REPLBND,ITOB*lx,ITOB*ly,UNIT); sprintf(headl[8],REPSIZE,ITOB*(ux-lx),ITOB*(uy-ly),UNIT); headn=9; // Evaluate the plan class switch (bae_planddbclass()) { // Layout case DDBCLILAY : // Print the checking parameters layerparams(); // Print the layout part list partlist(); break; // Part case DDBCLICELL : // Print the checking parameters layerparams(); // Print the part pin list pinlist(); break; } // Get the maximum line length for (i=headn-1;i>=0;i--) mc=maxint(mc,strlen(headl[i])+1); for (i=entryn-1;i>=0;i--) mc=maxint(mc,strlen(entryl[i])+1); // Activate the report popup menu bae_setintpar(16,3011); popupmenu(0,"",headl,headn,entryl,entryn, "",0,0,1,headn+entryn+2,mc,0,""); } // Data retrieval routines void layerparams() /* // Append the layer specific parameters at list */ { int layer /* Layer number */; // Store the connectivity layers header sprintf(headl[headn],REPECNLAY); headn++; // Loop for all signal layers for (layer=0;layer=0;i--) mc=maxint(mc,strlen(headl[i])+1); for (i=entryn-1;i>=0;i--) mc=maxint(mc,strlen(entryl[i])+1); // Activate the popup menu; get part list request bae_setintpar(16,3012); if ((uinput=popupmenu(5,"",headl,headn,entryl,entryn,UINPOPABORT, 0,0,1,headn+entryn+2,mc,0,""))=="" || uinput==UINPOPABORT) // Abort request error_abort(); // "Allocate" the part list plnam[pn]=""; plmac[pn]=""; plplc[pn]=""; // Re-init the part count pn=0; // Init the output field lengths lnam=strlen(ITMHDPRT); lmac=strlen(ITMHDMAC); forall (mac where mac.CLASS==DDBCLICELL) lmac=maxint(lmac,strlen(mac.NAME)); lplc=strlen(ITMINVPLC); // Print part scan message bae_prtdialog(REPSCNPRT); // Test if unplaced connection parts list requested if (uinput==UPRPARTLA || uinput==UPRPARTLU) { // Get the unplaced connection list parts forall (cpart where (cpart.USED&CPART_PLC)==0) { // Abort on request if (kbhit()) { getchr(); abort=1; break; } // Store the part info plnam[pn]=cpart.NAME; plmac[pn]=cpart.PLNAME; plplc[pn]=ITMUNPLC; pn++; // Update the output field lengths lnam=maxint(lnam,strlen(cpart.NAME)); lmac=maxint(lmac,strlen(cpart.PLNAME)); } } // Get the parts list request flags listp=uinput==UPRPARTLA || uinput==UPRPARTLP; listc=uinput==UPRPARTLA || uinput==UPRPARTLC; // Test if constructive parts list requested if (!abort && (listc || listp)) { // Loop thru the placed part list forall (nref) { // Abort on request if (kbhit()) { getchr(); abort=1; break; } // Test if connection list part if (icd_findconpart(nref.NAME,cpart)) { // Constructive part if (!listc) continue; // Store the part info plnam[pn]=nref.NAME; plmac[pn]=nref.MACRO.NAME; plplc[pn]=nref.MIRROR ? ITMPLCMI : ITMPLCUM; pn++; // Update output field lengths lnam=maxint(lnam,strlen(nref.NAME)); } else { // Placed con. part if (!listp) continue; // Store the part info plnam[pn]=cpart.NAME; plmac[pn]=cpart.PLNAME; plplc[pn]=(nref.MACRO.NAME!=cpart.PLNAME) ? ITMINVPLC : (nref.MIRROR ? ITMPLCMI : ITMPLCUM); pn++; // Update the output field lengths lnam=maxint(lnam,strlen(cpart.NAME)); lmac=maxint(lmac,strlen(cpart.PLNAME)); } } } // Complete the header sprintf(headl[headn],FMTPRTH1, lnam,ITMHDPRT,lmac,ITMHDMAC,lplc,ITMHDPLC); sprintf(headl[headn+1],FMTPRTH2, lnam,ITMULINE,lmac,ITMULINE,lplc,ITMULINE); headn+=2; // Build the part entry list entryl[pn]=""; entryn=0; for (i=0;i>1; // Test if entry found; update the search area if ((compres=numstrcmp(entrystr,entryl[sidx]))<0) sub=sidx-1; else slb=sidx+1; } // Insert new entry string to sorted entry list for (sidx=entryn;sidx>slb;sidx--) entryl[sidx]=entryl[sidx-1]; entryl[slb]=entrystr; entryn++; } // User Language program end