Changes between Version 13 and Version 14 of Component/Mapping Table/Tables Creation
- Timestamp:
- Dec 8, 2011, 7:33:12 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Component/Mapping Table/Tables Creation
v13 v14 3 3 = Tables types = 4 4 5 From the segments defined in the Mapping table, it is possible to generate 3 types of tables: 5 From the segments defined in the Mapping table, it is possible to generate 3 types of tables indexed by 6 the VCI address: 6 7 7 * Commands routing table, indexed by addresses, yieldingtarget 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; 10 11 11 12 When the mapping table is created, 4 informations must be defined: … … 18 19 Nothing is verified until actual tables are created. 19 20 21 = Routing tables = 22 23 In the general case, we can define hierarchical interconnects, where both initiators and targets are grouped 24 in subsystems, called clusters. Therefore, each initiator (and each target) is identified by two indexes: 25 a cluster_index, and a local_index. 26 27 In such a case, we must use, local routing tables, global routing tables and locality tables. 28 20 29 We'll suppose we create a MappingTable with the following code: 21 30 {{{ 22 MappingTable obj(32, IntTab(8, 4), IntTab(4, 3), 0x00300000 );31 MappingTable maptab(32, IntTab(8, 4), IntTab(4, 3), 0x00300000 ); 23 32 }}} 24 33 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. 34 For 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. 28 35 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. 36 The locality table is used by the local interconnect to decide wether a command packet is local or not. 30 37 31 38 For a response packet, the 4 SRCID MSB bits define directly the initiator cluster_index, and the next 3 SRCID bits 32 39 define directly the initiator local_index. 33 40 34 = Variable tables =35 36 41 The interconnect hierarchy can be seen as a tree. 37 Each interconnect in tree has an unique ID, which is an IntTab. The root interconnect42 Each interconnect in tree has an unique index, which is an IntTab. The root interconnect 38 43 has 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 connected44 is the local cluster_index. This ID '''must''' be the same as the targets and initiator ports it is connected 40 45 to on the global interconnect. 41 46 42 47 [[Image(routing.png)]] 43 48 44 In this figure, the command routing table is different is `lc0`, `lc1` and `vgmn`.45 49 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. 50 In the example above, `vgmn` is the global interconnect and uses the 8 address MSB bits. 50 51 `lc0` and `lc1` use the 4 next address bits (but the tables content is generally different for lc0 and lc1). 51 52 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 || 56 57 57 58 == Creating the routing tables == … … 73 74 74 75 As 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:76 the local routing table only decodes the next 4 address bits: 76 77 77 78 || Input (bits 23-20) || Target ID || … … 84 85 || 1111 || Don't Care || 85 86 86 == Incoherences == 87 88 If the routing table creator encounters an impossible configuration, it raises an exception. 87 If the routing table creator encounters an impossible configuration in the mapping table, it raises an exception. 89 88 Let's suppose we add the following segment: 90 89 91 90 || Name || Address || Size || Target || Cacheable || 92 || seg5 || 0x 20280000 || 0x00080000 || (1, 2) || False||91 || seg5 || 0x12300000 || 0x00010000 || (1, 3) || False || 93 92 94 Routing table should now be (even if bits 31—24 are 0x20): 93 The global routing table should decode the 8 address MSB bits to define the 94 cluster_index, segment seg0 and segment seg5 have the same MSB bits (0x12******), 95 but, they are mapped to different clusters, which is illegal. 95 96 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 ||101 97 102 == Creating the locality tables ==98 == Locality tables == 103 99 104 100 Locality tables just tell whether an address is local to a subtree of the network or not. … … 106 102 In the above example, locality table creation for local interconnect 0 (`getLocalityTable( IntTab(0) )`) would involve: 107 103 108 || Name || Address || Address![31:24]|| Target cluster||109 || seg0 || 0x12000000 || 0 x12|| 0 (local) ||110 || seg1 || 0x12100000 || 0 x12|| 0 (local) ||111 || seg2 || 0x14000000 || 0 x14|| 1 (foreign) ||112 || seg3 || 0x14100000 || 0 x14|| 1 (foreign) ||113 || seg4 || 0x14200000 || 0 x14|| 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) || 114 110 115 So the locality table w ouldbe:111 So the locality table will be: 116 112 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 || 124 117 125 118 = Cacheability Table = … … 152 145 and yield the Cacheability boolean. 153 146 154 == Incoherences ==155 156 147 Here again an exception is raised if we encounter an incoherent mapping table. 157 148