Ignore:
Timestamp:
Jan 15, 2013, 5:54:45 PM (11 years ago)
Author:
joannou
Message:

Updated vci_vdspin_initiator_wrapper and vci_vdspin_target_wrapper to fit new spec :
A single flit VCI response packet with a rdata=0 is translated to a single flit DSPIN response packet.
(All other responses need multi flit DSPIN response packets)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_vdspin_initiator_wrapper/caba/source/include/vci_vdspin_initiator_wrapper.h

    r150 r287  
    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
     25  *
     26  * Maintainers: alexandre.joannou@lip6.fr
     27  *
    2528  */
    2629
     
    4144// - VCI plen             == 8  bits
    4245// - VCI srcid            <= 14 bits
    43 // - VCI trdid            <= 8  bits
    44 // - VCI pktid field not transmitted
    45 // - VCI rerror           == 2 bits
     46// - VCI trdid            <= 4  bits
     47// - VCI pktid            <= 4  bits
     48// - VCI rerror           == 1  bit
    4649////////////////////////////////////////////////////////////////////////
    4750
     
    6063template<typename vci_param, int dspin_cmd_width, int dspin_rsp_width>
    6164class VciVdspinInitiatorWrapper
    62         : public soclib::caba::BaseModule
     65    : public soclib::caba::BaseModule
    6366{
    64     // Command FSM 
     67    // Command FSM
    6568    enum fsm_state_cmd{
    66         CMD_IDLE,
    67         CMD_BROADCAST,
    68         CMD_READ,
    69         CMD_WRITE,
    70         CMD_WDATA,
     69    CMD_IDLE,
     70    CMD_BROADCAST,
     71    CMD_READ,
     72    CMD_WRITE,
     73    CMD_WDATA,
    7174    };
    7275
    7376    // Response FSM
    7477    enum fsm_state_rsp{
    75         RSP_IDLE,
    76         RSP_READ,               
    77         RSP_WRITE,     
     78    RSP_IDLE,
     79    RSP_DSPIN_SINGLE_FLIT,
     80    RSP_DSPIN_MULTI_FLIT,
    7881    };
    7982
     
    8386public:
    8487    // ports
    85     sc_core::sc_in<bool>                                        p_clk;
    86     sc_core::sc_in<bool>                                        p_resetn;
    87     soclib::caba::DspinOutput<dspin_cmd_width>                  p_dspin_out;
    88     soclib::caba::DspinInput<dspin_rsp_width>                   p_dspin_in;
    89     soclib::caba::VciTarget<vci_param>                          p_vci;
     88    sc_core::sc_in<bool>                                    p_clk;
     89    sc_core::sc_in<bool>                                    p_resetn;
     90    soclib::caba::DspinOutput<dspin_cmd_width>              p_dspin_out;
     91    soclib::caba::DspinInput<dspin_rsp_width>               p_dspin_in;
     92    soclib::caba::VciTarget<vci_param>                      p_vci;
    9093
    9194    // constructor / destructor
    92     VciVdspinInitiatorWrapper(  sc_module_name                  name,
    93                                 size_t                          cmd_fifo_depth,
    94                                 size_t                          rsp_fifo_depth);
     95    VciVdspinInitiatorWrapper(  sc_module_name              name,
     96                                size_t                      cmd_fifo_depth,
     97                                size_t                      rsp_fifo_depth  );
    9598private:
    9699    // internal registers
    97     sc_core::sc_signal<int>                                     r_cmd_fsm;
    98     sc_core::sc_signal<int>                                     r_rsp_fsm;
    99     sc_core::sc_signal<sc_uint<dspin_rsp_width> >               r_rsp_buf;
     100    sc_core::sc_signal<int>                                 r_cmd_fsm;
     101    sc_core::sc_signal<int>                                 r_rsp_fsm;
     102    sc_core::sc_signal<sc_uint<dspin_rsp_width>    >        r_rsp_buf;
    100103
    101104    // fifos cmd and rsp
    102     soclib::caba::GenericFifo<sc_uint<dspin_cmd_width> >        r_fifo_cmd;
    103     soclib::caba::GenericFifo<sc_uint<dspin_rsp_width> >        r_fifo_rsp;
     105    soclib::caba::GenericFifo<sc_uint<dspin_cmd_width> >    r_fifo_cmd;
     106    soclib::caba::GenericFifo<sc_uint<dspin_rsp_width> >    r_fifo_rsp;
    104107
    105108    // methods systemc
     
    113116
    114117}} // end namespace
    115                
     118
    116119#endif // VCI_VDSPIN_INITIATOR_WRAPPER_H_
    117120
Note: See TracChangeset for help on using the changeset viewer.