Ignore:
Timestamp:
Jun 23, 2014, 3:43:33 PM (10 years ago)
Author:
cfuguet
Message:

vci_io_bridge:

  • erasing XICU base and size registers. There registers are not used anymore because routing through INT network is done by using special attribute of IOX mapping segments.
  • bugfix: adding config_cmd_to_config_rsp registers for transmitting SRCID, TRDID and PKTID. Before, r_config_cmd registers were used for transmitting these informations to CONFIG_RSP FSM, but these registers can be simultaneously modified by the CONFIG_CMD FSM.
  • adding a masking table for SRCID in the DMA_CMD FSM. This masking table is used to replace SRCID global bits of commands coming from external DMA peripherals by the IOB cluster global bits. This way, the responses for DMA peripheral commands, will come through the same IOB. In the same manner, the DMA_RSP FSM masks the global bits of RSRCID before sending to DMA external peripherals.
  • introduction of an IO transaction table in the CONFIG_CMD FSM. This table is used to store SRCID and TRDID of incoming commands from the INT network. The SRCID and TRDID of these commands is replaced by the IOB IOX SRCID and table index respectively. The goal is to force that responses to these commands come back trough the same IOB. The CONFIG_RSP FSM restores both SRCID and TRDID by reading the table.
File:
1 edited

Legend:

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

    r240 r715  
    99#define DEBUG_IOB_TRANSACTION 0
    1010
    11 // The index of Transaction Tab Entry corresponds to the trdid of the VCI packet on XRAM network
    12 
    1311////////////////////////////////////////////////////////////////////////
    1412//                  A transaction tab entry         
     
    1614
    1715class TransactionTabIOEntry {
    18   typedef uint32_t              size_t;
     16  typedef uint32_t size_t;
    1917
    2018 public:
    21   bool                      valid;          // entry valid
    22   size_t                    srcid;          // processor requesting the transaction
    23   size_t                    trdid;          // processor requesting the transaction
     19  bool   valid;          // valid entry
     20  size_t srcid;          // initiator requesting the transaction
     21  size_t trdid;          // thread ID of transaction
    2422
    2523  /////////////////////////////////////////////////////////////////////
     
    2826  void init()
    2927  {
    30     valid               = false;
     28    valid = false;
    3129  }
    3230
     
    3836  void copy(const TransactionTabIOEntry &source)
    3937  {
    40     valid          = source.valid;
    41     srcid          = source.srcid;
    42     trdid          = source.trdid;
     38    valid = source.valid;
     39    srcid = source.srcid;
     40    trdid = source.trdid;
    4341  }
    4442
     
    4745  ////////////////////////////////////////////////////////////////////
    4846  void print(){
    49     std::cout << "valid       = " << valid        << std::endl;
    50     std::cout << "srcid       = " << srcid        << std::endl;
    51     std::cout << "trdid       = " << trdid        << std::endl;
    52   }
    53 
    54   /////////////////////////////////////////////////////////////////////
    55   //            Constructors
     47    std::cout << "   valid = " << valid << std::hex
     48              << " / srcid = " << srcid
     49              << " / trdid = " << trdid << std::dec
     50              << std::endl;
     51  }
     52
     53  /////////////////////////////////////////////////////////////////////
     54  //        Constructors
    5655  /////////////////////////////////////////////////////////////////////
    5756
    5857  TransactionTabIOEntry()
     58  {
     59    valid = false;
     60  }
     61
     62  TransactionTabIOEntry(const TransactionTabIOEntry &source){
     63    valid = source.valid;
     64    srcid = source.srcid;
     65    trdid = source.trdid;
     66  }
     67
     68}; // end class TransactionTabIOEntry
     69
     70////////////////////////////////////////////////////////////////////////
     71//                  The transaction tab                             
     72////////////////////////////////////////////////////////////////////////
     73class TransactionTabIO{
     74 private:
     75  const size_t size_tab;          // The size of the tab
     76
     77 public:
     78  TransactionTabIOEntry *tab;     // The transaction tab
     79
     80  ////////////////////////////////////////////////////////////////////
     81  //        Constructors
     82  ////////////////////////////////////////////////////////////////////
     83  TransactionTabIO(size_t n_entries) : size_tab(n_entries)
     84  {
     85    tab = new TransactionTabIOEntry[size_tab];
     86  }
     87
     88  ~TransactionTabIO()
     89  {
     90    delete [] tab;
     91  }
     92
     93  /////////////////////////////////////////////////////////////////////
     94  // The size() function returns the size of the tab
     95  /////////////////////////////////////////////////////////////////////
     96  const size_t& size()
     97  {
     98    return size_tab;
     99  }
     100
     101  /////////////////////////////////////////////////////////////////////
     102  // The init() function initializes the transaction tab entries
     103  /////////////////////////////////////////////////////////////////////
     104  void init()
     105  {
     106    for ( size_t index = 0; index < size_tab; index++)
    59107    {
    60       valid=false;
     108      tab[index].init();
    61109    }
    62 
    63   TransactionTabIOEntry(const TransactionTabIOEntry &source){
    64     valid           = source.valid;
    65     srcid           = source.srcid;
    66     trdid           = source.trdid;
    67   }
    68 
    69 }; // end class TransactionTabIOEntry
    70 
    71 ////////////////////////////////////////////////////////////////////////
    72 //                  The transaction tab                             
    73 ////////////////////////////////////////////////////////////////////////
    74 class TransactionTabIO{
    75 //  typedef uint32_t size_t;
    76 
    77  private:
    78   size_t size_tab;                // The size of the tab
    79 
    80  public:
    81   TransactionTabIOEntry *tab;       // The transaction tab
    82 
    83   ////////////////////////////////////////////////////////////////////
    84   //            Constructors
    85   ////////////////////////////////////////////////////////////////////
    86   TransactionTabIO()
    87     {
    88       size_tab=0;
    89       tab=NULL;
    90     }
    91 
    92   TransactionTabIO(size_t n_entries)
    93     {
    94       size_tab = n_entries;
    95       tab = new TransactionTabIOEntry[size_tab];
    96     }
    97 
    98   ~TransactionTabIO()
    99     {
    100       delete [] tab;
    101     }
    102 
    103   /////////////////////////////////////////////////////////////////////
    104   // The size() function returns the size of the tab
    105   /////////////////////////////////////////////////////////////////////
    106   size_t size()
    107   {
    108     return size_tab;
    109   }
    110 
    111   /////////////////////////////////////////////////////////////////////
    112   // The init() function initializes the transaction tab entries
    113   /////////////////////////////////////////////////////////////////////
    114   void init()
    115   {
    116     for ( size_t i=0; i<size_tab; i++) {
    117       tab[i].init();
    118     }
    119110  }
    120111
     
    126117  void print(const size_t index)
    127118  {
    128     assert( (index < size_tab)
    129             && "Invalid Transaction Tab Entry");
     119    assert( (index < size_tab) && "Invalid Transaction Tab Entry");
    130120    tab[index].print();
    131121    return;
     
    133123
    134124  /////////////////////////////////////////////////////////////////////
     125  // The printTrace() function prints all transaction tab entries
     126  /////////////////////////////////////////////////////////////////////
     127  void printTrace()
     128  {
     129    for (size_t index = 0; index < size_tab; index++)
     130    {
     131      tab[index].print();
     132    }
     133  }
     134
     135  /////////////////////////////////////////////////////////////////////
    135136  // The read() function returns a transaction tab entry.
    136137  // Arguments :
    137138  // - index : the index of the entry to read
    138139  /////////////////////////////////////////////////////////////////////
    139   TransactionTabIOEntry read(const size_t index)
    140   {
    141     assert( (index < size_tab)
    142             && "Invalid Transaction Tab Entry");
     140  TransactionTabIOEntry& read(const size_t index)
     141  {
     142    assert( (index < size_tab) && "Invalid Transaction Tab Entry");
    143143    return tab[index];
    144144  }
     
    151151  size_t readSrcid(const size_t index)
    152152  {
    153     assert( (index < size_tab)
    154             && "Invalid Transaction Tab Entry");
     153    assert( (index < size_tab) && "Invalid Transaction Tab Entry");
    155154    return tab[index].srcid;
    156155  }
     
    163162  size_t readTrdid(const size_t index)
    164163  {
    165     assert( (index < size_tab)
    166             && "Invalid Transaction Tab Entry");
     164    assert( (index < size_tab) && "Invalid Transaction Tab Entry");
    167165    return tab[index].trdid;
    168166  }
     
    176174  bool full(size_t &index)
    177175  {
    178     for(size_t i=0; i<size_tab; i++){
    179       if(!tab[i].valid){
    180             index=i;
    181             return false;       
     176    for(size_t i=0; i<size_tab; i++)
     177    {
     178      if(!tab[i].valid)
     179      {
     180        index = i;
     181        return false;   
    182182      }
    183183    }
     
    194194  /////////////////////////////////////////////////////////////////////
    195195  void set(const size_t index,
    196            const size_t srcid,
    197            const size_t trdid)
    198   {
    199     assert( (index < size_tab)
    200             && "The selected entry is out of range in set() Transaction Tab");
    201 
    202     tab[index].valid            = true;
    203     tab[index].srcid            = srcid;
    204     tab[index].trdid            = trdid;
     196           const size_t srcid,
     197           const size_t trdid)
     198  {
     199    assert( (index < size_tab) && "Invalid Transaction Tab Entry");
     200    tab[index].valid = true;
     201    tab[index].srcid = srcid;
     202    tab[index].trdid = trdid;
    205203  }
    206204
     
    212210  void erase(const size_t index)
    213211  {
    214     assert( (index < size_tab)
    215             && "The selected entry is out of range in erase() Transaction Tab");
    216     tab[index].valid    = false;
     212    assert( (index < size_tab) && "Invalid Transaction Tab Entry");
     213    tab[index].valid = false;
    217214  }
    218215}; // end class TransactionTabIO
     
    221218
    222219// Local Variables:
    223 // tab-width: 4
    224 // c-basic-offset: 4
     220// tab-width: 2
     221// c-basic-offset: 2
    225222// c-file-offsets:((innamespace . 0)(inline-open . 0))
    226223// indent-tabs-mode: nil
    227224// End:
    228225
    229 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
    230 
     226// vim: filetype=cpp:expandtab:shiftwidth=2:tabstop=2:softtabstop=2
     227
Note: See TracChangeset for help on using the changeset viewer.