Ignore:
Timestamp:
Apr 15, 2015, 4:02:12 PM (9 years ago)
Author:
cfuguet
Message:

reconf: dont test the locality of global to local requests.

  • This is to support segment reallocation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/dspin_local_crossbar/caba/source/include/dspin_local_crossbar.h

    r976 r977  
    55  *
    66  * SOCLIB_LGPL_HEADER_BEGIN
    7   * 
     7  *
    88  * This file is part of SoCLib, GNU LGPLv2.1.
    9   * 
     9  *
    1010  * SoCLib is free software; you can redistribute it and/or modify it
    1111  * under the terms of the GNU Lesser General Public License as published
    1212  * by the Free Software Foundation; version 2.1 of the License.
    13   * 
     13  *
    1414  * SoCLib is distributed in the hope that it will be useful, but
    1515  * WITHOUT ANY WARRANTY; without even the implied warranty of
    1616  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1717  * Lesser General Public License for more details.
    18   * 
     18  *
    1919  * You should have received a copy of the GNU Lesser General Public
    2020  * License along with SoCLib; if not, write to the Free Software
    2121  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    2222  * 02110-1301 USA
    23   * 
     23  *
    2424  * SOCLIB_LGPL_HEADER_END
    2525  *
     
    4444
    4545    template<size_t flit_width>
    46         class DspinLocalCrossbar
    47         : public soclib::caba::BaseModule
    48         {
     46    class DspinLocalCrossbar
     47    : public soclib::caba::BaseModule
     48    {
    4949        // Input Port FSM
    50         enum 
     50        enum
    5151        {
    5252        INFSM_IDLE,
     
    5757        };
    5858
    59             protected:
    60             SC_HAS_PROCESS(DspinLocalCrossbar);
     59        protected:
     60        SC_HAS_PROCESS(DspinLocalCrossbar);
    6161
    62             public:
     62        public:
    6363
    64             // ports
    65             sc_in<bool>                     p_clk;
    66             sc_in<bool>                     p_resetn;
    67             DspinInput<flit_width>                  p_global_in;
    68             DspinOutput<flit_width>                     p_global_out;
    69             DspinInput<flit_width>*                 p_local_in;
    70             DspinOutput<flit_width>*            p_local_out;
     64        // ports
     65        sc_in<bool>                     p_clk;
     66        sc_in<bool>                     p_resetn;
     67        DspinInput<flit_width>          p_global_in;
     68        DspinOutput<flit_width>         p_global_out;
     69        DspinInput<flit_width>*         p_local_in;
     70        DspinOutput<flit_width>*        p_local_out;
    7171
    7272        void      print_trace();
    7373
    74             // constructor / destructor
    75             DspinLocalCrossbar( sc_module_name      name,
     74        // constructor / destructor
     75        DspinLocalCrossbar( sc_module_name      name,
    7676                            const MappingTable  &mt,
    7777                            const size_t        x,              // cluster x coordinate
    7878                            const size_t        y,              // cluster y coordinate
    7979                            const size_t        x_width,        // x field width
    80                             const size_t        y_width,        // y field width       
     80                            const size_t        y_width,        // y field width
    8181                            const size_t        l_width,        // local field width
    8282                            const size_t        nb_local_inputs,
     
    9090        ~DspinLocalCrossbar();
    9191
    92             private:
     92        private:
    9393
    9494        // define the FIFO flit
    95         typedef struct internal_flit_s 
     95        typedef struct internal_flit_s
    9696        {
    9797            sc_uint<flit_width>  data;
     
    9999        } internal_flit_t;
    100100
    101             // internal registers
    102             sc_signal<bool>                             *r_alloc_out;  // output port allocated
    103             sc_signal<size_t>               *r_index_out;  // owner input port index
     101        // internal registers
     102        sc_signal<bool>                 *r_alloc_out;  // output port allocated
     103        sc_signal<size_t>               *r_index_out;  // owner input port index
    104104        internal_flit_t                 *r_buf_in;     // input port fifo extension
    105105        sc_signal<int>                  *r_fsm_in;     // input port state
    106             sc_signal<size_t>               *r_index_in;   // requested output port index
     106        sc_signal<size_t>               *r_index_in;   // requested output port index
    107107
    108             // fifos
    109             soclib::caba::GenericFifo<internal_flit_t>*  r_fifo_in;
    110             soclib::caba::GenericFifo<internal_flit_t>*  r_fifo_out;
     108        // fifos
     109        soclib::caba::GenericFifo<internal_flit_t>*  r_fifo_in;
     110        soclib::caba::GenericFifo<internal_flit_t>*  r_fifo_out;
    111111
    112             // structural parameters
    113             const size_t                            m_local_x;
    114             const size_t                            m_local_y;
    115             const size_t                            m_x_width;
    116             const size_t                            m_x_shift;
    117             const size_t                            m_x_mask;
    118             const size_t                            m_y_width;
    119             const size_t                            m_y_shift;
    120             const size_t                            m_y_mask;
    121             const size_t                            m_l_width;
    122             const size_t                            m_l_shift;
    123             const size_t                            m_l_mask;
     112        // structural parameters
     113        const size_t                            m_local_x;
     114        const size_t                            m_local_y;
     115        const size_t                            m_x_width;
     116        const size_t                            m_x_shift;
     117        const size_t                            m_x_mask;
     118        const size_t                            m_y_width;
     119        const size_t                            m_y_shift;
     120        const size_t                            m_y_mask;
     121        const size_t                            m_l_width;
     122        const size_t                            m_l_shift;
     123        const size_t                            m_l_mask;
    124124        const size_t                            m_local_inputs;
    125125        const size_t                            m_local_outputs;
     
    133133        AddressDecodingTable<uint32_t, size_t>  m_rsp_rt;
    134134
    135             // methods
    136             void      transition();
    137             void      genMoore();
     135        // methods
     136        void      transition();
     137        void      genMoore();
    138138        size_t    route( sc_uint<flit_width> data, size_t index );
    139139        bool      is_broadcast( sc_uint<flit_width> data );
    140         };
     140    };
    141141
    142142}} // end namespace
    143                
     143
    144144#endif // DSPIN_LOCAL_CROSSBAR_H_
    145145
Note: See TracChangeset for help on using the changeset viewer.