📄 oaleftest.cpp
字号:
return result;}// *****************************************************************************// LefTestTechAttach::testLefIn()//// This function imports a LEF file in order to create technology data for// exercising the LEF export translator.// *****************************************************************************oaBooleanLefTestTechAttach::testLefIn(){ LefInOptions options; oaString techLibName = getName() + "_tech_lib"; options.addFileName(getName() + ".lef"); options.setLibName(libName); options.setTechLibName(techLibName); lefIn.run(&options); return result;}// *****************************************************************************// LefTestLayerMap::testLefIn()//// This function imports a LEF file in order to create technology data for// exercising the LEF export translator. Layermap is specified in the options.// *****************************************************************************oaBooleanLefTestLayerMap::testLefIn(){ LefInOptions options; options.addFileName(getName() + ".lef"); options.setLibName(libName); options.setTechLibName(getName() + "_tech_lib"); options.addLayerMap("M1", 1); options.addLayerMap("CUT12", 2); options.addLayerMap("M2", 3); lefIn.run(&options); return result;}// *****************************************************************************// LefTestTechOnly::testLefOut()//// This function exports LEF from the test library.// *****************************************************************************oaBooleanLefTestTechOnly::testLefOut(){ LefOutOptions options; options.setFileName(getName() + ".lef.out"); options.setLibName(libName); options.setWriteCells(false); lefOut.run(&options); return result;}// *****************************************************************************// LefTestCellsOnly::testLefOut()//// This function exports LEF from the test library.// *****************************************************************************oaBooleanLefTestCellsOnly::testLefOut(){ LefOutOptions options; options.setFileName(getName() + ".lef.out"); options.setLibName(libName); options.setWriteTech(false); lefOut.run(&options); return result;}// *****************************************************************************// LefTestError::testLefIn()//// This function imports a LEF file in order to create technology data for// exercising the LEF export translator.// *****************************************************************************oaBooleanLefTestError::testLefIn(){ LefInOptions options; FILE *file = (FILE*) defGZipOpen(getName() + ".lef", "rb"); try { lefIn.run(file, &options); } catch (oaException &err) { verify(err.getMsgId() == cLibNotSpecified); } options.setLibName(libName); lefIn.run(file, &options); defGZipClose(file); return result;}// *****************************************************************************// LefTestError::testLefOut()//// This function exports LEF from the test library.// *****************************************************************************oaBooleanLefTestError::testLefOut(){ LefOutOptions options; FILE *file = fopen(getName() + ".lef.out", "w"); try { lefOut.run(file, &options); } catch (oaException &err) { verify(err.getMsgId() == cLibNotSpecified); } options.setLibName(libName); options.addCellName("A"); options.addCellName("B"); options.addCellName("C"); options.addCellName("D"); options.addCellName("E"); options.addCellName("F"); options.addCellName("G"); options.addCellName("M1_M2"); options.addViewName("abstract"); options.addViewName("layout"); lefOut.run(file, &options); fclose(file); return result;}// *****************************************************************************// LefTest53::preTest()//// This function makes preparations before the test is run. This includes// opening the output file (for unitTest output), deleting the technology// library (it is created by the test), and resetting the library list file.// *****************************************************************************voidLefTest53::preTest(){ LefTest::preTest(); if (copyRefFiles) { oaString refFile = getName() + ".lef.gz"; oaString tmp; getRelPath(refFile, tmp); if (!tmp.isEmpty() && tmp != refFile) { copyFile(tmp, refFile); } }}// *****************************************************************************// LefTest53::testLefIn()//// This function imports a LEF file in order to create technology data for// exercising the LEF export translator.// *****************************************************************************oaBooleanLefTest53::testLefIn(){ LefInOptions options; options.addFileName(getName() + ".lef.gz"); options.setLibName(libName); options.setViewName("abstract"); lefIn.run(&options); return result;}// *****************************************************************************// LefTest53::testLefOut()//// This function exports LEF from the test library.// *****************************************************************************oaBooleanLefTest53::testLefOut(){ LefOutOptions options; options.setFileName(getName() + ".lef.out"); options.setLibName(libName); options.setVersion(LefDefVersion("5.3")); lefOut.run(&options); return result;}// *****************************************************************************// LefTest54::testLefOut()//// This function exports LEF from the test library.// *****************************************************************************oaBooleanLefTest54::testLefOut(){ LefOutOptions options; options.setFileName(getName() + ".lef.out"); options.setLibName(libName); options.setVersion(cLefDefVersion54); lefOut.run(&options); return result;}// *****************************************************************************// LefTest55::testLefOut()//// This function exports LEF from the test library.// *****************************************************************************oaBooleanLefTest55::testLefOut(){ LefOutOptions options; options.setFileName(getName() + ".lef.out"); options.setLibName(libName); options.setVersion(cLefDefVersion55); options.addCellName("A"); options.addCellName("B"); options.addCellName("C"); options.addCellName("D"); options.addCellName("E"); options.addCellName("F"); options.addCellName("G"); options.addCellName("H"); options.addCellName("I"); options.addCellName("J"); options.addCellName("K"); options.addCellName("L"); options.addCellName("M"); options.addCellName("N"); options.addCellName("O"); options.addCellName("P"); options.addCellName("Q"); options.addCellName("R"); options.addCellName("S"); options.addCellName("T"); options.addCellName("U"); options.addCellName("V"); options.addCellName("W"); options.addCellName("RECTILINEAR"); options.addViewName("abstract.ver"); options.addViewName("b"); options.addViewName("c"); options.addViewName("d"); options.addViewName("e"); options.addViewName("f"); options.addViewName("g"); options.addViewName("h"); options.addViewName("i"); options.addViewName("j"); options.addViewName("k"); options.addViewName("l"); options.addViewName("abstract"); lefOut.run(&options); return result;}// *****************************************************************************// LefTest56::testLefOut()//// This function exports LEF from the test library.// *****************************************************************************oaBooleanLefTest56::testLefOut(){ LefOutOptions options; options.setFileName(getName() + ".lef.out"); options.setLibName(libName); options.setVersion(LefDefVersion("5.6")); lefOut.run(&options); return result;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -