Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

credit.h

Go to the documentation of this file.
00001 
00002 /*
00003  * credit.h
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License,
00007  * version 2, as published by the Free Software Foundation.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License along
00015  * with this program; if not, write to the Free Software Foundation, Inc.,
00016  * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00017  *
00018  * Author: Lavina Jain
00019  *
00020  */
00021 
00026 
00027 #ifndef _CREDIT_
00028 #define _CREDIT_
00029 
00030 #include "systemc.h"
00031 
00035 struct creditLine {
00036         sc_bit  freeVC;         
00037         sc_bit  freeBuf;        
00038 
00039         // overloading equality operator for creditLine
00040         inline bool operator == (const creditLine& rhs) const {
00041                 return (rhs.freeVC == freeVC && rhs.freeBuf == freeBuf);
00042         }
00043 };
00044 
00045 // overloading extraction operator for creditLine
00046 inline ostream& operator << ( ostream& os, const creditLine& a) {
00047         os << "freeVC: " << a.freeVC << " freeBuf: "<< a.freeBuf << endl;
00048         return os;
00049 }
00050 
00051 // overloading sc_trace for creditLine
00052 inline void sc_trace( sc_trace_file*& tf, const creditLine& a, const std::string& name) {
00053         sc_trace( tf, a.freeVC, name+".freeVC");
00054         sc_trace( tf, a.freeBuf, name+".freeBuf");
00055 }
00056 
00057 #endif

Generated on Mon May 7 19:03:19 2007 for NIRGAM by  doxygen 1.3.9.1