⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oaveriloginmultifiletest.cpp

📁 openaccess与verilog互相转化时所用的源代码
💻 CPP
字号:
// *****************************************************************************// *****************************************************************************// oaVerilogInMultiFileTest.cpp//// This file contains the implementation of the	oaVerilogInMultiFileTest class.//// *****************************************************************************// Except as specified in the OpenAccess terms of use of Cadence or Silicon// Integration Initiative, this	material may not be copied, modified,// re-published, uploaded, executed, or	istributed in any way, in any medium,// in whole or in part,	without	prior written permission from Cadence.////		  Copyright 2003-2005 Cadence Design	Systems, Inc.//			     All Rights	Reserved.////  $Author: shaun $//  $Revision: 1.16 $//  $Date: 2005/05/19 00:48:50 $//  $State: Exp $// *****************************************************************************// *****************************************************************************#include "oaVerilogInTest.h"// *****************************************************************************// oaVerilogInMultiFileTest::oaVerilogInMultiFileTest()//// This is the constructor for the oaVerilogInMultiFileTest class.// *****************************************************************************oaVerilogInMultiFileTest::oaVerilogInMultiFileTest(const oaString   &name,						   oaBoolean	    trace):   oaVerilogInTest(name, false, false, trace){}// *****************************************************************************// oaVerilogInMultiFileTest::preTest()//// This function makes preparations before the test is run.  This includes// copying the input files.// *****************************************************************************voidoaVerilogInMultiFileTest::preTest(){    if (copyRefFiles) {	// Copy the first input file.	oaString    input   = getName()	+ "1.v";	oaString    tmp;	getRelPath(input, tmp);	if (!tmp.isEmpty() && tmp != input) {	    copyFile(tmp, input);	}	// Copy the second input file.	input = getName() + "2.v";	getRelPath(input, tmp);	if (!tmp.isEmpty() && tmp != input) {	    copyFile(tmp, input);	}	// Copy the third input file.	input = getName() + "3.v";	getRelPath(input, tmp);	if (!tmp.isEmpty() && tmp != input) {	    copyFile(tmp, input);	}    }}// *****************************************************************************// oaVerilogInMultiFileTest::test()//// This method is the main entry point for the test.// *****************************************************************************oaBooleanoaVerilogInMultiFileTest::test(){    preTest();    openOutputFile();    enableCallbacks(true);    try	{	MsgAdapter  msgs;	oaString    myLogFileName;	myLogFileName = getPathToData() + ds + getName() + ".log";	msgs.setOutFile(NULL);	msgs.setLogFile(myLogFileName);	VerilogIn   reader(msgs);	OptionsIn   &readerOptions = reader.getOptions();	readerOptions.enableTolerate();	readerOptions.addFile(getPathToData() + ds + getName() + "1.v");	readerOptions.addFile(getPathToData() + ds + getName() + "2.v");	readerOptions.addFile(getPathToData() + ds + getName() + "3.v");	oaString    myLibName = getName() + "_designX";	openLib(myLibName);	tout.print(starLine);	tout.print("* Explode, No EMH\n");	tout.print(starLine);	readerOptions.setLibName(myLibName);	reader.enableDesignPerMod(true);	reader.parse();	tout.print("Reader succeeded\n\n\n\n");	cleanup(myLibName);    }    catch(Error    &verr) {	tout.print(verr.getMsg());	closeOutputFile();	enableCallbacks(false);	throw;    }    catch(oaException	 &oaErr) {	tout.print((const char*) oaErr.getMsg());	closeOutputFile();	enableCallbacks(false);	throw;    }    catch(...) {	tout.print("Caught an exception that was not handled by the reader.\n");	closeOutputFile();	enableCallbacks(false);	throw;    }    closeOutputFile();    enableCallbacks(false);    return compareOutputByName(getName());}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -