Ignore:
Timestamp:
Apr 8, 2010, 6:07:01 PM (14 years ago)
Author:
simerabe
Message:

fixing bug related to broadcast

File:
1 edited

Legend:

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

    r11 r14  
    3232#include "gate_ports_2.h"
    3333
    34 #define HT_DEBUG
     34//#define HT_DEBUG
    3535//#define HT_DEBUG_FSM
    3636
     
    157157
    158158#ifdef HT_DEBUG_FSM
    159     std::cout << "--------------------------------------------" << std::endl;
    160     std::cout             << " ring cmd fsm = " << ring_cmd_fsm_state_str_ht[r_ring_cmd_fsm] << std::endl
    161                           << " ring rsp fsm = " << ring_rsp_fsm_state_str_ht[r_ring_rsp_fsm] << std::endl;
     159if( trace(sc_time_stamp()))
     160    std::cout << sc_time_stamp() << " - " << m_name
     161                                 << " - ring cmd = " << ring_cmd_fsm_state_str_ht[r_ring_cmd_fsm]
     162                                 << " - ring rsp = " << ring_rsp_fsm_state_str_ht[r_ring_rsp_fsm]
     163                                 << std::endl;
    162164#endif
    163165       
     
    182184          << " -- ring rok : " <<  p_ring_in.rsp_w
    183185          << " -- ringin rsp grant : " << p_ring_in.rsp_grant
    184           << " -- ringin rsp data  : " << p_ring_in.rsp_data
     186          << " -- fifo rsp data  : " << std::hex << m_rsp_fifo.read()
    185187          << std::endl;
    186188#endif   
     
    192194
    193195                case DEFAULT: 
    194                        
    195                         if ( m_rsp_fifo.rok()) // && p_ring_in.rsp_r )
    196                         {
    197196#ifdef HT_DEBUG
    198197if( trace(sc_time_stamp()))
     
    200199          << " -- fifo_rsp_data : " << std::hex << m_rsp_fifo.read()
    201200          << std::endl;
    202 #endif
     201#endif                 
     202                        if ( m_rsp_fifo.rok()) // && p_ring_in.rsp_r )
     203                        {
     204
    203205                                rsp_fifo_get = p_ring_in.rsp_r; //true;
    204206                                r_ring_rsp_fsm = KEEP;
     
    240242                {
    241243                        vci_addr_t rtgtid = (vci_addr_t) ((p_ring_in.cmd_data >> 1) << 2);
    242                         uint32_t cluster = (uint32_t) ((p_ring_in.cmd_data >> 24) & 0xF); // a voir FF
     244                        int cluster =  (int) (p_ring_in.cmd_data >> 24) & 0xF; // a voir FF
    243245                        bool brdcst = (IntTab(cluster) == m_ringid) && ((p_ring_in.cmd_data & 0x1) == 0X1) ;                       
    244246                        bool loc = !((p_ring_in.cmd_data & 0x1) == 0x1) && !m_lt[rtgtid] && !m_local;
     
    249251std::cout     << sc_time_stamp() << " -- " << m_name
    250252              << " -- ring_cmd_fsm -- CMD_IDLE "
    251               << " -- in rok : " << p_ring_in.cmd_w
    252               << " -- addr : " << std::hex << rtgtid
    253               << " -- brdcst : " << brdcst
    254               << " -- eop : " << eop
    255               << " -- isloc : " << loc
    256               << " -- in wok : " << p_ring_in.cmd_r
    257               << " -- fifo wok : " << m_cmd_fifo.wok()
    258 //            << " -- cluster : " << std::hex << cluster
    259 //            << " -- intTab : " << IntTab(cluster)
     253              << " - in rok : " << p_ring_in.cmd_w
     254              << " - addr : " << std::hex << rtgtid
     255              << " - brdcst : " << brdcst
     256              << " - eop : " << eop
     257              << " - isloc : " << loc
     258              << " - in wok : " << p_ring_in.cmd_r
     259              << " - fifo wok : " << m_cmd_fifo.wok()
     260              << " - ringid  : " << m_ringid
     261              << " - cluster : " << cluster
     262              << " - intTab : " << IntTab(cluster)
    260263              << std::endl;
    261264}
     
    427430
    428431        p_gate_target.rsp_r= m_rsp_fifo.wok();
     432
    429433} // end genMoore
    430434
     
    478482
    479483                        vci_addr_t rtgtid = (vci_addr_t) ((p_ring_in.cmd_data >> 1) << 2);
    480                         uint32_t cluster = (uint32_t) ((p_ring_in.cmd_data >> 24) & 0xF); // a voir FF
     484                        int cluster = (int) (p_ring_in.cmd_data >> 24) & 0xF; // a voir FF
    481485                        bool brdcst = (IntTab(cluster) == m_ringid) && ((p_ring_in.cmd_data & 0x1) == 0X1) ;
    482486                        bool loc = !((p_ring_in.cmd_data & 0x1) == 0x1) && !m_lt[rtgtid] && !m_local;
Note: See TracChangeset for help on using the changeset viewer.