Changeset 966 for trunk/platforms
- Timestamp:
- Apr 6, 2015, 12:37:30 AM (10 years ago)
- Location:
- trunk/platforms/tsar_generic_iob
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_iob/arch.py
r965 r966 14 14 # (global vsegs). 15 15 # 16 # This platform includes 6external peripherals, accessible through an IOB16 # This platform includes 7 external peripherals, accessible through an IOB 17 17 # components located in cluster [0,0] or in cluster [x_size-1, y_size-1]. 18 # Available peripherals are: TTY, HBA, FBF, ROM, NIC, CMA, PIC.18 # Available peripherals are: TTY, IOC, FBF, ROM, NIC, CMA, PIC. 19 19 # 20 20 # All clusters contain (nb_procs) processors, one L2 cache, one XCU, and 21 21 # one DMA controller. 22 22 # 23 # The "constructor" parameters are:23 # The "constructor" parameters (defined in Makefile) are: 24 24 # - x_size : number of clusters in a row 25 25 # - y_size : number of clusters in a column … … 27 27 # - nb_ttys : number of TTY channels 28 28 # - fbf_width : frame_buffer width = frame_buffer heigth 29 # - ioc_type : can be 'BDV' , 'HBA' , 'SDC' , 'NONE'30 # 31 # The other hardware parameters are:29 # - ioc_type : can be 'BDV','HBA','SDC', but not 'RDK' 30 # 31 # The other hardware parameters (defined below) are: 32 32 # - nb_nics : number of NIC channels 33 33 # - nb_cmas : number of CMA channels … … 39 39 # - irq_per_proc : number of input IRQs per processor 40 40 # - use_ramdisk : use a ramdisk when True 41 # - vseg_increment : address increment for replicated peripherals41 # - vseg_increment : address increment for replicated vsegs 42 42 # 43 43 # Regarding the boot and kernel vsegs mapping : … … 71 71 p_width = 4 72 72 paddr_width = 40 73 irq_per_proc = 4 74 peri_increment = 0x10000 # distributed peripherals vbase address increment73 irq_per_proc = 4 # NetBSD constraint 74 peri_increment = 0x10000 75 75 76 76 ### parameters checking … … 89 89 ((x_io == x_size-1) and (y_io == y_size-1)) ) 90 90 91 assert( ioc_type in IOCSUBTYPES)91 assert( ioc_type in [ 'BDV' , 'HBA' , 'SDC' ] ) 92 92 93 93 ### define platform name -
trunk/platforms/tsar_generic_iob/top.cpp
r965 r966 3 3 // Author: Alain Greiner 4 4 // Copyright: UPMC/LIP6 5 // Date : august 2013 5 // Date : august 2013 / updated march 2015 6 6 // This program is released under the GNU public license 7 7 /////////////////////////////////////////////////////////////////////////////// … … 18 18 // 19 19 // This I/0 bus is connected to internal address space through two IOB bridges 20 // located in cluster[0][0] and cluster[X_SIZE-1][ Åž_SIZE-1].20 // located in cluster[0][0] and cluster[X_SIZE-1][Y_SIZE-1]. 21 21 // 22 22 // The internal physical address space is 40 bits, and the cluster index … … 78 78 // 79 79 // The main hardware parameters must be defined in the hard_config.h file : 80 // - X_WIDTH : number of bits for x cluster coordinate 81 // - Y_WIDTH : number of bits for y cluster coordinate 82 // - P_WIDTH : number of bits for local processor coordinate 80 83 // - X_SIZE : number of clusters in a row 81 84 // - Y_SIZE : number of clusters in a column … … 91 94 // - XCU_NB_WTI : number of XCU WTIs (>= 4*NB_PROCS_MAX) 92 95 // - XCU_NB_OUT : number of XCU output IRQs (>= 4*NB_PROCS_MAX) 96 // - USE_IOC_XYZ : IOC type (XYZ in HBA / BDV / SDC) 93 97 // 94 // Some secondaryhardware parameters must be defined in this top.cpp file:98 // Some other hardware parameters must be defined in this top.cpp file: 95 99 // - XRAM_LATENCY : external ram latency 96 100 // - MEMC_WAYS : L2 cache number of ways … … 319 323 size_t ncycles = 4000000000; // simulated cycles 320 324 char disk_name[256] = DISK_IMAGE_NAME; // pathname: disk image 321 ssize_t threads _nr= 1; // simulator's threads number325 ssize_t threads = 1; // simulator's threads number 322 326 bool debug_ok = false; // trace activated 323 327 size_t debug_memc_id = 0xFFFFFFFF; // index of traced memc … … 353 357 { 354 358 ncycles = atoi(argv[n+1]); 355 }356 else if ((strcmp(argv[n],"-ROM") == 0) && (n+1<argc) )357 {358 strcpy(soft_name, argv[n+1]);359 359 } 360 360 else if ((strcmp(argv[n],"-DEBUG") == 0) && (n+1<argc) ) … … 374 374 if( (x>=XMAX) || (y>=YMAX) ) 375 375 { 376 std::cout << "MEMCID parameter does 'nt fit XMAX/YMAX" << std::endl;376 std::cout << "MEMCID parameter doesn't fit XMAX/YMAX" << std::endl; 377 377 std::cout << " - MEMCID = " << std::hex << debug_memc_id << std::endl; 378 378 std::cout << " - XMAX = " << std::hex << XMAX << std::endl; … … 413 413 else if ((strcmp(argv[n], "-THREADS") == 0) && ((n+1) < argc)) 414 414 { 415 threads _nr= atoi(argv[n+1]);416 threads _nr = (threads_nr < 1) ? 1 : threads_nr;415 threads = atoi(argv[n+1]); 416 threads = (threads < 1) ? 1 : threads; 417 417 } 418 418 else if ((strcmp(argv[n], "-FROZEN") == 0) && (n+1 < argc)) … … 425 425 std::cout << " The order is not important." << std::endl; 426 426 std::cout << " Accepted arguments are :" << std::endl << std::endl; 427 std::cout << " - ROM pathname_for_embedded_soft" << std::endl;428 std::cout << " - DISK pathname_for_disk_image" << std::endl;429 427 std::cout << " - NCYCLES number_of_simulated_cycles" << std::endl; 430 428 std::cout << " - DEBUG debug_start_cycle" << std::endl; … … 432 430 std::cout << " - FROZEN max_number_of_lines" << std::endl; 433 431 std::cout << " - MEMCID index_memc_to_be_traced" << std::endl; 434 std::cout << " - XRAMID index_xram_to_be_traced" << std::endl;435 432 std::cout << " - PROCID index_proc_to_be_traced" << std::endl; 436 433 std::cout << " - IOB non_zero_value" << std::endl; … … 473 470 assert( (NB_CMA_CHANNELS <= 4) and 474 471 "The NB_CMA_CHANNELS parameter cannot be larger than 4" ); 472 473 assert( (X_WIDTH == 4) and (Y_WIDTH == 4) and 474 "You must have X_WIDTH == Y_WIDTH == 4"); 475 475 476 476 std::cout << std::endl << std::dec … … 487 487 << " - MAX_FROZEN = " << frozen_cycles << std::endl 488 488 << " - NCYCLES = " << ncycles << std::endl 489 << " - SOFT_FILENAME = " << soft_name << std::endl 490 << " - DISK_IMAGENAME = " << disk_name << std::endl 491 << " - OPENMP THREADS = " << threads << std::endl 489 492 << " - DEBUG_PROCID = " << debug_proc_id << std::endl 490 493 << " - DEBUG_MEMCID = " << debug_memc_id << std::endl … … 495 498 #if USING_OPENMP 496 499 omp_set_dynamic(false); 497 omp_set_num_threads(threads _nr);500 omp_set_num_threads(threads); 498 501 std::cerr << "Built with openmp version " << _OPENMP << std::endl; 499 502 #endif … … 958 961 959 962 #if ( USE_IOC_HBA ) 963 960 964 VciMultiAhci<vci_param_ext>* disk; 961 965 disk = new VciMultiAhci<vci_param_ext>( "disk", … … 967 971 64, // burst size (bytes) 968 972 0 ); // disk latency 969 #elif ( USE_IOC_BDV ) 973 #elif ( USE_IOC_BDV or USE_IOC_SDC ) 974 970 975 VciBlockDeviceTsar<vci_param_ext>* disk; 971 976 disk = new VciBlockDeviceTsar<vci_param_ext>( "disk", … … 977 982 64, // burst size (bytes) 978 983 0 ); // disk latency 979 #else980 std::cout << "Error in tsar_generic_iob : only HBA & BDV are supported" << std::endl;981 exit(0);982 984 #endif 983 985
Note: See TracChangeset
for help on using the changeset viewer.