Changeset 938 for trunk/platforms/tsar_generic_iob/top.cpp
- Timestamp:
- Feb 8, 2015, 9:38:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/platforms/tsar_generic_iob/top.cpp
r914 r938 6 6 // This program is released under the GNU public license 7 7 /////////////////////////////////////////////////////////////////////////////// 8 // This file define a generic TSAR architecture with an IO network emulating9 // an external bus (i.e. Hypertransport)to access 7 external peripherals:8 // This file define a generic TSAR architecture with an external IO network 9 // emulating a PCI or Hypertransport I/O bus to access 7 external peripherals: 10 10 // 11 11 // - BROM : boot ROM … … 17 17 // - IOPI : HWI to SWI translator. 18 18 // 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]. 21 // 19 22 // The internal physical address space is 40 bits, and the cluster index 20 23 // is defined by the 8 MSB bits, using a fixed format: X is encoded on 4 bits, 21 // Y is encode son 4 bits, whatever the actual mesh size.24 // Y is encoded on 4 bits, whatever the actual mesh size. 22 25 // => at most 16 * 16 clusters. Each cluster contains up to 4 processors. 23 26 // … … 95 98 // - L1_DSETS 96 99 // - BDEV_IMAGE_NAME : file pathname for block device 97 // - NIC_TIMEOUT : max number of cycles before closing a container98 100 // 99 101 // General policy for 40 bits physical address decoding: … … 207 209 #define BDEV_IMAGE_NAME "../../../giet_vm/hdd/virt_hdd.dmg" 208 210 209 #define NIC_TIMEOUT 10000211 #define ROM_SOFT_NAME "../../softs/tsar_boot/preloader.elf" 210 212 211 213 #define NORTH 0 … … 215 217 216 218 #define cluster(x,y) ((y) + ((x) << 4)) 217 218 ////////////////////////////////////////////////////////////219 // Software to be loaded in ROM & RAM220 //////////////////////i/////////////////////////////////////221 222 #define BOOT_SOFT_NAME "../../softs/tsar_boot/preloader.elf"223 219 224 220 //////////////////////////////////////////////////////////// … … 318 314 319 315 320 char soft_name[256] = BOOT_SOFT_NAME;// pathname: binary code321 size_t ncycles = 4000000000; 322 char disk_name[256] = BDEV_IMAGE_NAME; 323 ssize_t threads_nr = 1; 324 bool debug_ok = false; 325 size_t debug_memc_id = 0xFFFFFFFF; 326 size_t debug_proc_id = 0xFFFFFFFF; 327 size_t debug_xram_id = 0xFFFFFFFF; 328 bool debug_iob = false; 329 uint32_t debug_from = 0; 330 uint32_t frozen_cycles = MAX_FROZEN_CYCLES; 331 size_t cluster_iob0 = cluster(0,0); 332 size_t cluster_iob1 = cluster(XMAX-1,YMAX-1); 333 size_t x_width = X_WIDTH; 334 size_t y_width = Y_WIDTH; 335 size_t p_width = P_WIDTH; 316 char soft_name[256] = ROM_SOFT_NAME; // pathname: binary code 317 size_t ncycles = 4000000000; // simulated cycles 318 char disk_name[256] = BDEV_IMAGE_NAME; // pathname: disk image 319 ssize_t threads_nr = 1; // simulator's threads number 320 bool debug_ok = false; // trace activated 321 size_t debug_memc_id = 0xFFFFFFFF; // index of traced memc 322 size_t debug_proc_id = 0xFFFFFFFF; // index of traced proc 323 size_t debug_xram_id = 0xFFFFFFFF; // index of traced xram 324 bool debug_iob = false; // trace iob0 & iob1 when true 325 uint32_t debug_from = 0; // trace start cycle 326 uint32_t frozen_cycles = MAX_FROZEN_CYCLES; // monitoring frozen processor 327 size_t cluster_iob0 = cluster(0,0); // cluster containing IOB0 328 size_t cluster_iob1 = cluster(XMAX-1,YMAX-1); // cluster containing IOB1 329 size_t x_width = X_WIDTH; // # of bits for x 330 size_t y_width = Y_WIDTH; // # of bits for y 331 size_t p_width = P_WIDTH; // # of bits for lpid 336 332 337 333 #if USING_OPENMP … … 356 352 ncycles = atoi(argv[n+1]); 357 353 } 358 else if ((strcmp(argv[n],"- SOFT") == 0) && (n+1<argc) )354 else if ((strcmp(argv[n],"-ROM") == 0) && (n+1<argc) ) 359 355 { 360 356 strcpy(soft_name, argv[n+1]); … … 427 423 std::cout << " The order is not important." << std::endl; 428 424 std::cout << " Accepted arguments are :" << std::endl << std::endl; 429 std::cout << " - SOFTpathname_for_embedded_soft" << std::endl;430 std::cout << " - DISK pathname_for_disk_image" << std::endl;431 std::cout << " - NCYCLES number_of_simulated_cycles" << std::endl;432 std::cout << " - DEBUG debug_start_cycle" << std::endl;433 std::cout << " - THREADS simulator's threads number" << std::endl;434 std::cout << " - FROZEN max_number_of_lines" << std::endl;435 std::cout << " - MEMCID index_memc_to_be_traced" << std::endl;436 std::cout << " - XRAMID index_xram_to_be_traced" << std::endl;437 std::cout << " - PROCID index_proc_to_be_traced" << std::endl;438 std::cout << " - IOB non_zero_value" << std::endl;425 std::cout << " - ROM pathname_for_embedded_soft" << std::endl; 426 std::cout << " - DISK pathname_for_disk_image" << std::endl; 427 std::cout << " - NCYCLES number_of_simulated_cycles" << std::endl; 428 std::cout << " - DEBUG debug_start_cycle" << std::endl; 429 std::cout << " - THREADS simulator's threads number" << std::endl; 430 std::cout << " - FROZEN max_number_of_lines" << std::endl; 431 std::cout << " - MEMCID index_memc_to_be_traced" << std::endl; 432 std::cout << " - XRAMID index_xram_to_be_traced" << std::endl; 433 std::cout << " - PROCID index_proc_to_be_traced" << std::endl; 434 std::cout << " - IOB non_zero_value" << std::endl; 439 435 exit(0); 440 436 }
Note: See TracChangeset
for help on using the changeset viewer.