Changes between Initial Version and Version 1 of Component/Mapping Table/Tables Creation


Ignore:
Timestamp:
Jan 25, 2010, 12:37:05 PM (14 years ago)
Author:
Nicolas Pouillon
Comment:

--

Legend:

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

    v1 v1  
     1= Tables types =
     2
     3Mapping table creates 5 types of tables:
     4
     5* Commands routing table, indexed by addresses, yielding target port number;
     6* Commands locality table, indexed by addresses, yielding boolean whether an address is local or not;
     7* Response routing table, indexed by source ID, yielding initiator port number;
     8* Response routing table, indexed by source ID, yielding boolean whether an index is local or not;
     9* Cacheability table, indexed by address, yielding whether allowed to cache or not.
     10
     11When the mapping table is created, it gets 4 informations:
     12* Address size (in bits)
     13* Address routing table fields sizes (in bits, from the MSBs)
     14* Index routing table fields sizes (in bits, from MSB of indexes)
     15* Cacheability mask
     16
     17When the mapping table is created, segments are registered with the `.add()` method. This
     18does nothing except registering segments. Nothing is verified until actual tables are created.
     19
     20We'll suppose we create a MappingTable with the following code:
     21{{{
     22MappingTable obj(32, IntTab(8, 4), IntTab(4, 4), 0x00300000 );
     23}}}
     24
     25
     26= Variable tables =
     27
     28The two routing table types are unique for each interconnect. The interconnect hierarchy can be seen
     29as a tree. Each interconnect in tree has an unique ID, which is an IntTab. The root interconnect is
     30has the empty `IntTab()` ID, if there are local interconnects, they are numbered `IntTab(n)` where `n`
     31is the local cluster ID. This ID '''must''' be the same as the targets and initiator ports it is connected
     32to on the global interconnect.
     33
     34[[Image(routing.png)]]
     35
     36In this figure, the command routing table is different is `lc0`, `lc1` and `vgmn`.
     37
     38= Command tables =
     39
     40Routing tables can only use a part of the address to do their job. In the example
     41above, `vgmn` is the global interconnect and uses Most-significant-bits of the addresses;
     42`lc0` and `lc1` use the same bits (but on different tables), just after the MSBs used by
     43`vgmn`:
     44
     45An address and its decoding fields, if we suppose we created the Mapping Table as before,
     46we have a 32-bit address:
     47
     48|| width:|| 8       || 4         || (the rest)      ||
     49|| bits: || 31 — 24 ||23 —  20   || 19 — 0          ||
     50|| field:|| vgmn    || lc0 & lc1 || rest of address ||
     51
     52== Creating the routing tables ==
     53
     54When code calls `getRoutingTable( index )` on a `MappingTable`, `MappingTable` scans the list of
     55registered segments and filters all the segments ''under'' `index`.
     56
     57Let's say we have the following segments:
     58
     59|| Name  ||  Address    || Size       || Target ||  Cacheable  ||
     60|| seg0  ||  0x12000000 || 0x00100000 || (0, 0) || False       ||
     61|| seg1  ||  0x12100000 || 0x00100000 || (0, 1) || True        ||
     62|| seg2  ||  0x14000000 || 0x00100000 || (1, 0) || False       ||
     63|| seg3  ||  0x14100000 || 0x00100000 || (1, 1) || True        ||
     64|| seg4  ||  0x14200000 || 0x00080000 || (1, 1) || True        ||
     65
     66When calling `getRoutingTable( IntTab(1) )`, the resulting routing table
     67will only contain information about `seg2`, `seg3`  and `seg4`, which targets `(1, …)`.
     68As the 8 first bits of address are assumed already decoded, the table only decodes the next 4 bits:
     69
     70|| Input (bits 23-20) || Target value ||
     71|| 0                  || 0    (seg2)  ||
     72|| 1                  || 1    (seg3)  ||
     73|| 2                  || 1    (seg4)  ||
     74|| 3 .. 0xf           || unknown      ||
     75
     76== Incoherences ==
     77
     78If routing table creation encounters an impossible configuration, it raises an exception.
     79Let's suppose we add the following segment:
     80
     81|| Name  ||  Address    || Size       || Target ||  Cacheable  ||
     82|| seg5  ||  0x20280000 || 0x00080000 || (1, 2) || False       ||
     83
     84Routing table should now be (even if bits 31—24 are 0x20):
     85
     86|| Address (bits 23-20) || Target value ||
     87|| 0                    || 0    (seg2)  ||
     88|| 1                    || 1    (seg3)  ||
     89|| 2                    || 1 or 2   (seg4 & seg5)  ||
     90|| 3 .. 0xf             || unknown      ||
     91
     92== Creating the locality tables ==
     93
     94TODO
     95
     96= Response tables =
     97
     98== Response Routing table ==
     99
     100The response tables are quite the same as the command ones, except bits used in decoding the
     101source ID field are equal to the result.
     102
     103`getIdRoutingTable( IntTab(1) )` yields:
     104
     105|| Srcid (bits 7-4)   || Target value ||
     106|| 0                  || 0            ||
     107|| 1                  || 1            ||
     108|| 2                  || 2            ||
     109|| ...                || ...          ||
     110|| 0xf                || 0xf          ||
     111
     112= Cacheability Table =
     113
     114Cacheability tables are a built the same way, but bits used for decoding are selected through mask
     115passed at construction:
     116* take all segments
     117* extract cacheability value
     118* set the cacheability attribute for the value
     119
     120We use a cacheability mask of 0x00300000.
     121
     122|| Name  ||  Address    || Cacheability value || Shortened value || Cacheablility  ||
     123|| seg0  ||  0x12000000 || 0x00000000         || 0               ||    False       ||
     124|| seg1  ||  0x12100000 || 0x00100000         || 1               ||    True        ||
     125|| seg2  ||  0x14000000 || 0x00000000         || 0               ||    False       ||
     126|| seg3  ||  0x14100000 || 0x00100000         || 1               ||    True        ||
     127|| seg4  ||  0x14200000 || 0x00200000         || 2               ||    True        ||
     128
     129We can deduct the following table:
     130
     131|| Shortened value || Cacheability ||
     132|| 0               || False        ||
     133|| 1               || True         ||
     134|| 2               || True         ||
     135|| 3               || unknown      ||
     136
     137== Incoherences ==
     138
     139Again, if we encounter an incoherent value, exception will be raised; let's suppose we add
     140the following segment:
     141
     142|| Name  ||  Address    || Size       || Target ||  Cacheable  ||
     143|| seg5  ||  0x20280000 || 0x00080000 || (1, 2) || False       ||
     144
     145Its entry is
     146
     147|| Name  ||  Address    || Cacheability value || Shortened value || Cacheablility  ||
     148|| seg5  ||  0x20280000 || 0x00200000         || 2               ||    False       ||
     149
     150Now the table becomes:
     151
     152|| Shortened value || Cacheability ||
     153|| 0               || False        ||
     154|| 1               || True         ||
     155|| 2               || True & False ||
     156|| 3               || unknown      ||
     157
     158This must not happen