📄 oaverilogoptions.cpp
字号:
// *****************************************************************************// *****************************************************************************// oaVerilogOptions.cpp//// This file contains the implementation for the Options class and the// definition of the Verilog buildInfo object.//// *****************************************************************************// 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: sailajad $// $Revision: 1.32 $// $Date: 2005/07/17 21:07:32 $// $State: Exp $// *****************************************************************************// *****************************************************************************#include "oaVerilogInPvt.h"BEGIN_VERILOG_NAMESPACEusing namespace oaUtil;// *****************************************************************************// VerilogBuild// *****************************************************************************class VerilogBuild : public oaBuildInfo { VerilogBuild() : oaBuildInfo("oaVerilog", OA_BUILD_NAME, OA_BUILD_TIME, OA_BUILD_NUMBER) {} private: static VerilogBuild buildInfo;};// *****************************************************************************// Initialize static data members.// *****************************************************************************VerilogBuild VerilogBuild::buildInfo;const oaString Options::libOptionDefault("library");const oaString Options::globalsOptionDefault("globals");const oaString Options::tieHighOptionDefault("tie1");const oaString Options::tieLowOptionDefault("tie0");const oaString Options::viewOptionDefault("netlist");const oaChar Options::sep = oacPathSeparatorChar;const oaString Options::uniqueNamePrefix = "_oaVerilogIn";const oaString Options::uniqueNameFmt = uniqueNamePrefix + "%d_";const oaString Options::unconnectedNameFmt = "UNCONNECTED" + uniqueNameFmt;const oaString Options::anonymousBusName = "bus";const oaString Options::anonymousScalarName = "scalar";// *****************************************************************************// Options::Options()//// This is the constructor for the Options. It takes no arguments,// but it does set defaults which may be changed via the other methods of the// option class.// *****************************************************************************Options::Options(MsgAdapter &msgsIn): fileAndLine(true), msgs(&msgsIn), warningsEnabled(true), libName(vns, libOptionDefault), viewName(vns, viewOptionDefault), globalModName(globalsOptionDefault), tieHigh(vns, tieHighOptionDefault), tieLow(vns, tieLowOptionDefault){}// *****************************************************************************// Options::~Options()//// This is the destructor for the Options class.// *****************************************************************************Options::~Options(){}// *****************************************************************************// Options::enableFileAndLine()//// This function enables file and line number information when printing error// messages. This behavior is enabled by default. Passing a false value will// disable file and line number information from error messages.// *****************************************************************************voidOptions::enableFileAndLine(oaBoolean value){ fileAndLine = value;}// *****************************************************************************// Options::enableWarnings()//// This function enables the printing of warning messages.// *****************************************************************************voidOptions::enableWarnings(oaBoolean value){ warningsEnabled = value;}// *****************************************************************************// Options::getTopModuleName()//// This function returns the name of the top module.// *****************************************************************************const oaString&Options::getTopModuleName() const{ return topModuleName;}// *****************************************************************************// Options::getGlobalModuleName()//// This function gets the name of the module that collects global nets. It// returns the name of the module as a string in the Verilog name space.// *****************************************************************************const oaString&Options::getGlobalModuleName() const{ return globalModName;}// *****************************************************************************// Options::getLibName()//// This function gets the name of the library that will contain the modules// created by the reader.// *****************************************************************************const oaScalarName&Options::getLibName() const{ return libName;}// *****************************************************************************// Options::getLibOptions()//// This function gets the options used to access libraries.// *****************************************************************************const LibMgrOptions&Options::getLibOptions() const{ return libOptions;}// *****************************************************************************// Options::getMsgAdapter()//// This function gets the message adapter used by the translator component.// *****************************************************************************MsgAdapter*Options::getMsgAdapter() const{ return msgs;}// *****************************************************************************// Options::getTieHighNet()//// This function gets the hierarchical name of the net to use for global tie // high connections.// *****************************************************************************voidOptions::getTieHighNet(oaSimpleName &tieHighNet) const { oaString netName; oaString combinedName; tieHigh.get(vns, netName); combinedName = globalModName + "." + netName; tieHighNet.init(vns, combinedName);}// *****************************************************************************// Options::getTieHighNetBase()//// This function gets the non-hierarchical name of the net to use for global tie// high connections.// *****************************************************************************voidOptions::getTieHighNetBase(oaSimpleName &tieHighNet) const { tieHighNet = tieHigh;}// *****************************************************************************// Options::getTieLowNet()//// This function gets the hierarchical name of the net to use for global tie low// connections.// *****************************************************************************voidOptions::getTieLowNet(oaSimpleName &tieLowNet) const { oaString netName; oaString combinedName; tieLow.get(vns, netName); combinedName = globalModName + "." + netName; tieLowNet.init(vns, combinedName);}// *****************************************************************************// Options::getTieLowNetBase()//// This function gets the non-hierarchical name of the net to use for global tie// low connections.// *****************************************************************************voidOptions::getTieLowNetBase(oaSimpleName &tieLowNet) const { tieLowNet = tieLow;}// *****************************************************************************// Options::getViewName()//// This function gets the default view name. The default view name is used for// every created design and module as well as the first view to try when// instantiating a module.// *****************************************************************************const oaScalarName&Options::getViewName() const { return viewName;}// *****************************************************************************// Options::setGlobalModuleName()//// This function sets the name of the module that contains global nets.// *****************************************************************************voidOptions::setGlobalModuleName(const oaString &value){ globalModName = value;}// *****************************************************************************// Options::setLibName()//// This function set the name of the library in which designs are created.// *****************************************************************************voidOptions::setLibName(const oaString &value){ oaNativeNS ns; libName.init(ns, value);}// *****************************************************************************// Options::setLibOptions()//// This function sets the options used to access libraries.// *****************************************************************************voidOptions::setLibOptions(const LibMgrOptions &opts){ libOptions = opts;}// *****************************************************************************// Options::setMsgAdapter()//// This function sets the message adapter for the translator component.// *****************************************************************************voidOptions::setMsgAdapter(MsgAdapter *msgIn){ msgs = msgIn;}// *****************************************************************************// Options::setTieHighName()//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -