Changeset 405


Ignore:
Timestamp:
Jun 7, 2013, 6:02:13 PM (12 years ago)
Author:
fraga
Message:

VCI_IO_BRIDGE: Adding some casts to handle the different VCI fields sizes on
each network.

Location:
trunk/modules/vci_io_bridge/caba/source
Files:
2 edited

Legend:

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

    r240 r405  
    9696    // Data field may change for external network
    9797    typedef typename vci_param_x::data_t      vci_data_t_x;
     98    typedef typename vci_param_x::be_t        vci_be_t_x;
    9899    // Srcid field may change for external network
    99100    typedef typename vci_param_x::srcid_t     vci_srcid_t_x;
     
    374375    sc_signal<vci_trdid_t>          r_miss_trdid ;
    375376    sc_signal<vci_pktid_t>          r_miss_pktid ;
    376     vci_data_t                      *r_miss_data ; 
     377    vci_data_t_x                    *r_miss_data ; 
    377378    vci_be_t                        *r_miss_be;
    378379   
  • trunk/modules/vci_io_bridge/caba/source/src/vci_io_bridge.cpp

    r240 r405  
    360360    assert( (vci_param_d::N <=  64) and
    361361            "ADDRESS cannot be bigger than 64 bits");
    362     assert( (vci_param_d::B ==  vci_param_io::B) and
    363             "DATA field must have the same size in Direct and IO Network");
     362    assert( (vci_param_x::B)*8 == 64 and (vci_param_io::B)*8 == 64 and
     363            "DATA field must be 64 bits in Extern and IO Network");
    364364    assert ( (vci_param_d::B)*8 == 32
    365365        and "Error: data field in Direct Noc must be 32 bits" );
     
    16971697   
    16981698    /////////////////////////////////////////////////////////////////////
    1699     // The CONFIG_CMD_FSM is similar to the DMA_CMD_FSM, but without miss TLB treatmentcontrols the following ressources:
     1699    // The CONFIG_CMD_FSM is similar to the DMA_CMD_FSM, but without miss TLB treatment.
     1700    // It controls the following ressources:
    17001701    // - r_config_cmd_fsm
    17011702    //
     
    30513052        #endif
    30523053       
    3053         p_vci_ini_config.be      = m_config_cmd_be_fifo.read();
     3054        p_vci_ini_config.be      = (vci_be_t_x)m_config_cmd_be_fifo.read();
    30543055        p_vci_ini_config.cmd     = m_config_cmd_cmd_fifo.read();
    30553056        p_vci_ini_config.contig  = m_config_cmd_contig_fifo.read();
     
    30573058        //TODO
    30583059        #else
    3059         p_vci_ini_config.wdata   = m_config_cmd_data_fifo.read(); // The first is in param_x
    3060                                                     // the second in param_io
     3060        p_vci_ini_config.wdata   = (vci_data_t_x)m_config_cmd_data_fifo.read(); // The first is in param_io
     3061                                                    // the second in param_d
    30613062        #endif
    30623063        p_vci_ini_config.eop     = m_config_cmd_eop_fifo.read();
     
    31403141        p_vci_tgt_config.rtrdid  = m_config_local_rtrdid_fifo.read();
    31413142        p_vci_tgt_config.rpktid  = m_config_local_rpktid_fifo.read();
    3142         p_vci_tgt_config.rdata   = m_config_local_data_fifo.read();
     3143        p_vci_tgt_config.rdata   = (vci_data_t)m_config_local_data_fifo.read();
    31433144        p_vci_tgt_config.rerror  = m_config_local_rerror_fifo.read();
    31443145        p_vci_tgt_config.reop    = m_config_local_reop_fifo.read();
     
    31523153        p_vci_tgt_config.rpktid  = m_config_rsp_rpktid_fifo.read();
    31533154   
    3154         p_vci_tgt_config.rdata   = m_config_rsp_data_fifo.read(); // The first is in param_d
     3155        p_vci_tgt_config.rdata   = (vci_data_t)m_config_rsp_data_fifo.read(); // The first is in param_d
    31553156                                                    // the second in param_io
    31563157        p_vci_tgt_config.rerror  = m_config_rsp_rerror_fifo.read();
     
    31803181        p_vci_tgt_config.rpktid  = m_config_rsp_rpktid_fifo.read();
    31813182   
    3182         p_vci_tgt_config.rdata   = m_config_rsp_data_fifo.read(); // The first is in param_d
     3183        p_vci_tgt_config.rdata   = (vci_data_t)m_config_rsp_data_fifo.read(); // The first is in param_d
    31833184                                                    // the second in param_io
    31843185        p_vci_tgt_config.rerror  = m_config_rsp_rerror_fifo.read();
     
    31913192        p_vci_tgt_config.rtrdid  = m_config_local_rtrdid_fifo.read();
    31923193        p_vci_tgt_config.rpktid  = m_config_local_rpktid_fifo.read();
    3193         p_vci_tgt_config.rdata   = m_config_local_data_fifo.read();
     3194        p_vci_tgt_config.rdata   = (vci_data_t)m_config_local_data_fifo.read();
    31943195        p_vci_tgt_config.rerror  = m_config_local_rerror_fifo.read();
    31953196        p_vci_tgt_config.reop    = m_config_local_reop_fifo.read();
Note: See TracChangeset for help on using the changeset viewer.