fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/Hw/SltRegisterVector.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     SltRegisterVector.h  -  description
00003 
00004     begin                : Tue Jul 18 2000
00005     copyright            : (C) 2000 by Andreas Kopmann
00006     email                : kopmann@hpe.fzk.de
00007  ***************************************************************************/
00008 
00009 
00010 #ifndef SLTREGISTERVECTOR_H
00011 #define SLTREGISTERVECTOR_H
00012 
00013 #include <Hw/SltDef.h>
00014 #include <Pbus/Pbus.h>
00015 
00016 class FEunitData;
00017 class FEunitDataBoolVector;
00018 
00034 //##ModelId=39914F050227
00035 class SltRegisterVector : public Pbus  {
00036 public: 
00037         //##ModelId=39914F050266
00038         SltRegisterVector(const char * name, int slotID, unsigned int regID, int r, int w, int len);
00039 
00040         //##ModelId=39914F050265
00041         virtual ~SltRegisterVector();
00042 
00043         //##ModelId=39914F050264
00044   const char * getName();
00045 
00046         //##ModelId=39914F05025F
00047   bool isReadable();
00048 
00049         //##ModelId=39914F05025E
00050   bool isWriteable();
00051 
00052         //##ModelId=39914F05025D
00053   int getLength();
00054 
00055         //##ModelId=39914F050247
00056   unsigned long read(int elem=0);
00057 
00058         //##ModelId=39914F05023D
00059   void write(int elem, unsigned long data);
00060 
00061         //##ModelId=39914F050251
00062   void read(unsigned long *data, int len);
00063 
00064         //##ModelId=39914F050240
00065   void write(unsigned long *data, int len);
00066 
00067         //##ModelId=39914F05025B
00068   void read(unsigned long *data);
00069 
00070         //##ModelId=39914F050243
00071   void write(unsigned long *data);
00072 
00073 
00074   void writeBits(int elem, unsigned long data, unsigned long mask, int shift);
00075 
00076   void setBitsToHigh(int elem, unsigned long mask);
00077 
00078   void setBitsToLow(int elem, unsigned long mask);
00079 
00082   virtual void get(FEunitData **data);
00083   
00085   unsigned long getAddr(int elem = 0);
00086 
00087 protected:
00088         //##ModelId=39914F05023C
00089         unsigned long addr;
00090 
00091         //##ModelId=39914F050234
00092         const char * name;
00093 
00094         //##ModelId=39914F050233
00095         bool readable;
00096 
00097         //##ModelId=39914F050232
00098         bool writeable;
00099 
00100         //##ModelId=39914F050231
00101   int len;
00102 };
00103 
00104 #endif