genericBuffer.h

Go to the documentation of this file.
00001 
00019 #ifndef  _genericbuffer_h_INC
00020 #define  _genericbuffer_h_INC
00021 
00022 #include        "../interfaces/buffer.h"
00023 #include        "../../data_types/impl/flit.h"
00024 #include        <deque>
00025 #include        <vector>
00026 
00027 class GenericBuffer: public Buffer
00028 {
00029     public:
00030         GenericBuffer ();                             /* constructor */
00031         ~GenericBuffer ();                             /* desstructor */
00032         void push( Flit* f );
00033         Flit* pull();
00034         Flit* peek();
00035         uint get_occupancy( uint ch ) const;
00036         void resize ( uint vcs, uint buffer_size );
00037         uint get_no_vcs() const;
00038         void change_pull_channel( uint ch );
00039         void change_push_channel( uint ch );
00040         uint get_pull_channel() const;
00041         uint get_push_channel() const;
00042         bool is_channel_full( uint ch ) const;
00043         bool is_empty( uint ch ) const;
00044 
00045         string toString() const;
00046 
00047         void got_credit( uint ch ) ;
00048         uint get_no_credits( uint ch ) const;
00049         void set_no_credits( uint no );
00050         vector < deque<Flit*> > buffers;
00051         vector < int > next_port;
00052 
00053     protected:
00054 
00055     private:
00056         vector < int > credits;
00057         uint vcs;
00058         uint buffer_size;
00059         uint max_credits;
00060         uint pull_channel;
00061         uint push_channel;
00062 
00063 }; /* -----  end of class GenericBuffer  ----- */
00064 
00065 #endif   /* ----- #ifndef _genericbuffer_h_INC  ----- */
00066 

Generated on Tue Oct 19 17:22:00 2010 for IRIS by  doxygen 1.5.8