Changeset 1029 for trunk/platforms/tsar_generic_leti
- Timestamp:
- Jan 7, 2016, 4:16:03 PM (9 years ago)
- Location:
- trunk/platforms/tsar_generic_leti
- Files:
-
- 4 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 -
trunk/platforms/tsar_generic_leti/top.cpp
r1004 r1029 159 159 #define L1_DSETS 64 160 160 161 #define DISK_IMAGE_NAME " ../../../giet_vm/hdd/virt_hdd.dmg"161 #define DISK_IMAGE_NAME "virt_hdd.dmg" 162 162 163 163 #define ROM_SOFT_NAME "../../softs/tsar_boot/preloader.elf" … … 690 690 MTTY_TGTID, 691 691 DISK_TGTID, 692 (USE_IOC_RDK == 1), 692 693 disk_name, 693 694 MEMC_WAYS, … … 873 874 874 875 // disk 876 #if ( USE_IOC_HBA or USE_IOC_BDV or USE_IOC_SDC ) 875 877 disk->p_clk (signal_clk); 876 878 disk->p_resetn (signal_resetn); … … 884 886 885 887 std::cout << " - DISK connected" << std::endl; 888 #endif 886 889 887 890 // frame_buffer … … 1289 1292 // clusters[1][1]->router_m2p->print_trace(); 1290 1293 1294 #if ( USE_IOC_HBA or USE_IOC_BDV or USE_IOC_SDC ) 1291 1295 #if USE_PIC 1292 1296 // trace external ioc … … 1306 1310 clusters[0][0]->signal_vci_tgt_disk.print_trace("[SIG]DISK_0_0"); 1307 1311 clusters[0][0]->signal_vci_ini_disk.print_trace("[SIG]DISK_0_0"); 1312 #endif 1308 1313 #endif 1309 1314 -
trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/include/tsar_leti_cluster.h
r803 r1029 171 171 size_t tgtid_mtty, 172 172 size_t tgtid_bdev, 173 bool use_ramdisk, 173 174 const char* disk_pathname, 174 175 size_t memc_ways, -
trunk/platforms/tsar_generic_leti/tsar_leti_cluster/caba/source/src/tsar_leti_cluster.cpp
r803 r1029 37 37 size_t tgtid_mtty, 38 38 size_t tgtid_bdev, 39 bool use_ramdisk, 39 40 const char* disk_pathname, 40 41 size_t memc_ways, … … 170 171 if ((x_id == 0) and (y_id == 0)) // cluster(0,0) 171 172 { 172 nb_initiators = nb_procs + 1; 173 nb_targets = 4; 173 nb_targets++; // TTY 174 175 if (not use_ramdisk) 176 { 177 nb_initiators++; 178 nb_targets++; 179 } 174 180 } 175 181 … … 291 297 if ((x_id == 0) and (y_id == 0)) 292 298 { 293 ///////////////////////////////////////////// 294 bdev = new VciBlockDeviceTsar<vci_param_int>( 295 "bdev", 296 mtd, 297 IntTab(cluster_xy, nb_procs), 298 IntTab(cluster_xy, tgtid_bdev), 299 disk_pathname, 300 512, 301 64 ); // burst size 299 if (not use_ramdisk) 300 { 301 ///////////////////////////////////////////// 302 bdev = new VciBlockDeviceTsar<vci_param_int>( 303 "bdev", 304 mtd, 305 IntTab(cluster_xy, nb_procs), 306 IntTab(cluster_xy, tgtid_bdev), 307 disk_pathname, 308 512, 309 64 ); // burst size 310 } 302 311 303 312 ///////////////////////////////////////////// … … 378 387 { 379 388 xbar_cmd->p_to_target[tgtid_mtty] (signal_vci_tgt_mtty); 380 xbar_cmd->p_to_target[tgtid_bdev] (signal_vci_tgt_bdev); 381 xbar_cmd->p_to_initiator[nb_procs] (signal_vci_ini_bdev); 389 390 if (not use_ramdisk) 391 { 392 xbar_cmd->p_to_target[tgtid_bdev] (signal_vci_tgt_bdev); 393 xbar_cmd->p_to_initiator[nb_procs] (signal_vci_ini_bdev); 394 } 382 395 } 383 396 … … 462 475 if ((x_id == 0) and (y_id == 0)) // cluster (0,0) 463 476 { 464 if (i == 8) xicu->p_hwi[i] (signal_irq_memc);465 else if (i == 9 )xicu->p_hwi[i] (signal_irq_bdev);466 else if (i == 10) xicu->p_hwi[i] (signal_irq_mtty);467 else xicu->p_hwi[i] (signal_false);477 if (i == 8) xicu->p_hwi[i] (signal_irq_memc); 478 else if (i == 9 and not use_ramdisk) xicu->p_hwi[i] (signal_irq_bdev); 479 else if (i == 10) xicu->p_hwi[i] (signal_irq_mtty); 480 else xicu->p_hwi[i] (signal_false); 468 481 } 469 482 else // other clusters … … 499 512 if ((x_id == 0) and (y_id == 0)) 500 513 { 501 // BDEV 502 bdev->p_clk (this->p_clk); 503 bdev->p_resetn (this->p_resetn); 504 bdev->p_irq (signal_irq_bdev); 505 bdev->p_vci_target (signal_vci_tgt_bdev); 506 bdev->p_vci_initiator (signal_vci_ini_bdev); 507 508 std::cout << " - BDEV connected" << std::endl; 514 if (not use_ramdisk) 515 { 516 // BDEV 517 bdev->p_clk (this->p_clk); 518 bdev->p_resetn (this->p_resetn); 519 bdev->p_irq (signal_irq_bdev); 520 bdev->p_vci_target (signal_vci_tgt_bdev); 521 bdev->p_vci_initiator (signal_vci_ini_bdev); 522 523 std::cout << " - BDEV connected" << std::endl; 524 } 509 525 510 526 // MTTY (single channel)
Note: See TracChangeset
for help on using the changeset viewer.