Changeset 1006


Ignore:
Timestamp:
Jul 16, 2015, 3:17:49 PM (9 years ago)
Author:
cfuguet
Message:

reconf: simplify the mechanism to transform a router in a black-hole.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/modules/dspin_router/caba/source/src/dspin_router.cpp

    r997 r1006  
    593593            // do not write into the FIFO of disabled interfaces
    594594            fifo_in_write[i]       = p_in[i].write.read() &&
    595                                      ((m_disable_mask & (1 << i)) == 0);
     595                (((m_disable_mask >> i) & 1) == 0);
    596596
    597597            fifo_in_wdata[i].data  = p_in[i].data.read();
    598598            fifo_in_wdata[i].eop   = p_in[i].eop.read();
    599599
    600             fifo_out_read[i]       = p_out[i].read.read();
     600            fifo_out_read[i]       = p_out[i].read.read() ||
     601                (((m_disable_mask >> i) & 1) == 1);
    601602            fifo_out_write[i]      = false;
    602603        }
     
    882883            if( r_alloc_out[j] )  // output port allocated
    883884            {
    884                 fifo_out_write[j] = put_in[r_index_out[j]] &&
    885                                     ((m_disable_mask & (1 << j)) == 0);
     885                fifo_out_write[j] = put_in[r_index_out[j]];
    886886                fifo_out_wdata[j] = data_in[r_index_out[j]];
    887887            }
     
    908908        {
    909909            // input ports : READ signals
    910             p_in[i].read = r_fifo_in[i].wok();
     910            p_in[i].read = r_fifo_in[i].wok() ||
     911                (((m_disable_mask >> i) & 1) == 1);
    911912
    912913            // output ports : DATA & WRITE signals
    913914            p_out[i].data  = r_fifo_out[i].read().data;
    914915            p_out[i].eop   = r_fifo_out[i].read().eop;
    915             p_out[i].write = r_fifo_out[i].rok();
     916            p_out[i].write = r_fifo_out[i].rok() &&
     917                (((m_disable_mask >> i) & 1) == 0);
    916918        }
    917919    } // end genMoore
Note: See TracChangeset for help on using the changeset viewer.