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

📄 oaverilogoptionsin.cpp

📁 openaccess与verilog互相转化时所用的源代码
💻 CPP
📖 第 1 页 / 共 2 页
字号:
// *****************************************************************************// *****************************************************************************// oaVerilogInOptions.cpp//// This file contains the implementation for the OptionsIn 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 distributed 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.51 $//  $Date: 2005/07/12 00:00:57 $//  $State: Exp $// *****************************************************************************// *****************************************************************************#include "oaVerilogInPvt.h"BEGIN_VERILOG_NAMESPACEusing namespace oaUtil;// *****************************************************************************// Initialize static data members.// *****************************************************************************const oaString	OptionsIn::leafViewsOptionDefault("abstract");const oaString	OptionsIn::viewTypeOptionDefault("netlist");const oaString	OptionsIn::libPathOptionDefault("");const oaString	OptionsIn::dmSystemOptionDefault("oaDMTurbo");const oaString	OptionsIn::tmpDesignPrefix("oaVerilogInTmp");const oaString	OptionsIn::refCountName("oaVerilog::RefCount");const oaString	OptionsIn::moduleIndexName("oaVerilog::ModuleIndex");const oaString	OptionsIn::moduleDepthName("oaVerilog::ModuleDepth");const oaString	OptionsIn::topModuleGroupName("oaVerilog::TopGroup");const oaString	OptionsIn::bmemName("oaVerilog::BundleMember");const oaString	OptionsIn::modifiedByName("oaVerilog::ModifiedBy");const oaString	OptionsIn::createdByName("oaVerilog::CreatedBy");const oaString	OptionsIn::termTypeName("oaVerilog::TermType");// *****************************************************************************// OptionsIn::OptionsIn()//// This is the constructor for the OptionsIn.  It takes no arguments,// but it does set defaults which may be changed via the other methods of the// option class.// *****************************************************************************OptionsIn::OptionsIn(MsgAdapter	&msgsIn):   Options(msgsIn),    designPerMod(false),    tolerate(false),    blackBoxEnabled(false),    overwriteEnabled(false),    purgeLeafsEnabled(true),    topWarningEnabled(true),    defLeafViewName(vns, leafViewsOptionDefault),    viewType(oaViewType::get(viewTypeOptionDefault)),    libPath(libPathOptionDefault),    dmSystem(dmSystemOptionDefault){    addLeafView(leafViewsOptionDefault);}// *****************************************************************************// OptionsIn::~OptionsIn()//// This is the destructor for the OptionsIn class.// *****************************************************************************OptionsIn::~OptionsIn(){    clearLeafInfo();    clearFiles();}// *****************************************************************************// OptionsIn::addFile()//// This function adds the given file to the list of files to parse.// *****************************************************************************voidOptionsIn::addFile(const oaString   &fileName){    verilogFiles.push_back(new oaString(fileName));}// *****************************************************************************// OptionsIn::addLeafLib()//// This function adds the given name to the list of leaf libraries to search.// *****************************************************************************voidOptionsIn::addLeafLib(const oaString	&libNameStr){    oaNativeNS	ns;    leafLibs.push_back(new oaScalarName(ns, libNameStr));}// *****************************************************************************// OptionsIn::addLeafView()//// This function adds the given name to the list of leaf views to search.// *****************************************************************************voidOptionsIn::addLeafView(const oaString	&viewNameIn){    oaNativeNS	ns;    leafViews.push_back(new oaScalarName(ns, viewNameIn));}// *****************************************************************************// OptionsIn::clearLeafInfo()//// This function removes all information about leaf cells.  It removes// information that was added via the addLeafLib and addLeafView// methods.// *****************************************************************************voidOptionsIn::clearLeafInfo(){    clearLeafLibs();    clearLeafViews();}// *****************************************************************************// OptionsIn::clearLeafLibs()//// This function removes all information about leaf libraries.  It removes all// information that was added via the addLeafLib method.// *****************************************************************************voidOptionsIn::clearLeafLibs(){    ScalarNameListIter	libIter;    for	(libIter = leafLibs.begin(); libIter !=	leafLibs.end();	libIter++) {	delete *libIter;    }    leafLibs.clear();}// *****************************************************************************// OptionsIn::clearLeafViews()//// This function removes all information about leaf views.  It removes all// information that was added via the addLeafView method as well as the // default leaf view name.// *****************************************************************************voidOptionsIn::clearLeafViews(){    ScalarNameListIter	viewIter;    for	(viewIter = leafViews.begin(); viewIter	!= leafViews.end(); 	 viewIter++) {	delete *viewIter;    }    leafViews.clear();}// *****************************************************************************// OptionsIn::clearFiles()//// This function removes all filenames from the list of files to parse.// *****************************************************************************voidOptionsIn::clearFiles(){    while (!verilogFiles.empty()) {	delete verilogFiles.front();	verilogFiles.pop_front();    }}// *****************************************************************************// OptionsIn::enableBlackBox()//// This function enables writing of black-box cells.  Black-box cells are // Verilog modules that have no contents.// *****************************************************************************voidOptionsIn::enableBlackBox(oaBoolean value){    blackBoxEnabled = value;}// *****************************************************************************// OptionsIn::enableDesignPerMod()//// This function enables the "Design Per Module" option.  When this option is// in effect, each Verilog module is written to a separate design.  By default,// all Verilog modules become modules within the same design.// *****************************************************************************voidOptionsIn::enableDesignPerMod(oaBoolean	value){    designPerMod = value;}// *****************************************************************************// OptionsIn::enableOverwrite()//// This function enables (or disables) design database overwrite.  By default,// a DesignExists exception is thrown if a design already exists.  When this // option is in effect, the existing design data is destroyed and created from // scratch.// *****************************************************************************voidOptionsIn::enableOverwrite(oaBoolean  value){    overwriteEnabled = value;}// *****************************************************************************// OptionsIn::enablePurgeLeafs()//// This function sets the option state that causes the reader to purge leaf// designs when the translation is finished.   If this option is disabled, then// the reader will not purge any leaf designs.// *****************************************************************************voidOptionsIn::enablePurgeLeafs(oaBoolean	value){    purgeLeafsEnabled = value;}// *****************************************************************************// OptionsIn::enableTolerate()//// This function enables the "tolerate" option (or disables it if the boolean// value is false).  The tolerate option informs the callbacks of the parser// that they should tolerate unimplemented features of Verilog and that they// should make do as best they can (instead of throwing an exception and // halting). While this may enable you to accept a Verilog file, you may not get// the result you expected.// *****************************************************************************voidOptionsIn::enableTolerate(oaBoolean value){    tolerate = value;}// *****************************************************************************// OptionsIn::enableTopWarning()//// This function enables printing a warning when leaf designs do not have top // modules.// *****************************************************************************voidOptionsIn::enableTopWarning(oaBoolean	value){    topWarningEnabled = value;}// *****************************************************************************// OptionsIn::getDMSystem()//

⌨️ 快捷键说明

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