Changes between Version 12 and Version 13 of Component/Mapping Table/Tables Creation


Ignore:
Timestamp:
Dec 8, 2011, 6:57:40 PM (12 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Component/Mapping Table/Tables Creation

    v12 v13  
    33= Tables types =
    44
    5 Mapping table creates 5 types of tables:
     5From the segments defined in the Mapping table, it is possible to generate 3 types of tables:
    66
    77 * Commands routing table, indexed by addresses, yielding target port number;
    88 * Commands locality table, indexed by addresses, yielding boolean whether an address is local or not;
    9  * Response routing table, indexed by source ID, yielding initiator port number;
    10  * Response routing table, indexed by source ID, yielding boolean whether an index is local or not;
    119 * Cacheability table, indexed by address, yielding whether allowed to cache or not.
    1210
    13 When the mapping table is created, it gets 4 informations:
     11When the mapping table is created, 4 informations must be defined:
    1412 * Address size (in bits)
    15  * Address routing table fields sizes (in bits, from the MSBs)
    16  * Index routing table fields sizes (in bits, from MSB of indexes)
     13 * Address routing table fields sizes (in bits, from the VCI ADDRES MSB bits)
     14 * Index routing table fields sizes (in bits, from the VCI SRCID)
    1715 * Cacheability mask
    1816
    19 When the mapping table is created, segments are registered with the `.add()` method. This
    20 does nothing except registering segments. Nothing is verified until actual tables are created.
     17Segments are registered with the `.add()` method.
     18Nothing is verified until actual tables are created.
    2119
    2220We'll suppose we create a MappingTable with the following code:
    2321{{{
    24 MappingTable obj(32, IntTab(8, 4), IntTab(4, 4), 0x00300000 );
     22MappingTable obj(32, IntTab(8, 4), IntTab(4, 3), 0x00300000 );
    2523}}}
    2624
     25This define a two levels hierarchical interconnect, where both initiators and targets are grouped
     26in subsystems, called clusters. Therefore, each initiator and each target is identified by two indexes:
     27a cluster_index, and a local_index.
     28
     29For a command packet, the first 8 MSB ADDRES bits must be decoded by a global routing table to get the target cluster_index, and the next 4 ADDRESS bits must be decoded by a local routing table to get the target local_index.
     30
     31For a response packet, the 4 SRCID MSB bits define directly the initiator cluster_index, and the next 3 SRCID bits 
     32define directly the initiator local_index.
    2733
    2834= Variable tables =
    2935
    30 The two routing table types are unique for each interconnect. The interconnect hierarchy can be seen
    31 as a tree. Each interconnect in tree has an unique ID, which is an IntTab. The root interconnect is
     36The interconnect hierarchy can be seen as a tree.
     37Each interconnect in tree has an unique ID, which is an IntTab. The root interconnect
    3238has the empty `IntTab()` ID, if there are local interconnects, they are numbered `IntTab(n)` where `n`
    3339is the local cluster ID. This ID '''must''' be the same as the targets and initiator ports it is connected
     
    4147
    4248Routing tables can only use a part of the address to do their job. In the example
    43 above, `vgmn` is the global interconnect and uses Most-significant-bits of the addresses;
    44 `lc0` and `lc1` use the same bits (but on different tables), just after the MSBs used by
    45 `vgmn`:
     49above, `vgmn` is the global interconnect and uses the 8 address MSB bits.
     50`lc0` and `lc1` use the 4 next address bits (but the tables content is generally different for lc0 and lc1).
    4651
    47 An address and its decoding fields, if we suppose we created the Mapping Table as before,
    48 we have a 32-bit address:
    49 
    50 || widths:                || 8        || 4        || remaining bits ||
    51 || bits:                  || 31 — 24  ||23 —  20  || 19 — 0         ||
    52 || locality decision for: || lc0, lc1 ||          ||                ||
    53 || routing decision for:  || vgmn     || lc0, lc1 ||                ||
     52|| widths            || 8        || 4        || remaining bits ||
     53|| bits              || 31 — 24  ||23 —  20  || 19 — 0         ||
     54|| locality decision || lc0, lc1 ||          ||                ||
     55|| routing decision  || vgmn     || lc0, lc1 ||                ||
    5456
    5557== Creating the routing tables ==
    5658
    5759When code calls `getRoutingTable( index )` on a `MappingTable`, `MappingTable` scans the list of
    58 registered segments and filters all the segments ''under'' `index`.
     60registered segments and filters all the segments corresponding to index value.
    5961
    6062Let's say we have the following segments:
     
    6567|| seg2  ||  0x14000000 || 0x00100000 || (1, 0) || False       ||
    6668|| seg3  ||  0x14100000 || 0x00100000 || (1, 1) || True        ||
    67 || seg4  ||  0x14200000 || 0x00080000 || (1, 1) || True        ||
     69|| seg4  ||  0x14200000 || 0x00080000 || (1, 2) || True        ||
    6870
    69 When calling `getRoutingTable( IntTab(1) )`, the resulting routing table
    70 will only contain information about segments which targets `(1, …)`: `seg2`, `seg3`  and `seg4`.
     71When calling `getRoutingTable( IntTab(1) )`, the resulting local routing table
     72will only contain information about segments located in cluster 1: `seg2`, `seg3`  and `seg4`.
    7173
    72 As the 8 first bits of address are assumed already decoded, the table only decodes the next 4 bits:
     74As the 8 first bits of address are assumed already decoded to select cluster 1,
     75the local table only decodes the next 4 address bits:
    7376
    7477|| Input (bits 23-20) || Target ID    ||
    75 || 0                  || 0    (seg2)  ||
    76 || 1                  || 1    (seg3)  ||
    77 || 2                  || 1    (seg4)  ||
    78 || 3 .. 0xf           || unknown      ||
     78|| 0000               || 0    (seg2)  ||
     79|| 0001               || 1    (seg3)  ||
     80|| 0010               || 2    (seg4)  ||
     81|| 0011               || Don't Care   ||
     82|| 0100               || Don't Care   ||
     83|| ...                || Don't Care   ||
     84|| 1111               || Don't Care   ||
    7985
    8086== Incoherences ==
    8187
    82 If routing table creation encounters an impossible configuration, it raises an exception.
     88If the routing table creator encounters an impossible configuration, it raises an exception.
    8389Let's suppose we add the following segment:
    8490
     
    116122|| 0x15 .. 0xff   || Unknown  ||
    117123
    118 = Response tables =
    119 
    120 == Response Routing table ==
    121 
    122 The response tables are quite the same as the command ones, except bits used in decoding the
    123 source ID field are equal to the result.
    124 
    125 `getIdRoutingTable( IntTab(1) )` yields:
    126 
    127 || Srcid (bits 7-4)   || Target value ||
    128 || 0                  || 0            ||
    129 || 1                  || 1            ||
    130 || 2                  || 2            ||
    131 || ...                || ...          ||
    132 || 0xf                || 0xf          ||
    133124
    134125= Cacheability Table =
    135126
    136 Cacheability tables are a built the same way, but bits used for decoding are selected through mask
    137 passed at construction:
     127Cacheability tables are a built the same way, but bits used for decoding are selected through the
     128cacheability mask:
     129
    138130 * take all segments
    139131 * extract masked value
    140132 * set the cacheability attribute for the value
    141133
    142 We use a cacheability mask of 0x00300000.
     134We use a cacheability mask of 0x00300000 (bits Address[21:22]
    143135
    144136|| Name  ||  Address    || Masked value || Address![21:20] || Cacheablility  ||
     
    149141|| seg4  ||  0x14200000 || 0x00200000   || 10              ||    True        ||
    150142
    151 We can deduct the following table:
     143We obtain the following cacheability table:
    152144
    153145|| Address![21:20]  || Cacheability ||
    154 || 0O               || False        ||
     146|| 00               || False        ||
    155147|| 01               || True         ||
    156148|| 10               || True         ||
    157149|| 11               || Don't Care   ||
    158150
    159 In components' code, Cacheability Tables directly take an address, select appropriate bits
     151Cacheability Tables take an address, select appropriate bits
    160152and yield the Cacheability boolean.
    161153
    162154== Incoherences ==
    163155
    164 Again, if we encounter an incoherent value, exception will be raised; let's suppose we add
    165 the following segment:
     156Here again an exception is raised if we encounter an incoherent mapping table.
     157
     158Assume we add a new segment seg5:
    166159
    167160|| Name  ||  Address    || Size       || Target ||  Cacheable  ||
    168161|| seg5  ||  0x20280000 || 0x00080000 || (1, 2) || False       ||
    169162
    170 Its entry is
     163Its cacheability entry should be:
    171164
    172165|| Name  ||  Address    || Masked value || Address![21:20] || Cacheablility  ||
    173 || seg5  ||  0x20280000 || 0x00200000   || 2               ||    False       ||
     166|| seg5  ||  0x20280000 || 0x00200000   || 10              ||    False       ||
    174167
    175 Now the table becomes:
     168The cacheability should be True for segment 4, and False for segment 5, which is not possible.
    176169
    177 || Shortened value || Cacheability ||
    178 || 0               || False        ||
    179 || 1               || True         ||
    180 || 2               || True & False ||
    181 || 3               || unknown      ||
    182170
    183 This must not happen
     171