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

📄 oaveriloginsampletest.cpp

📁 openaccess与verilog互相转化时所用的源代码
💻 CPP
字号:
// *****************************************************************************// *****************************************************************************// oaVerilogInSampleTest.cpp//// This file contains the implementation of the	oaVerilogInSampleTest 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.14 $//  $Date: 2005/07/25 18:44:42 $//  $State: Exp $// *****************************************************************************// *****************************************************************************#include "oaVerilogInTest.h"// *****************************************************************************// oaVerilogInSampleTest::oaVerilogInSampleTest()//// This is the constructor for the oaVerilogInSampleTest class.// *****************************************************************************oaVerilogInSampleTest::oaVerilogInSampleTest(const oaString &name,					     oaBoolean	    doNoEMH,					     oaBoolean	    doEMH,					     oaBoolean	    trace):   oaVerilogInTest(name, doNoEMH, doEMH, trace){}// *****************************************************************************// oaVerilogInSampleTest::preTest()//// This function makes preparations before the test is run.  This includes// copying the input files.// *****************************************************************************voidoaVerilogInSampleTest::preTest(){    if (copyRefFiles) {	oaString    input = getName() + ".v";	oaString    tmp;	getRelPath(input, tmp);	if (!tmp.isEmpty() && tmp != input) {	    copyFile(tmp, input);	}    }}// *****************************************************************************// oaVerilogInSampleTest::test()//// This method is the main entry point for the test.// *****************************************************************************oaBooleanoaVerilogInSampleTest::test(){    preTest();    openOutputFile();    DebugObserver::init();    enableCallbacks(true);    try	{	MsgAdapter  msgs;	msgs.setOutFile(tout.outFile);	msgs.setLogFile(NULL);	oaString    testcase = getPathToData() + ds + getName() + ".v";	VerilogIn   reader(msgs);	OptionsIn   &readerOptions = reader.getOptions();	readerOptions.enableTolerate();	readerOptions.enableFileAndLine(fullErrorMessages);		testReader(reader, testcase);    }    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 true;}

⌨️ 快捷键说明

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