Changeset 913
 Timestamp:
 Jan 2, 2015, 2:10:58 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/platforms/tsar_generic_iob/arch.py
r874 r913 53 53 ### define architecture constants 54 54 55 nb_nics = 2 55 nb_nics = 1 56 nb_cmas = 2 56 57 x_io = 0 57 58 y_io = 0 … … 63 64 use_ramdisk = False 64 65 peri_increment = 0x10000 # distributed peripherals vbase address increment 65 sched_increment = 0x10000 # distributed schedulers vbase address increment66 ptab_increment = 0x200000 # distributed page tables vbase address increment67 66 68 67 ### parameters checking … … 87 86 88 87 ram_base = 0x0000000000 89 ram_size = 0x 4000000 # 64Mbytes88 ram_size = 0x1000000 # 16 Mbytes 90 89 91 90 xcu_base = 0x00B0000000 … … 129 128 ### define bootloader vsegs base addresses and sizes 130 129 ### We want to pack these 4 vsegs in the same big page 131 ### => boot cost is one B PPin cluster[0][0]132 133 boot_mapping_vbase = 0x00000000 # ident134 boot_mapping_size = 0x00080000 # 512 Kbytes135 136 boot_code_vbase = 0x00080000 # ident137 boot_code_size = 0x00040000 # 256 Kbytes138 139 boot_data_vbase = 0x000C0000 # ident140 boot_data_size = 0x000 80000 # 512Kbytes141 142 boot_stack_vbase = 0x001 40000# ident143 boot_stack_size = 0x000 50000 # 320Kbytes130 ### => boot cost is one BIG page in cluster[0][0] 131 132 boot_mapping_vbase = 0x00000000 # ident 133 boot_mapping_size = 0x00080000 # 512 Kbytes 134 135 boot_code_vbase = 0x00080000 # ident 136 boot_code_size = 0x00040000 # 256 Kbytes 137 138 boot_data_vbase = 0x000C0000 # ident 139 boot_data_size = 0x000C0000 # 768 Kbytes 140 141 boot_stack_vbase = 0x00180000 # ident 142 boot_stack_size = 0x00080000 # 512 Kbytes 144 143 145 144 ### define kernel vsegs base addresses and sizes 146 ### code, init, ptab & sched vsegs are replicated in all clusters.145 ### code, init, ptab, heap & sched vsegs are replicated in all clusters. 147 146 ### data & uncdata vsegs are only mapped in cluster[0][0]. 148 ###  We pack code, init, data vsegs in the same BIG page. 149 ###  We use another BIG page for the ptab vseg. 150 ###  We use 2*nb_procs SMALL pages for the sched vseg. 151 ###  we use one SMALL page for uncdata 152 ### => kernel cost is 2 BPPs and (2*n + 1) SPPs per cluster. 147 ###  We use one BIG page for code vsegs in each cluster. 148 ###  We use one BIG page for ptab vsegs in each cluster. 149 ###  we use one BIG page for heap vsegs in each cluster. 150 ###  We use 2*procs SMALL pages for sched vsegs in each cluster. 151 ###  We use one BIG page for data vseg in cluster[0,0]. 152 ###  we use one SMALL page for uncdata in cluster[0,0]. 153 153 154 154 kernel_code_vbase = 0x80000000 155 kernel_code_size = 0x00080000 # 512 Kbytes per cluster 156 157 kernel_init_vbase = 0x80080000 158 kernel_init_size = 0x00080000 # 512 Kbytes per cluster 159 160 kernel_data_vbase = 0x80100000 161 kernel_data_size = 0x00100000 # 1 Mbytes in cluster[0][0] 155 kernel_code_size = 0x00100000 # 1 Mbytes per cluster 156 157 kernel_init_vbase = 0x80100000 158 kernel_init_size = 0x00100000 # 1 Mbytes per cluster 159 160 kernel_data_vbase = 0x90000000 161 kernel_data_size = 0x00200000 # 2 Mbytes in cluster[0,0] 162 163 kernel_uncdata_vbase = 0x90200000 164 kernel_uncdata_size = 0x00001000 # 4 Kbytes in cluster[0,0] 162 165 163 166 kernel_ptab_vbase = 0xE0000000 164 kernel_ptab_size = 0x00200000 # 2 Mbytes per cluster165 166 kernel_ uncdata_vbase = 0x90000000167 kernel_ uncdata_size = 0x00001000 # 4 Kbytes167 kernel_ptab_size = 0x00200000 # 2 Mbytes per cluster 168 169 kernel_heap_vbase = 0xD0000000 170 kernel_heap_size = 0x00200000 # 2 Mbytes per cluster 168 171 169 172 kernel_sched_vbase = 0xA0000000 … … 199 202 nic = mapping.addPeriph( 'NIC', base = nic_base, size = nic_size, ptype = 'NIC', channels = nb_nics ) 200 203 201 cma = mapping.addPeriph( 'CMA', base = cma_base, size = cma_size, ptype = 'CMA', channels = 2*nb_nics )204 cma = mapping.addPeriph( 'CMA', base = cma_base, size = cma_size, ptype = 'CMA', channels = nb_cmas ) 202 205 203 206 fbf = mapping.addPeriph( 'FBF', base = fbf_base, size = fbf_size, ptype = 'FBF', arg = fbf_width ) … … 253 256 254 257 xcu = mapping.addPeriph( 'XCU', base = xcu_base + offset, size = xcu_size, 255 ptype = 'XCU', channels = nb_procs * irq_per_proc, arg = 16)258 ptype = 'XCU', channels = nb_procs * irq_per_proc, arg = 32 ) 256 259 257 260 # MMC IRQ replicated in all clusters … … 287 290 identity = True , local = False, big = True ) 288 291 289 ### Global vsegs kernel_ptab_x_y : big page292 ### Global vsegs kernel_ptab_x_y : big / non local 290 293 ### one vseg per cluster: name indexed by (x,y) 291 ### vbase address incremented by (cluster_xy * vseg_increment) 292 for x in xrange( x_size ): 293 for y in xrange( y_size ): 294 offset = ((x << y_width) + y) * ptab_increment 294 for x in xrange( x_size ): 295 for y in xrange( y_size ): 296 offset = ((x << y_width) + y) * kernel_ptab_size 295 297 base = kernel_ptab_vbase + offset 296 298 mapping.addGlobal( 'seg_kernel_ptab_%d_%d' %(x,y), base, kernel_ptab_size, … … 298 300 local = False , big = True ) 299 301 300 ### global vsegs kernel_code, kernel_init : big page302 ### global vsegs kernel_code, kernel_init : big / local 301 303 ### replicated in all clusters with the same name & same vbase 302 304 for x in xrange( x_size ): … … 312 314 local = True, big = True ) 313 315 314 ### global vseg kernel_data : big page316 ### global vseg kernel_data : big / non local 315 317 ### Only mapped in cluster[0][0] 316 318 mapping.addGlobal( 'seg_kernel_data', kernel_data_vbase, kernel_data_size, … … 319 321 local = False, big = True ) 320 322 321 ### global vseg kernel_uncdata : small page323 ### global vseg kernel_uncdata : small / non local 322 324 ### Only mapped in cluster[0][0] 323 325 mapping.addGlobal( 'seg_kernel_uncdata', kernel_uncdata_vbase, kernel_uncdata_size, … … 326 328 local = False, big = False ) 327 329 328 ### global vsegs kernel_sched_x_y : small pages330 ### global vsegs kernel_sched_x_y : small / non local 329 331 ### one vseg per cluster with name indexed by (x,y) 330 ### as vbase address is incremented by (cluster_xy * vseg_increment) 331 for x in xrange( x_size ): 332 for y in xrange( y_size ): 333 offset = ((x << y_width) + y) * sched_increment 332 for x in xrange( x_size ): 333 for y in xrange( y_size ): 334 offset = ((x << y_width) + y) * kernel_sched_size 334 335 mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y), kernel_sched_vbase + offset , kernel_sched_size, 335 336 'C_W_', vtype = 'SCHED', x = x , y = y , pseg = 'RAM', 336 337 local = False, big = False ) 338 339 ### global vsegs kernel_heap_x_y : big / non local 340 ### one vseg per cluster with name indexed by (x,y) 341 for x in xrange( x_size ): 342 for y in xrange( y_size ): 343 offset = ((x << y_width) + y) * kernel_heap_size 344 mapping.addGlobal( 'seg_kernel_heap_%d_%d' %(x,y), kernel_heap_vbase + offset , kernel_heap_size, 345 'C_W_', vtype = 'HEAP', x = x , y = y , pseg = 'RAM', 346 local = False, big = True ) 337 347 338 348 ### global vsegs for external peripherals : non local / big page
Note: See TracChangeset
for help on using the changeset viewer.