oaverilogrange.cpp
来自「openaccess与verilog互相转化时所用的源代码」· C++ 代码 · 共 175 行
CPP
175 行
// *****************************************************************************// *****************************************************************************// oaVerilogRange.cpp//// This file contains the implementation for the Range and// RangeList classes.//// *****************************************************************************// 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.11 $// $Date: 2005/05/14 02:51:41 $// $State: Exp $// *****************************************************************************// *****************************************************************************#include "oaVerilogInPvt.h"BEGIN_VERILOG_NAMESPACE// *****************************************************************************// Range::Range()//// This function is the first constructor for the Range class. It takes// no arguments and it initializes the start and stop values of the range to 0.// *****************************************************************************Range::Range(): startVal(0), stopVal(0){}// *****************************************************************************// Range::Range()//// This function constructs a Range and intializes both the start and stop// values to the same input oaInt4.// *****************************************************************************Range::Range(oaInt4 init): startVal(init), stopVal(init){}// *****************************************************************************// Range::Range()//// This takes two oaInt4 arguments. It intializes the start of the range with// the first argument and the stop of the range with the second argument.// *****************************************************************************Range::Range(oaInt4 start, oaInt4 stop): startVal(start), stopVal(stop){}// *****************************************************************************// Range::Range()//// This function constructs a Range and intializes both the start and stop// values using the same input Value reference.// *****************************************************************************Range::Range(const Value &init): startVal(init), stopVal(init){}// *****************************************************************************// Range::Range()//// This takes two Value reference arguments. It intializes the start of // the range with the first argument and the stop of the range with the // second argument.// *****************************************************************************Range::Range(const Value &start, const Value &stop): startVal(start), stopVal(stop){}// *****************************************************************************// Range::init()//// This function assigns a startVal and a stopVal to the range.// *****************************************************************************voidRange::init(const Value &start, const Value &stop){ startVal = start; stopVal = stop;}// **************************************************************************// Range::setStartVal()//// This function assigns the start value to the range.// *****************************************************************************voidRange::setStartVal(const Value &value){ startVal = value;}// *****************************************************************************// Range::setStopVal()//// Ths method assigns the stop value to the range.// *****************************************************************************voidRange::setStopVal(const Value &value){ stopVal = value;}// *****************************************************************************// RangeList::RangeList()//// This function is the contructor for the RangeList class. // *****************************************************************************RangeList::RangeList(): std::list<Range*> (){}// *****************************************************************************// RangeList::~RangeList()//// This function is the destructor for the RangeList class. The ranges// in the list are deleted along with the list.// *****************************************************************************RangeList::~RangeList(){ while (!empty()) { delete front(); pop_front(); }}END_VERILOG_NAMESPACE
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?