Ignore:
Timestamp:
Oct 17, 2013, 8:50:46 PM (11 years ago)
Author:
alain
Message:

Compliance with mapping_table defined in release 2462
Introducing the dspin_router_tsar component used in tsar_generic_iob
platform to implement the RAM networt (between L2 & L3).

File:
1 edited

Legend:

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

    r489 r549  
    2929    bool                        proc_read;          // read request from processor
    3030    size_t                  read_length;    // length of the read (for the response)
    31     size_t                  word_index;         // index of the first read word (for the response)
     31    size_t                  word_index;         // index of the first read word (for response)
    3232    std::vector<data_t> wdata;          // write buffer (one cache line)
    3333    std::vector<be_t>   wdata_be;       // be for each data in the write buffer
     
    4848    /////////////////////////////////////////////////////////////////////
    4949    // The alloc() function initializes the vectors of an entry
    50     // Its arguments are :
    51     // - n_words : number of words per line in the cache
     50    // The "n_words" argument is the number of words in a cache line.
    5251    /////////////////////////////////////////////////////////////////////
    5352    void alloc(size_t n_words)
     
    6463    ////////////////////////////////////////////////////////////////////
    6564    // The copy() function copies an existing entry
    66     // Its arguments are :
    67     // - source : the transaction tab entry to copy
    6865    ////////////////////////////////////////////////////////////////////
    6966    void copy(const TransactionTabEntry &source)
     
    8683
    8784    ////////////////////////////////////////////////////////////////////
    88     // The print() function prints the entry
    89     ////////////////////////////////////////////////////////////////////
    90     void print()
    91     {
    92         std::cout << "------- TRT entry -------" << std::endl;
    93         std::cout << "valid       = " << valid        << std::endl;
    94         std::cout << "xram_read   = " << xram_read    << std::endl;
    95         std::cout << "nline       = " << std::hex << nline << std::endl;
    96         std::cout << "srcid       = " << srcid        << std::endl;
    97         std::cout << "trdid       = " << trdid        << std::endl;
    98         std::cout << "pktid       = " << pktid        << std::endl;
    99         std::cout << "proc_read   = " << proc_read    << std::endl;
    100         std::cout << "read_length = " << read_length  << std::endl;
    101         std::cout << "word_index  = " << word_index   << std::endl;
    102         for(size_t i=0; i<wdata_be.size() ; i++)
    103         {
    104             std::cout << "wdata_be[" << std::dec << i << "] = "
    105                       << std::hex << wdata_be[i] << std::endl;
    106         }
    107         for(size_t i=0; i<wdata.size() ; i++)
    108         {
    109             std::cout << "wdata[" << std::dec << i << "] = "
    110                       << std::hex << wdata[i] << std::endl;
    111         }
    112         std::cout << "rerror      = " << rerror       << std::endl;
    113         std::cout << "ll_key      = " << ll_key       << std::endl;
    114         std::cout << "config      = " << config       << std::endl;
    115         std::cout << std::endl;
     85    // The print() function prints the entry identified by "index".
     86    ////////////////////////////////////////////////////////////////////
     87    void print( size_t index, size_t mode )
     88    {
     89        std::cout << "  TRT[" << std::dec << index << "] "
     90                  << " valid = " << valid
     91                  << " / error = " << rerror
     92                  << " / get = " << xram_read
     93                  << " / config = " << config << std::hex
     94                  << " / address = " << nline*4*wdata.size()
     95                  << " / srcid = " << srcid << std::endl;
     96        if ( mode )
     97        {
     98            std::cout << "        trdid = " << trdid
     99                      << " / pktid = " << pktid << std::dec
     100                      << " / proc_read = " << proc_read
     101                      << " / read_length = " << read_length
     102                      << " / word_index  = " << word_index << std::hex
     103                      << " / ll_key = " << ll_key << std::endl;
     104            std::cout << "        wdata = ";
     105            for(size_t i=0; i<wdata.size() ; i++)
     106            {
     107                std::cout << std::hex << wdata[i] << " / ";
     108            }
     109            std::cout << std::endl;
     110        }
    116111    }
    117112
     
    228223    }
    229224    /////////////////////////////////////////////////////////////////////
    230     // The print() function prints a transaction tab entry
    231     // Arguments :
    232     // - index : the index of the entry to print
    233     /////////////////////////////////////////////////////////////////////
    234     void print(const size_t index)
    235     {
    236         assert( (index < size_tab) and
    237         "MEMC ERROR: The selected entry is out of range in TRT write_data_mask()");
    238 
    239         tab[index].print();
    240         return;
     225    // The print() function prints TRT content.
     226    // Detailed content if detailed argument is non zero.
     227    /////////////////////////////////////////////////////////////////////
     228    void print( size_t detailed = 0 )
     229    {
     230        std::cout << "  < TRT content in " <<  tab_name << " >" << std::endl;
     231        for ( size_t id = 0 ; id < size_tab ; id++ )
     232        {
     233            tab[id].print( id , detailed );
     234        }
    241235    }
    242236    /////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.