Changeset 1029 for trunk/platforms/tsar_generic_leti/arch.py
- Timestamp:
- Jan 7, 2016, 4:16:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_leti/arch.py
r975 r1029 61 61 nb_ttys = 1, 62 62 fbf_width = 128, 63 ioc_type = 'HBA' ): 63 ioc_type = 'HBA', 64 mwr_type = 'CPY'): 64 65 65 66 ### define architecture constants … … 67 68 nb_nics = 1 68 69 nb_cmas = 2 69 x_io = x_size - 1 # LETI constraint70 y_io = y_size - 1 # LETI constraint70 x_io = 0 71 y_io = 0 71 72 x_width = 4 72 73 y_width = 4 … … 146 147 147 148 ### define ramdisk vseg / must be identity mapping in cluster[0][0] 148 ### occupies 1 5BPP after the boot149 ramdisk_vbase = 0x0 0200000149 ### occupies 16 BPP after the boot 150 ramdisk_vbase = 0x02000000 150 151 ramdisk_size = 0x02000000 # 32 Mbytes 151 152 … … 157 158 kernel_code_size = 0x00100000 # 1 Mbytes per cluster 158 159 159 kernel_init_vbase = 0x8 0100000160 kernel_init_vbase = 0x88000000 160 161 kernel_init_size = 0x00100000 # 1 Mbytes per cluster 161 162 … … 217 218 arg0 = 16, arg1 = 16, arg2 = 16 ) 218 219 219 mapping.addIrq( xcu, index = 8, src = mmc, isrtype = 'ISR_MMC' ) 220 mapping.addIrq( xcu, index = 8 , src = mmc, isrtype = 'ISR_MMC' ) 221 222 if ( x==0 ) and ( y==0 ): 223 tty = mapping.addPeriph( 'TTY', base = tty_base + offset, size = tty_size, 224 ptype = 'TTY', channels = nb_ttys ) 225 226 mapping.addIrq( xcu, index = 10, src = tty, 227 isrtype = 'ISR_TTY_RX', channel = 0 ) 220 228 221 229 for p in xrange ( nb_procs ): 222 230 mapping.addProc( x, y, p ) 223 231 224 ### external peripherals incluster_io225 if ( (x==x_io) and (y==y_io) ):232 ### peripherals in external cluster_io 233 if ( x_io!=0 ) and ( y_io!=0 ) and ( x==( x_size-1 ) ) and ( y==( y_size-1 ) ) : 226 234 227 235 if ( ioc_type != 'RDK' ): … … 261 269 isrtype = 'ISR_CMA', channel = 3 ) 262 270 263 if ( ioc_type == 'BDV' ): isr_type = 'ISR_BDV'264 elif ( ioc_type == 'HBA' ): isr_type = 'ISR_HBA'265 elif ( ioc_type == 'SDC' ): isr_type = 'ISR_SDC'266 267 271 if ( ioc_type != 'RDK' ): 272 if ( ioc_type == 'BDV' ): isr_type = 'ISR_BDV' 273 elif ( ioc_type == 'HBA' ): isr_type = 'ISR_HBA' 274 elif ( ioc_type == 'SDC' ): isr_type = 'ISR_SDC' 275 268 276 mapping.addIrq( pic, index = 8, src = ioc, 269 277 isrtype = isr_type, channel = 0 ) … … 316 324 ### identity mapping / non local / big pages 317 325 if (ioc_type == 'RDK'): 318 319 326 mapping.addGlobal( 'seg_ramdisk', ramdisk_vbase, ramdisk_size, 320 327 'C_W_', vtype = 'BUFFER', x = 0, y = 0, pseg = 'RAM', 321 328 identity = True, local = True, big = True ) 322 323 ### global vsegs kernel_code, kernel_init : local / big page324 ### replicated in all clusters containing processors325 ### same content => same name / same vbase326 for x in xrange( x_size ):327 for y in xrange( y_size - 1 ):328 329 mapping.addGlobal( 'seg_kernel_code',330 kernel_code_vbase, kernel_code_size,331 'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',332 binpath = 'build/kernel/kernel.elf',333 local = True, big = True )334 335 mapping.addGlobal( 'seg_kernel_init',336 kernel_init_vbase, kernel_init_size,337 'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM',338 binpath = 'build/kernel/kernel.elf',339 local = True, big = True )340 329 341 330 ### global vseg kernel_data: non local / big page … … 344 333 kernel_data_vbase, kernel_data_size, 345 334 'C_W_', vtype = 'ELF', x = 0, y = 0, pseg = 'RAM', 346 binpath = 'b uild/kernel/kernel.elf',335 binpath = 'bin/kernel/kernel.elf', 347 336 local = False, big = True ) 337 338 ### global vsegs kernel_code, kernel_init : local / big page 339 ### replicated in all clusters containing processors 340 ### same content => same name / same vbase 341 for x in xrange( x_size ): 342 for y in xrange( y_size - 1 ): 343 mapping.addGlobal( 'seg_kernel_code', 344 kernel_code_vbase, kernel_code_size, 345 'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM', 346 binpath = 'bin/kernel/kernel.elf', 347 local = True, big = True ) 348 349 mapping.addGlobal( 'seg_kernel_init', 350 kernel_init_vbase, kernel_init_size, 351 'CXW_', vtype = 'ELF', x = x, y = y, pseg = 'RAM', 352 binpath = 'bin/kernel/kernel.elf', 353 local = True, big = True ) 348 354 349 355 ### Global vsegs kernel_ptab_x_y: non local / big page … … 353 359 for y in xrange( y_size - 1 ): 354 360 offset = ((x << y_width) + y) * kernel_ptab_size 355 356 361 mapping.addGlobal( 'seg_kernel_ptab_%d_%d' %(x,y), 357 362 kernel_ptab_vbase + offset, kernel_ptab_size, … … 359 364 local = False, big = True ) 360 365 366 ### global vsegs kernel_sched : non local / small pages 367 ### allocated in all clusters containing processors 368 ### different content => name & vbase indexed by (x,y) 369 for x in xrange( x_size ): 370 for y in xrange( y_size - 1 ): 371 offset = ((x << y_width) + y) * kernel_ptab_size 372 mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y), 373 kernel_sched_vbase + offset , kernel_sched_size, 374 'C_W_', vtype = 'SCHED', x = x, y = y, pseg = 'RAM', 375 local = False, big = False ) 376 361 377 ### global vsegs kernel_heap_x_y : non local / big pages 362 378 ### distributed in all clusters containing processors … … 365 381 for y in xrange( y_size - 1 ): 366 382 offset = ((x << y_width) + y) * kernel_heap_size 367 368 383 mapping.addGlobal( 'seg_kernel_heap_%d_%d' %(x,y), 369 384 kernel_heap_vbase + offset , kernel_heap_size, … … 373 388 ### global vsegs for external peripherals: non local / big page 374 389 ### only mapped in cluster_io 375 mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size, 376 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'IOC', 377 local = False, big = True ) 390 if ioc_type != 'RDK': 391 mapping.addGlobal( 'seg_ioc', ioc_base, ioc_size, 392 '__W_', vtype = 'PERI', x = x_io, y = y_io, 393 pseg = 'IOC', local = False, big = True ) 378 394 379 395 mapping.addGlobal( 'seg_tty', tty_base, tty_size, 380 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'TTY', 381 local = False, big = True ) 382 383 mapping.addGlobal( 'seg_nic', nic_base, nic_size, 384 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'NIC', 385 local = False, big = True ) 386 387 mapping.addGlobal( 'seg_cma', cma_base, cma_size, 388 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'CMA', 389 local = False, big = True ) 390 391 mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size, 392 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'FBF', 393 local = False, big = True ) 394 395 mapping.addGlobal( 'seg_pic', pic_base, pic_size, 396 '__W_', vtype = 'PERI', x = x_io, y = y_io, pseg = 'PIC', 397 local = False, big = True ) 396 '__W_', vtype = 'PERI', x = x_io, y = y_io, 397 pseg = 'TTY', local = False, big = True ) 398 399 if ( x_io!=0 ) and ( y_io!=0 ) : 400 mapping.addGlobal( 'seg_nic', nic_base, nic_size, 401 '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1, 402 pseg = 'NIC', local = False, big = True ) 403 404 mapping.addGlobal( 'seg_cma', cma_base, cma_size, 405 '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1, 406 pseg = 'CMA', local = False, big = True ) 407 408 mapping.addGlobal( 'seg_fbf', fbf_base, fbf_size, 409 '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1, 410 pseg = 'FBF', local = False, big = True ) 411 412 mapping.addGlobal( 'seg_pic', pic_base, pic_size, 413 '__W_', vtype = 'PERI', x = x_size-1, y = y_size-1, 414 pseg = 'PIC', local = False, big = True ) 398 415 399 416 ### global vsegs for internal peripherals : non local / small pages … … 412 429 mmc_base + offset, mmc_size, 413 430 '__W_', vtype = 'PERI' , x = x , y = y , pseg = 'MMC', 414 local = False, big = False )415 416 ### global vsegs kernel_sched : non local / small pages417 ### allocated in all clusters containing processors418 ### different content => name & vbase indexed by (x,y)419 for x in xrange( x_size ):420 for y in xrange( y_size - 1 ):421 offset = ((x << y_width) + y) * kernel_ptab_size422 423 mapping.addGlobal( 'seg_kernel_sched_%d_%d' %(x,y),424 kernel_sched_vbase + offset , kernel_sched_size,425 'C_W_', vtype = 'SCHED', x = x, y = y, pseg = 'RAM',426 431 local = False, big = False ) 427 432
Note: See TracChangeset
for help on using the changeset viewer.