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


Ignore:
Timestamp:
Dec 8, 2011, 7:33:12 PM (12 years ago)
Author:
alain
Comment:

--

Legend:

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

    v13 v14  
    33= Tables types =
    44
    5 From the segments defined in the Mapping table, it is possible to generate 3 types of tables:
     5From the segments defined in the Mapping table, it is possible to generate 3 types of tables indexed by
     6the VCI address:
    67
    7  * Commands routing table, indexed by addresses, yielding target port number;
    8  * Commands locality table, indexed by addresses, yielding boolean whether an address is local or not;
    9  * Cacheability table, indexed by address, yielding whether allowed to cache or not.
     8 * routing table, yielding a target port number;
     9 * locality table, yielding a boolean indicating wether the address is local;
     10 * Cacheability table, yielding a boolean indicating wether the address is cacheable;
    1011
    1112When the mapping table is created, 4 informations must be defined:
     
    1819Nothing is verified until actual tables are created.
    1920
     21= Routing tables =
     22
     23In the general case, we can define hierarchical interconnects, where both initiators and targets are grouped
     24in subsystems, called clusters. Therefore, each initiator (and each target) is identified by two indexes:
     25a cluster_index, and a local_index.
     26
     27In such a case, we must use, local routing tables, global routing tables and locality tables.
     28
    2029We'll suppose we create a MappingTable with the following code:
    2130{{{
    22 MappingTable obj(32, IntTab(8, 4), IntTab(4, 3), 0x00300000 );
     31MappingTable maptab(32, IntTab(8, 4), IntTab(4, 3), 0x00300000 );
    2332}}}
    2433
    25 This define a two levels hierarchical interconnect, where both initiators and targets are grouped
    26 in subsystems, called clusters. Therefore, each initiator and each target is identified by two indexes:
    27 a cluster_index, and a local_index.
     34For a command packet, the first 8 MSB ADDRES bits must be decoded by the global interconnect using the global routing table to get the target cluster_index, and the next 4 ADDRESS bits must be decoded by the local interconnect using a local routing table to get the target local_index.
    2835
    29 For 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.
     36The locality table is used by the local interconnect to decide wether a command packet is local or not.
    3037
    3138For a response packet, the 4 SRCID MSB bits define directly the initiator cluster_index, and the next 3 SRCID bits 
    3239define directly the initiator local_index.
    3340
    34 = Variable tables =
    35 
    3641The interconnect hierarchy can be seen as a tree.
    37 Each interconnect in tree has an unique ID, which is an IntTab. The root interconnect
     42Each interconnect in tree has an unique index, which is an IntTab. The root interconnect
    3843has the empty `IntTab()` ID, if there are local interconnects, they are numbered `IntTab(n)` where `n`
    39 is the local cluster ID. This ID '''must''' be the same as the targets and initiator ports it is connected
     44is the local cluster_index. This ID '''must''' be the same as the targets and initiator ports it is connected
    4045to on the global interconnect.
    4146
    4247[[Image(routing.png)]]
    4348
    44 In this figure, the command routing table is different is `lc0`, `lc1` and `vgmn`.
    4549
    46 = Command tables =
    47 
    48 Routing tables can only use a part of the address to do their job. In the example
    49 above, `vgmn` is the global interconnect and uses the 8 address MSB bits.
     50In the example above, `vgmn` is the global interconnect and uses the 8 address MSB bits.
    5051`lc0` and `lc1` use the 4 next address bits (but the tables content is generally different for lc0 and lc1).
    5152
    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 ||                ||
     53|| widths            || 8        || 4        ||
     54|| bits              || 31 — 24  ||23 —  20  ||
     55|| locality decision || lc0, lc1 ||          ||   
     56|| routing decision  || vgmn     || lc0, lc1 ||
    5657
    5758== Creating the routing tables ==
     
    7374
    7475As the 8 first bits of address are assumed already decoded to select cluster 1,
    75 the local table only decodes the next 4 address bits:
     76the local routing table only decodes the next 4 address bits:
    7677
    7778|| Input (bits 23-20) || Target ID    ||
     
    8485|| 1111               || Don't Care   ||
    8586
    86 == Incoherences ==
    87 
    88 If the routing table creator encounters an impossible configuration, it raises an exception.
     87If the routing table creator encounters an impossible configuration in the mapping table, it raises an exception.
    8988Let's suppose we add the following segment:
    9089
    9190|| Name  ||  Address    || Size       || Target ||  Cacheable  ||
    92 || seg5  ||  0x20280000 || 0x00080000 || (1, 2) || False       ||
     91|| seg5  ||  0x12300000 || 0x00010000 || (1, 3) ||  False      ||
    9392
    94 Routing table should now be (even if bits 31—24 are 0x20):
     93The global routing table should decode the 8 address MSB bits to define the
     94cluster_index, segment seg0 and segment seg5 have the same MSB bits (0x12******),
     95but, they are mapped to different clusters, which is illegal.
    9596
    96 || Address (bits 23-20) || Target value ||
    97 || 0                    || 0    (seg2)  ||
    98 || 1                    || 1    (seg3)  ||
    99 || 2                    || 1 or 2   (seg4 & seg5)  ||
    100 || 3 .. 0xf             || unknown      ||
    10197
    102 == Creating the locality tables ==
     98== Locality tables ==
    10399
    104100Locality tables just tell whether an address is local to a subtree of the network or not.
     
    106102In the above example, locality table creation for local interconnect 0 (`getLocalityTable( IntTab(0) )`) would involve:
    107103
    108 || Name  ||  Address    || Address![31:24]|| Target cluster ||
    109 || seg0  ||  0x12000000 || 0x12           || 0 (local)      ||
    110 || seg1  ||  0x12100000 || 0x12           || 0 (local)      ||
    111 || seg2  ||  0x14000000 || 0x14           || 1 (foreign)    ||
    112 || seg3  ||  0x14100000 || 0x14           || 1 (foreign)    ||
    113 || seg4  ||  0x14200000 || 0x14           || 1 (foreign)    ||
     104|| Name  ||  Address    || Address![31:24]|| locality      ||
     105|| seg0  ||  0x12000000 || 00010010       || 0 (local)      ||
     106|| seg1  ||  0x12100000 || 00010010       || 0 (local)      ||
     107|| seg2  ||  0x14000000 || 00010100       || 1 (foreign)    ||
     108|| seg3  ||  0x14100000 || 00010100       || 1 (foreign)    ||
     109|| seg4  ||  0x14200000 || 00010100       || 1 (foreign)    ||
    114110
    115 So the locality table would be:
     111So the locality table will be:
    116112
    117 || Address![31:24]|| Is Local ||
    118 || 0x00 .. 0x11   || Unknown  ||
    119 || 0x12           || True     ||
    120 || 0x13           || Unknown  ||
    121 || 0x14           || False    ||
    122 || 0x15 .. 0xff   || Unknown  ||
    123 
     113|| Address![31:24]|| Is Local   ||
     114|| 00010010       || True       ||
     115|| 00010100       || False      ||
     116|| else           || Don't Care ||
    124117
    125118= Cacheability Table =
     
    152145and yield the Cacheability boolean.
    153146
    154 == Incoherences ==
    155 
    156147Here again an exception is raised if we encounter an incoherent mapping table.
    157148